Skip navigation links


oracle.iam.platform.entitymgr.vo
Class EntityMetadata

java.lang.Object
  extended by oracle.iam.platform.entitymgr.vo.EntityMetadata

All Implemented Interfaces:
oracle.iam.platform.utils.XmlObject

public class EntityMetadata
extends java.lang.Object
implements oracle.iam.platform.utils.XmlObject

Constructor Summary
EntityMetadata()
          Constructor for Kernel use to generate the entity metadata from XML only! Use the other constructor EntityMetadata(String entityType, boolean childEntity) for any other purposes.
EntityMetadata(java.lang.String entityType, boolean childEntity)
          Construct an empty entity metadata object.

 

Method Summary
 void addAttribute(AttributeDefinition attrDef)
          Add or modify an attribute.
 void addAttributeMapping(java.lang.String attrName, java.lang.String fieldName)
          Add or modify an attribute mapping.
 void addChildEntityAttribute(AttributeDefinition attrDef)
          Add or modify a child entity attribute.
 void addContainedEntity(java.lang.String entityType)
          Add an entity type to the set of entity types that can be contained in this container.
 void addControlAttribute(ControlAttributeDefinition attrDef)
          Add or modify a control attribute.
 void addField(FieldDefinition fieldDef)
          Add or modify an target field.
 void addMetadataAttachment(java.lang.String category, java.lang.String name, java.lang.String value)
          Add a metadata attachment.
 void generateObject(org.w3c.dom.Document doc)
           
 org.w3c.dom.Document generateXml()
           
 java.util.Map getAttachedMetadata()
          Get all attached metadata
 java.util.Map getAttachedMetadata(java.lang.String category)
          Get all attached metadata of a specific category
 AttributeDefinition getAttribute(java.lang.String attrName)
          Get a attribute definition
 java.util.Map getAttributeMap()
          Get the attribute map
 java.util.Map getAttributes()
          Get all the attribute definitions
 AttributeDefinition getChildEntityAttribute(java.lang.String attrName)
          Get a child entity attribute definition
 java.util.Map getChildEntityAttributes()
          Get all the child entity attribute definitions
 java.util.Set getContainedEntities()
          Get the set of entity types that can be contained in this container.
 ControlAttributeDefinition getControlAttribute(java.lang.String attrName)
          Get a control attribute definition
 java.util.Map getControlAttributes()
          Get all the control attribute definitions
 java.lang.String getEntityType()
          Get the entity type
 FieldDefinition getField(java.lang.String fieldName)
          Get a target field definition
 java.util.Map getFields()
          Get all the target field definitions
 java.util.Map getProviderParameters()
          Get the data provider parameters.
 java.lang.String getProviderType()
          Get the data provider type name.
 java.lang.String getRepositoryInstance()
          Get the repository instance name.
 boolean isChildEntity()
          Check if the entity metadata object represents a child entity.
 boolean isContainer()
          Check if it is a container.
 void removeAttribute(java.lang.String attrName)
          Remove an attribute.
 void removeAttributeMapping(java.lang.String attrName)
          Remove an attribute mapping.
 void removeChildEntityAttribute(java.lang.String attrName)
          Remove a child entity attribute.
 void removeContainedEntity(java.lang.String entityType)
          Remove an entity type from the set of entity types that can be contained in this container.
 void removeControlAttribute(java.lang.String attrName)
          Remove a control attribute.
 void removeField(java.lang.String fieldName)
          Remove an target field.
 void removeMetadataAttachment(java.lang.String category, java.lang.String name)
          Remove a metadata attachment.
 void setAttributeMap(java.util.Map attrMap)
          Set the attribute map
 void setContainer(boolean isContainer)
          Set if the entity can be a container
 void setProviderParameters(java.util.Map providerParams)
          Set the data provider parameters.
 void setProviderType(java.lang.String providerType)
          Set the data provider type name.
 void setRepositoryInstance(java.lang.String reposInstance)
          Set the repository instance name.
 org.w3c.dom.Document toDocument()
          Convert the entity metadata object into a XML document

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

