Package com.iplanet.am.sdk
Class AMEntityImpl
- java.lang.Object
-
- com.iplanet.am.sdk.AMEntityImpl
-
- All Implemented Interfaces:
AMConstants,AMEntity,AMObject
public class AMEntityImpl extends Object implements AMEntity
-
-
Field Summary
Fields Modifier and Type Field Description protected static DebugdebugDeprecated.protected IDirectoryServicesdsServicesDeprecated.protected StringentryDNDeprecated.protected StringlocaleDeprecated.protected static HashtableprofileNameTableDeprecated.Hash table used to keep track of elements that need to be removed from objImplListeners table when a SSOToken is no longer valid.protected intprofileTypeDeprecated.protected StringrfcDNDeprecated.protected SSOTokentokenDeprecated.-
Fields inherited from interface com.iplanet.am.sdk.AMConstants
ADD_MEMBER, ADMIN_GROUPS_ENABLED_ATTR, ADMIN_ROLE_ATTR, ADMINISTRATION_SERVICE, CACHE_ENABLED_DISABLED_KEY, CACHE_MAX_SIZE_KEY, COMPLIANCE_SPECIAL_FILTER_ATTR, COMPLIANCE_USER_DELETION_ATTR, CONTAINER_DEFAULT_TEMPLATE_ROLE, CONTAINER_SUPPORTED_TYPES_ATTRIBUTE, DCT_ATTRIBUTE_LIST_ATTR, DCT_ENABLED_ATTR, DOMAIN_ADMINISTRATORS, DOMAIN_HELP_DESK_ADMINISTRATORS, EMAIL_ATTRIBUTE, FILTER_ATTR_NAME, INET_ADMIN_OBJECT_CLASS, INET_DOMAIN_STATUS_ATTR, INET_DOMAIN_STATUS_ATTRIBUTE, INVALID_USERID_CHARACTERS, OTHER_COSATTR_TYPE, POLICY_COSATTR_TYPE, POLICY_SUFFIX, PRE_POST_PROCESSING_MODULES_ATTR, REMOVE_ATTRIBUTE, REMOVE_MEMBER, REQUIRED_SERVICES_ATTR, ROLE_MANAGED_CONTAINER_DN_ATTRIBUTE, SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SERVICE_STATUS_ATTRIBUTE, STATIC_GROUP_DN_ATTRIBUTE, SUBSCRIBABLE_ATTRIBUTE, UNIQUE_ATTRIBUTE_LIST_ATTRIBUTE, UNIQUE_MEMBER_ATTRIBUTE, USER_CREATE_NOTIFICATION_LIST, USER_DELETE_NOTIFICATION_LIST, USER_ENCRYPTED_PASSWORD_ATTRIBUTE, USER_ENTRY_PROCESSING_IMPL, USER_MODIFY_NOTIFICATION_LIST, USER_PASSWORD_ATTRIBUTE, USER_SEARCH_RETURN_ATTR, USERID_PASSWORD_VALIDATION_CLASS
-
Fields inherited from interface com.iplanet.am.sdk.AMObject
ACTIVE, ACTIVE_VALUE, ASSIGNABLE_DYNAMIC_GROUP, DELETED, DELETED_VALUE, DYNAMIC_GROUP, FILTERED_ROLE, GROUP, GROUP_CONTAINER, GROUP_PROFILE, INACTIVE, INACTIVE_VALUE, MANAGED_ROLE, ORGANIZATION, ORGANIZATIONAL_UNIT, PEOPLE_CONTAINER, POLICY, RESOURCE, ROLE, ROLE_PROFILE, SERVICE, STATIC_GROUP, TEMPLATE, UNDETERMINED_OBJECT_TYPE, UNKNOWN_OBJECT_TYPE, USER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAMEntityImpl(SSOToken ssotoken, String dn)protectedAMEntityImpl(SSOToken ssotoken, String dn, int type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Activates the entity (if a status attribute is defined for this entity).voidaddEventListener(AMEventListener listener)Deprecated.Register a AMEventListener that needs to be invoked when a relevant event occurs.voidassignPolicies(String serviceName, Set policyDNs)Deprecated.Assigns the given policies to this object.voidassignServices(Map serviceNamesAndAttr)Deprecated.Assigns a set of services and the attributes for a service to the user.voidassignServices(Map serviceNamesAndAttr, boolean store)Deprecated.Assigns a set of services and the attributes for a service to the user.protected static StringconstructFilter(String objectClassFilter)Deprecated.protected static StringconstructFilter(String namingAttr, String objectClassFilter, String wildcard)Deprecated.protected static StringconstructFilter(Map avPairs)Deprecated.voidcreate()Deprecated.voidcreate(String stype)AMTemplatecreatePolicyTemplate(String serviceName, Map attributes)Deprecated.Creates a Policy Template with no priority for the given service associated with thisAMObject.AMTemplatecreatePolicyTemplate(String serviceName, Map attributes, int priority)Deprecated.Creates a Policy Template with a priority for the given service associated with thisAMObject.AMTemplatecreateTemplate(int templateType, String serviceName, Map attributes)Deprecated.Creates a Template with no priority for the given service associated with thisAMObject.AMTemplatecreateTemplate(int templateType, String serviceName, Map attributes, int priority)Deprecated.Creates a Template with a priority for the given service associated with thisAMObject.AMTemplatecreateTemplate(int templateType, String serviceName, Map attributes, int priority, Set policyDNs)Deprecated.voiddeactivate()Deactivates the entity (if a status attribute is defined for this entity).voiddelete()Removes and destroys the object.voiddelete(boolean recursive)Deletes object.SetgetAssignedServices()Deprecated.Gets all service names that are assigned to the user/group/org.SetgetAttribute(String attributeName)Deprecated.Returns attribute value.byte[][]getAttributeByteArray(String attributeName)Deprecated.Returns attribute value.MapgetAttributes()Returns Map of all attributes.MapgetAttributes(Set attributeNames)Returns Map of specified attributes.MapgetAttributesByteArray()Deprecated.Returns Map of all attributes.MapgetAttributesByteArray(Set attributeNames)Deprecated.Returns Map of specified attributes.MapgetAttributesFromDataStore()Deprecated.Returns Map of all attributes directly from data store.MapgetAttributesFromDataStore(Set attributeNames)Deprecated.Returns Map of specified attributes directly from data store.booleangetBooleanAttribute(String attributeName)Deprecated.StringgetDN()Returns the DN of the entry.intgetIntegerAttribute(String attributeName)Deprecated.StringgetOrganizationDN()Gets the object's organization.StringgetParentDN()Returns the parent DN of the entry.MapgetPolicy(String serviceName)Deprecated.Returns the effective service policy defined at this object after considering any inheritance from any policy templates.AMTemplategetPolicyTemplate(String serviceName)Deprecated.Returns the policy template for a service defined for this object ignoring any inheritance.protected SetgetRoleDNs()protected StringgetSearchFilter(int objectType)Deprecated.protected StringgetSearchFilter(int objectType, String searchTempName)Deprecated.MapgetServiceAttributes(String serviceName)Deprecated.Returns Map of all attributes of specified service.StringgetServiceStatus(String serviceName)Deprecated.Get the status of the service for this entity (user/group/organization/ organizational unit).StringgetStringAttribute(String attributeName)Deprecated.Returns string type attribute value.AMTemplategetTemplate(String serviceName, int templateType)Deprecated.Returns the Template for the given service associated with thisAMObject.booleanisActivated()Returns true if the entity is activated.booleanisExists()Checks if the entry exists in the directory or not.voidmodifyService(String sname, Map attrMap)Deprecated.Modify the service attributes of a service assigned to a entity (user/group/organization/organizational unit).protected static voidnotifyACIChangeEvent(String dn, int eventType)Deprecated.Notifies ACI Change.protected static voidnotifyAffectedDNs(String affectedDN, AMEvent dpEvent)Deprecated.Sends event notifications to all the listeners that correspond to a DN whose suffix which ends with affectedDN in the objImpListeners.protected static voidnotifyEntryEvent(String dn, int eventType, boolean cosType)Deprecated.This method will be called EntryEventListener to send notifications to all interested AMObjectImp's whenever an Entry Event occurs.voidpurge(boolean recursive, int graceperiod)Method to hard Delete an object.voidremoveAttributes(Set attributes)Removes attributes in thisAMObject.voidremoveEventListener(AMEventListener listener)Deprecated.UnRegister a previously registered event listener.protected static SetremoveFromProfileNameTable(SSOToken ssoToken)Deprecated.This method removes the entry corresponding to SSOTokenID supplied.protected static voidremoveObjImplListeners(Set dnSet, SSOTokenID ssoTokenId)Deprecated.Method that removes all the entries that correspond ("dn",ssoTokenId) supplied.protected SetreplaceAciListMacros(Set aciSet, String roleDN, String orgDN, String groupDN, String pcDN)Deprecated.Substitutes the macros in the set of DN:ACI.protected StringreplaceAciMacro(String aci, String macro, String str)Deprecated.protected StringreplaceAciMacros(String aci, String roleDN, String orgDN, String groupDN, String pcDN)Deprecated.Setsearch(int level, String filter)Deprecated.Search objects based on specified level and filter.protected SetsearchObjects(int[] objectTypes, String wildcard, Map avPairs, int level)Deprecated.protected AMSearchResultssearchObjects(int[] objectTypes, String wildcard, Map avPairs, AMSearchControl searchControl)Deprecated.protected AMSearchResultssearchObjects(String objectClassFilter, AMSearchControl searchControl, String avfilter)Deprecated.protected AMSearchResultssearchObjects(String namingAttr, String objectClassFilter, String wildcard, AMSearchControl searchControl, String avfilter)Deprecated.SetsearchObjects(String namingAttr, String objectClassFilter, String wildcard, Map avPairs, int level)Deprecated.protected AMSearchResultssearchObjects(String namingAttr, String objectClassFilter, String wildcard, Map avPairs, AMSearchControl searchControl)Deprecated.protected static voidsendExpiryEvent(String sourceDN, int sourceType)Deprecated.voidsetAttribute(String attributeName, Set attributeValue)Deprecated.voidsetAttributeByteArray(String attrName, byte[][] byteValues)Deprecated.Sets byte attribute values in thisAMObject.voidsetAttributes(Map attributes)Sets attribute values in thisAMObject.voidsetAttributesByteArray(Map attributes)Deprecated.Sets byte attribute values in thisAMObject.voidsetBooleanAttribute(String attributeName, boolean value)Deprecated.voidsetIntegerAttribute(String attributeName, int value)Deprecated.voidsetServiceStatus(String sname, String status)Deprecated.Set the status of the service for this entity (User/Organization /Group/Organizational Unit).voidsetStringAttribute(String attributeName, String value)Deprecated.Sets string type attribute value.voidstore()Stores the change to directory server.voidstore(boolean isAdd)Deprecated.Stores the change to directory server.voidunassignPolicies(String serviceName, Set policyDNs)Deprecated.Unassigns the given policies from this object.voidunassignServices(Set serviceNames)Deprecated.Unassigns services from the user.
-
-
-
Field Detail
-
profileNameTable
protected static Hashtable profileNameTable
Deprecated.Hash table used to keep track of elements that need to be removed from objImplListeners table when a SSOToken is no longer valid. The key is SSOTokenId & the value is a Set of DN's.
-
debug
protected static Debug debug
Deprecated.
-
dsServices
protected IDirectoryServices dsServices
Deprecated.
-
token
protected SSOToken token
Deprecated.
-
entryDN
protected String entryDN
Deprecated.
-
rfcDN
protected String rfcDN
Deprecated.
-
locale
protected String locale
Deprecated.
-
profileType
protected int profileType
Deprecated.
-
-
Method Detail
-
delete
public void delete(boolean recursive) throws AMException, SSOExceptionDeletes object. This method takes a boolean parameter, if its value is true, will remove all sub entries and the object itself, otherwise, will try to remove the object only. Two notes on recursive delete. First, be aware of the PERFORMANCE hit when large amount of child objects present. Second, it won't follow referral.- Specified by:
deletein interfaceAMEntity- Specified by:
deletein interfaceAMObject- Parameters:
recursive- if true delete the object and any objects under it, otherwise, delete the object only.- Throws:
AMException- if there is an internal problem with AM Store.SSOException- if the sign-on is no longer valid.- See Also:
AMObject.purge(boolean, int)
-
getAttributes
public Map getAttributes() throws AMException, SSOException
Description copied from interface:AMObjectReturns Map of all attributes. Map key is the attribute name and value is the attribute value.- Specified by:
getAttributesin interfaceAMEntity- Specified by:
getAttributesin interfaceAMObject- Returns:
- Map of all attributes.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data store.SSOException- if the single sign on token is no longer valid.
-
getDN
public String getDN()
Description copied from interface:AMObjectReturns the DN of the entry.
-
getOrganizationDN
public String getOrganizationDN() throws AMException, SSOException
Gets the object's organization.- Specified by:
getOrganizationDNin interfaceAMEntity- Specified by:
getOrganizationDNin interfaceAMObject- Returns:
- The object's organization DN.
- Throws:
AMException- if there is an internal error in the AM Store or the object doesn't have organzation DN.SSOException- if the sign on is no longer valid
-
getParentDN
public String getParentDN()
Description copied from interface:AMObjectReturns the parent DN of the entry.- Specified by:
getParentDNin interfaceAMEntity- Specified by:
getParentDNin interfaceAMObject- Returns:
- String DN
-
isExists
public boolean isExists() throws SSOExceptionChecks if the entry exists in the directory or not. First a syntax check is done on the DN string corresponding to the entry. If the DN syntax is valid, a directory call will be made to check for the existence of the entry.NOTE: This method internally invokes a call to the directory to verify the existence of the entry. There could be a performance overhead. Hence, please use your discretion while using this method.
- Specified by:
isExistsin interfaceAMEntity- Specified by:
isExistsin interfaceAMObject- Returns:
- false if the entry does not have a valid DN syntax or if the entry does not exists in the Directory. True otherwise.
- Throws:
SSOException- if the sign-on is no longer valid.
-
purge
public void purge(boolean recursive, int graceperiod) throws AMException, SSOExceptionMethod to hard Delete an object.- Specified by:
purgein interfaceAMEntity- Specified by:
purgein interfaceAMObject- Parameters:
recursive- If true, then recursively delete the whole subtree.graceperiod- If set to an integer greater than -1, it will verify if the object was last modified at least that many days ago before physically deleting it. Pre/PostCallbackplugins as registered in the Administration Service, will be called upon object deletion. If any of thepre-callbackclasses throw an exception, then the operation is aborted.- Throws:
AMException- if there is an internal error in the access management data store.SSOException- if the single sign on token is no longer valid- See Also:
AMObject.delete()
-
removeAttributes
public void removeAttributes(Set attributes) throws AMException, SSOException
Description copied from interface:AMObjectRemoves attributes in thisAMObject. The attributes are removed from the LDAP data store- Specified by:
removeAttributesin interfaceAMEntity- Specified by:
removeAttributesin interfaceAMObject- Parameters:
attributes- The Set of attribute names- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
setAttributes
public void setAttributes(Map attributes) throws AMException, SSOException
Description copied from interface:AMObjectSets attribute values in thisAMObject. Note that this method sets or replaces the attribute value with the new value supplied. Also, the attributes changed by this method are not committed to the LDAP data store unless the methodstore()is called explicitly.- Specified by:
setAttributesin interfaceAMEntity- Specified by:
setAttributesin interfaceAMObject- Parameters:
attributes- Map where key is the attribute name and value is a Set of attribute values. Each of the attribute value must be a string value.- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
delete
public void delete() throws AMException, SSOExceptionRemoves and destroys the object.- Specified by:
deletein interfaceAMEntity- Specified by:
deletein interfaceAMObject- Throws:
AMException- if there is an internal problem with AM Store.SSOException- if the sign-on is no longer valid.- See Also:
AMObject.delete(boolean),AMObject.purge(boolean, int)
-
store
public void store() throws AMException, SSOExceptionDescription copied from interface:AMObjectStores the change to directory server. This method should be called after doingsetAttributesso that the changes that are made can be permanently committed to the LDAP data store.- Specified by:
storein interfaceAMEntity- Specified by:
storein interfaceAMObject- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data store.SSOException- if the single sign on token is no longer valid.
-
create
public void create(String stype) throws AMException, SSOException
- Throws:
AMExceptionSSOException
-
activate
public void activate() throws AMException, SSOExceptionDescription copied from interface:AMEntityActivates the entity (if a status attribute is defined for this entity). If a status attribute is not defined then this method returns without doing anything.- Specified by:
activatein interfaceAMEntity- Throws:
AMException- if an error is encountered when trying to activate the managed object.SSOException- if the single sign on token is no longer valid.
-
deactivate
public void deactivate() throws AMException, SSOExceptionDescription copied from interface:AMEntityDeactivates the entity (if a status attribute is defined for this entity). If a status attribute is not defined then this method returns without doing anything.- Specified by:
deactivatein interfaceAMEntity- Throws:
AMException- if an error is encountered when trying to deactivate the managed object.SSOException- if the single sign on token is no longer valid.
-
isActivated
public boolean isActivated() throws AMException, SSOExceptionDescription copied from interface:AMEntityReturns true if the entity is activated. If the entity does not have a status attribute, then this method returns true, rather that throw an exception.- Specified by:
isActivatedin interfaceAMEntity- Returns:
- true if the entity is activated.
- Throws:
AMException- if an error is encountered when trying to get the status attribute from the data store.SSOException- if the single sign on token is no longer valid.
-
getAttributes
public Map getAttributes(Set attributeNames) throws AMException, SSOException
Description copied from interface:AMObjectReturns Map of specified attributes. Map key is the attribute name and value is the attribute value.- Specified by:
getAttributesin interfaceAMEntity- Specified by:
getAttributesin interfaceAMObject- Parameters:
attributeNames- The Set of attribute names.- Returns:
- Map of specified attributes.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
getRoleDNs
protected Set getRoleDNs() throws AMException, SSOException
- Throws:
AMExceptionSSOException
-
getAssignedServices
public Set getAssignedServices() throws AMException, SSOException
Deprecated.Gets all service names that are assigned to the user/group/org.- Specified by:
getAssignedServicesin interfaceAMObject- Returns:
- The Set of service names that are assigned to the user.
- Throws:
AMException- if there is an internal error in the AM StoreSSOException- if the sign on is no longer valid
-
setAttribute
public void setAttribute(String attributeName, Set attributeValue) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
getAttribute
public Set getAttribute(String attributeName) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns attribute value.- Specified by:
getAttributein interfaceAMObject- Parameters:
attributeName- Attribute name- Returns:
- Set of attribute values.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
setAttributeByteArray
public void setAttributeByteArray(String attrName, byte[][] byteValues) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectSets byte attribute values in thisAMObject. Note that this method sets or replaces the attribute value with the new value supplied. Also, the attributes changed by this method are not committed to the LDAP data store unless the methodstore()is called explicitly.- Specified by:
setAttributeByteArrayin interfaceAMObject- Parameters:
attrName- the attribute namebyteValues- attribute values in byte[][] format- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
getAttributeByteArray
public byte[][] getAttributeByteArray(String attributeName) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns attribute value.- Specified by:
getAttributeByteArrayin interfaceAMObject- Parameters:
attributeName- Attribute name- Returns:
- attribute values in byte[][] format or null if the attribute does not exist.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
getAttributesFromDataStore
public Map getAttributesFromDataStore() throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns Map of all attributes directly from data store. Map key is the attribute name and value is the attribute value.- Specified by:
getAttributesFromDataStorein interfaceAMObject- Returns:
- Map of all attributes.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
getAttributesFromDataStore
public Map getAttributesFromDataStore(Set attributeNames) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns Map of specified attributes directly from data store. Map key is the attribute name and value is the attribute value.- Specified by:
getAttributesFromDataStorein interfaceAMObject- Parameters:
attributeNames- The Set of attribute names.- Returns:
- Map of specified attributes.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
setAttributesByteArray
public void setAttributesByteArray(Map attributes) throws SSOException, AMException
Deprecated.Description copied from interface:AMObjectSets byte attribute values in thisAMObject. Note that this method sets or replaces the attribute value with the new value supplied. Also, the attributes changed by this method are not committed to the LDAP data store unless the methodstore()is called explicitly.- Specified by:
setAttributesByteArrayin interfaceAMObject- Parameters:
attributes- Map where key is the attribute name and values are in byte[][] format.- Throws:
SSOException- if the single sign on token is no longer valid.AMException- if an error is encountered when trying to access/retrieve data from the data store
-
getAttributesByteArray
public Map getAttributesByteArray() throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns Map of all attributes. Map key is the attribute name and value is the attribute value in byte[][] format.- Specified by:
getAttributesByteArrayin interfaceAMObject- Returns:
- Map of all attributes.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
getAttributesByteArray
public Map getAttributesByteArray(Set attributeNames) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns Map of specified attributes. Map key is the attribute name and value is the attribute value in byte[][] format.- Specified by:
getAttributesByteArrayin interfaceAMObject- Parameters:
attributeNames- The Set of attribute names.- Returns:
- Map of specified attributes. The key of the map is the attribute name and the values in byte[][] format.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
setBooleanAttribute
public void setBooleanAttribute(String attributeName, boolean value) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
getBooleanAttribute
public boolean getBooleanAttribute(String attributeName) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
setIntegerAttribute
public void setIntegerAttribute(String attributeName, int value) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
getIntegerAttribute
public int getIntegerAttribute(String attributeName) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
getPolicy
public Map getPolicy(String serviceName) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns the effective service policy defined at this object after considering any inheritance from any policy templates.- Specified by:
getPolicyin interfaceAMObject- Parameters:
serviceName- service name.- Returns:
- Map the effective service policy for the object after inheritance; key is the attribute name and value is attribute value. An empty Map will be returned if no policy attribute is defined in the specified service.
- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this methodAMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid
-
getPolicyTemplate
public AMTemplate getPolicyTemplate(String serviceName) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns the policy template for a service defined for this object ignoring any inheritance. This is a convenience method and is equivalent togetTemplate(serviceName, AMTemplate.POLICY_TEMPLATE).AMUserobject will throwUnsupportedOperationExceptionbecause this method is not relevant forAMUser.- Specified by:
getPolicyTemplatein interfaceAMObject- Parameters:
serviceName- service name.- Returns:
AMTemplatethe policy template of the service for this object.- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this method.AMException- if an error is encountered when trying to access/retrieve data from the data store.SSOException- if the single sign on token is no longer valid
-
getServiceAttributes
public Map getServiceAttributes(String serviceName) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns Map of all attributes of specified service. Map key is the attribute name and value is the attribute value.- Specified by:
getServiceAttributesin interfaceAMObject- Parameters:
serviceName- Service name- Returns:
- Map of all attributes of specified service, an empty Map will be returned if no service attribute is defined in the specified service.
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.- See Also:
AMObject.getTemplate(java.lang.String, int)
-
setServiceStatus
public void setServiceStatus(String sname, String status) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectSet the status of the service for this entity (User/Organization /Group/Organizational Unit). The valid values for the status attribute are defined in the SMS DTD. Before the status attribute is set, it is verified to see if the service is first assigned to the user or not, and that the value for the status is valid per the DTD.- Specified by:
setServiceStatusin interfaceAMObject- Parameters:
sname- Name of service whose status attribute has to be changedstatus- One of the status values as defined in the service schema- Throws:
AMException- if a data store exception is encountered.SSOException- if the single sign on token is no longer valid.
-
getServiceStatus
public String getServiceStatus(String serviceName) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectGet the status of the service for this entity (user/group/organization/ organizational unit). Returns null, if service is not assigned to the entity.- Specified by:
getServiceStatusin interfaceAMObject- Parameters:
serviceName- Name of service- Returns:
- status Value of the status attribute
- Throws:
AMException- if a data store exception is encounteredSSOException- if single sign on token is no longer valid.
-
setStringAttribute
public void setStringAttribute(String attributeName, String value) throws AMException, SSOException
Deprecated.Sets string type attribute value.- Specified by:
setStringAttributein interfaceAMObject- Parameters:
attributeName- Attribute namevalue- value to be set for the attributeName- Throws:
AMException- if there is an internal problem with AM Store.SSOException- if the sign-on is no longer valid.
-
getStringAttribute
public String getStringAttribute(String attributeName) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns string type attribute value.- Specified by:
getStringAttributein interfaceAMObject- Parameters:
attributeName- Attribute name- Returns:
- String value of attribute
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
getTemplate
public AMTemplate getTemplate(String serviceName, int templateType) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectReturns the Template for the given service associated with thisAMObject.- Specified by:
getTemplatein interfaceAMObject- Parameters:
serviceName- service name.templateType- the template type. Can be one of the following:- Returns:
AMTemplatethe service template for thisAMObject.- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this methodAMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
addEventListener
public void addEventListener(AMEventListener listener) throws SSOException
Deprecated.Register a AMEventListener that needs to be invoked when a relevant event occurs. If the listener was already registered, then it is registered only once; no duplicate registration is allowed.Object.equals()method on the listener object is used to determine duplicates.
NOTE: This method does not check if the listener implementation object exists in the directory, since it is brought from directory itself.- Specified by:
addEventListenerin interfaceAMObject- Parameters:
listener- listener object that will be called upon when an event occurs.- Throws:
SSOException- if errors were encountered in adding a new SSOTokenListener instance
-
assignPolicies
public void assignPolicies(String serviceName, Set policyDNs) throws AMException, SSOException
Deprecated.Assigns the given policies to this object.- Specified by:
assignPoliciesin interfaceAMObject- Parameters:
serviceName- serviceNamepolicyDNs- Set of policy DN string- Throws:
AMException- if there is an internal problem with AM Store.SSOException- if the sign-on is no longer valid.
-
assignServices
public void assignServices(Map serviceNamesAndAttr) throws AMException, SSOException
Deprecated.Assigns a set of services and the attributes for a service to the user.- Specified by:
assignServicesin interfaceAMObject- Parameters:
serviceNamesAndAttr- Set of service names and the attributes for a service.- Throws:
AMException- if there is an internal error in the AM StoreSSOException- if the sign on is no longer valid- See Also:
AMUser.assignServices(java.util.Set)
-
assignServices
public void assignServices(Map serviceNamesAndAttr, boolean store) throws AMException, SSOException
Deprecated.Assigns a set of services and the attributes for a service to the user.- Parameters:
serviceNamesAndAttr- Set of service names and the attributes for a service.store- A boolean value. If the boolean value is 'true', 1) Checks if there is already an assigned service. 2) Checks if any of the assigned services are registered with the parent organization. 3) Combines the old Object Classes and the new Object classes and assigns them for a service. If the boolean value is 'false', 1) Assigns services without any check for existence of already assigned service. 2) Assigns only the new object classes.- Throws:
AMException- if there is an internal error in the AM StoreSSOException- if the sign on is no longer valid- See Also:
AMUser.assignServices( java.util.Set serviceNames)
-
create
public void create() throws AMException, SSOExceptionDeprecated.- Throws:
AMExceptionSSOException
-
createPolicyTemplate
public AMTemplate createPolicyTemplate(String serviceName, Map attributes) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectCreates a Policy Template with no priority for the given service associated with thisAMObject. This is a convenience method and is equivalent tocreateTemplate( AMTemplate.POLICY_TEMPLATE, serviceName, attributes).- Specified by:
createPolicyTemplatein interfaceAMObject- Parameters:
serviceName- service name.attributes- Map of attributes name-value pairs.- Returns:
AMTemplatethe service template for thisAMObject.- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this method.AMException- if an error is encountered when trying to access/retrieve data from the data store.SSOException- if the single sign on token is no longer valid.
-
createPolicyTemplate
public AMTemplate createPolicyTemplate(String serviceName, Map attributes, int priority) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectCreates a Policy Template with a priority for the given service associated with thisAMObject. This is a convenience method and is equivalent tocreateTemplate(AMTemplate.POLICY_TEMPLATE, serviceName, attributes, priority).- Specified by:
createPolicyTemplatein interfaceAMObject- Parameters:
serviceName- service name.attributes- Map of attributes name-value pairs.priority- template priority (0 is the highest priority).- Returns:
AMTemplatethe service template for thisAMObject.- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this method.AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
createTemplate
public AMTemplate createTemplate(int templateType, String serviceName, Map attributes) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectCreates a Template with no priority for the given service associated with thisAMObject.- Specified by:
createTemplatein interfaceAMObject- Parameters:
templateType- the template type. Can be one of the following:serviceName- service nameattributes- Map of attributes name-value pairs. if it is null default values will be used.- Returns:
AMTemplatethe service template for thisAMObject.- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this method.AMException- if an error is encountered when trying to access/retrieve data from the data store.SSOException- if the single sign on token is no longer valid.
-
createTemplate
public AMTemplate createTemplate(int templateType, String serviceName, Map attributes, int priority) throws UnsupportedOperationException, AMException, SSOException
Deprecated.Description copied from interface:AMObjectCreates a Template with a priority for the given service associated with thisAMObject.- Specified by:
createTemplatein interfaceAMObject- Parameters:
templateType- the template type. Can be one of the following:serviceName- service name.attributes- Map of attributes name-value pairspriority- template priority (0 is the highest priority)- Returns:
AMTemplatethe service template for thisAMObject.- Throws:
UnsupportedOperationException- if the class implementing this interface does not support this methodAMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
createTemplate
public AMTemplate createTemplate(int templateType, String serviceName, Map attributes, int priority, Set policyDNs) throws UnsupportedOperationException, AMException, SSOException
Deprecated.
-
modifyService
public void modifyService(String sname, Map attrMap) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectModify the service attributes of a service assigned to a entity (user/group/organization/organizational unit). It replaces existing service attribute values with the ones provided. If new attribute values are provided, those are set too. Values of the attribute are validated against the service schema. Before the values are replaced in the entry, theServiceCallbackclasses, if any, are instantiated and thevalidateAttribute()method is called.- Specified by:
modifyServicein interfaceAMObject- Parameters:
sname- Name of the service which has to be modifiedattrMap- Map of attribute names and set of attribute values.- Throws:
AMException- if an error occurs during validation or storingSSOException- if the single sign on token is no longer valid.
-
removeEventListener
public void removeEventListener(AMEventListener listener)
Deprecated.UnRegister a previously registered event listener. If thelistenerwas not registered, the method simply returns without doing anything.- Specified by:
removeEventListenerin interfaceAMObject- Parameters:
listener- listener object that will be removed or unregistered.
-
search
public Set search(int level, String filter) throws AMException, SSOException
Deprecated.Description copied from interface:AMObjectSearch objects based on specified level and filter.- Specified by:
searchin interfaceAMObject- Parameters:
level- The search level starting from the objectfilter- The search filter- Returns:
- Set of object DN's matching the search
- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data storeSSOException- if the single sign on token is no longer valid.
-
searchObjects
public Set searchObjects(String namingAttr, String objectClassFilter, String wildcard, Map avPairs, int level) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
store
public void store(boolean isAdd) throws AMException, SSOExceptionDeprecated.Description copied from interface:AMObjectStores the change to directory server. This method should be called after doingsetAttributesor any otherset methodsprovided. so that the changes that are made can be permanently committed to the LDAP data store.- Specified by:
storein interfaceAMObject- Parameters:
isAdd- IfaddValuesis true, then the attribute values as set in thesetAttributesmethod are added to any existing values for the same attribute in the directory. Otherwise, the attribute values replace existing values in the data store.- Throws:
AMException- if an error is encountered when trying to access/retrieve data from the data store.SSOException- if the single sign on token is no longer valid.
-
unassignPolicies
public void unassignPolicies(String serviceName, Set policyDNs) throws AMException, SSOException
Deprecated.Unassigns the given policies from this object.- Specified by:
unassignPoliciesin interfaceAMObject- Parameters:
serviceName- serviceNamepolicyDNs- Set of policy DN string- Throws:
AMException- if there is an internal problem with AM Store.SSOException- if the sign-on is no longer valid.
-
unassignServices
public void unassignServices(Set serviceNames) throws AMException, SSOException
Deprecated.Unassigns services from the user.- Specified by:
unassignServicesin interfaceAMObject- Parameters:
serviceNames- Set of service names- Throws:
AMException- if there is an internal error in the AM StoreSSOException- if the sign on is no longer valid
-
constructFilter
protected static String constructFilter(String namingAttr, String objectClassFilter, String wildcard)
Deprecated.
-
getSearchFilter
protected String getSearchFilter(int objectType)
Deprecated.
-
getSearchFilter
protected String getSearchFilter(int objectType, String searchTempName)
Deprecated.
-
notifyACIChangeEvent
protected static void notifyACIChangeEvent(String dn, int eventType)
Deprecated.Notifies ACI Change. This method will be called by theAMIdRepoListener to send notifications to all interested AMObjectImp's whenever an ACI change occurs.- Parameters:
dn- name of the object changedeventType- type of modification
-
notifyEntryEvent
protected static void notifyEntryEvent(String dn, int eventType, boolean cosType)
Deprecated.This method will be called EntryEventListener to send notifications to all interested AMObjectImp's whenever an Entry Event occurs.- Parameters:
dn- the object that is modifiedeventType- type of modificationcosType- - true if it is a cosrelated event; false otherwise
-
sendExpiryEvent
protected static void sendExpiryEvent(String sourceDN, int sourceType)
Deprecated.
-
removeFromProfileNameTable
protected static Set removeFromProfileNameTable(SSOToken ssoToken)
Deprecated.This method removes the entry corresponding to SSOTokenID supplied.- Parameters:
ssoToken- - a SSOToken- Returns:
- Set of DN's for the given SSOTokenID or null if not present
-
removeObjImplListeners
protected static void removeObjImplListeners(Set dnSet, SSOTokenID ssoTokenId)
Deprecated.Method that removes all the entries that correspond ("dn",ssoTokenId) supplied. This is done for all the DN's in the set of DN's supplied.- Parameters:
dnSet- - a set of DNsssoTokenId- - the SSO token Id
-
replaceAciListMacros
protected Set replaceAciListMacros(Set aciSet, String roleDN, String orgDN, String groupDN, String pcDN)
Deprecated.Substitutes the macros in the set of DN:ACI.- Parameters:
aciSet- Set of DN:ACIroleDN- Role DN to replace macro ROLENAMEorgDN- Organization DN to replace macro ORGANIZATIONgroupDN- Group DN to replace macro GROUPNAMEpcDN- People container DN to replace PCNAME
-
replaceAciMacros
protected String replaceAciMacros(String aci, String roleDN, String orgDN, String groupDN, String pcDN)
Deprecated.
-
searchObjects
protected AMSearchResults searchObjects(String namingAttr, String objectClassFilter, String wildcard, Map avPairs, AMSearchControl searchControl) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
searchObjects
protected AMSearchResults searchObjects(String namingAttr, String objectClassFilter, String wildcard, AMSearchControl searchControl, String avfilter) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
searchObjects
protected AMSearchResults searchObjects(String objectClassFilter, AMSearchControl searchControl, String avfilter) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
searchObjects
protected Set searchObjects(int[] objectTypes, String wildcard, Map avPairs, int level) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
searchObjects
protected AMSearchResults searchObjects(int[] objectTypes, String wildcard, Map avPairs, AMSearchControl searchControl) throws AMException, SSOException
Deprecated.- Throws:
AMExceptionSSOException
-
notifyAffectedDNs
protected static void notifyAffectedDNs(String affectedDN, AMEvent dpEvent)
Deprecated.Sends event notifications to all the listeners that correspond to a DN whose suffix which ends with affectedDN in the objImpListeners.- Parameters:
affectedDN- - String which has been stripped to reflect the subtree of DN's that will be affected in case of cos related changesdpEvent- - a AMEvent
-
-