|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The AMObject
interface provides methods to
manage various Sun ONE Identity Server objects and their attributes.
Field Summary | |
static int |
ASSIGNABLE_DYNAMIC_GROUP
Represents a Dynamic Group object type |
static int |
DYNAMIC_GROUP
Represents a Dynamic Group object type |
static int |
FILTERED_ROLE
Represents a Filtered Role object type |
static int |
GROUP
Represents a Group object type |
static int |
GROUP_CONTAINER
Represents a group container object type |
static int |
GROUP_PROFILE
Represents group profile Information |
static int |
MANAGED_ROLE
Represents a Managed Role object type |
static int |
ORGANIZATION
Represents an Organization object type |
static int |
ORGANIZATIONAL_UNIT
Represents a Organizational Unit object type |
static int |
PEOPLE_CONTAINER
Represents a People Container object type |
static int |
POLICY
Represents Policy Information |
static int |
ROLE
Represents a Role object type |
static int |
ROLE_PROFILE
Represents role profile Information |
static int |
SERVICE
Represents Service Information |
static int |
STATIC_GROUP
Represents a Static Group object type |
static int |
TEMPLATE
Represents a Template object type |
static int |
UNKNOWN_OBJECT_TYPE
Represents an object type that cannot be identified |
static int |
USER
Represents a User object type |
Fields inherited from interface com.iplanet.am.sdk.AMConstants |
SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SUBSCRIBABLE_ATTRIBUTE, UNIQUE_MEMBER_ATTRIBUTE |
Method Summary | |
void |
addEventListener(AMEventListener listener)
Register a event listener that needs to be invoked when a relevant event occurs. |
void |
assignPolicies(java.lang.String serviceName,
java.util.Set policyDNs)
Assigns the given policies to this object. |
AMTemplate |
createPolicyTemplate(java.lang.String serviceName,
java.util.Map attributes)
Creates a Policy Template with no priority for the given service associated with this AMObject. |
AMTemplate |
createPolicyTemplate(java.lang.String serviceName,
java.util.Map attributes,
int priority)
Creates a Policy Template with a priority for the given service associated with this AMObject. |
AMTemplate |
createTemplate(int templateType,
java.lang.String serviceName,
java.util.Map attributes)
Creates a Template with no priority for the given service associated with this AMObject. |
AMTemplate |
createTemplate(int templateType,
java.lang.String serviceName,
java.util.Map attributes,
int priority)
Creates a Template with a priority for the given service associated with this AMObject. |
void |
delete()
Deletes the object. |
void |
delete(boolean recursive)
Deletes object(s). |
java.util.Set |
getAttribute(java.lang.String attributeName)
Gets attribute value. |
byte[][] |
getAttributeByteArray(java.lang.String attributeName)
Gets attribute value. |
java.util.Map |
getAttributes()
Gets Map of all attributes. |
java.util.Map |
getAttributes(java.util.Set attributeNames)
Gets Map of specified attributes. |
java.util.Map |
getAttributesByteArray()
Gets Map of all attributes. |
java.util.Map |
getAttributesByteArray(java.util.Set attributeNames)
Gets Map of specified attributes. |
java.lang.String |
getDN()
Gets the DN of the entry. |
java.lang.String |
getOrganizationDN()
Gets the object's organization. |
java.lang.String |
getParentDN()
Gets the parent DN of the entry. |
java.util.Map |
getPolicy(java.lang.String serviceName)
Gets the effective service policy defined at this object after considering any inheritance from any policy tempates. |
AMTemplate |
getPolicyTemplate(java.lang.String serviceName)
Gets the policy template for a service defined for this object ignoring any inheritance. |
java.util.Map |
getServiceAttributes(java.lang.String serviceName)
Gets Map of all attributes of specified service. |
java.lang.String |
getStringAttribute(java.lang.String attributeName)
Gets string type attribute value. |
AMTemplate |
getTemplate(java.lang.String serviceName,
int templateType)
Gets the Template for the given service associated with this AMObject. |
boolean |
isExists()
Checks if the entry exists in the directory or not. |
void |
removeAttributes(java.util.Set attributes)
Removes attributes in this AMObject. |
void |
removeEventListener(AMEventListener listener)
UnRegister a previously registered event listener. |
java.util.Set |
search(int level,
java.lang.String filter)
Search objects based on specified level and filter. |
void |
setAttributes(java.util.Map attributes)
Sets attribute values in this AMObject. |
void |
setStringAttribute(java.lang.String attributeName,
java.lang.String value)
Sets string type attribute value. |
void |
store()
Stores the change to directory server. |
void |
unassignPolicies(java.lang.String serviceName,
java.util.Set policyDNs)
Unassigns the given policies from this object. |
Field Detail |
public static final int USER
public static final int ORGANIZATION
public static final int ORGANIZATIONAL_UNIT
public static final int GROUP_CONTAINER
public static final int PEOPLE_CONTAINER
public static final int ROLE
public static final int MANAGED_ROLE
public static final int FILTERED_ROLE
public static final int GROUP
public static final int STATIC_GROUP
public static final int DYNAMIC_GROUP
public static final int ASSIGNABLE_DYNAMIC_GROUP
public static final int TEMPLATE
public static final int POLICY
public static final int SERVICE
public static final int ROLE_PROFILE
public static final int GROUP_PROFILE
public static final int UNKNOWN_OBJECT_TYPE
Method Detail |
public java.lang.String getDN()
public java.lang.String getParentDN()
public void store() throws AMException, SSOException
AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public boolean isExists() throws SSOException
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.
SSOException
- if the sign-on is no longer valid.public java.util.Map getAttributes() throws AMException, SSOException
AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.util.Map getAttributesByteArray() throws AMException, SSOException
AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.util.Map getAttributes(java.util.Set attributeNames) throws AMException, SSOException
attributeNames
- The Set of attribute names.AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.util.Map getAttributesByteArray(java.util.Set attributeNames) throws AMException, SSOException
attributeNames
- The Set of attribute names.AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.util.Set getAttribute(java.lang.String attributeName) throws AMException, SSOException
attributeName
- Attribute nameAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public byte[][] getAttributeByteArray(java.lang.String attributeName) throws AMException, SSOException
attributeName
- Attribute nameAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.lang.String getStringAttribute(java.lang.String attributeName) throws AMException, SSOException
attributeName
- Attribute nameAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.util.Map getServiceAttributes(java.lang.String serviceName) throws AMException, SSOException
serviceName
- Service nameAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public AMTemplate createTemplate(int templateType, java.lang.String serviceName, java.util.Map attributes) throws java.lang.UnsupportedOperationException, AMException, SSOException
templateType
- either AMTemplate.POLICY_TEMPLATE
or
AMTemplate.DYNAMIC_TEMPLATE
serviceName
- serviceNameattributes
- Map of attributes name-value pairs. if it is null
defalut values will be usedAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.java.lang.UnsupportedOperationException
- if the class implementing this
interface does not support this
methodpublic AMTemplate createTemplate(int templateType, java.lang.String serviceName, java.util.Map attributes, int priority) throws java.lang.UnsupportedOperationException, AMException, SSOException
templateType
- either AMTemplate.POLICY_TEMPLATE
or
AMTemplate.DYNAMIC_TEMPLATE
serviceName
- serviceNameattributes
- Map of attributes name-value pairspriority
- template priority (0 is the highest priority)AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.java.lang.UnsupportedOperationException
- if the class implementing this
interface does not support this
methodpublic AMTemplate getTemplate(java.lang.String serviceName, int templateType) throws java.lang.UnsupportedOperationException, AMException, SSOException
serviceName
- serviceNametemplateType
- either AMTemplate.POLICY_TEMPLATE
or
AMTemplate.DYNAMIC_TEMPLATE
AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.java.lang.UnsupportedOperationException
- if the class implementing this
interface does not support this
methodpublic void assignPolicies(java.lang.String serviceName, java.util.Set policyDNs) throws AMException, SSOException
serviceName
- serviceNamepolicyDNs
- Set of policy DN stringAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void unassignPolicies(java.lang.String serviceName, java.util.Set policyDNs) throws AMException, SSOException
serviceName
- serviceNamepolicyDNs
- Set of policy DN stringAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void setAttributes(java.util.Map attributes) throws AMException, SSOException
attributes
- Map where key is the attribute name and value is the
attribute valueAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void removeAttributes(java.util.Set attributes) throws AMException, SSOException
attributes
- The Set of attribute namesAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void setStringAttribute(java.lang.String attributeName, java.lang.String value) throws AMException, SSOException
attributeName
- Attribute namevalue
- value to be set for the attributeNameAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void delete() throws AMException, SSOException
AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void delete(boolean recursive) throws AMException, SSOException
recursive
- if true delete the object and any objects under it,
otherwise, delete the object only.AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public java.util.Set search(int level, java.lang.String filter) throws AMException, SSOException
level
- The search level starting from the objectfilter
- The search filterAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.public void addEventListener(AMEventListener listener) throws SSOException
Object.equals()
method on the listener object
is used to determine duplicates.
listener
- listener object that will be called upon when an event
occurs.SSOException
- if errors were encountered in adding a new
SSOTokenListener instancepublic void removeEventListener(AMEventListener listener)
listener
was not registered previously, the method simply
returns without doing anything.listener
- listener object that will be removed or unregistered.public AMTemplate createPolicyTemplate(java.lang.String serviceName, java.util.Map attributes) throws java.lang.UnsupportedOperationException, AMException, SSOException
serviceName
- serviceNameattributes
- Map of attributes name-value pairsAMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.java.lang.UnsupportedOperationException
- if the class implementing this
interface does not support this
methodpublic AMTemplate createPolicyTemplate(java.lang.String serviceName, java.util.Map attributes, int priority) throws java.lang.UnsupportedOperationException, AMException, SSOException
serviceName
- serviceNameattributes
- Map of attributes name-value pairspriority
- template priority (0 is the highest priority)AMException
- if an error is encountered when trying to
access/retrieve data from the data storeSSOException
- if the sign-on is no longer valid.java.lang.UnsupportedOperationException
- if the class implementing this
interface does not support this
methodpublic AMTemplate getPolicyTemplate(java.lang.String serviceName) throws java.lang.UnsupportedOperationException, AMException, SSOException
java.lang.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 sign on is no longer validpublic java.util.Map getPolicy(java.lang.String serviceName) throws java.lang.UnsupportedOperationException, AMException, SSOException
java.lang.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 sign on is no longer validpublic java.lang.String getOrganizationDN() throws AMException, SSOException
AMException
- if an error is encountered when trying to
access/retrieve data from the data store or the object doesn't
have organzation DN.SSOException
- if the sign on is no longer valid
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |