com.sap.security.api
Class UMFactory

java.lang.Object
  |
  +--com.sap.security.api.UMFactory

public class UMFactory
extends java.lang.Object

The UMFactory class provides functionality to get access to implementations of factory classes. Applications access all the functionality through this class. The UMFactory can be initialized in 2 ways: either the function #initialize(Properties, HashMap) is called or the first call to getInstance() initializes the factory.


Field Summary
static java.lang.String VERSIONSTRING
          Description of the Field
 
Method Summary
static void addSystemLandscapeWrapper(ISystemLandscapeWrapper slw)
           
static IAclManager getAclManager()
          Gets the default Access Control List (ACL) Manager.
static IAclManager getAclManager(java.lang.String applicationId)
          Gets an application specific Access Control List (ACL) Manager.
static java.lang.String[] getAllAclManagers()
          Returns an array of all used Access Control List (ACL) Managers.
static IAnonymousUserFactory getAnonymousUserFactory()
          Gets the anonymous user factory for retrieving anonymous user.
static IAuthentication getAuthenticator()
          getAuthenticator provides access to an implementation of IAuthentication
static java.lang.String getDatabaseVendor()
          Gets the database vendor
static java.lang.Object getDataSourceClass()
          getDataSourceClass gets a dataSourceClass which is used for PCD role handling
static IUserFactory getDefaultFactory()
          Deprecated. : use getUserFactory() instead
static IGroupFactory getGroupFactory()
          Returns an implementation of IGroupFactory.
static UMFactory getInstance()
          Returns the instance of UMFactory.
static java.lang.Object getLoggerClass()
          Deprecated.  
static ILogonAuthentication getLogonAuthenticator()
          getLogonAuthenticator provides access to an implementation of ILogonAuthentication
static IPrincipalFactory getPrincipalFactory()
          Returns an implementation of IPrincipalFactory.
static com.sap.security.api.util.IUMParameters getProperties()
          Get access to UMParameters interface
static IRoleFactory getRoleFactory()
          Returns an implementation of IRoleFactory.
static java.lang.SecurityManager getSecurityManager()
          A method in the usermanagement that wants to check whether the caller is allowed to call it should call this method instead of System.getSecurityManager() to get a security manager to perfom the checkPermission call.
static ISecurityPolicy getSecurityPolicy()
          getSecurityPolicy provides access to the security policy object
static com.sap.security.api.srvUser.IServiceUserFactory getServiceUserFactory()
          Returns an implementation of IServiceUserFactory.
static java.util.ArrayList getSystemLandscapeWrappers()
           
 TicketVerifier getTicketVerifier()
          getTicketVerifier provides access to an object which can be used for verifing Tickets
static com.sap.security.api.util.IUMFileIO getUMFileIO()
           
static IUserAccountFactory getUserAccountFactory()
          Returns an implementation of IUserAccountFactory.
static IUserFactory getUserFactory()
          Returns an implementation of IUserFactory.
static IUserMapping getUserMapping()
          Gets the global user mapping object.
static void initialize(java.util.Properties prop, java.util.HashMap files, com.sap.security.api.util.IUMFileIO fileio)
          initialize the UMFactory manually.
static void initialize(java.lang.String umeCfgPath)
          Initialize the UMFactory manually.
static boolean isInitialized()
          isInitialized provides information about the state of UMFactory.
static void removeSystemLandscapeWrapper(ISystemLandscapeWrapper slw)
           
static void setClassLoader(java.lang.ClassLoader loader)
          Deprecated. applications should not use this method.
static void setDataSourceClass(java.lang.Object dataSourceClass)
          setDataSourceClass sets a dataSourceClass which is used for PCD role handling
static void setLoggerClass(java.lang.Object loggerClass)
          Deprecated.  
static void setSecurityManager(java.lang.SecurityManager securitymanager)
          Sets the security manager that is used to protect the API.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSIONSTRING

