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

public boolean isRunBinaryAndScriptAllowed()
                                    throws SDKException

Returns a boolean indicating whether this deployment allows running binary programs and scripts.

Returns:
true if running binary programs and scripts is allowed, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setRunBinaryAndScriptAllowed

public void setRunBinaryAndScriptAllowed(boolean allowed)
                                  throws SDKException

Sets whether this deployment allows running binary programs and scripts.

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

public boolean isRunJavaAllowed()
                         throws SDKException

Returns a boolean indicating whether this deployment allows running Java programs.

Returns:
true if running Java programs is allowed, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setRunJavaAllowed

public void setRunJavaAllowed(boolean allowed)
                       throws SDKException

Sets whether this deployment allows running Java programs.

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

isJavaImpersonationUsed

public boolean isJavaImpersonationUsed()
                                throws SDKException

Returns a boolean indicating whether this deployment uses impersonation for Java programs.

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

setJavaImpersonationUsed

public void setJavaImpersonationUsed(boolean used)
                              throws SDKException

Sets whether this deployment uses impersonation for Java programs.

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

isGlobalCredentialsEnabled

public boolean isGlobalCredentialsEnabled()
                                   throws SDKException

Returns a boolean indicating whether global credentials are enabled if credentials are not specified at schedule time for individual programs.

Returns:
true if global credentials are enabled, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setGlobalCredentialsEnabled

public void setGlobalCredentialsEnabled(boolean enabled)
                                 throws SDKException

Sets whether global credentials are enabled if credentials are not specified at schedule time for individual programs.

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

public java.lang.String getUserName()
                             throws SDKException

Returns the user name for global credential. This value is in effect only if global credentials are enabled.

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

setUserName

public 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.

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

setPassword

public 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.

Throws:
SDKException - This is thrown if the process is unsuccessful.

isPasswordSet

public 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.

isPasswordNotEmpty

public 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.