com.ibm.itim.dataservices.model
Class ObjectProfile

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.ObjectProfile
All Implemented Interfaces:
ManagableProfile, java.io.Serializable
Direct Known Subclasses:
ServiceProfile

public class ObjectProfile
extends java.lang.Object
implements ManagableProfile, java.io.Serializable

Value Object class that holds the attribute data of an object profile.

See Also:
ObjectProfileEntity, Serialized Form

Field Summary
static java.lang.String ER_XML
          String constant for the operation xml.
static java.lang.String OBJ_PROFILE_ATTR_CATEGORY
          String constant for the category attribute name.
static java.lang.String OBJ_PROFILE_ATTR_CUSTOM_CLASS
          String constant for the class attribute name.
static java.lang.String OBJ_PROFILE_ATTR_MAP
          String constant for the attribute map attribute name.
static java.lang.String OBJ_PROFILE_ATTR_NAME
          String constant for the naming attribute name.
static java.lang.String OBJ_PROFILE_ATTR_RDN
          String constant for the rdn attribute name.
static java.lang.String OBJ_PROFILE_ATTR_SEARCH
          String constant for the search attribute name.
 
Constructor Summary
ObjectProfile(DistinguishedName dn, java.lang.String category, java.lang.String name, java.lang.String customClass, java.lang.String nameAttr, java.util.Map attrMap, java.lang.String searchAttr)
          Constructs a new ObjectProfile object.
ObjectProfile(DistinguishedName dn, java.lang.String category, java.lang.String name, java.lang.String customClass, java.lang.String nameAttr, java.util.Map attrMap, java.lang.String searchAttr, java.util.Collection operations)
          Constructs a new ObjectProfile object.
ObjectProfile(java.lang.String category, java.lang.String name, java.lang.String customClass, java.lang.String nameAttr, java.util.Map attrMap, java.lang.String searchAttr)
          Constructs a new ObjectProfile object.
 
Method Summary
 void addOperation(ObjectProfileOperation oper)
          Adds a new operation to the list of supported operations for the entity
 java.util.Map getAttributeMap()
          Returns the map of semantic attributes to class attributes.
 java.lang.String getCategory()
          Returns the category of the profile (i.e., Person, Account, Service).
 java.lang.String getCustomClass()
          Returns the data store class.
 DistinguishedName getDistinguishedName()
          Constructs a new ObjectProfile object.
 java.lang.String getMappedAttribute(java.lang.String attrName)
          Returns the class attribute mapped to the given semantic attribute.
 java.lang.String getName()
          Returns the profile's name.
 java.lang.String getNameAttribute()
          Returns the naming attriute of the data store class (i.e., cn).
 ObjectProfileOperation getOperation(java.lang.String name)
          Returns a specific operation by name
 java.util.Collection getOperationNames()
          Returns the supported operations for the entity
 java.util.Collection getOperations()
          Returns the supported operations for the entity
 java.lang.String getSearchAttribute()
          Returns the default search attribute for the data store class.
 DistinguishedName getTenantDN()
          Returns the distinguished name of the tenant this profile applies to.
 boolean isPasswordAttributeExist()
          Returns whether a password attribute exists for this data store class.
 void removeOperation(java.lang.String operationName)
          Removes an operation from the list of supported operations
 void setAttributeMap(java.util.Map attrMap)
          Changes the map of semantic attributes to class attributes.
 void setCategory(java.lang.String category)
          Changes the category of the entity.
 void setCustomClass(java.lang.String className)
          Changes the data store class.
 void setName(java.lang.String name)
          Changes the profile's name.
 void setNameAttribute(java.lang.String nameAttr)
          Change the naming attribute of the data store class.
 void setOperation(ObjectProfileOperation oper)
          Modifies a specific operation by name
 void setOperations(java.util.Collection operations)
          Sets the supported operations for the entity
 void setSearchAttribute(java.lang.String searchAttr)
          Change the default search attribute of the data store class.
 void setTenantDN(DistinguishedName tenantDN)
          Sets the distinguished name for the tenant this object resides in.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJ_PROFILE_ATTR_NAME