public static final java.lang.String VERSIONSTRING
Description of the Field
Method Detail

getLogonAuthenticator

public static ILogonAuthentication getLogonAuthenticator()
getLogonAuthenticator provides access to an implementation of ILogonAuthentication
Returns:
ILogonAuthentication object used for extended authentication handling. For more details see ILogonAuthentication

getAuthenticator

public static IAuthentication getAuthenticator()
getAuthenticator provides access to an implementation of IAuthentication
Returns:
IAuthentication object used for authentication handling. For more details see IAuthentication

setClassLoader

public static void setClassLoader(java.lang.ClassLoader loader)
Deprecated. applications should not use this method.

Method without functionality.

setSecurityManager

public static void setSecurityManager(java.lang.SecurityManager securitymanager)
Sets the security manager that is used to protect the API. The security manager can only be set once. More attempts to set a security manager result in an IllegalStateException. An IllegalStateException is also thrown if there is a system security manager and this method is called. If the SecurityManagerFactory is visible for the UMFactory, this this method must be called before the UMFactory is initialized, because in this case during intialization a security manager is set if there is neither a system security manager nor this method was called.
Parameters:
securitymanager - security manager to be used
Throws:
java.lang.IllegalStateException - in case this method has already been called before or there is a system security manager

getSecurityManager

public static java.lang.SecurityManager getSecurityManager()
A method in the usermanagement that wants to check whether the caller is allowed to call it should call this method instead of System.getSecurityManager() to get a security manager to perfom the checkPermission call.
Returns:
SecurityManager object, if a security manager was set using method setSecurityManager or if s system security manager exists.
null otherwise.

getDefaultFactory

public static IUserFactory getDefaultFactory()
Deprecated. : use getUserFactory() instead

Returns an implementation of IUserFactory. This method should be called to get the user factory for all user related operations.
Returns:
UserFactory object

getUserMapping

public static IUserMapping getUserMapping()
Gets the global user mapping object.
Returns:
IUserMapping object used for handling user mapping operations.

getGroupFactory

public static IGroupFactory getGroupFactory()
Returns an implementation of IGroupFactory. This method should be called to get the group factory for all group related operations.
Returns:
IGroupFactory object used for handling group operations

getUMFileIO

public static com.sap.security.api.util.IUMFileIO getUMFileIO()

getInstance

public static UMFactory getInstance()
Returns the instance of UMFactory. If the UMFactory is not already initialized this function throws an IllegalStateException. Note: UMFactory will be initialized by EP6 Portal or J2EE Engine 630. If UMFactory should be used standalone, it has to be initialized explicitly with the method initialize(String umeCfgPath)
Returns:
Instance of UMFactory
Throws:
java.lang.IllegalStateException - If the UMFactory is not already initialized.

getProperties

public static com.sap.security.api.util.IUMParameters getProperties()
Get access to UMParameters interface
Returns:
API for accessing IUMParameters

getRoleFactory

public static IRoleFactory getRoleFactory()
Returns an implementation of IRoleFactory. This method should be called to get the role factory for all role related operations.
Returns:
IRoleFactory object used for handling role operations

getUserAccountFactory

public static IUserAccountFactory getUserAccountFactory()
Returns an implementation of IUserAccountFactory. This method should be called to get the user account factory for all user account related operations.
Returns:
IUserAccountFactory object used for handling user account operations

getPrincipalFactory

public static IPrincipalFactory getPrincipalFactory()
Returns an implementation of IPrincipalFactory. This method should be called to get the principal factory for all principal related operations.
Returns:
IPrincipalFactory object used for handling principal operations

getUserFactory

public static IUserFactory getUserFactory()
Returns an implementation of IUserFactory. This method should be called to get the user factory for all user related operations.
Returns:
IUserFactory object used for handling user operations

getServiceUserFactory

