com.crystaldecisions.sdk.plugin.desktop.program
Interface IProgramGlobal


public interface IProgramGlobal

This interface is used to set what type of program object is available for deployment. In addition it provides security tools minimizing the possibility of malicious users exploiting the program plugin feature. In order to minimize this risk, impersonation is required when running both Binary and Script programs. Impersonation is a form of delegation which authorizes another principle to use its identity with restricted privileges. For example, when the Program Job Server uses impersonation credentials to login, all scheduled program objects will execute on the machine running the Program Job Server as if the user (whose credentials were provided) logged in and started the program. Without impersonation, this program object will have the same rights and privileges as the user account running the Program Job Server.

A Java policy file is used with a Java program to limit its privilege scope. The policy file is always applied when a Java program is executed, regardless of whether Java impersonation is enabled. This file is installed on each server running the Program Job Server. This file cannot be customized through the SDK. Only the administrator has rights to edit the policy file.

Java impersonation is optional when working with Java programs. However, this type of additional control can be applied to all users running a Java program by setting the setGlobalCredentialsEnabled() method and setJavaImpersonationUsed() method to true.


Method Summary
 java.lang.String getUserName()
          Returns the user name for global credential.
 boolean isGlobalCredentialsEnabled()
          Returns a boolean indicating whether global credentials are enabled if credentials are not specified at schedule time for individual programs.
 boolean isJavaImpersonationUsed()
           Returns a boolean indicating whether this deployment uses impersonation for Java programs.
 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.
 boolean isRunBinaryAndScriptAllowed()
           Returns a boolean indicating whether this deployment allows running binary programs and scripts.
 boolean isRunJavaAllowed()
           Returns a boolean indicating whether this deployment allows running Java programs.
 void setGlobalCredentialsEnabled(boolean enabled)
           Sets whether global credentials are enabled if credentials are not specified at schedule time for individual programs.
 void setJavaImpersonationUsed(boolean used)
           Sets whether this deployment uses impersonation for Java programs.
 void setPassword(java.lang.String password)
           Sets the password for global credentials.
 void setRunBinaryAndScriptAllowed(boolean allowed)
           Sets whether this deployment allows running binary programs and scripts.
 void setRunJavaAllowed(boolean allowed)
           Sets whether this deployment allows running Java programs.
 void setUserName(java.lang.String name)
           Sets the user name for global credentials.
 

Method Detail

isRunBinaryAndScriptAllowed

boolean isRunBinaryAndScriptAllowed()
                                    throws SDKException

Returns a boolean indicating whether this deployment allows running binary programs and scripts. This method can only be invoked on the Program plugin.

Returns:
true if running binary programs and scripts is allowed, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_BINARY_SCRIPT_ALLOWED

setRunBinaryAndScriptAllowed

void setRunBinaryAndScriptAllowed(boolean allowed)
                                  throws SDKException

Sets whether this deployment allows running binary programs and scripts. This method can only be invoked on the Program plugin.

Parameters:
allowed - A boolean specifying whether this deployment allows running binary programs and scripts. A true value indicates that running binary programs and scripts is allowed, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.

isRunJavaAllowed

boolean isRunJavaAllowed()
                         throws SDKException

Returns a boolean indicating whether this deployment allows running Java programs. This method can only be invoked on the Program plugin.

Returns:
true if running Java programs is allowed, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_JAVA_ALLOWED

setRunJavaAllowed

void setRunJavaAllowed(boolean allowed)
                       throws SDKException

Sets whether this deployment allows running Java programs. This method can only be invoked on the Program plugin.

Parameters:
allowed - A boolean specifying whether this deployment allows running java programs.
Throws:
SDKException - This is thrown if the process is unsuccessful.

isJavaImpersonationUsed

boolean isJavaImpersonationUsed()
                                throws SDKException

Returns a boolean indicating whether this deployment uses impersonation for Java programs. This method can only be invoked on the Program plugin.

Returns:
true if impersonation is used for Java programs, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_JAVA_IMPERSONATE

setJavaImpersonationUsed

void setJavaImpersonationUsed(boolean used)
                              throws SDKException

Sets whether this deployment uses impersonation for Java programs. This method can only be invoked on the Program plugin.

Parameters:
used - A boolean specifying whether this deployment uses impersonation for Java programs.
Throws:
SDKException - This is thrown if the process is unsuccessful.

isGlobalCredentialsEnabled

boolean isGlobalCredentialsEnabled()
                                   throws SDKException

Returns a boolean indicating whether global credentials are enabled if credentials are not specified at schedule time for individual programs. This method can only be invoked on the Program plugin.

Returns:
true if global credentials are enabled, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_ENABLED

setGlobalCredentialsEnabled

void setGlobalCredentialsEnabled(boolean enabled)
                                 throws SDKException

Sets whether global credentials are enabled if credentials are not specified at schedule time for individual programs. This method can only be invoked on the Program plugin.

Parameters:
enabled - A boolean specifying whether global credentials are enabled if credentials are not specified at schedule time for individual programs.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getUserName

java.lang.String getUserName()
                             throws SDKException

Returns the user name for global credential. This value is in effect only if global credentials are enabled. This method can only be invoked on the Program plugin.

Returns:
A String indicating the user name for global credential.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_USER

setUserName

void setUserName(java.lang.String name)
                 throws SDKException

Sets the user name for global credentials. This value is in effect only if global credentials are enabled. This method can only be invoked on the Program plugin.

Parameters:
name - A String specifying the user name.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setPassword

void setPassword(java.lang.String password)
                 throws SDKException

Sets the password for global credentials. This value is in effect only if global credentials are enabled. This method can only be invoked on the Program plugin.

Parameters:
password - A String specifying the password.
Throws:
SDKException - This is thrown if the process is unsuccessful.

isPasswordSet

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.

Returns:
true if the password is set, and false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_CRED_KEY

isPasswordNotEmpty

boolean isPasswordNotEmpty()
                           throws SDKException

Returns a boolean that indicates whether the password is set and not empty.

Returns:
true if the password is set and not empty, and false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_CRED_KEY