Skip navigation links


oracle.iam.platform
Class Platform

java.lang.Object
  extended by oracle.iam.platform.Platform


public final class Platform
extends java.lang.Object

Provides OIM Components a way to interact with other elements in the OIM runtime environment.This class cannot be instantiated. All functionality is provided using static methods. The elements include

Since:
OIM 9.2

Field Summary
static char PACKAGE_SEPARATOR_CHAR
           
static java.lang.String SERVICE_DELEGATE_SUFFIX
           

 

Method Summary
static javax.sql.DataSource getAuditDS()
           
static java.lang.Object getBean(java.lang.Class beanType)
          Gets the bean for a particular type
static oracle.iam.platform.utils.Configuration getConfiguration()
          Returns a handle to OIM configuration so that you can retrieve various configuration data that is part of oim-config.xml
static javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
          Returns a handle to DocumentBuilderFactory to perform XML related operations
static MDSInstance getMDSInstance()
          Returns the MDS Instance that can be used to retrieve component specific metadata
static javax.sql.DataSource getNonXADataSource()
          Returns the Non-XA datasource for OIM.
static oracle.iam.platform.tx.OIMTransactionManager getOIMTransactionManager()
          Returns transaction manager
static javax.sql.DataSource getOperationalDS()
          Provides the XA DataSource for the OIM OperationalDS.
static java.lang.Object getService(java.lang.Class serviceClass)
          Returns a handle to a Service available in an OIM .
static java.lang.Object getServiceForEventHandlers(java.lang.Class serviceClass, java.lang.String contextKey, java.lang.String contextType, java.lang.String contextSubType, java.util.HashMap contextValues)
          Returns a handle to a Service available in an OIM .
static java.lang.Object getTargetImplementation(java.lang.Object obj, java.lang.Class clazz)
           
static Session getToplinkSession()
          Returns the Default Toplink Session that can be used to do database operations.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

SERVICE_DELEGATE_SUFFIX

public static final java.lang.String SERVICE_DELEGATE_SUFFIX
See Also:
Constant Field Values

PACKAGE_SEPARATOR_CHAR

public static final char PACKAGE_SEPARATOR_CHAR
See Also:
Constant Field Values

Method Detail

getOperationalDS

public static javax.sql.DataSource getOperationalDS()
Provides the XA DataSource for the OIM OperationalDS. This is typically used by components that do direct JDBC operations instead of using toplink
Returns:
a DataSource for the OIM OperationalDS

getNonXADataSource

public static javax.sql.DataSource getNonXADataSource()
Returns the Non-XA datasource for OIM. By default all OIM components use the XADataSource returned by getOperationalDS(). However, certain components like AuthzService, Scheduler require a non-transactional datasource. This datasource is for their use. NOTE: Do not use this datasource unless you have a requirement to work with NonXA datasources. Use OperationalDS instead
Returns:
the Non-XA datasource for OIM.

getAuditDS

public static javax.sql.DataSource getAuditDS()

getService

public static java.lang.Object getService(java.lang.Class serviceClass)
                                   throws oracle.iam.platform.utils.NoSuchServiceException
Returns a handle to a Service available in an OIM . A Service is either a Business Service (e.g UserManager) provided by a feature or an infrastructure service provided by the OIM Platform.The argument to this method is the interface that establishes the Service contract. For examples, the UserService interface may establish the contract for the UserMgmt feature. Similarly the EntityManager interface establishes the contract for the Entity Manager.
Accessing a Service
 //Get a handle to the UserService (a Business Service)
 UserManager userService = Platform.getService(UserManager.class);
 
 //Get a handle to the OrchestrationEngine (Infrastructure Service)
 EntityManager entityMgr = Platform.getService(EntityManager.class);
 
Parameters:
serviceClass - the Class object corresponding to the Service Interface
Returns:
a POJO handle to the Service
Throws:
oracle.iam.platform.utils.NoSuchServiceException - if no such service handle is available in OIM

getServiceForEventHandlers

public static java.lang.Object getServiceForEventHandlers(java.lang.Class serviceClass,
                                                          java.lang.String contextKey,
                                                          java.lang.String contextType,
                                                          java.lang.String contextSubType,
                                                          java.util.HashMap contextValues)
                                                   throws oracle.iam.platform.utils.NoSuchServiceException
Returns a handle to a Service available in an OIM . Use this method to get services inside OIM event handlers. API calls made using the service obtained through this method are run in a new OIM context. Do not use this method to get service that make read API calls. One of the examples where this methods can be used is, while a request is in progress and as part of post processing, if you call an API to update a user using regular mechanism, this update call will fail because when kernel computes the list of event handlers for this update operation and detects that it needs to run approval initiation async event handler but the update API call submits a sync orchestration to kernel. To avoid this issue get the service through this method and then call the API. Note that For APIs that are called using the service obtained through this method, any orchestrations created by those API calls will not be executed until the current orchestration is completed. For example, if you obtain a service within an event handler of a create user orchestration and use it to make an API call to modify the user, the user will not be modified upon the API call returns. Instead, the user modify orchestration will only be executed when the user create orchestration is completed.
Accessing a Service
 //Get a handle to the User Service (a Business Service)
 UserManager userService = Platform.getService(UserManager.class);
 
 //Get a handle to the OrchestrationEngine (Infrastructure Service)
 EntityManager entityMgr = Platform.getService(EntityManager.class);
 
Parameters:
serviceClass - the Class object corresponding to the Service Interface.
contextKey - context key such as request key if request context, policy key if access policy context. Value can be null
contextType - Type of the context such as REQUEST, RECON, POLICY. Value has to be one of the values of Enum oracle.iam.platform.context.ContextManager.ContextTypes or null
contextSubType - Sub type information that can additionally identifies the context. Value can be null
contextValues - Values that should be set in this context. Key of the map should be a string and value should be a ContextAware object. These will be available in the context as ContextAwareHashMap with key APIContext.
Returns:
a POJO handle to the Service
Throws:
oracle.iam.platform.utils.NoSuchServiceException - if no such service handle is available in OIM

getBean

public static java.lang.Object getBean(java.lang.Class beanType)
Gets the bean for a particular type
Parameters:
beanType - the Class object for the bean type
Returns:
the bean corresponding to the bean type

getMDSInstance

public static MDSInstance getMDSInstance()
Returns the MDS Instance that can be used to retrieve component specific metadata
Returns:
an MDS Instance

getToplinkSession

public static Session getToplinkSession()
Returns the Default Toplink Session that can be used to do database operations.
Returns:
a Toplink Session

getConfiguration

public static oracle.iam.platform.utils.Configuration getConfiguration()
Returns a handle to OIM configuration so that you can retrieve various configuration data that is part of oim-config.xml
Returns:
a handle to OIM Configuration

getOIMTransactionManager

public static oracle.iam.platform.tx.OIMTransactionManager getOIMTransactionManager()
Returns transaction manager
Returns:

getDocumentBuilderFactory

public static javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
Returns a handle to DocumentBuilderFactory to perform XML related operations
Returns:

getTargetImplementation

public static java.lang.Object getTargetImplementation(java.lang.Object obj,
                                                       java.lang.Class clazz)

Skip navigation links


Copyright © 2015, Oracle and/or its affiliates. All rights reserved.