|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hyperion.css.CSSSystem
public class CSSSystem
This is a class is responsible to initialize the security client system in one of the following modes depending on the value of the flag stored in EPM Registry:
The value FUSIONAPPS
in the EPM Registry stored under EPM_SYSTEM_PRODUCT@mode
will direct
the security system client to initialize in Fusion/JPS mode. In this mode the security client interacts with the
underlying JPS API's all authentication, authorization and other search requests.
Note that in the JPS mode, the security client required the configuration files and binaries required by JPS. Only a
subset of the public API are supported in this mode. Any unsupported API's will throw
CSSMethodNotSupportedException
. This mode does not support or require EPM Shared Services
and Native Directory.
When the EPM registry flag is set to any other value or not available the security system will initialize in EPM (Normal) mode with full support for all API's. All User Directories will including Native, LDAP, MSAD, SAP and DB will be supported in this mode. This mode requires EPM Shared Services to be running.
The EPM mode can be initialized thru the Security configuration stored in the registry or the by specifying the configuration url.
This is a Singleton class and is guaranteed to return the same instance in any given JVM once initialized.
This Security System class provides handle to the following public interfaces:
Sample use of the application:
<code> 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, "host1.hyperion.com"); try { context.put(CSSAPIIF.LOGIN_NAME, "user"); 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 } </code>
Field Summary | |
---|---|
static int |
EPM_MODE
Constant specifying EPM mode of CSS initialization. |
static int |
FUSION_MODE
Constant specifying Fusion mode of CSS initialization. |
static java.lang.String |
NO_CACHE
Constant specifying that NO Cache should be initialized during CSS initialization. |
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 EPM Registry. |
static CSSSystem |
getInstance(java.util.Map context,
java.net.URL configURL,
java.lang.String logPath)
Deprecated. (non-Javadoc) This is an EPM mode only API. 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
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. |
static com.hyperion.css.spi.CSSManager |
getManager()
This is an EPM mode only API. |
static int |
getMode()
Gets the working mode of this CSS system. |
java.lang.String |
getSAPTicket(java.util.Map context,
java.lang.String cSSToken)
This is an EPM mode only API |
static java.lang.String |
restoreToken(java.util.Map context,
java.lang.String token)
Deprecated. - use restoreToken(Map, String, String) |
java.lang.String |
restoreToken(java.util.Map context,
java.lang.String token,
java.lang.String trustedServiceKey)
Validates the token and renews it for a time period specified in the SSO token timeout configuration property. |
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 final int EPM_MODE
The value is 0.
public static final int FUSION_MODE
The value is 1.
public static java.lang.String NO_CACHE
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() throws CSSException
Return the Configuration Manager.
This API will be supported only in EPM mode.
CSSMethodNotSupportedException
- - if this method is invoked in Fusion mode.
CSSException
- - if there was any other abnormalitypublic static CSSSystem getInstance(java.util.Map context, java.lang.String logPath) throws CSSException
In Fusion/JPS mode, the initialization will use JPS configuration file to initialize JPS and return the system instance. This is the recommended API to initialize Security system client in Fusion/JPS mode.
In EPM mode, 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 (EPM mode only):
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()
getInstance(Map, String)
instead.
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:
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 int getMode()
CSS can initialize in EPM mode or Fusion mode. This method finds the current mode and returns it.
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:
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 static com.hyperion.css.spi.CSSManager getManager() throws CSSException
Returns an instance of CSS Manager if CSS is already initialized, returns null otherwise.
CSSMethodNotSupportedException
- - if this method is invoked in Fusion mode.
CSSException
- - if there was any other abnormalitypublic 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.public static java.lang.String restoreToken(java.util.Map context, java.lang.String token) throws CSSException
token
- - existing token.
CSSException
- - if there is any problem parsing the existing token or creating the new one.public java.lang.String restoreToken(java.util.Map context, java.lang.String token, java.lang.String trustedServiceKey) throws CSSException
token
- - original token which has reached its expiration time and needs to be restored.trustedServiceKey
- - value of the security trusted key.
CSSException
- - if there is any problem parsing the existing token or creating the new one;
if there is any problem retrieving the trusted key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |