com.iplanet.am.sdk
Interface AMEntity


Deprecated. As of Sun Java System Access Manager 7.1.

public interface AMEntity

This interface provides methods to manage entities. The entities that can be managed by these interfaces are configured in the DAI service of Access Manager. This service will group the name of the entity and the creation templates, search template, primary LDAP objectclass and the status attribute (if any). This grouping is used to determine what object is being managed. AMEntity objects can be obtained by using AMStoreConnection. A handle to this object can be obtained by using the DN of the object.

 
 AMStoreConnection amsc = new AMStoreConnection(ssotoken); if
 (amsc.doesEntryExist(uDN)) { AMEntity entity = amsc.getEntity(uDN); }
 
 


Method Summary
 void activate()
          Deprecated. Activates the entity (if a status attribute is defined for this entity).
 void deactivate()
          Deprecated. Deactivates the entity (if a status attribute is defined for this entity).
 void delete()
          Deprecated. Deletes the object.
 void delete(boolean recursive)
          Deprecated. Deletes object(s).
 Map getAttributes()
          Deprecated. Returns Map of all attributes.
 Map getAttributes(Set attributeNames)
          Deprecated. Returns Map of specified attributes.
 String getDN()
          Deprecated. Returns the distinguished name of the entry.
 String getOrganizationDN()
          Deprecated. Gets the object's organization distinguished name.
 String getParentDN()
          Deprecated. Returns the parent distinguished name of the entry.
 boolean isActivated()
          Deprecated. Returns true if the entity is activated.
 boolean isExists()
          Deprecated. Returns true if the entry exists in the directory or not.
 void purge(boolean recursive, int graceperiod)
          Deprecated. Purges entry from data store.
 void removeAttributes(Set attributes)
          Deprecated. Removes attributes in this AMObject.
 void setAttributes(Map attributes)
          Deprecated. Sets attribute values in this AMObject.
 void store()
          Deprecated. Stores the change to directory server.
 

Method Detail

getDN

String getDN()
Deprecated. 
Returns the distinguished name of the entry.

Returns:
distinguished name.

getParentDN

String getParentDN()
Deprecated. 
Returns the parent distinguished name of the entry.

Returns:
distinguished name.

isExists

boolean isExists()
                 throws SSOException
Deprecated. 
Returns true if the entry exists in the directory or not. First a syntax check is done on the distinguished name string corresponding to the entry. If the distinguished name 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.

Returns:
false if the entry does not have a valid DN syntax or if the entry does not exists in the Directory.
Throws:
SSOException - if the single sign on token is no longer valid.

getAttributes

Map getAttributes()
                  throws AMException,
                         SSOException
Deprecated. 
Returns Map of all attributes. Map key is the attribute name and value is the attribute value.

Returns:
Map of all attributes.
Throws:
AMException - if an error is encountered when trying to read attributes from the data store.
SSOException - if the single sign on token is no longer valid.

getAttributes

Map getAttributes(Set attributeNames)
                  throws AMException,
                         SSOException
Deprecated. 
Returns Map of specified attributes. Map key is the attribute name and value is the attribute value.

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 store
SSOException - if the single sign on token is no longer valid.

setAttributes

void setAttributes(Map attributes)
                   throws AMException,
                          SSOException
Deprecated. 
Sets attribute values in this AMObject. 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 method store() is called explicitly.

Parameters:
attributes - map of attribute name to 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 set/replace attributes from the data store.
SSOException - if the single sign on token is no longer valid.

removeAttributes

void removeAttributes(Set attributes)
                      throws AMException,
                             SSOException
Deprecated. 
Removes attributes in this AMObject. The attributes are removed from the LDAP data store.

Parameters:
attributes - The Set of attribute names.
Throws:
AMException - if an error is encountered when trying to remove attributes from the data store.
SSOException - if the single sign on token is no longer valid.

activate

void activate()
              throws AMException,
                     SSOException
Deprecated. 
Activates 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.

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

void deactivate()
                throws AMException,
                       SSOException
Deprecated. 
Deactivates 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.

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

boolean isActivated()
                    throws AMException,
                           SSOException
Deprecated. 
Returns 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.

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.

delete

void delete()
            throws AMException,
                   SSOException
Deprecated. 
Deletes the object.

Throws:
AMException - if an error is encountered when trying to delete entry from the data store.
SSOException - if the single sign on token is no longer valid.
See Also:
AMEntity.delete(boolean), AMEntity.purge(boolean, int)

delete

void delete(boolean recursive)
            throws AMException,
                   SSOException
Deprecated. 
Deletes object(s). This method takes a boolean parameter, if its value is true, will remove the object and any objects under it, 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. In the soft-delete mode, this method will mark the following objects for deletion: Organization, Group, User purge() should be used to physically delete this object.

Parameters:
recursive - if true delete the object and any objects under it, otherwise, delete the object only.
Throws:
AMException - if an error is encountered when trying to delete entry from the data store.
SSOException - if the single sign on token is no longer valid.
See Also:
AMEntity.purge(boolean, int)

getOrganizationDN

String getOrganizationDN()
                         throws AMException,
                                SSOException
Deprecated. 
Gets the object's organization distinguished name. NOTE: Obtaining an organization distinguished name involves considerable overhead. Hence after obtaining the organization distinguished name, each object saves this information. Consecutives method calls on this object fetch the value stored in the object. Creating a new AMEntity instance every time to obtain the organization distinguished name is not recommended.

Returns:
The object's organization DN.
Throws:
AMException - if an error is encountered when trying to access/retrieve data from the data store or the object does not have organization distinguished name.
SSOException - if the single sign on token is no longer valid.

store

void store()
           throws AMException,
                  SSOException
Deprecated. 
Stores the change to directory server. This method should be called after doing setAttributes so that the changes that are made can be permanently committed to the LDAP data store.

Throws:
AMException - if an error is encountered when trying to save the attributes to the data store.
SSOException - if the single sign on token is no longer valid.

purge

void purge(boolean recursive,
           int graceperiod)
           throws AMException,
                  SSOException
Deprecated. 
Purges entry from data store. It will physically delete the entry from the data store. This method will override the soft-delete option, which the method delete() will not. There is a big PERFORMANCE hit if this method is used to delete a large organization in the recursive mode.

Parameters:
recursive - true to 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/Post Callback plugins as registered in the Administration Service, will be called upon object deletion. If any of the pre-callback classes throw an exception, then the operation is aborted.
Throws:
AMException - if there is an internal error in the data store.
SSOException - if the single sign on token is no longer valid.
See Also:
AMEntity.delete()