com.ibm.itim.dataservices.model
Class ModelMetaDataBridge

java.lang.Object
  extended by com.ibm.itim.dataservices.model.ModelMetaDataBridge
All Implemented Interfaces:
IModelMetaData, java.io.Serializable

public class ModelMetaDataBridge
extends java.lang.Object
implements IModelMetaData, java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ibm.itim.dataservices.model.IModelMetaData
modelFileName, NAME
 
Constructor Summary
ModelMetaDataBridge()
           
 
Method Summary
 void defineClass(java.lang.Class cl)
          Defines a new class in the data model.
 void defineEntity(java.lang.String cl, java.lang.String auxClassName, java.lang.String category)
          Defines a relationship for a given class.
 void defineRelationship(java.lang.Class cl, java.lang.String relationshipName, java.lang.Class rel)
          Defines a relationship for a given class.
 void defineRelationship(java.lang.String cl, java.lang.String relationshipName, java.lang.Class rel)
          Defines a relationship for a given class.
 java.util.Collection<java.lang.String> getClasses()
          Returns the names of all classes defined for the data model.
 java.lang.Class getEntity(java.util.Collection<java.lang.String> objClasses)
          Retrieves the entity class with the given set of LDAP auxiliary class names.
 java.lang.String getEntityCategory(java.util.Collection<java.lang.String> objClasses)
          Retrieves the entity category with the given set of LDAP auxiliary class names.
 java.lang.Class getRelationship(java.lang.Class cl, java.lang.String relationshipName)
          Retrieves the relationship with the given name for a given class.
 java.util.Set<java.lang.String> getSubjectCategories(java.lang.String relationshipName)
          Returns a set of category names, whose implementation classes support the given relationship.
 java.util.Collection<java.lang.String> getSupportedRelationships(java.lang.Class cl)
          Returns the names of the supported relationships for the given class.
 void loadTable()
          Loads the table from the enRoleModel.xml file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelMetaDataBridge

public ModelMetaDataBridge()
Method Detail

defineClass

public void defineClass(java.lang.Class cl)
                 throws ModelIntegrityException
Description copied from interface: IModelMetaData
Defines a new class in the data model. This definition is cached and is not saved to the enRoleModel.xml file.

Specified by:
defineClass in interface IModelMetaData
Parameters:
cl - Class to add to the data model.
Throws:
ModelIntegrityException

defineEntity

public void defineEntity(java.lang.String cl,
                         java.lang.String auxClassName,
                         java.lang.String category)
                  throws java.lang.ClassNotFoundException,
                         ModelIntegrityException
Description copied from interface: IModelMetaData
Defines a relationship for a given class. This definition is cached and is not saved to the enRoleModel.xml file.

Specified by:
defineEntity in interface IModelMetaData
Parameters:
cl - Name of the Subject Class of the relationship.
auxClassName - Name of the relationship being defined.
category - Implementation class implementing the Relationship interface. The category can be found at ObjectProfileCategory class.
Throws:
java.lang.ClassNotFoundException - Name of the Subject class of the relationship cannot be found.
ModelIntegrityException
See Also:
ObjectProfileCategory

defineRelationship

public void defineRelationship(java.lang.Class cl,
                               java.lang.String relationshipName,
                               java.lang.Class rel)
                        throws ModelIntegrityException
Description copied from interface: IModelMetaData
Defines a relationship for a given class. This definition is cached and is not saved to the enRoleModel.xml file.

Specified by:
defineRelationship in interface IModelMetaData
Parameters:
cl - Subject Class of the relationship.
relationshipName - Name of the relationship being defined.
rel - Implementation class implementing the Relationship interface.
Throws:
ModelIntegrityException

defineRelationship

public void defineRelationship(java.lang.String cl,
                               java.lang.String relationshipName,
                               java.lang.Class rel)
                        throws ModelIntegrityException