public static java.lang.String OBJ_PROFILE_ATTR_NAME
String constant for the naming attribute name.

OBJ_PROFILE_ATTR_CATEGORY

public static java.lang.String OBJ_PROFILE_ATTR_CATEGORY
String constant for the category attribute name.

OBJ_PROFILE_ATTR_CUSTOM_CLASS

public static java.lang.String OBJ_PROFILE_ATTR_CUSTOM_CLASS
String constant for the class attribute name.

OBJ_PROFILE_ATTR_RDN

public static java.lang.String OBJ_PROFILE_ATTR_RDN
String constant for the rdn attribute name.

OBJ_PROFILE_ATTR_SEARCH

public static java.lang.String OBJ_PROFILE_ATTR_SEARCH
String constant for the search attribute name.

OBJ_PROFILE_ATTR_MAP

public static java.lang.String OBJ_PROFILE_ATTR_MAP
String constant for the attribute map attribute name.

ER_XML

public static java.lang.String ER_XML
String constant for the operation xml.
Constructor Detail

ObjectProfile

public ObjectProfile(java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map attrMap,
                     java.lang.String searchAttr)
Constructs a new ObjectProfile object. Warning: the purpose of this constructor is to provide clients with the ability to create value objects for creation in the data store or to register a new profile with the ProfileLocator at runtime. Do not use this constructor to create value objects that represent existing profiles in the data store. See the ObjectProfileSearch object for achieving that.
Parameters:
category - Name of the category.
name - Name of the object profile.
customClass - Name of the data store class.
nameAttr - Attribute to use as the name of an entry defined by this profile.
attrMap - A mapping of semantic attributes to class attributes (may be null).
searchAttr - Attribute to use when searching entries defined by this profile.

ObjectProfile

public ObjectProfile(DistinguishedName dn,
                     java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map attrMap,
                     java.lang.String searchAttr)
Constructs a new ObjectProfile object. Warning: the purpose of this constructor is to construct the profile once retrieved from the datastore. It is used internally to the platform and should not be used by external applications.
Parameters:
dn - DistinguishedName of the profile.
category - Name of the category.
name - Name of the object profile.
customClass - Name of the data store class.
nameAttr - Attribute to use as the name of an entry defined by this profile.
attrMap - A mapping of semantic attributes to class attributes.
searchAttr - Attribute to use when searching entries defined by this profile.

ObjectProfile

public ObjectProfile(DistinguishedName dn,
                     java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map attrMap,
                     java.lang.String searchAttr,
                     java.util.Collection operations)
Constructs a new ObjectProfile object. Warning: the purpose of this constructor is to construct the profile once retrieved from the datastore. It is used internally to the platform and should not be used by external applications.
Parameters:
dn - DistinguishedName of the profile.
category - Name of the category.
name - Name of the object profile.
customClass - Name of the data store class.
nameAttr - Attribute to use as the name of an entry defined by this profile.
attrMap - A mapping of semantic attributes to class attributes.
searchAttr - Attribute to use when searching entries defined by this profile.
operations - Collection of operations for this profile
Method Detail

getDistinguishedName

public DistinguishedName getDistinguishedName()
Constructs a new ObjectProfile object. Warning: the purpose of this constructor is to construct the profile once retrieved from the datastore. It is used internally to the platform and should not be used by external applications.
Specified by:
getDistinguishedName in interface ManagableProfile
Parameters:
dn - DistinguishedName of the profile.
category - Name of the category.
name - Name of the object profile.
customClass - Name of the data store class.
nameAttr - Attribute to use as the name of an entry defined by this profile.
attrMap - A mapping of semantic attributes to class attributes.
searchAttr - Attribute to use when searching entries defined by this profile.

getTenantDN

public DistinguishedName getTenantDN()
Returns the distinguished name of the tenant this profile applies to.
Returns:
Distinguished Name of the tenant.

setTenantDN

