public class EntityMetadata
extends java.lang.Object
implements oracle.iam.platform.utils.XmlObject
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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 |
getFieldMap()
Get the attribute map
|
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
|
public EntityMetadata()
public EntityMetadata(java.lang.String entityType, boolean childEntity)
entityType
- the entity typechildEntity
- if the entity metadata object represents a child entitypublic java.lang.String getEntityType()
public boolean isChildEntity()
public java.lang.String getRepositoryInstance()
public void setRepositoryInstance(java.lang.String reposInstance)
reposInstance
- the repository instance namepublic java.lang.String getProviderType()
public void setProviderType(java.lang.String providerType)
providerType
- the data provider type namepublic java.util.Map getProviderParameters()
public void setProviderParameters(java.util.Map providerParams)
providerParams
- the data provider parameterspublic boolean isContainer()
public void setContainer(boolean isContainer)
isContainer
- if it is a containerpublic java.util.Set getContainedEntities() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
- if the entity metadata object does not represents a containerpublic void addContainedEntity(java.lang.String entityType) throws java.lang.UnsupportedOperationException
entityType
- the entity type to be addedjava.lang.UnsupportedOperationException
- if the entity metadata object does not represents a containerpublic void removeContainedEntity(java.lang.String entityType) throws java.lang.UnsupportedOperationException
entityType
- the entity type to be removedjava.lang.UnsupportedOperationException
- if the entity metadata object does not represents a containerpublic java.util.Map getAttributes()
public AttributeDefinition getAttribute(java.lang.String attrName)
attrName
- the attribute namepublic void addAttribute(AttributeDefinition attrDef)
attrDef
- the attribute definition to be added/modifiedpublic void removeAttribute(java.lang.String attrName)
attrName
- the attribute name to be removedpublic java.util.Map getFields()
public FieldDefinition getField(java.lang.String fieldName)
fieldName
- the target field namepublic void addField(FieldDefinition fieldDef)
fieldDef
- the target field definition to be added/modifiedpublic void removeField(java.lang.String fieldName)
fieldName
- the target field name to be removedpublic java.util.Map getAttributeMap()
public java.util.Map getFieldMap()
public void setAttributeMap(java.util.Map attrMap)
attrMap
- attribute mappublic void addAttributeMapping(java.lang.String attrName, java.lang.String fieldName) throws oracle.iam.platform.entitymgr.UnknownAttributeException
attrName
- the attribute namefieldName
- the target field nameoracle.iam.platform.entitymgr.UnknownAttributeException
- if the attribute name and/or target field name is not definedpublic void removeAttributeMapping(java.lang.String attrName)
attrName
- the attribute namepublic java.util.Map getChildEntityAttributes()
public AttributeDefinition getChildEntityAttribute(java.lang.String attrName)
attrName
- the child entity attribute namepublic void addChildEntityAttribute(AttributeDefinition attrDef)
attrDef
- the attribute definition of the child entity attribute to be added/modifiedpublic void removeChildEntityAttribute(java.lang.String attrName)
attrName
- the attribute name of the child entity attribute to be removedpublic java.util.Map getControlAttributes()
public ControlAttributeDefinition getControlAttribute(java.lang.String attrName)
attrName
- the control attribute namepublic void addControlAttribute(ControlAttributeDefinition attrDef)
attrDef
- the control attribute definition to be added/modifiedpublic void removeControlAttribute(java.lang.String attrName)
attrName
- the control attribute name to be removedpublic java.util.Map getAttachedMetadata()
public java.util.Map getAttachedMetadata(java.lang.String category)
category
- category namepublic void addMetadataAttachment(java.lang.String category, java.lang.String name, java.lang.String value)
category
- category namename
- namevalue
- valuepublic void removeMetadataAttachment(java.lang.String category, java.lang.String name)
category
- category namename
- namepublic org.w3c.dom.Document toDocument() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- if a DocumentBuilder cannot be createdpublic org.w3c.dom.Document generateXml() throws java.lang.Exception
generateXml
in interface oracle.iam.platform.utils.XmlObject
java.lang.Exception
public void generateObject(org.w3c.dom.Document doc)
generateObject
in interface oracle.iam.platform.utils.XmlObject