Description copied from interface: IModelMetaData
Defines a relationship for a given class. This definition is cached and is not saved to the enRoleModel.xml file.

Specified by:
defineRelationship in interface IModelMetaData
Parameters:
cl - Name of the Subject Class of the relationship.
relationshipName - Name of the relationship being defined.
rel - Implementation class implementing the Relationship interface.
Throws:
ModelIntegrityException

getClasses

public java.util.Collection<java.lang.String> getClasses()
                                                  throws ModelIntegrityException
Description copied from interface: IModelMetaData
Returns the names of all classes defined for the data model.

Specified by:
getClasses in interface IModelMetaData
Returns:
Collection of class names.
Throws:
ModelIntegrityException

getEntity

public java.lang.Class getEntity(java.util.Collection<java.lang.String> objClasses)
                          throws ObjectNotFoundException,
                                 ModelIntegrityException
Description copied from interface: IModelMetaData
Retrieves the entity class with the given set of LDAP auxiliary class names.

Specified by:
getEntity in interface IModelMetaData
Parameters:
objClasses - Collection of the LDAP auxiliary class.
Returns:
Matching Entity implementation Class.
Throws:
ObjectNotFoundException - Thrown if unable to find a matching Entity implementation.
ModelIntegrityException

getEntityCategory

public java.lang.String getEntityCategory(java.util.Collection<java.lang.String> objClasses)
                                   throws ModelIntegrityException
Description copied from interface: IModelMetaData
Retrieves the entity category with the given set of LDAP auxiliary class names.

Specified by:
getEntityCategory in interface IModelMetaData
Parameters:
objClasses - Collection of the LDAP auxiliary class.
Returns:
entity category.
Throws:
ModelIntegrityException

getRelationship

public java.lang.Class getRelationship(java.lang.Class cl,
                                       java.lang.String relationshipName)
                                throws ObjectNotFoundException,
                                       ModelIntegrityException
Description copied from interface: IModelMetaData
Retrieves the relationship with the given name for a given class.

Specified by:
getRelationship in interface IModelMetaData
Parameters:
cl - Subject class of the relationship.
relationshipName - Name of the relationship to retrieve.
Returns:
Matching Relationship implementation Class.
Throws:
ObjectNotFoundException - Thrown if unable to find a matching Relationship implementation.
ModelIntegrityException

getSubjectCategories

public java.util.Set<java.lang.String> getSubjectCategories(java.lang.String relationshipName)
                                                     throws ModelIntegrityException
Description copied from interface: IModelMetaData
Returns a set of category names, whose implementation classes support the given relationship.

Specified by:
getSubjectCategories in interface IModelMetaData
Parameters:
relationshipName - Name of the relationship
Returns:
Set of categories that support the relationship.
Throws:
ModelIntegrityException

getSupportedRelationships

public java.util.Collection<java.lang.String> getSupportedRelationships(java.lang.Class cl)
                                                                 throws ObjectNotFoundException,
                                                                        ModelIntegrityException
Description copied from interface: IModelMetaData
Returns the names of the supported relationships for the given class.

Specified by:
getSupportedRelationships in interface IModelMetaData
Parameters:
cl - Class for which relationships are queried.
Returns:
Collection of supported relationship names.
Throws:
ObjectNotFoundException - Thrown if unable to find the given class in the data model meta-data.
ModelIntegrityException

loadTable

public void loadTable()
               throws java.io.IOException,
                      java.io.FileNotFoundException,
                      ModelIntegrityException
Description copied from interface: IModelMetaData
Loads the table from the enRoleModel.xml file.

Specified by:
loadTable in interface IModelMetaData
Throws:
java.io.IOException
java.io.FileNotFoundException
ModelIntegrityException


IBM Tivoli Identity Manager 5.1
© Copyright International Business Machines Corporation 2007, 2009. All rightsreserved. US Government Users Restricited RightsUse, duplication or disclosure restricted by GSA ADP ScheduleContract with IBM Corp.