com.tivoli.pd.jadmin
Class PDAdmin

java.lang.Object
  |
  +--com.tivoli.pd.jadmin.PDAdmin

public final class PDAdmin
extends java.lang.Object

Utility class used to perform initialization and shut down operations needed by the Tivoli Access Manager Administration Java component classes.

Certain default values used in initialization can be overridden by specifying properties. The supported properties keys have names in the form PDADMIN_XXX_PROPERTY and are defined in this class. The properties can be specified on the command line through Java's -D flag or can be passed in to the initialize(String, Properties, PDMessages) method through the Properties argument.


Field Summary
static java.lang.String AZN_PLUGINSTAT_ATTR
          Attribute containing the status returned from the execution of a method within a Tivoli Access Manager Administration Service plugin shared library.
static java.lang.String AZN_RESULTS_ATTR
          Attribute containing the results returned from the execution of a method within a Tivoli Access Manager Administration Service plugin shared library.
static com.tivoli.pd.jras.pdjlog.PDJMessageLogger msgLog
           
static java.lang.String PDADMIN_PDJLOGCFG_PROPERTY
          These constants are externalized constants that are used in support of more than one PDAdmin class
static com.tivoli.pd.jras.pdjlog.PDJTraceLogger trcLog
           
 
Method Summary
static java.lang.String getProgramName()
          Returns the program name used to initialize this component.
static void initialize(java.lang.String progName, PDMessages messages)
          Performs initialization needed by the Tivoli Access Manager Administration Java classes.
static void initialize(java.lang.String progName, java.util.Properties properties, PDMessages messages)
          Performs initialization needed by the Tivoli Access Manager Administration Java classes.
static boolean isInited()
          Indicates whether this component has been initialized or not.
static void shutdown(PDMessages messages)
          Performs shut down needed by the Tivoli Access Manager Administration Java classes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trcLog

public static com.tivoli.pd.jras.pdjlog.PDJTraceLogger trcLog

msgLog

public static com.tivoli.pd.jras.pdjlog.PDJMessageLogger msgLog

PDADMIN_PDJLOGCFG_PROPERTY

public static final java.lang.String PDADMIN_PDJLOGCFG_PROPERTY
These constants are externalized constants that are used in support of more than one PDAdmin class

AZN_RESULTS_ATTR

public static final java.lang.String AZN_RESULTS_ATTR
Attribute containing the results returned from the execution of a method within a Tivoli Access Manager Administration Service plugin shared library. This is one of the attributes that might be populated into the PDAttrs "outData" parameter in methods that involve calls to Tivoli Access Manager Administration Services.

AZN_PLUGINSTAT_ATTR

public static final java.lang.String AZN_PLUGINSTAT_ATTR
Attribute containing the status returned from the execution of a method within a Tivoli Access Manager Administration Service plugin shared library. This is one of the attributes that might be populated into the PDAttrs "outData" parameter in methods that involve calls to Tivoli Access Manager Administration Services.
Method Detail

initialize

public static void initialize(java.lang.String progName,
                              java.util.Properties properties,
                              PDMessages messages)
                       throws PDException
Performs initialization needed by the Tivoli Access Manager Administration Java classes. Call this method before using any of the Administration classes. This method can be called multiple times, an initialization value specified for one invocation will override the value set on a previous invocation. Any call after the first will return a warning message in the messages argument to indicate a previous initialization. Any returned warning messages or exception text is translated into the default locale.

Every call to this method must be coupled with a call to shutdown so that the necessary cleanup can take place.

This method requires the javax.security.auth.AuthPermission("PDAdmin") permission.

Parameters:
progName - the program name that will appear in trace and message logs for the Tivoli Access Manager Administration Java classes.
properties - a Properties object that contains key/value pairs used for initialization operations. Supported keys are PDADMIN_*_PROPERTY constants defined in this class. Cannot be null.
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output.
Throws:
PDException - if the component cannot be initialized properly. In exception cases, the component is not initialized and the reference count is not incremented; therefore shut down should not be called. This exception might contain error and message codes defined in the product Error Message Reference document.

initialize

public static void initialize(java.lang.String progName,
                              PDMessages messages)
                       throws PDException
Performs initialization needed by the Tivoli Access Manager Administration Java classes. Call this method before using any of the Administration classes. This method can be called multiple times, but only the first invocation executes initialization operations. Subsequent calls will only change the program name. Subsequent calls will also return a warning message in the messages argument to indicate a previous initialization. Any returned warning messages or exception text is translated into the default locale.

Every call to this method must be coupled with a call to shutdown so that the necessary cleanup can take place.

This method requires the javax.security.auth.AuthPermission("PDAdmin") permission.

Parameters:
progName - the program name that will appear in trace and message logs for the Tivoli Access Manager Administration Java classes.
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output.
Throws:
PDException - if the component cannot be initialized properly. In exception cases, the component is not initialized and the reference count is not incremented; therefore shut down should not be called. This exception might contain error and message codes defined in the product Error Message Reference document.

shutdown

public static void shutdown(PDMessages messages)
                     throws PDException
Performs shut down needed by the Tivoli Access Manager Administration Java classes. Currently, re-initialization after shut down is not supported, and once shut down has been executed, the Administration classes should no longer be used. This method can be called multiple times, but the actual shut down operations are executed only when the number of shutdown invocations equals the number of initialize invocations. On calls that do not execute shut down operations, a warning message is returned in the messages argument. Any returned warning messages or exception text is translated into the default locale.

This method requires the javax.security.auth.AuthPermission("PDAdmin") permission.

Parameters:
messages - in/out parameter; empty PDMessages on input; might contain zero or more informational or warning messages on output.
Throws:
PDException - if the component cannot be shut down properly. This exception might contain error and message codes defined in the product Error Message Reference document.

isInited

public static boolean isInited()
Indicates whether this component has been initialized or not. The initialize method can be called multiple times, but only the first invocation will actually cause intialization operations to take place.

All callers of initialize must call shutdown so that the necessary cleanup can take place.

Returns:
true, if this component has been initialized and has not been shut down; false, if this component has not been initialized, or has been shut down.

getProgramName

public static java.lang.String getProgramName()
Returns the program name used to initialize this component. This program name will appear in message and trace output generated by the component. Null is returned if the component is not initialized.