|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IScriptProgram
This interface provides functionality which allows you to use a script program within the BusinessObjects Enterprise framework. This program can be used for any number of different tasks, such as deleting all instances owned by a particular user.
Script programs can be published to BusinessObjects Enterprise and scheduled to run at specific intervals. Once a script has been published and scheduled to BusinessObjects Enterprise, at the scheduled interval, the Program Job Server logs into the Central Management Server (CMS) using a logon token, and retrieves an InfoStore and EnterpriseSession instance. This information is stored in global properties, InfoStore and Session, respectively. Both of these properties are automatically present within a running Script program. This process ensures that a Script program can conveniently execute against a BusinessObjects Enterprise system.
The following global properties belong to each IScriptProgram object:
The following example uses the aforementioned global properties and object to retrieve the CMS name and all of the arguments that were set for the program:
Script.Writeln ("Output from a script program.\n");
Script.Writeln("Should be logged on with the logon token.\n");
Script.Writeln("The CMS is " + Session.CMSName);
var args = Script.Args.toArray();
Script.Writeln("Returned " + args.length + "args:");
var i;
for(i=0; i<args.length; i++){
Script.Writeln("args " + i + "=" + args[i]);
}
Script.Writeln("Finished");
Note: Script programs are required to use impersonation as a form of additional security. Impersonation is a form of delegation which authorizes another principle to use its identity with restricted privileges. For more information see the IProgramGlobal interface.
| Method Summary | |
|---|---|
java.lang.String |
getArgs()
Returns the program arguments for this script program object. |
java.lang.String |
getFileName()
Returns the name of file to be processed. |
java.lang.String |
getUserName()
Returns the user name for the system that this object will run on. |
java.lang.String |
getWorkingDir()
Returns the working directory of this script program object. |
boolean |
isPasswordNotEmpty()
Returns a boolean that indicates whether the password is set and not empty. |
boolean |
isPasswordSet()
Returns a boolean that indicates whether the password is set. |
void |
setArgs(java.lang.String newArgs)
Sets the program arguments for this script program object. |
void |
setFile(java.lang.String filePath)
Sets the file to be processed. |
void |
setPassword(java.lang.String password)
Sets the users's password for the system that this object will run on. |
void |
setUserName(java.lang.String userName)
Sets the user name for the system that this object will run on. |
void |
setWorkingDir(java.lang.String workingDir)
Sets the working directory of this script program object. |
| Method Detail |
|---|
void setFile(java.lang.String filePath)
throws SDKException
Sets the file to be processed.
filePath - A String specifying the location of the file to be processed.
SDKException
java.lang.String getFileName()
throws SDKException
Returns the name of file to be processed.
String containing the name of the file to be processed.
SDKException - This is thrown if the process is unsuccessful.void setArgs(java.lang.String newArgs)
Sets the program arguments for this script program object.
newArgs - A String specifying the program arguments.java.lang.String getArgs()
Returns the program arguments for this script program object.
String containing the program arguments.java.lang.String getWorkingDir()
Returns the working directory of this script program object.
String containing the working directory.void setWorkingDir(java.lang.String workingDir)
Sets the working directory of this script program object.
workingDir - A String specifying the working directory.java.lang.String getUserName()
Returns the user name for the system that this object will run on.
String containing the username.void setUserName(java.lang.String userName)
Sets the user name for the system that this object will run on.
userName - A String specifying the user name.void setPassword(java.lang.String password)
Sets the users's password for the system that this object will run on.
password - A String specifying the user's password.
boolean isPasswordSet()
throws SDKException
Returns a boolean that indicates whether the password is set.
Note: the password can be set and contain an empty field.
true if the password is set, and false otherwise.
SDKException - This is thrown if the process is unsuccessful.
boolean isPasswordNotEmpty()
throws SDKException
Returns a boolean that indicates whether the password is set and not empty.
true if the password is set and not empty, and false otherwise.
SDKException - This is thrown if the process is unsuccessful.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||