com.ibm.itim.dataservices.model
Class ObjectProfile

java.lang.Object
  extended by com.ibm.itim.dataservices.model.ObjectProfile
All Implemented Interfaces:
ManagableProfile, java.io.Serializable
Direct Known Subclasses:
LifecycleProfile, 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 ACCOUNT_ATTR_PASSWORD
           
static java.lang.String DAO_CLASS
           
static java.lang.String DESCRIPTION_ATTR
          String constant for the description.
static java.lang.String ER_XML
          String constant for the operation xml.
static java.lang.String MANAGE_GROUP
          String constant property key to determ if this profile supports group management.
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_PROPS
          String constant for the custom properties of the profile.
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.
static java.lang.String OBJ_PROFILE_RULES_ATTR
          String constant for the lifecycle rule xml.
static java.lang.String OWNERSHIP_TYPE_ATTR
          String constant for ownership type
 
Constructor Summary
ObjectProfile(DistinguishedName dn, java.lang.String category, java.lang.String name, java.lang.String customClass, java.lang.String nameAttr, java.util.Map<java.lang.String,java.lang.String> attrMap, java.util.Collection<java.lang.String> searchAttr, java.util.Collection operations, java.util.Collection complianceRules)
          Deprecated. Use ObjectProfile(DistinguishedName,Map,Collection,Collection,AttributeValues) instead.
ObjectProfile(DistinguishedName dn, java.lang.String category, java.lang.String name, java.lang.String customClass, java.lang.String nameAttr, java.util.Map<java.lang.String,java.lang.String> attrMap, java.lang.String searchAttr, java.util.Collection operations, java.util.Collection complianceRules)
          Deprecated. Use ObjectProfile(DistinguishedName,String,String,String,Map,Collection, Collection,Collection) instead.
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)
          Deprecated. Use ObjectProfile(DistinguishedName,String,String,String,Map,Collection) instead.
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)
          Deprecated. Use ObjectProfile(String,String,String,String,Map,Collection) instead.
