Class RelationMetadata

java.lang.Object
oracle.iam.platform.entitymgr.vo.RelationMetadata
All Implemented Interfaces:
oracle.iam.platform.utils.XmlObject

public class RelationMetadata extends Object implements oracle.iam.platform.utils.XmlObject
  • Constructor Details

    • RelationMetadata

      public RelationMetadata()
      Constructor for Kernel use to generate the relation metadata from XML only! Use the other constructor RelationMetadata(String relationType) for any other purposes.
    • RelationMetadata

      public RelationMetadata(String relationType)
      Construct an empty relation metadata object.
      Parameters:
      relationType - the relation type
  • Method Details

    • getRelationType

      public String getRelationType()
      Get the relation type
      Returns:
      the relation type
    • getRepositoryInstance

      public String getRepositoryInstance()
      Get the repository instance name.
      Returns:
      the repository instance name
    • setRepositoryInstance

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

      public String getProviderType()
      Get the relation provider type name.
      Returns:
      the relation provider type name
    • setProviderType

      public void setProviderType(String providerType)
      Set the relation provider type name.
      Parameters:
      providerType - the relation provider type name
    • getProviderParameters

      public Map<String,String> getProviderParameters()
      Get the relation provider parameters.
      Returns:
      the relation provider parameters
    • setProviderParameters

      public void setProviderParameters(Map<String,String> providerParams)
      Set the relation provider parameters.
      Parameters:
      providerParams - the relation provider parameters
    • getEntityType1

      public String getEntityType1()
      Get the entity type for entity 1
      Returns:
      the entity type for entity 1
    • setEntityType1

      public void setEntityType1(String entityType)
      Set the entity type for entity 1
      Parameters:
      entityType - the entity type for entity 1
    • getAttributeName1

      public String getAttributeName1()
      Get the attribute name for entity 1
      Returns:
      the attribute name for entity 1
    • setAttributeName1

      public void setAttributeName1(String attrName)
      Set the attribute name for entity 1
      Parameters:
      attrName - the attribute name for entity 1
    • getAttributeNameInEntity1

      public String getAttributeNameInEntity1()
      Get the attribute name in the specified entity type for entity 1
      Returns:
      the the attribute name in the specified entity type for entity 1
    • setAttributeNameInEntity1

      public void setAttributeNameInEntity1(String attrName)
      Set the attribute name in the specified entity type for entity 1
      Parameters:
      attrName - the the attribute name in the specified entity type for entity 1
    • getAttributeGroupName1

      public String getAttributeGroupName1()
      Get the attribute group name for entity 1
      Returns:
      the attribute group name for entity 1
    • setAttributeGroupName1

      public void setAttributeGroupName1(String attrGroupName)
      Set the attribute group name for entity 1
      Parameters:
      attrGroupName - the attribute group name for entity 1
    • getEntityType2

      public String getEntityType2()
      Get the entity type for entity 2
      Returns:
      the entity type for entity 2
    • setEntityType2

      public void setEntityType2(String entityType)
      Set the entity type for entity 2
      Parameters:
      entityType - the entity type for entity 2
    • getAttributeName2

      public String getAttributeName2()
      Get the attribute name for entity 2
      Returns:
      the attribute name for entity 2
    • setAttributeName2

      public void setAttributeName2(String attrName)
      Set the attribute name for entity 2
      Parameters:
      attrName - the attribute name for entity 2
    • getAttributeNameInEntity2

      public String getAttributeNameInEntity2()
      Get the attribute name in the specified entity type for entity 2
      Returns:
      the the attribute name in the specified entity type for entity 2
    • setAttributeNameInEntity2

      public void setAttributeNameInEntity2(String attrName)
      Set the attribute name in the specified entity type for entity 2
      Parameters:
      attrName - the the attribute name in the specified entity type for entity 2
    • getAttributeGroupName2

      public String getAttributeGroupName2()
      Get the attribute group name for entity 2
      Returns:
      the attribute group name for entity 2
    • setAttributeGroupName2

      public void setAttributeGroupName2(String attrGroupName)
      Set the attribute group name for entity 2
      Parameters:
      attrGroupName - the attribute group name for entity 2
    • getAttributes

      public Map<String,AttributeDefinition> getAttributes()
      Get all the attribute definitions
      Returns:
      all the attribute definitions
    • getAttribute

      public AttributeDefinition getAttribute(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(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 Map<String,FieldDefinition> getFields()
      Get all the target field definitions
      Returns:
      all the target field definitions
    • getField

      public FieldDefinition getField(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:
      fieldDef - the target field definition to be added/modified
    • removeField

      public void removeField(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 Map<String,String> getAttributeMap()
      Get the attribute map
      Returns:
      the attribute map
    • setAttributeMap

      public void setAttributeMap(Map<String,String> attrMap)
      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 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(String attrName)
      Remove an attribute mapping.
      Parameters:
      attrName - the attribute name
    • toDocument

      public Document toDocument() throws ParserConfigurationException
      Convert the relation metadata object into a XML document
      Returns:
      the relation metadata object in XML
      Throws:
      ParserConfigurationException - if a DocumentBuilder cannot be created
    • generateXml

      public Document generateXml() throws Exception
      Specified by:
      generateXml in interface oracle.iam.platform.utils.XmlObject
      Throws:
      Exception
    • generateObject

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