public static com.sap.security.api.srvUser.IServiceUserFactory getServiceUserFactory()
Returns an implementation of IServiceUserFactory. This method should be called to get the service user factory for all service user related operations. Only used for internal use.
Returns:
IServiceUserFactory object used for handling user operations

Only released for internal use


getAclManager

public static IAclManager getAclManager()
Gets the default Access Control List (ACL) Manager.
Returns:
IAclManager object used for handling Access Control Lists For further details check com.sap.security.api.acl.IAclManager

getAclManager

public static IAclManager getAclManager(java.lang.String applicationId)
Gets an application specific Access Control List (ACL) Manager.
Returns:
IAclManager object used for handling Access Control Lists For further details check com.sap.security.api.acl.IAclManager

getAllAclManagers

public static java.lang.String[] getAllAclManagers()
Returns an array of all used Access Control List (ACL) Managers.
Returns:
String[] applicationIDs of used ACL managers

initialize

public static void initialize(java.lang.String umeCfgPath)
Initialize the UMFactory manually. For standalone issues.
Parameters:
umeCfgPath - String object that contains the path to the sapum.properties file and the additional xml files

initialize

public static void initialize(java.util.Properties prop,
                              java.util.HashMap files,
                              com.sap.security.api.util.IUMFileIO fileio)
initialize the UMFactory manually. Called from Portal UserMangementService or WebAS 6.30 (or any other application that does all the initialization by itself (e.g. read properties and configuration files)
Parameters:
prop - Property object that contains all sapum.properties (it should consider the search path that is defined). Must not be null.
files - This is a HashMap containing name/byte[] pairs of files which can be read with IUMParameters.getInputStream(String). name should be plain names without path. Can be empty, should not be null.
fileio - Implements IUMFileIO for reading/writing files

getDatabaseVendor

public static java.lang.String getDatabaseVendor()
Gets the database vendor
Returns:
String specifying the database vendor

Only released for internal use


getTicketVerifier

public TicketVerifier getTicketVerifier()
getTicketVerifier provides access to an object which can be used for verifing Tickets
Returns:
TicketVerifier object used for ticket handling. For more details see TicketVerifier

addSystemLandscapeWrapper

public static void addSystemLandscapeWrapper(ISystemLandscapeWrapper slw)

getSystemLandscapeWrappers

public static java.util.ArrayList getSystemLandscapeWrappers()

removeSystemLandscapeWrapper

public static void removeSystemLandscapeWrapper(ISystemLandscapeWrapper slw)

getAnonymousUserFactory

public static IAnonymousUserFactory getAnonymousUserFactory()
Gets the anonymous user factory for retrieving anonymous user.
Returns:
IAnonymousUserFactory factory handling anonymous user objects. For further details refer to {com.sap.security.api.logon.IAnonymousUserFactory}

getSecurityPolicy

public static ISecurityPolicy getSecurityPolicy()
getSecurityPolicy provides access to the security policy object
Returns:
ISecurityPolicy object used for security policy handling. For more details see ISecurityPolicy

setDataSourceClass

public static void setDataSourceClass(java.lang.Object dataSourceClass)
setDataSourceClass sets a dataSourceClass which is used for PCD role handling

NOTE: only released for internal use


getDataSourceClass

public static java.lang.Object getDataSourceClass()
getDataSourceClass gets a dataSourceClass which is used for PCD role handling

NOTE: only released for internal use


setLoggerClass

public static void setLoggerClass(java.lang.Object loggerClass)
Deprecated.  

If Portal Logger Wrapper is used, UMFactory provides access to core classes

NOTE: only released for internal use


getLoggerClass

public static java.lang.Object getLoggerClass()
Deprecated.  

If Portal Logger Wrapper is used, UMFactory provides access to logger object

NOTE: only released for internal use


isInitialized

public static boolean isInitialized()
isInitialized provides information about the state of UMFactory.
Returns:
true if UMFactory is already initialized and configured, false otherwise


Copyright © 2002 SAP AG All Rights Reserved.