|
SAP NetWeaver 7.20 (SP01) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.security.api.UMFactory
public class UMFactory
Main factory providing access to all UME functionality.
Applications can access UME functionality via a set of public UME factories
like IUserFactory, IAuthentication
and IUserMapping.
UME factories can be distinguished by their behaviour regarding database transactions. There are factories that simply account for UME internal transactions, which is the default behaviour. And there may also be factories that participate in container wide shared transactions (if supported by the current runtime environment, e.g. SAP Application Server Java).
There are two ways to get access to UME factories:
UMFactory class provides functionality to get access to
UME factory objects. Applications access all the functionality through
this class and its (mostly static) factory getter methods like
getUserFactory(), getAuthenticator() and getUserMapping().
UMFactory's getter methods always return UME
factories that don't participate in shared transactions.
In scenarios where a JNDI naming system exists inside of the server, UME factories can also be retrieved by a JNDI lookup. This is the only way to get access to UME factories that participate in shared transactions.
Looking up UME factories from JNDI requires declaration of all necessary
factories in the application's deployment descriptor. In SAP Application Server Java,
this requires adding a server-component-ref node to the
web-j2ee-engine.xml / ejb-j2ee-engine.xml / appclient-j2ee-engine.xml
like this
(see Documentation of web-j2ee-engine.dtd):
<server-component-ref>
<name>
ume/userfactory
</name>
<type>
interface
</type>
<jndi-name>
UME/unsharable/com.sap.security.api.IUserFactory
</jndi-name>
</server-component-ref>
In this example, the application would call
lookup("java:comp/env/ume/userfactory") to retrieve an
instance of IUserFactory (which does not
participate in shared transactions, see below).
Some UME factories are available in two different subcontexts of the main UME context "UME":
"sharable" participate in shared
database transactions (if the container supports shared transactions
and the actual factory is subject to transactions at all).
"unsharable" ignore shared transactions
or are not subject to transactions at all.
Each factory object is bound into the UME subcontexts by the fully qualified name of the corresponding UME interface:
UME/sharable/com.sap.security.api.IGroupFactory
UME/sharable/com.sap.security.api.IPrincipalFactory
UME/sharable/com.sap.security.api.IRoleFactory
UME/sharable/com.sap.security.api.IUserAccountFactory
UME/sharable/com.sap.security.api.IUserFactory
UME/sharable/com.sap.security.api.acl.IAclManagerFactory
UME/sharable/com.sap.security.api.srvUser.IServiceUserFactory
UME/unsharable/com.sap.security.api.IGroupFactory
UME/unsharable/com.sap.security.api.IPrincipalFactory
UME/unsharable/com.sap.security.api.IRoleFactory
UME/unsharable/com.sap.security.api.IUserAccountFactory
UME/unsharable/com.sap.security.api.IUserFactory
UME/unsharable/com.sap.security.api.acl.IAclManagerFactory
UME/unsharable/com.sap.security.api.logon.IAnonymousUserFactory
UME/unsharable/com.sap.security.api.logon.IAuthentication
UME/unsharable/com.sap.security.api.logon.ILogonAuthentication
UME/unsharable/com.sap.security.api.logon.ISecurityPolicyFactory
UME/unsharable/com.sap.security.api.srvUser.IServiceUserFactory
UME/unsharable/com.sap.security.api.umap.IUserMapping
UME/unsharable/com.sap.security.api.umap.system.ISystemLandscapeFactory
UMFactory
initialize(Map) to initialize UMFactory. This is the
standard way which is already used in SAP Application Server Java and SAP JTS.
initialize(String) with a directory in the file system which contains
all required UME configuration data.
TicketVerifier.
| Field Summary | |
|---|---|
static String |
VERSIONSTRING
|
| Method Summary | |
|---|---|
static void |
addSystemLandscapeWrapper(ISystemLandscapeWrapper slw)
Deprecated. Use getSystemLandscapeFactory() and
ISystemLandscapeFactory.registerLandscape(ISystemLandscape) instead. |
static IAclManager |
getAclManager()
Gets the default Access Control List (ACL) Manager. |
static IAclManager |
getAclManager(String applicationId)
Gets an application specific Access Control List (ACL) Manager. |
static 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()
Provide access to an implementation of IAuthentication |
static IUserFactory |
getDefaultFactory()
Deprecated. : use getUserFactory() instead |
static IGroupFactory |
getGroupFactory()
Returns an implementation of IGroupFactory. |
static UMFactory |
getInstance()
Returns the instance of UMFactory. |
static ILogonAuthentication |
getLogonAuthenticator()
Provide access to an implementation of ILogonAuthentication |
static IPrincipalFactory |
getPrincipalFactory()
Returns an implementation of IPrincipalFactory. |
static com.sap.security.api.util.IUMParameters |
getProperties()
Deprecated. Released for internal use only |
static IRoleFactory |
getRoleFactory()
Returns an implementation of IRoleFactory. |
static 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 ISecurityPolicy |
getSecurityPolicyByLogonID(String logonID)
getSecurityPolicyByLogon provides retrieving security policy object from the associated user account |
static IServiceUserFactory |
getServiceUserFactory()
NOTE: Released for internal use only. |
static ISystemLandscapeFactory |
getSystemLandscapeFactory()
|
static ArrayList |
getSystemLandscapeWrappers()
Deprecated. Use getSystemLandscapeFactory() and
ISystemLandscapeFactory.getAllLandscapes() resp.
ISystemLandscapeFactory.getLandscape(String) instead. |
TicketVerifier |
getTicketVerifier()
Deprecated. Please use the native library "SAPSSOEXT" and the corresponding Java wrapper. For further information, including where to download the "SAPSSOEXT" package, please refer to the online documentation. |
static com.sap.security.api.util.IUMFileIO |
getUMFileIO()
NOTE: Released for internal use only. |
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 which provides access to all user mapping data. |
static void |
initialize(Map factories)
FOR INTERNAL USE ONLY: Initialize UME. |
static void |
initialize(String umeCfgPath)
FOR INTERNAL USE ONLY: Initialize UME For standalone issues. |
static boolean |
isInitialized()
isInitialized provides information about the state of UMFactory. |
static void |
removeSystemLandscapeWrapper(ISystemLandscapeWrapper slw)
Deprecated. Use getSystemLandscapeFactory() and
ISystemLandscapeFactory.unregisterLandscape(ISystemLandscape) instead. |
static void |
setSecurityManager(SecurityManager securitymanager)
Set the security manager that is used to protect the API. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERSIONSTRING
| Method Detail |
|---|
public static void initialize(Map factories)
isInitialized() will not return true
until the key "InitializationComplete" is contained in the
argument Map (see the table of keys and values below).
factories - Map of UME factory objects.
The following key / value pairs are currently required:
| Key | Value |
|---|---|
| IAclManager.class | Class object of the IAclManager implementation class |
| IAnonymousUserFactory.class | Instance of IAnonymousUserFactory |
| IAuthentication.class | Instance of IAuthentication |
| IGroupFactory.class | Instance of IGroupFactory |
| ILogonAuthentication.class | Instance of ILogonAuthentication |
| IPrincipalFactory.class | Instance of IPrincipalFactory |
| IRoleFactory.class | Instance of IRoleFactory |
| ISecurityPolicyFactory.class | Instance of ISecurityPolicyFactory |
| IServiceUserFactory.class | Instance of IServiceUserFactory |
| ISystemLandscapeFactory.class | Instance of ISystemLandscapeFactory |
| IUMFileIO.class | Instance of IUMFileIO |
| IUMParameters.class | Instance of IUMParameters |
| IUserAccountFactory.class | Instance of IUserAccountFactory |
| IUserFactory.class | Instance of IUserFactory |
| IUserMapping.class | Instance of IUserMapping |
| TicketVerifier.class | Class object of the TicketVerifier implementation class |
"InitializationComplete" (String) |
Boolean with value true. |
public static void initialize(String umeCfgPath)
com.sap.security.core.InternalUMFactory!
umeCfgPath - String object that contains the path
to the sapum.properties file and the additional xml files
public static UMFactory getInstance()
throws UMRuntimeException
UMFactory is not already initialized this function throws
an IllegalStateException.
Note: UMFactory will be initialized by EP6 Portal or SAP Application Server Java 630.
If UMFactory should be used standalone, it has to be initialized explicitly with
the method initialize(String umeCfgPath)
UMFactory
IllegalStateException - If the UMFactory is not
already initialized.
UMRuntimeException - If UME is running with
client ("Mandant") concept enabled and the current client can
not be determined.public static IAuthentication getAuthenticator()
IAuthentication@Deprecated public static IUserFactory getDefaultFactory()
getUserFactory() instead
public static IGroupFactory getGroupFactory()
public static ILogonAuthentication getLogonAuthenticator()
ILogonAuthenticationpublic static SecurityManager getSecurityManager()
public static IUserMapping getUserMapping()
public static com.sap.security.api.util.IUMFileIO getUMFileIO()
public static com.sap.security.api.util.IUMParameters getProperties()
Get access to IUMParameters interface
IUMParameterspublic static IRoleFactory getRoleFactory()
public static IUserAccountFactory getUserAccountFactory()
public static IPrincipalFactory getPrincipalFactory()
public static IUserFactory getUserFactory()
public static IServiceUserFactory getServiceUserFactory()
Returns an implementation of IServiceUserFactory. This method should be called to get the service user factory for all service user related operations.
public static IAclManager getAclManager()
public static IAclManager getAclManager(String applicationId)
public static String[] getAllAclManagers()
public static void setSecurityManager(SecurityManager securitymanager)
securitymanager - security manager to be used
IllegalStateException - in case this method has already
been called before or there is a system security manager@Deprecated public static void addSystemLandscapeWrapper(ISystemLandscapeWrapper slw)
getSystemLandscapeFactory() and
ISystemLandscapeFactory.registerLandscape(ISystemLandscape) instead.
@Deprecated public static ArrayList getSystemLandscapeWrappers()
getSystemLandscapeFactory() and
ISystemLandscapeFactory.getAllLandscapes() resp.
ISystemLandscapeFactory.getLandscape(String) instead.
ISystemLandscapeWrapper
implementations that are currently registered.
@Deprecated public static void removeSystemLandscapeWrapper(ISystemLandscapeWrapper slw)
getSystemLandscapeFactory() and
ISystemLandscapeFactory.unregisterLandscape(ISystemLandscape) instead.
public static ISystemLandscapeFactory getSystemLandscapeFactory()
public static IAnonymousUserFactory getAnonymousUserFactory()
public static ISecurityPolicy getSecurityPolicy()
ISecurityPolicy
public static ISecurityPolicy getSecurityPolicyByLogonID(String logonID)
throws UMException
logonID - the logon ID of the associated account's
For more details see ISecurityPolicy
UMExceptionpublic static boolean isInitialized()
@Deprecated public TicketVerifier getTicketVerifier()
TicketVerifier| Access Rights |
|---|
| SC | DC |
|---|---|
[sap.com] ENGINEAPI
|
[sap.com] com.sap.security.api.sda
|
[sap.com] ENGFACADE
|
[sap.com] tc/je/usermanagement/api
|
[sap.com] CORE-TOOLS
|
[sap.com] com.sap.engine.client.lib
|
|
SAP NetWeaver 7.20 (SP01) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||