com.hyperion.css
Class CSSSystem

java.lang.Object
  extended bycom.hyperion.css.CSSSystem

public class CSSSystem
extends java.lang.Object

This is a class designed for providing access to the security platform and the various components. This is responsible to initialize the css system thru registry or the specified configuration url.

This is a Singleton class and is guaranteed to return the same instance in any given JVM once initialized.

Provides handle to the CSSAPIIF, CSSDirectoryManagementIF and CSSUserProvisioningIF implementations

Sample use of the application:


    Map context = new HashMap(5);
    context.put(CSSAPIIF.LOCALE, new Locale("en", "US"));	  
    String logPath = "C:/Hyperion/logs/";
    
    CSSSystem instance = CSSSystem.getInstance(context, logPath);
    CSSAPIIF css = instance.getCSSAPI();

    // Host information (IP address/Host Name) is required for Auditing.
    context.put(CSSAPIIF.HOST_INFO, "ajoseph.hyperion.com");
 
    try
    {
    	context.put(CSSAPIIF.LOGIN_NAME, "gkhanna");
    	context.put(CSSAPIIF.PASSWORD, "password");

      CSSUserIF user = css.authenticate(context);
    }
    catch (CSSTokenNotAvailableException tNAE)
    {
       // log this
       // check message and error code for more info
       // try again
    }
    catch (CSSAuthenticationException aE)
    {
       // Unable to authenticate
       // check credentials
       // check message and error code for more info
       // log this
    }
    catch (CSSIllegalArgumentException iAE)
    {
       // check arguments and correct them according to the contract
       // check message and error code for more info
       // try again
    }
    catch (CSSNoProviderException nPE)
    {
       // CSS was unable to launch a provider
       // that was requested in the provider entry in the context
       // check message and error code for more info
       // check and try again
       // log this
    }
    catch (CSSInvalidIdentityException iIE)
    {
       // Unable to use the identity passed in the token
       // log this
    }
    catch (CSSTokenNotAcceptedException tNAcceptedE)
    {
       // the token passed in is not valid
       // log this
    }
    catch (CSSException e)
    {
       // Any other abnormality
       // check message and error code for more info
       // log this
    }
 

Since:
CSSv1.0
Author:
gkhanna

Field Summary
static int DEBUG_LEVEL
          Deprecated. - instead use CSSLogger.DEBUG_LEVEL
static int ERROR_LEVEL
          Deprecated. - instead use CSSLogger.ERROR_LEVEL
static int FATAL_LEVEL
          Deprecated. - instead use CSSLogger.FATAL_LEVEL
static int INFO_LEVEL
          Deprecated. - instead use CSSLogger.INFO_LEVEL
static java.lang.String NO_CACHE
          Constant specifying that NO Cache should be initialized during CSS initialization.
static java.util.Map providerProperties
          Map holds property values for all the providers that were set during Provider configuration through UI
static int WARN_LEVEL
          Deprecated. - instead use CSSLogger.WARN_LEVEL
 
Method Summary
static com.hyperion.css.common.configuration.CSSConfigurationManager getConfigurationManager()
          Return the Configuration Manager.
 CSSAPIIF getCSSAPI()
          Returns the entry point to the security platform API.
static CSSSystem getCSSSystem()
          Returns an instance of CSSSystem if the the system has been already initialized, returns null otherwise.
static CSSSystem getInstance()
          Deprecated.  
static CSSSystem getInstance(java.util.Map context, java.lang.String logPath)
          Returns an initialized singleton instance of CSSSystem using the configuration from registry.
static CSSSystem getInstance(java.util.Map context, java.net.URL configURL, java.lang.String logPath)
          Returns an initialized singleton instance of CSSSystem using the specified configURL.
static com.hyperion.css.spi.CSSManager getManager()
          Returns an instance of CSS Manager if CSS is already initialized, Returns null otherwise.
 java.lang.String getSAPTicket(java.util.Map context, java.lang.String cSSToken)
          Retrieves the SAP Login Ticket if the CSS token can retrieve it.
static java.lang.String restoreToken(java.util.Map context, java.lang.String token)
           
 void setLogLevel(int level)
          Deprecated. - instead use CSSLogger.setLogLevel(int)
 void shutdown()
          Shuts down the security platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_LEVEL

public static int DEBUG_LEVEL
Deprecated. - instead use CSSLogger.DEBUG_LEVEL

The DEBUG Level designates fine-grained informational events that are most useful to debug an application.


WARN_LEVEL

public static int WARN_LEVEL
Deprecated. - instead use CSSLogger.WARN_LEVEL

The WARN level designates potentially harmful situations.


ERROR_LEVEL

public static int ERROR_LEVEL
Deprecated. - instead use CSSLogger.ERROR_LEVEL

The ERROR level designates error events that might still allow the application to continue running.


FATAL_LEVEL

public static int FATAL_LEVEL
Deprecated. - instead use CSSLogger.FATAL_LEVEL

The FATAL level designates very severe error events that will presumably lead the application to abort.


INFO_LEVEL

public static int INFO_LEVEL
Deprecated. - instead use CSSLogger.INFO_LEVEL

