|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hyperion.css.CSSSystem
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
}
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 |
public static int DEBUG_LEVEL
CSSLogger.DEBUG_LEVEL
public static int WARN_LEVEL
CSSLogger.WARN_LEVEL
public static int ERROR_LEVEL
CSSLogger.ERROR_LEVEL
public static int FATAL_LEVEL
CSSLogger.FATAL_LEVEL
public static int INFO_LEVEL
CSSLogger.INFO_LEVEL
public static java.lang.String NO_CACHE
public static java.util.Map providerProperties
Method Detail |
public CSSAPIIF getCSSAPI()
Returns the entry point to the security platform API.
public static CSSSystem getCSSSystem()
public static com.hyperion.css.common.configuration.CSSConfigurationManager getConfigurationManager()
Return the Configuration Manager.
public static CSSSystem getInstance()
getInstance(Map, String)
instead.
public static CSSSystem getInstance(java.util.Map context, java.lang.String logPath) throws CSSException
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:
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.
context
- Map structure holding locale information.logPath
- - directory location of where the client log should be created.
CSSException
public static CSSSystem getInstance(java.util.Map context, java.net.URL configURL, java.lang.String logPath) throws CSSException
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:
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.
context
- Map structure holding locale information.configURL
- - valid url pointing to CSS configuration filelogPath
- - directory location of where the client log should be created.
CSSException
- - in case of any failures.public static java.lang.String restoreToken(java.util.Map context, java.lang.String token) throws CSSException
CSSException
public java.lang.String getSAPTicket(java.util.Map context, java.lang.String cSSToken) throws CSSException
The context
can specify the following:
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.
context
- -
Map structure holding key-value information about locale.cSSToken
- -
the CSS token string
CSSException
- -
Any abnormalitypublic void setLogLevel(int level) throws CSSException
CSSLogger.setLogLevel(int)
The level should be set to one of the following:
DEBUG_LEVEL
WARN_LEVEL
ERROR_LEVEL
FATAL_LEVEL
INFO_LEVEL
level
- -
the level of the logging to set.
CSSIllegalArgumentException
- -
if a value other than the specified logging levels is passed.
CSSException
- -
Any abnormality.public static com.hyperion.css.spi.CSSManager getManager()
public void shutdown() throws CSSException
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();
CSSException
- - if there is any abnormality in
releasing resources.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |