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 AMStoreConnection
amsc
protected AMOrganization
entity
protected static Object
lock
protected static Cache
oCache
protected SSOToken
token
-
Constructor Summary
Constructors Constructor Description EntityObjectImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
checkInitialization()
Method to get the token manager handle.Set
createEntity(String ssotoken, String entityName, String entityType, String entityLocation, Map attributes)
Creates entities.void
deleteEntity(String ssoToken, String entityName, String entityType, String entityLocation)
Deletes entities.protected AMEntity
getAMEntity(String ssoToken, String entityName, String entityType, String entityLocation)
Method to get the AMEntity object from the storeconnection.Map
getEntity(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.Set
getEntityNames(String ssoToken, String entityType, String entityLocation, String entityFilter)
Returns a set of Entity Names given the Entity Type for that particular organization.protected void
initializeObject(String ssoToken, String entityLocation)
Method to initialize the object.void
modifyEntity(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:
createEntity
in 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 theDAI
service.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:
deleteEntity
in 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 theDAI
service.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:
getEntity
in 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 theDAI
service.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:
getEntityNames
in 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 theDAI
service.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:
modifyEntity
in interfaceEntityObjectIF
- Parameters:
ssoToken
- User's Single Sign 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 theDAI
service.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 SSOException
Method 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:
EntityException
SSOException
-
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:
EntityException
SSOException
-
-