The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.


NO_CACHE

public static java.lang.String NO_CACHE
Constant specifying that NO Cache should be initialized during CSS initialization. The value of this constant is "noCache".


providerProperties

public static java.util.Map providerProperties
Map holds property values for all the providers that were set during Provider configuration through UI

Method Detail

getCSSAPI

public CSSAPIIF getCSSAPI()

Returns the entry point to the security platform API.

Returns:
CSSAPIIF

getCSSSystem

public static CSSSystem getCSSSystem()
Returns an instance of CSSSystem if the the system has been already initialized, returns null otherwise.


getConfigurationManager

public static com.hyperion.css.common.configuration.CSSConfigurationManager getConfigurationManager()

Return the Configuration Manager.

Returns:
CSSConfigurationManager

getInstance

public static CSSSystem getInstance()
Deprecated.  

Use getInstance(Map, String) instead.

Returns:

getInstance

public static CSSSystem getInstance(java.util.Map context,
                                    java.lang.String logPath)
                             throws CSSException
Returns an initialized singleton instance of CSSSystem using the configuration from registry. Note that the initialization requires the registry api's to be present in classpath and registry service (database) to be up and running. In case the registry is not reachable, the initialization will fail with an exception.

If Native directory is not reachable, the initialization logic will try to reconnect to it for a few attempts. If Native directory is not reachable even after retry attempts, this method will fail with exception.

The context can specify the following:

  1. locale
  2. NO_CACHE - Note that setting this option will only defer the cache building from initialize time to when required.

The directory location of where the client log file should be created is required, In case of invalid log location, the log will be created in the JVM temp folder.

Parameters:
context - Map structure holding locale information.
logPath - - directory location of where the client log should be created.
Returns:
CSSSystem
Throws:
CSSException

getInstance

public static CSSSystem getInstance(java.util.Map context,
                                    java.net.URL configURL,
                                    java.lang.String logPath)
                             throws CSSException
Returns an initialized singleton instance of CSSSystem using the specified configURL. Note that if the CSSSystem was already initialized using configuration from registry, the system will not initialize again, but the same instance would be returned. A warning would be logged.

If Native directory is not reachable, the initialization logic will try to reconnect to it for a few attempts. If Native directory is not reachable even after retry attempts, this method will fail with exception.

The context can specify the following:

  1. locale
  2. NO_CACHE - Note that setting this option will only defer the cache building from initialize time to when required.

The directory location of where the client log file should be created is required, In case of invalid log location, the log will be created in the JVM temp folder.

Parameters:
context - Map structure holding locale information.
configURL - - valid url pointing to CSS configuration file
logPath - - directory location of where the client log should be created.
Returns:
- instance of CSS System.
Throws:
CSSException - - in case of any failures.

restoreToken

public static java.lang.String restoreToken(java.util.Map context,
                                            java.lang.String token)
                                     throws CSSException
Throws:
CSSException

getSAPTicket

public java.lang.String getSAPTicket(java.util.Map context,
                                     java.lang.String cSSToken)
                              throws CSSException
Retrieves the SAP Login Ticket if the CSS token can retrieve it.

The context can specify the following:

  1. locale
Please make sure that the CSS system is initialized before invoking this method.

These properties are discussed in the field description at CSSAPIIF. Please note that if the locale is not specified, the default locale set for the system is used.

Parameters:
context - - Map structure holding key-value information about locale.
cSSToken - - the CSS token string
Returns:
- the SAP Login Ticket otherwise null
Throws:
CSSException - - Any abnormality

setLogLevel

public void setLogLevel(int level)
                 throws CSSException
Deprecated. - instead use CSSLogger.setLogLevel(int)

Set the CSS log level to the specified value at runtime.

The level should be set to one of the following:

  • DEBUG_LEVEL
  • WARN_LEVEL
  • ERROR_LEVEL
  • FATAL_LEVEL
  • INFO_LEVEL

    Parameters:
    level - - the level of the logging to set.
    Throws:
    CSSIllegalArgumentException - - if a value other than the specified logging levels is passed.
    CSSException - - Any abnormality.

  • getManager

    public static com.hyperion.css.spi.CSSManager getManager()
    Returns an instance of CSS Manager if CSS is already initialized, Returns null otherwise.


    shutdown

    public void shutdown()
                  throws CSSException
    Shuts down the security platform. Method releases resources used by the CSS system, e.g., audit threads, business cache threads, etc.

    Calling this before JVM shutdown will avoid the need for a forcible JVM exit. Calling shutdown and initialize after that in the same JVM is not supported.

    Usage:

     // get CSSSystem instance
     CSSSystem cssSystem = CSSystem.getInstance(context, "C:\work\Hyperion");
     CSSAPIIF cssAPI = cssSystem.getCSSAPI();
     
     // perform CSS operation
     cssAPI.authenticate(context,"ABCUser","ABCPassword");
     
     // shutdown
     cssSystem.shutdown();
     

    Throws:
    CSSException - - if there is any abnormality in releasing resources.
    Since:
    11.1.1.1.00


    Copyright 2005-2009 Oracle Corporation.