EntityMetadata

public EntityMetadata()
Constructor for Kernel use to generate the entity metadata from XML only! Use the other constructor EntityMetadata(String entityType, boolean childEntity) for any other purposes.

EntityMetadata

public EntityMetadata(java.lang.String entityType,
                      boolean childEntity)
Construct an empty entity metadata object.
Parameters:
entityType - the entity type
childEntity - if the entity metadata object represents a child entity

Method Detail

getEntityType

public java.lang.String getEntityType()
Get the entity type
Returns:
the entity type

isChildEntity

public boolean isChildEntity()
Check if the entity metadata object represents a child entity.
Returns:
true if the entity metadata object represents a child entity

getRepositoryInstance

public java.lang.String getRepositoryInstance()
Get the repository instance name.
Returns:
the repository instance name

setRepositoryInstance

public void setRepositoryInstance(java.lang.String reposInstance)
Set the repository instance name.
Parameters:
reposInstance - the repository instance name

getProviderType

public java.lang.String getProviderType()
Get the data provider type name.
Returns:
the data provider type name

setProviderType

public void setProviderType(java.lang.String providerType)
Set the data provider type name.
Parameters:
providerType - the data provider type name

getProviderParameters

public java.util.Map getProviderParameters()
Get the data provider parameters.
Returns:
the data provider parameters

setProviderParameters

public void setProviderParameters(java.util.Map providerParams)
Set the data provider parameters.
Parameters:
providerType - the data provider parameters

isContainer

public boolean isContainer()
Check if it is a container.
Returns:
true if it is a container

setContainer

public void setContainer(boolean isContainer)
Set if the entity can be a container
Parameters:
isContainer - if it is a container

getContainedEntities

public java.util.Set getContainedEntities()
                                   throws java.lang.UnsupportedOperationException
Get the set of entity types that can be contained in this container.
Returns:
the set of entity types that can be contained in this container
Throws:
java.lang.UnsupportedOperationException - if the entity metadata object does not represents a container

addContainedEntity

public void addContainedEntity(java.lang.String entityType)
                        throws java.lang.UnsupportedOperationException
Add an entity type to the set of entity types that can be contained in this container.
Parameters:
entityType - the entity type to be added
Throws:
java.lang.UnsupportedOperationException - if the entity metadata object does not represents a container

removeContainedEntity

public void removeContainedEntity(java.lang.String entityType)
                           throws java.lang.UnsupportedOperationException
Remove an entity type from the set of entity types that can be contained in this container.
Parameters:
entityType - the entity type to be removed
Throws:
java.lang.UnsupportedOperationException - if the entity metadata object does not represents a container

getAttributes

public java.util.Map getAttributes()
Get all the attribute definitions
Returns:
all the attribute definitions

getAttribute

public AttributeDefinition getAttribute(java.lang.String attrName)
Get a attribute definition
Parameters:
attrName - the attribute name
Returns:
the attribute definition

addAttribute

public void addAttribute(AttributeDefinition attrDef)
Add or modify an attribute. To modify an existing attribute, make sure the name of the attribute remains the same.
Parameters:
attrDef - the attribute definition to be added/modified

removeAttribute

public void removeAttribute(java.lang.String attrName)
Remove an attribute. Note that removing an attribute will also remove its corresponding attribute mapping if one exist.
Parameters:
attrName - the attribute name to be removed

getFields

public java.util.Map getFields()
Get all the target field definitions
Returns:
all the target field definitions

getField

public FieldDefinition getField(java.lang.String fieldName)
Get a target field definition
Parameters:
fieldName - the target field name
Returns:
the target field definition

addField

public void addField(FieldDefinition fieldDef)
Add or modify an target field. To modify an existing target field, make sure the name of the target field remains the same.
Parameters:
attrDef - the target field definition to be added/modified

removeField

public void removeField(java.lang.String fieldName)
Remove an target field. Note that removing an target field will also remove its corresponding attribute mapping if one exist.
Parameters:
fieldName - the target field name to be removed

