Class PersistentObject
- java.lang.Object
-
- com.iplanet.ums.PersistentObject
-
- All Implemented Interfaces:
ISearch,IUMSConstants,Serializable
- Direct Known Subclasses:
BaseRole,COSTemplate,DirectCOSDefinition,DomainComponent,DynamicGroup,Organization,OrganizationalUnit,PeopleContainer,Resource,StaticGroup,User
public class PersistentObject extends Object implements ISearch, Serializable, IUMSConstants
Represents a persistent object in UMS. This is the base class for all objects that Object Management Module (OMM) manages in UMS.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPUTED_MEMBER_ATTR_NAME-
Fields inherited from interface com.iplanet.ums.IUMSConstants
ADD_NULL_OBJ, ATTR_NOT_ALLOWED, ATTRIBUTETYPE_NOT_FOUND, BAD_ATTRNAMES, BAD_CHILD_OBJ, BAD_CLASS, BAD_COS_ATTR_QUALIFIER, BAD_GUID, BAD_ID, BAD_NAMING_ATTR, BAD_OBJ_TO_ADD, BAD_PRINCIPAL_HDL, BAD_STRUCTURE_TEMPLATE_PRIORITY, BAD_TEMPLATE, BAD_TOKEN_HDL, COMPOSE_GUID_FAILED, CONFIG_MGR_ERROR, COS_DEF_OR_TARGET_OBJECT_NULL, COS_DEFINITION_NOT_FOUND, COS_DEFINITION_NOT_PERSISTENT, COS_TARGET_OBJECT_DIFFERENT_TREE, COS_TARGET_OBJECT_NOT_PERSISTENT, COS_TEMPLATE_NOT_FOUND, DATA_CONSTRAINT, DEFINITION_NOT_PERSISTENT, DEL_NULL_OBJ, DSCFG_CONNECTFAIL, DSCFG_CTRLERROR, DSCFG_DIRSERVER_NODE_EXPECTED, DSCFG_INVALID_BASE_DN, DSCFG_JSSSFFAIL, DSCFG_NO_FILE_PATH, DSCFG_NOCFGMGR, DSCFG_SERVER_NOT_FOUND, DSCFG_SERVERGROUP_NODE_EXPECTED, DSCFG_UNSUPPORTEDLSTNRTYPE, DSCFG_UNSUPPORTEDSERVERCTRL, ENTRY_ALREADY_EXISTS, ENTRY_NOT_FOUND, ERROR_CM, ERROR_CM_INITIATE, ILLEGAL_ADGROUP_SCOPE, ILLEGAL_GROUP_SCOPE, INSTANCE_FAILED, INSUFFICIENT_ACCESS_ADD, INSUFFICIENT_ACCESS_DELETE, INVALID_COS_ATTRIBUTE_QUALIFIER, INVALID_COSDEFINITION, INVALID_TOKEN, MISSING_TEMPL_NAME, MULTIPLE_ENTRY, NEW_INSTANCE_FAILED, NEXT_ENTRY_FAILED, NO_NAMING_ATTR, NO_POLICY_DOMAIN, NO_RECURSION_ALLOW, NO_REQUIRED, NO_VALUE, NULL_GUIDS, NULL_PRINCIPAL, NULL_SESSION, NULL_TOKEN, OBJECT_NOT_PERSISTENT, OBJECTCLASS_NOT_FOUND, PERSISTENT_OBJECT_PARAM_NULL, POLICIES_DO_NOT_MATCH_BY_NAME_RESOURCE_ACTION, POLICY_DOMAIN_NOT_FOUND, POLICY_EXISTS_FOR_NAME, POLICY_EXISTS_FOR_RESOURCE_ACTION, POLICY_NOT_FOUND, POLICY_ROOT_NOT_FOUND, READ_ATTRIBUTES_ERROR, READING_LDIF_FAILED, REPLACE_DEFINITION_NOT_PERSISTENT, ROLE_CONTAINED, SEARCH_FAILED, services_validator_initialize_failed, services_validator_invalid_attr_name, services_validator_invalid_attr_schema, services_validator_schema_does_not_exist, SMS_ADD_SUB_CONFIG_FAILED, SMS_ADMIN_LIMIT_EXCEEDED, SMS_ATTR_LIST_NEEDED, SMS_ATTR_NAME_NOT_FOUND, SMS_ATTR_OR_VAL_EXISTS, SMS_ATTR_SYNTAX_NOT_FOUND, SMS_AUTHENTICATION_ERROR, SMS_CAN_NOT_CONSTRUCT_SERVICE_MANAGER, SMS_CANNOT_CREATE_INSTANCE, SMS_CANNOT_CREATE_PLACE_HOLDER_NODE, SMS_EVENT_NOTIFICATION_FAILED, SMS_failed_to_get_schema_manager, SMS_INSUFFICIENT_ACCESS_RIGHTS, SMS_INVALID_ATTR_ENTRY, SMS_INVALID_ATTR_NAME, SMS_INVALID_CLASS_NAME, SMS_INVALID_CONFIG_NAME, SMS_INVALID_DN, SMS_INVALID_METHOD, SMS_INVALID_OP_VALUE, SMS_INVALID_PARAMETERS, SMS_INVALID_SEARCH_BASE, SMS_INVALID_SEARCH_ORDER_PARAMETER, SMS_INVALID_SEARCH_PATTERN, SMS_LDAP_NOT_SUPPORTED, SMS_LDAP_OPERATION_FAILED, SMS_LDAP_REFERRAL_EXCEPTION, SMS_LDAP_SERVER_BUSY, SMS_NO_ATTRIBUTE_IN_ENTRY, SMS_NO_SUCH_ATTRIBUTE, SMS_NO_SUCH_OBJECT, SMS_NODE_ALREADY_EXISTS, SMS_OC_NAME_NOT_FOUND, SMS_organization_already_exists_no_args, SMS_READONLY_OBJ, SMS_SERVER_DOWN, SMS_SERVER_INSTANCE_NOT_FOUND, SMS_service_already_exists, SMS_service_already_exists_no_args, SMS_service_does_not_exist, SMS_SERVICE_NAME_NOT_FOUND, SMS_SERVICE_NODE_NOT_FOUND, SMS_services_node_does_not_exist, SMS_SMSSchema_exception_message, SMS_SMSSchema_invalid_input_stream, SMS_SMSSchema_invalid_xml_document, SMS_SMSSchema_no_schema_element, SMS_SMSSchema_no_service_element, SMS_SMSSchema_parser_error, SMS_SMSSchema_service_notfound, SMS_SUB_CONFIG_DOES_NOT_EXIST, SMS_TIME_LIMIT_EXCEEDED, SMS_UNEXPECTED_LDAP_EXCEPTION, SMS_UNKNOWN_EXCEPTION_OCCURRED, SMS_VALIDATOR_CANNOT_INSTANTIATE_CLASS, SMS_VALUE_DOES_NOT_EXIST, SMS_xml_invalid_doc_type, SMS_XML_PARSER_EXCEPTION, SMSSCHEMA_SERVICE_NOTFOUND, SSO_ILLEGALACCESS, SSO_NOPROVIDERCLASS, SSO_NOPROVIDERINSTANCE, SSO_NOPROVIDERPROPERTY, STRUCTURE_TEMPLATE_ATTRSET_NULL, TEMPLATE_NO_ATTR, UMS_BUNDLE_NAME, UMS_DEBUG, UMS_PKG, UNABLE_TO_ADD_ENTRY, UNABLE_TO_DELETE_ENTRY, UNABLE_TO_READ_ENTRY, UNMATCHED_CLASS, USER_NOT_IN_GROUP_SCOPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPersistentObject()Default ConstructorPersistentObject(CreationTemplate template, AttrSet attrSet)Constructor for in memory object to be added to the system.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddACI(ACI aci)Adds an ACI to this object.static voidaddAttributeValue(SSOToken token, Guid guid, String name, String value)Adds value for an attribute and saves the change in the database.voidaddChild(PersistentObject object)Adds a child object to the persistent object container.voidchangePassword(String entryDN, String attrName, String oldPassword, String newPassword)Changes user password.voiddeleteACI(ACI aci)Deletes an ACI of this objectCollectiongetACI()Returns all the ACIs of this object.CollectiongetACI(String name)Returns all the ACIs of this object with the given name.AttrgetAttribute(String attrName)Gets an attribute of the object.AttrgetAttribute(String attrName, Locale locale)Gets an attribute value with a given localeString[]getAttributeNames()Gets names for all available attributes for this entityAttrSetgetAttributes(String[] attrs)Gets attribute valuesAttrSetgetAttributes(String[] attrs, boolean cacheOnly)Gets attribute valuesAttrSetgetAttributes(String[] attrNames, Locale locale)Returns attribute values with a specified locale.protected AttrSetgetAttrSet()Gets the attribute set as a reference, not a deep copySearchResultsgetChildren(SearchTemplate template, SearchControl searchControl)Gets all immediate children under current node based on search criteria specified in template, and returns attributes specified there.SearchResultsgetChildren(String filter, SearchControl searchControl)Gets the immediate children, subject to search filter constraints.SearchResultsgetChildren(String filter, String[] resultAttributeNames, SearchControl searchControl)Gets the immediate children, returning only specified attributesStringgetDN()Gets the DN of the entityGuidgetGuid()Get GUID of the given entityStringgetNamingAttribute()Gets the attribute name that specifies the ID (or RDN in terms of DN in ldap) component in an object.GuidgetParentGuid()Gets the parent guidPersistentObjectgetParentObject()Gets the parent objectCollectiongetRoles()Gets the list of GUIDS roles assosciated with this objectstatic StringidToDN(String namingAttribute, String name, String[] parentID)Maps to a DN from naming attribute value of a persistent object.booleanisMemberOf(IMembership im)Checks if this object is a member of an IMembership.protected booleanisPersistent()Check if the object is persistent in the systemvoidmodify(Attr attr, org.forgerock.opendj.ldap.ModificationType modificationType)Modifies the values of a single attribute for the entity.voidmodify(String attrName, String value, org.forgerock.opendj.ldap.ModificationType modificationType)Modify a single attribute for the entity.voidmodify(Collection<org.forgerock.opendj.ldap.Modification> modSet)Modifies attribute values for the entity.voidremove()Remove itself from the persistent store.voidremoveAttribute(Attr attr)Removes attribute value for the entity.static voidremoveAttributeValue(SSOToken token, Guid guid, String name, String value)Removes value for an attribute and saves the change in the database.voidremoveChild(Guid childGuid)Removes an object given its unique ID.voidremoveChild(PersistentObject object)Removes a child object from a persistent object container.voidrename(String newRDN, boolean deleteOldName)Renames the RDN to a new value.voidreplaceACI(ACI oldACI, ACI newACI)Replaces an ACI of this objectvoidsave()Save the modification(s) to the object.SearchResultssearch(SearchTemplate template, SearchControl searchControl)Gets the attributes specified in the template for all objects at the current level and below which match the search filter in the template.SearchResultssearch(String filter, SearchControl searchControl)Gets only the IDs and object classes of all objects at the current level and below which match the search filter.SearchResultssearch(String filter, String[] resultAttributeNames, SearchControl searchControl)Gets the specified attributes of all objects at the current level and below which match the search filter.voidsetAttribute(Attr attr)Set an attribute value for the entity.voidsetAttribute(Attr attr, Locale locale)Sets an attribute value with a given locale for the entity.protected voidsetAttrSet(AttrSet attrSet)Sets the attribute setprotected voidsetGuid(Guid guid)Sets the GUID of the entity; used within the packageStringtoString()Gets a string representation of the object
-
-
-
Field Detail
-
COMPUTED_MEMBER_ATTR_NAME
public static final String COMPUTED_MEMBER_ATTR_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PersistentObject
protected PersistentObject()
Default Constructor
-
PersistentObject
public PersistentObject(CreationTemplate template, AttrSet attrSet) throws UMSException
Constructor for in memory object to be added to the system. You can make the object persistent two ways:1) call add on parent object (recommended)
2) call save(...) method after all attributes for in memory object are set up properly.
- Parameters:
template- Object creation template. The template holds all the default values such as objectclass and requirted attributes to be suppliedattrSet- Attribute set to construct the object in memory- Throws:
UMSException- for failure to construct the object. The given attrSet needs to provide the required attribute(s) defined in template
-
-
Method Detail
-
getAttribute
public Attr getAttribute(String attrName)
Gets an attribute of the object. If the attribute is not in memory, the object is refreshed from persistent storage.- Parameters:
attrName- Name of the attribute to be queried- Returns:
- Attribute value
-
getAttribute
public Attr getAttribute(String attrName, Locale locale) throws UMSException
Gets an attribute value with a given locale- Parameters:
attrName- Name of the attributelocale- Locale of attribute to be retrieved- Returns:
- Attribute value with the specified locale. May return null if the attribute with locale not found. No fallback mechanism is provided
- Throws:
UMSException- See Also:
getAttribute(String)
-
getAttributes
public AttrSet getAttributes(String[] attrs) throws UMSException
Gets attribute values- Parameters:
attrs- Array of strings representing attribute names- Returns:
- attribute value set for the return values
- Throws:
UMSException- See Also:
getAttribute(String)
-
getAttributes
public AttrSet getAttributes(String[] attrs, boolean cacheOnly) throws UMSException
Gets attribute values- Parameters:
attrs- Array of strings representing attribute namescacheOnly- if true, read attributes from cache only without contacting data stroe- Returns:
- attribute value set for the return values
- Throws:
UMSException- See Also:
getAttribute(String)
-
getAttributes
public AttrSet getAttributes(String[] attrNames, Locale locale) throws UMSException
Returns attribute values with a specified locale.- Parameters:
attrNames- Attribute nameslocale- Locale of the attributes to be queried- Returns:
- Attribute value set. May return null value for attribute(s) with unfound locale. No fallback mechanism is provided.
- Throws:
UMSException- See Also:
getAttribute(String)
-
setAttribute
public void setAttribute(Attr attr)
Set an attribute value for the entity.IMPORTANT: To make the changes persistent, you need to call the save method to save the changes.
- Parameters:
attr- Attribute and value
-
setAttribute
public void setAttribute(Attr attr, Locale locale)
Sets an attribute value with a given locale for the entity.IMPORTANT: To make the changes persistent, you need to call the save method to save the changes.
- Parameters:
attr- Attribute and valuelocale- Intended locale of the attribute to be set
-
changePassword
public void changePassword(String entryDN, String attrName, String oldPassword, String newPassword) throws UMSException
Changes user password.- Parameters:
entryDN- DN of the profile whose template is to be setattrName- password attribute nameoldPassword- old passwordnewPassword- new password- Throws:
AMException- if an error occurs when changing user passwordSSOException- If user's single sign on token is invalid.UMSException
-
removeAttribute
public void removeAttribute(Attr attr)
Removes attribute value for the entity.IMPORTANT: To make the changes persistent, you need to call the save method to save the changes.
- Parameters:
attr- Attribute to be removed
-
getAttributeNames
public String[] getAttributeNames()
Gets names for all available attributes for this entity- Returns:
- Array of strings representing attribute names
-
modify
public void modify(Collection<org.forgerock.opendj.ldap.Modification> modSet)
Modifies attribute values for the entity.IMPORTANT: To make the changes persistent, you need to call the save method to save the changes.
- Parameters:
modSet- Set of modification of attributes- See Also:
ModSet
-
modify
public void modify(Attr attr, org.forgerock.opendj.ldap.ModificationType modificationType)
Modifies the values of a single attribute for the entity.IMPORTANT: To make the changes persistent, you need to call the save method to save the changes.
- Parameters:
attr- Attribute value to be modifiedmodificationType- Operation type in the modification. Input values includeModificationType.ADD, ModificationType.DELETE, ModificationType.REPLACE, ModificationType.INCREMENT- See Also:
ModSet
-
modify
public void modify(String attrName, String value, org.forgerock.opendj.ldap.ModificationType modificationType)
Modify a single attribute for the entity.IMPORTANT: To make the changes persistent, you need to call the save method to save the changes.
- Parameters:
attrName- Attribute name of the attribute to be modifiedvalue- String value of the attributemodificationType- Operation type in the modification. Input values includeModificationType.ADD, ModificationType.DELETE, ModificationType.REPLACE, ModificationType.INCREMENT
-
getGuid
public Guid getGuid()
Get GUID of the given entity- Returns:
- the GUID.
-
rename
public void rename(String newRDN, boolean deleteOldName) throws AccessRightsException, EntryNotFoundException, UMSException
Renames the RDN to a new value. Note: The modified or added attribute values are not saved by this call.- Parameters:
newRDN- the new RDN valuedeleteOldName- if true old RDN value is deleted, otherwise the old value is retained.- Throws:
AccessRightsException- if an access rights exception occurs.EntryNotFoundException- if the entry is not foundUMSException- on failure to save to persistent storage
-
save
public void save() throws AccessRightsException, EntryNotFoundException, UMSExceptionSave the modification(s) to the object. Save the changes made so far for the persistent object. In other words, make the changes persistent for the object.This save method takes no parameter. You use this save method when the object is already instantiated. For example,
User user = (User) UMSObject.getObject(principal, id); user.modify("telephonenumber", "650.937.4444", ModificationType.REPLACE); user.save();- Throws:
AccessRightsException- if an access rights exception occurs.EntryNotFoundException- if the entry is not foundUMSException- on failure to save to persistent storage
-
getNamingAttribute
public String getNamingAttribute()
Gets the attribute name that specifies the ID (or RDN in terms of DN in ldap) component in an object. Subclasses may choose to override this function. For instance, User takes either "uid" or "cn" for its identification- Returns:
- Attribute name for identification
-
getParentObject
public PersistentObject getParentObject() throws UMSException
Gets the parent object- Returns:
- PersistentObject representing the parent object
- Throws:
UMSException- on failure instantiating the parent object
-
addChild
public void addChild(PersistentObject object) throws AccessRightsException, EntryAlreadyExistsException, UMSException
Adds a child object to the persistent object container. All persistent objects can add objects as a container. To override this behavior or impose restrictions override the add method in a subclass so that e.g. User.add( object ) is restricted or disallowed in certain ways.- Parameters:
object- Child object to be added to this persistent container.- Throws:
AccessRightsException- if an access rights exception occurs.EntryAlreadyExistsException- if the entry already exists.UMSException- if fail to add the given child object to the container. Possible causes includeEntryAlreadyExists,AccessRightsviolation.
-
removeChild
public void removeChild(PersistentObject object) throws AccessRightsException, EntryNotFoundException, UMSException
Removes a child object from a persistent object container. It is important for constraints to be applied in overriding this method in subclasses of PersistentObject. For example, Organization may choose not to allow remove( object ) when object is an organization.- Parameters:
object- Child object to be removed.- Throws:
AccessRightsException- if an access rights exception occurs.EntryNotFoundException- if the entry is not found.UMSException- if fail to remove the child object. Possible causes includes EntryNotFount, AccessRights violation etc.
-
removeChild
public void removeChild(Guid childGuid) throws AccessRightsException, EntryNotFoundException, UMSException
Removes an object given its unique ID. This method expects the given child ID is a descendant (something being contained) in "this" object- Parameters:
childGuid- Unique entry identification for the child to be removed.- Throws:
AccessRights- if an access rights exception occurs.EntryNotFoundException- if the entry is not found.UMSException- if failure to remove the entry from the persistent store. Possible causes include AccessRights violation, EntryNotFound etc.AccessRightsException
-
remove
public void remove() throws AccessRightsException, EntryNotFoundException, UMSExceptionRemove itself from the persistent store. This method removes the object at hand from the persistent storage but keeps its internal data so that the ums client can save it to somewhere else or make reference to its internal data- Throws:
AccessRights- Exception if an access rights exception occurs.EntryNotFoundException- if the entry is not foundUMSException- from UMSSession.removeObject( principal, guid)AccessRightsException
-
toString
public String toString()
Gets a string representation of the object
-
getParentGuid
public Guid getParentGuid()
Gets the parent guid- Specified by:
getParentGuidin interfaceISearch- Returns:
- String representation of the parent guid
-
getChildren
public SearchResults getChildren(String filter, SearchControl searchControl) throws InvalidSearchFilterException, UMSException
Gets the immediate children, subject to search filter constraints. Only the IDs and object classes of each child are returned.- Specified by:
getChildrenin interfaceISearch- Parameters:
filter- Search filtersearchControl- Search control- Returns:
- Result child IDs in Vector
- Throws:
InvalidSearchFilterException- if the search filter is invalidUMSException- on searching for immediate children in the container
-
getChildren
public SearchResults getChildren(String filter, String[] resultAttributeNames, SearchControl searchControl) throws InvalidSearchFilterException, UMSException
Gets the immediate children, returning only specified attributes- Specified by:
getChildrenin interfaceISearch- Parameters:
filter- Search filterresultAttributeNames- Names of attributes to retrievesearchControl- Search control object- Returns:
- SearchResults
- Throws:
InvalidSearchFilterException- on invalid search filterUMSException- on failure with searhing
-
getChildren
public SearchResults getChildren(SearchTemplate template, SearchControl searchControl) throws UMSException
Gets all immediate children under current node based on search criteria specified in template, and returns attributes specified there. Search behavior is controlled by searchControl.Returning attributes are determined by the search template
- Specified by:
getChildrenin interfaceISearch- Parameters:
template- Search templatesearchControl- Search control, use default setting if searchControl == null- Throws:
UMSException- on failure with searching
-
search
public SearchResults search(String filter, SearchControl searchControl) throws InvalidSearchFilterException, UMSException
Gets only the IDs and object classes of all objects at the current level and below which match the search filter.- Specified by:
searchin interfaceISearch- Parameters:
filter- Search filtersearchControl- Search control object- Returns:
- An search result class for reading IDs.
- Throws:
InvalidSearchFilterException- on invalid search filterUMSException- on failure with searching
-
search
public SearchResults search(String filter, String[] resultAttributeNames, SearchControl searchControl) throws InvalidSearchFilterException, UMSException
Gets the specified attributes of all objects at the current level and below which match the search filter.- Specified by:
searchin interfaceISearch- Parameters:
filter- Search filterresultAttributeNames- Names of attributes to retrievesearchControl- Search control object- Returns:
- SearchResults
- Throws:
InvalidSearchFilterException- on invalid search filterUMSException- on failure with searching
-
search
public SearchResults search(SearchTemplate template, SearchControl searchControl) throws UMSException
Gets the attributes specified in the template for all objects at the current level and below which match the search filter in the template. Search behavior is controlled by searchControl.- Specified by:
searchin interfaceISearch- Parameters:
template- Search templatesearchControl- Search control, use default setting if searchControl == null- Throws:
UMSException- on failure to search
-
getDN
public String getDN()
Gets the DN of the entity- Returns:
- String representing the distinguished name of the entry
-
setGuid
protected void setGuid(Guid guid)
Sets the GUID of the entity; used within the package- Parameters:
guid- String representation of guid
-
setAttrSet
protected void setAttrSet(AttrSet attrSet)
Sets the attribute set- Parameters:
attrSet- The attribute set to be assigned as a reference (not a deep copy)
-
getAttrSet
protected AttrSet getAttrSet()
Gets the attribute set as a reference, not a deep copy- Returns:
- The in-memory attribute set
-
idToDN
public static String idToDN(String namingAttribute, String name, String[] parentID)
Maps to a DN from naming attribute value of a persistent object.- Parameters:
namingAttribute- Naming attribute of the object.name- Naming attribute value of the object.parentID- Array of its parent names, all assumed to takeoas the naming attributes.
-
isMemberOf
public boolean isMemberOf(IMembership im) throws UMSException
Checks if this object is a member of an IMembership. Roles and Groups implement IMembership- Parameters:
im- Role or Group against which the membership is to be checked- Returns:
trueif this object is a member of the IMembership,falseotherwise- Throws:
UMSException- propagates any exception from the datalayer
-
getRoles
public Collection getRoles() throws UMSException
Gets the list of GUIDS roles assosciated with this object- Returns:
- list that lets iterating over role GUIDs
- Throws:
UMSException- propagates any exception from the datalayer
-
getACI
public Collection getACI() throws ACIParseException, UMSException
Returns all the ACIs of this object.- Returns:
- collecion of ACIs of this object.
- Throws:
ACIParseException- if any errorUMSException
-
getACI
public Collection getACI(String name) throws ACIParseException, UMSException
Returns all the ACIs of this object with the given name.- Parameters:
name- Name of the ACI to get.- Returns:
- collecion of ACIs of this object.
- Throws:
ACIParseException- in case of any errorUMSException
-
addACI
public void addACI(ACI aci) throws AccessRightsException, UMSException
Adds an ACI to this object.- Parameters:
aci- ACI added to be added to this object.- Throws:
AccessRightsException- if an access rights exception occurs.UMSException- if any error
-
deleteACI
public void deleteACI(ACI aci) throws AccessRightsException, UMSException
Deletes an ACI of this object- Parameters:
aci- ACI to be deleted.- Throws:
AccessRightsException- if an access rights exception occurs.UMSException- if any error.
-
replaceACI
public void replaceACI(ACI oldACI, ACI newACI) throws AccessRightsException, UMSException
Replaces an ACI of this object- Parameters:
oldACI- ACI to be replaced.newACI- the new ACI.- Throws:
AccessRightsException- if an access rights exception occurs.UMSException- if any error.
-
addAttributeValue
public static void addAttributeValue(SSOToken token, Guid guid, String name, String value) throws UMSException
Adds value for an attribute and saves the change in the database.- Parameters:
token- Authenticated prinicpal's single sign on token.guid- Identifiation of the entry to which to add the attribute value.name- Name of the attribute to which value is being added.value- Value to be added to the attribute.- Throws:
UMSException- if any exception from the data layer.
-
removeAttributeValue
public static void removeAttributeValue(SSOToken token, Guid guid, String name, String value) throws UMSException
Removes value for an attribute and saves the change in the database.- Parameters:
token- Authenticated prinicpal's single sign on token.guid- Identification of the entry from which to remove the attribute value.name- Name of the attribute from which value is being removed.value- Value to be removed from the attribute.- Throws:
UMSException- if any exception from the data layer.
-
isPersistent
protected boolean isPersistent()
Check if the object is persistent in the system- Returns:
- true if the object is persistent in the system and false otherwise
-
-