public void setTenantDN(DistinguishedName tenantDN)
Sets the distinguished name for the tenant this object resides in.
Parameters:
The - DistinguishedName of the tenant.

getName

public java.lang.String getName()
Returns the profile's name. The name is used to classify a group of entries that are specified by the same profile. For example, Employee or Contractor may be profile names.
Specified by:
getName in interface ManagableProfile
Returns:
String representation of the profile name.

setName

public void setName(java.lang.String name)
Changes the profile's name. The name must be unique to all profiles within a single tenant.
Parameters:
name - String name of the profile.

getCategory

public java.lang.String getCategory()
Returns the category of the profile (i.e., Person, Account, Service).
Returns:
String representation of the category.

setCategory

public void setCategory(java.lang.String category)
Changes the category of the entity.
Parameters:
category - String category to change to.

getMappedAttribute

public java.lang.String getMappedAttribute(java.lang.String attrName)
Returns the class attribute mapped to the given semantic attribute.
Returns:
Name of the class attribute.

getAttributeMap

public java.util.Map getAttributeMap()
Returns the map of semantic attributes to class attributes. The key of the map is the semantic attribute name and the value is the raw (physical) attribute name.
Returns:
The Map of semantic attribute names to physical names.

setAttributeMap

public void setAttributeMap(java.util.Map attrMap)
Changes the map of semantic attributes to class attributes.
Parameters:
attrMap - Map of attributes. The key of the map is the semantic attribute name and the value is the raw (physical) attribute name.

getCustomClass

public java.lang.String getCustomClass()
Returns the data store class.
Returns:
String class name.

setCustomClass

public void setCustomClass(java.lang.String className)
Changes the data store class.
Parameters:
String - class name.

getNameAttribute

public java.lang.String getNameAttribute()
Returns the naming attriute of the data store class (i.e., cn).
Returns:
String attribute name.

setNameAttribute

public void setNameAttribute(java.lang.String nameAttr)
Change the naming attribute of the data store class.
Parameters:
nameAttr - String attribute name.

getSearchAttribute

public java.lang.String getSearchAttribute()
Returns the default search attribute for the data store class.
Returns:
String attribute name.

setSearchAttribute

public void setSearchAttribute(java.lang.String searchAttr)
Change the default search attribute of the data store class.
Parameters:
searchAttr - String attribute name.

isPasswordAttributeExist

public boolean isPasswordAttributeExist()
Returns whether a password attribute exists for this data store class.
Returns:
true if password attribute exists, false if not.

getOperations

public java.util.Collection getOperations()
Returns the supported operations for the entity
Specified by:
getOperations in interface ManagableProfile
Returns:
Collection of operations.

getOperationNames

public java.util.Collection getOperationNames()
Returns the supported operations for the entity
Specified by:
getOperationNames in interface ManagableProfile
Returns:
Collection of operation names (Strings).

getOperation

public ObjectProfileOperation getOperation(java.lang.String name)
Returns a specific operation by name
Specified by:
getOperation in interface ManagableProfile
Parameters:
name - The name of the operation
Returns:
ObjectProfileOperation

setOperations

public void setOperations(java.util.Collection operations)
                   throws java.lang.ClassCastException
Sets the supported operations for the entity
Specified by:
setOperations in interface ManagableProfile
Parameters:
Collection - of supported ObjectProfileOperation

addOperation

public void addOperation(ObjectProfileOperation oper)
Adds a new operation to the list of supported operations for the entity
Specified by:
addOperation in interface ManagableProfile
Parameters:
operation - Operation name to add.

setOperation

public void setOperation(ObjectProfileOperation oper)
                  throws ObjectNotFoundException
Modifies a specific operation by name
Specified by:
setOperation in interface ManagableProfile
Parameters:
oper - The new operation definition

removeOperation

public void removeOperation(java.lang.String operationName)
                     throws ObjectNotFoundException,
                            ModelException
Removes an operation from the list of supported operations
Specified by:
removeOperation in interface ManagableProfile
Parameters:
operation - Operation name to remove.