ObjectProfile(java.lang.String category, java.lang.String name, java.lang.String customClass, java.lang.String nameAttr, java.util.Map<java.lang.String,java.lang.String> attrMap, java.util.Collection<java.lang.String> searchAttr)
          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<java.lang.String,java.lang.String> attrMap, java.util.Collection<java.lang.String> searchAttr, AttributeValues avs)
          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<java.lang.String,java.lang.String> 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
 void addRule(LifecycleRule rule)
          Adds a new lifecycle rule to the list of supported lifecycle rules for the profile
 java.util.Map<java.lang.String,java.lang.String> 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.
 java.util.Properties getCustomProperties()
          Returns the properties for the profile.
 java.lang.String getDaoClassName()
           
 DistinguishedName getDistinguishedName()
          Gets the DistinguishedName of this 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<java.lang.String> getOperationNames()
          Returns the supported operations for the entity
 java.util.Collection<ObjectProfileOperation> getOperations()
          Returns the supported operations for the entity
 LifecycleRule getRule(long ruleID)
          Returns the supported lifecycle rules for the profile for a given id.
 java.util.Collection<LifecycleRule> getRules()
          Returns the supported lifecycle rules for the profile
 java.lang.String getSearchAttribute()
          Returns the default search attribute for the data store class.
 java.util.Collection<java.lang.String> getSearchAttributes()
          Returns the a list of search attributes 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 removeRule(long ruleID)
          Removes the supported rules for the profile
 void setAttributeMap(java.util.Map<java.lang.String,java.lang.String> 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 setRule(LifecycleRule rule)
          Sets the supported rule for the profile.
 void setRules(java.util.Collection rules)
          Sets the supported rules for the profile.
 void setSearchAttribute(java.util.Collection<java.lang.String> searchAttr)
          Change the search attributes of the data store class.
 void setSearchAttribute(java.lang.String searchAttr)
          Deprecated. Use setSearchAttribute(Collection) instead.
 void setTenantDN(DistinguishedName tenantDN)
          Sets the distinguished name for the tenant this object resides in.
 java.lang.String toString()
          Returns the name of the object profile.
 java.lang.String toXML()
          Returns the name of the object profile.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, 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.


OBJ_PROFILE_RULES_ATTR

public static final java.lang.String OBJ_PROFILE_RULES_ATTR
String constant for the lifecycle rule xml.

See Also:
Constant Field Values

OBJ_PROFILE_ATTR_PROPS

public static java.lang.String OBJ_PROFILE_ATTR_PROPS
String constant for the custom properties of the profile.


DESCRIPTION_ATTR

public static final java.lang.String DESCRIPTION_ATTR
String constant for the description.

See Also:
Constant Field Values

MANAGE_GROUP

public static final java.lang.String MANAGE_GROUP
String constant property key to determ if this profile supports group management.

See Also:
Constant Field Values

OWNERSHIP_TYPE_ATTR

public static final java.lang.String OWNERSHIP_TYPE_ATTR
String constant for ownership type

See Also:
Constant Field Values

DAO_CLASS

public static final java.lang.String DAO_CLASS
See Also:
Constant Field Values

ACCOUNT_ATTR_PASSWORD

public static java.lang.String ACCOUNT_ATTR_PASSWORD
Constructor Detail

ObjectProfile

public ObjectProfile(java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map<java.lang.String,java.lang.String> 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(java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map<java.lang.String,java.lang.String> attrMap,
                     java.util.Collection<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 - A list of attributes to use when searching entries defined by this profile.

ObjectProfile

public ObjectProfile(java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map<java.lang.String,java.lang.String> attrMap,
                     java.util.Collection<java.lang.String> searchAttr,
                     AttributeValues avs)
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 - A list of attributes 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)
Deprecated. Use ObjectProfile(DistinguishedName,String,String,String,Map,Collection) instead.

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.
Since:
deprecated in 5.0 to support multiple search attributes.

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)
Deprecated. Use ObjectProfile(String,String,String,String,Map,Collection) instead.

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
Since:
deprecated in 5.0 to support multiple search attributes.

ObjectProfile

public ObjectProfile(DistinguishedName dn,
                     java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map<java.lang.String,java.lang.String> attrMap,
                     java.lang.String searchAttr,
                     java.util.Collection operations,
                     java.util.Collection complianceRules)
Deprecated. Use ObjectProfile(DistinguishedName,String,String,String,Map,Collection, Collection,Collection) instead.

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
complianceRules - Collection of compliance rules for this profile
Since:
deprecated in 5.0 to support multiple search attributes.

ObjectProfile

public ObjectProfile(DistinguishedName dn,
                     java.lang.String category,
                     java.lang.String name,
                     java.lang.String customClass,
                     java.lang.String nameAttr,
                     java.util.Map<java.lang.String,java.lang.String> attrMap,
                     java.util.Collection<java.lang.String> searchAttr,
                     java.util.Collection operations,
                     java.util.Collection complianceRules)
Deprecated. Use ObjectProfile(DistinguishedName,Map,Collection,Collection,AttributeValues) instead.

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
complianceRules - Collection of compliance rules for this profile
Since:
deprecated in 5.0 to support multiple search attributes.
Method Detail

getDistinguishedName

public DistinguishedName getDistinguishedName()
Gets the DistinguishedName of this ObjectProfile object.

Specified by:
getDistinguishedName in interface ManagableProfile
Returns:
a DistinguishedName of this object.

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:
tenantDN - 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<java.lang.String,java.lang.String> 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<java.lang.String,java.lang.String> 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:
className - 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.

getSearchAttributes

public java.util.Collection<java.lang.String> getSearchAttributes()
Returns the a list of search attributes for the data store class.

Returns:
a list of attribute names.

setSearchAttribute

public void setSearchAttribute(java.lang.String searchAttr)
Deprecated. Use setSearchAttribute(Collection) instead.

Change the default search attribute of the data store class.

Parameters:
searchAttr - String attribute name.
Since:
deprecated in 5.0 to support multiple search attributes.

setSearchAttribute

public void setSearchAttribute(java.util.Collection<java.lang.String> searchAttr)
Change the search attributes of the data store class.

Parameters:
searchAttr - a list of attribute names (String).

isPasswordAttributeExist

public boolean isPasswordAttributeExist()
Returns whether a password attribute exists for this data store class.

Returns:
true if password attribute exists, false if not.

getCustomProperties

public java.util.Properties getCustomProperties()
Returns the properties for the profile. The value returned will not be null. If there are no properties an empty table will be returned.

Returns:
A table of properties (key and value pair)

getOperations

public java.util.Collection<ObjectProfileOperation> getOperations()
Returns the supported operations for the entity

Specified by:
getOperations in interface ManagableProfile
Returns:
Collection of operations.

getOperationNames

public java.util.Collection<java.lang.String> 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:
operations - Collection of supported ObjectProfileOperation
Throws:
java.lang.ClassCastException

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:
oper - 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
Throws:
ObjectNotFoundException

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:
operationName - Operation name to remove.
Throws:
ObjectNotFoundException
ModelException

getRules

public java.util.Collection<LifecycleRule> getRules()
Returns the supported lifecycle rules for the profile

Specified by:
getRules in interface ManagableProfile
Returns:
Collection of LifecycleRule

setRules

public void setRules(java.util.Collection rules)
              throws java.lang.ClassCastException
Sets the supported rules for the profile. A new identification number is generated for all lifecycle rules.

Specified by:
setRules in interface ManagableProfile
Parameters:
rules - Collection of supported LifecycleRule
Throws:
java.lang.ClassCastException

setRule

public void setRule(LifecycleRule rule)
Sets the supported rule for the profile.

Specified by:
setRule in interface ManagableProfile
Parameters:
rule - A modified lifecycle rule.

getRule

public LifecycleRule getRule(long ruleID)
Returns the supported lifecycle rules for the profile for a given id.

Specified by:
getRule in interface ManagableProfile
Parameters:
ruleID - the identification number of the lifecycle rule. The identification number is obtained from getRules().
Returns:
LifecycleRule lifecycle rule for a given ruleID.

addRule

public void addRule(LifecycleRule rule)
Adds a new lifecycle rule to the list of supported lifecycle rules for the profile

Specified by:
addRule in interface ManagableProfile
Parameters:
rule - A new lifecycle rule.

removeRule

public void removeRule(long ruleID)
                throws ObjectNotFoundException
Removes the supported rules for the profile

Specified by:
removeRule in interface ManagableProfile
Parameters:
ruleID - identifier of supported LifecycleRule
Throws:
ObjectNotFoundException - Thrown if unable to locate the lifecycle rule.

getDaoClassName

public java.lang.String getDaoClassName()

toString

public java.lang.String toString()
Returns the name of the object profile.

Overrides:
toString in class java.lang.Object
Returns:
String representation the name of the object profile.

toXML

public java.lang.String toXML()
Returns the name of the object profile.

Returns:
String representation the name of the object profile.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.