getAttributeMap

public java.util.Map getAttributeMap()
Get the attribute map
Returns:
the attribute map

setAttributeMap

public void setAttributeMap(java.util.Map attrMap)
Set the attribute map
Parameters:
attrMap - attribute map

addAttributeMapping

public void addAttributeMapping(java.lang.String attrName,
                                java.lang.String fieldName)
                         throws oracle.iam.platform.entitymgr.UnknownAttributeException
Add or modify an attribute mapping. To modify an existing attribute mapping, use the same attribute name of the existing attribute mapping with the new target field name.
Parameters:
attrName - the attribute name
fieldName - the target field name
Throws:
oracle.iam.platform.entitymgr.UnknownAttributeException - if the attribute name and/or target field name is not defined

removeAttributeMapping

public void removeAttributeMapping(java.lang.String attrName)
Remove an attribute mapping.
Parameters:
attrName - the attribute name

getChildEntityAttributes

public java.util.Map getChildEntityAttributes()
Get all the child entity attribute definitions
Returns:
all the child entity attribute definitions

getChildEntityAttribute

public AttributeDefinition getChildEntityAttribute(java.lang.String attrName)
Get a child entity attribute definition
Parameters:
attrName - the child entity attribute name
Returns:
the child entity attribute definition

addChildEntityAttribute

public void addChildEntityAttribute(AttributeDefinition attrDef)
Add or modify a child entity attribute. To modify an existing child entity attribute, use the same attribute name. Note that the type of the attribute should be the entity type of the child entity and that it will not support default value.
Parameters:
attrDef - the attribute definition of the child entity attribute to be added/modified

removeChildEntityAttribute

public void removeChildEntityAttribute(java.lang.String attrName)
Remove a child entity attribute.
Parameters:
attrName - the attribute name of the child entity attribute to be removed

getControlAttributes

public java.util.Map getControlAttributes()
Get all the control attribute definitions
Returns:
all the control attribute definitions

getControlAttribute

public ControlAttributeDefinition getControlAttribute(java.lang.String attrName)
Get a control attribute definition
Parameters:
attrName - the control attribute name
Returns:
the control attribute definition

addControlAttribute

public void addControlAttribute(ControlAttributeDefinition attrDef)
Add or modify a control attribute. To modify an existing control attribute, make sure the name of the control attribute remains the same.
Parameters:
attrDef - the control attribute definition to be added/modified

removeControlAttribute

public void removeControlAttribute(java.lang.String attrName)
Remove a control attribute.
Parameters:
attrName - the control attribute name to be removed

getAttachedMetadata

public java.util.Map getAttachedMetadata()
Get all attached metadata
Returns:
all attached metadata in a Map with category names as keys to the Map and the metadata name-value pairs as values

getAttachedMetadata

public java.util.Map getAttachedMetadata(java.lang.String category)
Get all attached metadata of a specific category
Parameters:
category - category name
Returns:
all attached metadata of the category

addMetadataAttachment

public void addMetadataAttachment(java.lang.String category,
                                  java.lang.String name,
                                  java.lang.String value)
Add a metadata attachment.
Parameters:
category - category name
name - name
value - value

removeMetadataAttachment

public void removeMetadataAttachment(java.lang.String category,
                                     java.lang.String name)
Remove a metadata attachment.
Parameters:
category - category name
name - name

toDocument

public org.w3c.dom.Document toDocument()
                                throws javax.xml.parsers.ParserConfigurationException
Convert the entity metadata object into a XML document
Returns:
the entity metadata object in XML
Throws:
javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created

generateXml

public org.w3c.dom.Document generateXml()
                                 throws java.lang.Exception
Specified by:
generateXml in interface oracle.iam.platform.utils.XmlObject
Throws:
java.lang.Exception

generateObject

public void generateObject(org.w3c.dom.Document doc)
Specified by:
generateObject in interface oracle.iam.platform.utils.XmlObject

Skip navigation links


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.