Package com.sun.identity.entity
Class EntityObjectImpl
- java.lang.Object
-
- com.sun.identity.entity.EntityObjectImpl
-
- All Implemented Interfaces:
EntityObjectIF,Remote
public class EntityObjectImpl extends Object implements EntityObjectIF
Implementation class for the interface EntityObjectIF
-
-
Field Summary
Fields Modifier and Type Field Description protected AMStoreConnectionamscprotected AMOrganizationentityprotected static Objectlockprotected static CacheoCacheprotected SSOTokentoken
-
Constructor Summary
Constructors Constructor Description EntityObjectImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidcheckInitialization()Method to get the token manager handle.SetcreateEntity(String ssotoken, String entityName, String entityType, String entityLocation, Map attributes)Creates entities.voiddeleteEntity(String ssoToken, String entityName, String entityType, String entityLocation)Deletes entities.protected AMEntitygetAMEntity(String ssoToken, String entityName, String entityType, String entityLocation)Method to get the AMEntity object from the storeconnection.MapgetEntity(String ssoToken, String entityName, String entityType, String entityLocation)Returns the entity object for each entity given the entityType and entityName(s) in that particular organization.SetgetEntityNames(String ssoToken, String entityType, String entityLocation, String entityFilter)Returns a set of Entity Names given the Entity Type for that particular organization.protected voidinitializeObject(String ssoToken, String entityLocation)Method to initialize the object.voidmodifyEntity(String ssoToken, String entityName, String entityType, String entityLocation, Map attributes)Sets or replaces attribute values with the new values supplied and Stores the changes to directory server.
-
-
-
Field Detail
-
oCache
protected static Cache oCache
-
lock
protected static Object lock
-
token
protected SSOToken token
-
amsc
protected AMStoreConnection amsc
-
entity
protected AMOrganization entity
-
-
Method Detail
-
createEntity
public Set createEntity(String ssotoken, String entityName, String entityType, String entityLocation, Map attributes) throws EntityException, SSOException
Creates entities.- Specified by:
createEntityin interfaceEntityObjectIF- Parameters:
ssotoken- String representing user's SSO Token.entityName- Name of this entity.eg.cn=websphereAgententityType- Type of entity being created. eg. Agent The types supported by SDK are configured in the list of Managed Objects in theDAIservice.entityLocation- Location of the entity creation.eg.www.abc.comattributes- Map to represent Attribute-Value Pairs- Returns:
- Returns a set of Entity DNs created.
- Throws:
EntityException- if there is an internal error in the AM StoreSSOException- if the sign on is no longer valid
-
deleteEntity
public void deleteEntity(String ssoToken, String entityName, String entityType, String entityLocation) throws EntityException, SSOException
Deletes entities.- Specified by:
deleteEntityin interfaceEntityObjectIF- Parameters:
ssoToken- User's Single Sign On Token.entityName- Name of this entity. examplecn=websphereAgent.entityType- Type of entity being created. eg. Agent The types supported by SDK are configured in the list of Managed Objects in theDAIservice.entityLocation- Location of the entity creation. examplewww.abc.com.- Throws:
EntityException- if there is an internal error in the AM Store.SSOException- if the sign on is no longer valid.
-
getEntity
public Map getEntity(String ssoToken, String entityName, String entityType, String entityLocation) throws EntityException, SSOException, RemoteException
Returns the entity object for each entity given the entityType and entityName(s) in that particular organization.- Specified by:
getEntityin interfaceEntityObjectIF- Parameters:
ssoToken- User's Single Sign On Token.entityName- Name of this entity. examplecn=websphereAgent.entityType- Type of entity being created. eg. Agent The types supported by SDK are configured in the list of Managed Objects in theDAIservice.entityLocation- Location of the entity creation. examplewww.abc.com.- Returns:
- Set of Entity objects.
- Throws:
EntityException- if there is an internal error in the AM Store.SSOException- if the sign on is no longer valid.RemoteException
-
getEntityNames
public Set getEntityNames(String ssoToken, String entityType, String entityLocation, String entityFilter) throws EntityException, SSOException, RemoteException
Returns a set of Entity Names given the Entity Type for that particular organization.- Specified by:
getEntityNamesin interfaceEntityObjectIF- Parameters:
ssoToken- User's Single Sign On Token.entityType- Type of entity being created. eg. Agent The types supported by SDK are configured in the list of Managed Objects in theDAIservice.entityLocation- Location of the entity creation. examplewww.abc.com.entityFilter-- Returns:
- Set of Entity Names.
- Throws:
EntityException- if there is an internal error in the AM Store.SSOException- if the sign on is no longer valid.RemoteException
-
modifyEntity
public void modifyEntity(String ssoToken, String entityName, String entityType, String entityLocation, Map attributes) throws EntityException, SSOException, RemoteException
Sets or replaces attribute values with the new values supplied and Stores the changes to directory server.- Specified by:
modifyEntityin interfaceEntityObjectIF- Parameters:
ssoToken- User's Single Sign Token.entityName- Name of this entity. examplecn=websphereAgententityType- Type of entity being created. eg. Agent The types supported by SDK are configured in the list of Managed Objects in theDAIservice.entityLocation- Location of the entity creation. examplewww.abc.com.- Throws:
EntityException- if there is an internal error in the AM Store.SSOException- if the sign on is no longer valid.RemoteException
-
checkInitialization
protected static void checkInitialization() throws SSOExceptionMethod to get the token manager handle.- Throws:
SSOException
-
getAMEntity
protected AMEntity getAMEntity(String ssoToken, String entityName, String entityType, String entityLocation) throws EntityException, SSOException
Method to get the AMEntity object from the storeconnection.- Throws:
EntityExceptionSSOException
-
initializeObject
protected void initializeObject(String ssoToken, String entityLocation) throws EntityException, SSOException
Method to initialize the object. The AMStoreConnection handle is obtained by creating a valid SSOToken.- Throws:
EntityExceptionSSOException
-
-