Package oracle.iam.platform.entitymgr.vo
Class EntityMetadata
java.lang.Object
oracle.iam.platform.entitymgr.vo.EntityMetadata
- All Implemented Interfaces:
oracle.iam.platform.utils.XmlObject
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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
(String entityType, boolean childEntity) Construct an empty entity metadata object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(AttributeDefinition attrDef) Add or modify an attribute.void
addAttributeMapping
(String attrName, String fieldName) Add or modify an attribute mapping.void
Add or modify a child entity attribute.void
addContainedEntity
(String entityType) Add an entity type to the set of entity types that can be contained in this container.void
Add or modify a control attribute.void
addField
(FieldDefinition fieldDef) Add or modify an target field.void
addMetadataAttachment
(String category, String name, String value) Add a metadata attachment.void
generateObject
(Document doc) Get all attached metadatagetAttachedMetadata
(String category) Get all attached metadata of a specific categorygetAttribute
(String attrName) Get a attribute definitionGet the attribute mapGet all the attribute definitionsgetChildEntityAttribute
(String attrName) Get a child entity attribute definitionGet all the child entity attribute definitionsGet the set of entity types that can be contained in this container.getControlAttribute
(String attrName) Get a control attribute definitionGet all the control attribute definitionsGet the entity typeGet a target field definitionGet the attribute mapGet all the target field definitionsGet the data provider parameters.Get the data provider type name.Get the repository instance name.boolean
Check if the entity metadata object represents a child entity.boolean
Check if it is a container.void
removeAttribute
(String attrName) Remove an attribute.void
removeAttributeMapping
(String attrName) Remove an attribute mapping.void
removeChildEntityAttribute
(String attrName) Remove a child entity attribute.void
removeContainedEntity
(String entityType) Remove an entity type from the set of entity types that can be contained in this container.void
removeControlAttribute
(String attrName) Remove a control attribute.void
removeField
(String fieldName) Remove an target field.void
removeMetadataAttachment
(String category, String name) Remove a metadata attachment.void
setAttributeMap
(Map<String, String> attrMap) Set the attribute mapvoid
setContainer
(boolean isContainer) Set if the entity can be a containervoid
setProviderParameters
(Map<String, List<String>> providerParams) Set the data provider parameters.void
setProviderType
(String providerType) Set the data provider type name.void
setRepositoryInstance
(String reposInstance) Set the repository instance name.Convert the entity metadata object into a XML document
-
Constructor Details
-
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
Construct an empty entity metadata object.- Parameters:
entityType
- the entity typechildEntity
- if the entity metadata object represents a child entity
-
-
Method Details
-
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
Get the repository instance name.- Returns:
- the repository instance name
-
setRepositoryInstance
Set the repository instance name.- Parameters:
reposInstance
- the repository instance name
-
getProviderType
Get the data provider type name.- Returns:
- the data provider type name
-
setProviderType
Set the data provider type name.- Parameters:
providerType
- the data provider type name
-
getProviderParameters
Get the data provider parameters.- Returns:
- the data provider parameters
-
setProviderParameters
Set the data provider parameters.- Parameters:
providerParams
- 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
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:
UnsupportedOperationException
- if the entity metadata object does not represents a container
-
addContainedEntity
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:
UnsupportedOperationException
- if the entity metadata object does not represents a container
-
removeContainedEntity
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:
UnsupportedOperationException
- if the entity metadata object does not represents a container
-
getAttributes
Get all the attribute definitions- Returns:
- all the attribute definitions
-
getAttribute
Get a attribute definition- Parameters:
attrName
- the attribute name- Returns:
- the attribute definition
-
addAttribute
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
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
Get all the target field definitions- Returns:
- all the target field definitions
-
getField
Get a target field definition- Parameters:
fieldName
- the target field name- Returns:
- the target field definition
-
addField
Add or modify an target field. To modify an existing target field, make sure the name of the target field remains the same.- Parameters:
fieldDef
- the target field definition to be added/modified
-
removeField
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
Get the attribute map- Returns:
- the attribute map
-
getFieldMap
Get the attribute map- Returns:
- the attribute map
-
setAttributeMap
Set the attribute map- Parameters:
attrMap
- attribute map
-
addAttributeMapping
public void addAttributeMapping(String attrName, 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 namefieldName
- the target field name- Throws:
oracle.iam.platform.entitymgr.UnknownAttributeException
- if the attribute name and/or target field name is not defined
-
removeAttributeMapping
Remove an attribute mapping.- Parameters:
attrName
- the attribute name
-
getChildEntityAttributes
Get all the child entity attribute definitions- Returns:
- all the child entity attribute definitions
-
getChildEntityAttribute
Get a child entity attribute definition- Parameters:
attrName
- the child entity attribute name- Returns:
- the child entity attribute definition
-
addChildEntityAttribute
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
Remove a child entity attribute.- Parameters:
attrName
- the attribute name of the child entity attribute to be removed
-
getControlAttributes
Get all the control attribute definitions- Returns:
- all the control attribute definitions
-
getControlAttribute
Get a control attribute definition- Parameters:
attrName
- the control attribute name- Returns:
- the control attribute definition
-
addControlAttribute
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
Remove a control attribute.- Parameters:
attrName
- the control attribute name to be removed
-
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
Get all attached metadata of a specific category- Parameters:
category
- category name- Returns:
- all attached metadata of the category
-
addMetadataAttachment
Add a metadata attachment.- Parameters:
category
- category namename
- namevalue
- value
-
removeMetadataAttachment
Remove a metadata attachment.- Parameters:
category
- category namename
- name
-
toDocument
Convert the entity metadata object into a XML document- Returns:
- the entity metadata object in XML
- Throws:
ParserConfigurationException
- if a DocumentBuilder cannot be created
-
generateXml
- Specified by:
generateXml
in interfaceoracle.iam.platform.utils.XmlObject
- Throws:
Exception
-
generateObject
- Specified by:
generateObject
in interfaceoracle.iam.platform.utils.XmlObject
-