Class TemplateRequestBody

java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.rest.MetadataSourceRequestBody
org.odpi.openmetadata.frameworkservices.gaf.rest.TemplateRequestBody

public class TemplateRequestBody extends MetadataSourceRequestBody
TemplateRequestBody provides a structure for passing the properties for a new metadata element that is to be created via a template.
  • Constructor Details

    • TemplateRequestBody

      public TemplateRequestBody()
      Default constructor
    • TemplateRequestBody

      public TemplateRequestBody(TemplateRequestBody template)
      Copy/clone constructor
      Parameters:
      template - object to copy
  • Method Details

    • getTypeName

      public String getTypeName()
      Return the open metadata type name for the new metadata element.
      Returns:
      string name
    • setTypeName

      public void setTypeName(String typeName)
      Set up the open metadata type name for the new metadata element.
      Parameters:
      typeName - string name
    • getInitialStatus

      public ElementStatus getInitialStatus()
      Return the initial status of the metadata element (typically ACTIVE).
      Returns:
      element status enum value
    • getInitialClassifications

      public Map<String,ElementProperties> getInitialClassifications()
      Return the map of classification name to properties describing the initial classification for the new metadata element.
      Returns:
      map of classification name to classification properties (or null for none)
    • setInitialClassifications

      public void setInitialClassifications(Map<String,ElementProperties> initialClassifications)
      Set up the map of classification name to properties describing the initial classification for the new metadata element.
      Parameters:
      initialClassifications - map of classification name to classification properties (or null for none)
    • getAnchorGUID

      public String getAnchorGUID()
      Return the unique identifier of the element that should be the anchor for the new element. It is set to null if no anchor, or the Anchors classification is included in the initial classifications.
      Returns:
      string guid
    • setAnchorGUID

      public void setAnchorGUID(String anchorGUID)
      Set up the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, or the Anchors classification is included in the initial classifications.
      Parameters:
      anchorGUID - string guid
    • getIsOwnAnchor

      public boolean getIsOwnAnchor()
      Return whether this element should be classified as its own anchor or not. The default is false.
      Returns:
      boolean
    • setIsOwnAnchor

      public void setIsOwnAnchor(boolean ownAnchor)
      Set up whether this element should be classified as its own anchor or not. The default is false.
      Parameters:
      ownAnchor - boolean
    • getAllowRetrieve

      public boolean getAllowRetrieve()
      Return whether the code allowed to retrieve an existing element, or must it create a new one - the match is done on the qualified name (default is false).
      Returns:
      boolean
    • setAllowRetrieve

      public void setAllowRetrieve(boolean allowRetrieve)
      Set up whether the code allowed to retrieve an existing element, or must it create a new one - the match is done on the qualified name (default is false).
      Parameters:
      allowRetrieve - boolean
    • setInitialStatus

      public void setInitialStatus(ElementStatus initialStatus)
      Set up the initial status of the metadata element (typically ACTIVE).
      Parameters:
      initialStatus - element status enum value
    • getEffectiveFrom

      public Date getEffectiveFrom()
      Return the date/time that this new element becomes effective in the governance program (null means immediately).
      Returns:
      date object
    • setEffectiveFrom

      public void setEffectiveFrom(Date effectiveFrom)
      Set up the date/time that this new element becomes effective in the governance program (null means immediately).
      Parameters:
      effectiveFrom - date object
    • getEffectiveTo

      public Date getEffectiveTo()
      Return the date/time when the new element is no longer effective in the governance program (null means until deleted).
      Returns:
      date object
    • setEffectiveTo

      public void setEffectiveTo(Date effectiveTo)
      Set up the date/time when the new element is no longer effective in the governance program (null means until deleted).
      Parameters:
      effectiveTo - date object
    • getReplacementProperties

      public ElementProperties getReplacementProperties()
      Return the properties for the new metadata element.
      Returns:
      list of properties
    • setReplacementProperties

      public void setReplacementProperties(ElementProperties templateProperties)
      Set up the properties for the new metadata element.
      Parameters:
      templateProperties - list of properties
    • setTemplateGUID

      public void setTemplateGUID(String templateGUID)
      Set up the unique identifier of the element to use as a template (optional).
      Parameters:
      templateGUID - String guid
    • getTemplateGUID

      public String getTemplateGUID()
      Returns the unique identifier of the element to use as a template (optional).
      Returns:
      string guid
    • getPlaceholderPropertyValues

      public Map<String,String> getPlaceholderPropertyValues()
      Return the property values to replace placeholders in the template.
      Returns:
      map of property name to property value
    • setPlaceholderPropertyValues

      public void setPlaceholderPropertyValues(Map<String,String> placeholderPropertyValues)
      Set up the property values to replace placeholders in the template.
      Parameters:
      placeholderPropertyValues - map of property name to property value
    • getParentGUID

      public String getParentGUID()
      Return the optional unique identifier for an element that should be connected to the newly created element. If this property is specified, parentRelationshipTypeName must also be specified.
      Returns:
      string guid
    • setParentGUID

      public void setParentGUID(String parentGUID)
      Set up the optional unique identifier for an element that should be connected to the newly created element. If this property is specified, parentRelationshipTypeName must also be specified.
      Parameters:
      parentGUID - string guid
    • getParentRelationshipTypeName

      public String getParentRelationshipTypeName()
      Return the name of the relationship, if any, that should be established between the new element and the parent element.
      Returns:
      string type name
    • setParentRelationshipTypeName

      public void setParentRelationshipTypeName(String parentRelationshipTypeName)
      Set up the name of the optional relationship from the newly created element to a parent element.
      Parameters:
      parentRelationshipTypeName - string type name
    • getParentRelationshipProperties

      public ElementProperties getParentRelationshipProperties()
      Return any properties that should be included in the parent relationship.
      Returns:
      element properties
    • setParentRelationshipProperties

      public void setParentRelationshipProperties(ElementProperties parentRelationshipProperties)
      Set up any properties that should be included in the parent relationship.
      Parameters:
      parentRelationshipProperties - element properties
    • getParentAtEnd1

      public boolean getParentAtEnd1()
      Return which end any parent entity sits on the relationship.
      Returns:
      boolean
    • setParentAtEnd1

      public void setParentAtEnd1(boolean parentAtEnd1)
      Set up which end any parent entity sits on the relationship.
      Parameters:
      parentAtEnd1 - boolean
    • getEffectiveTime

      public Date getEffectiveTime()
      Return the effective time use on any queries for related elements.
      Returns:
      date object
    • setEffectiveTime

      public void setEffectiveTime(Date effectiveTime)
      Set up the effective time use on any queries for related elements.
      Parameters:
      effectiveTime - date object
    • toString

      public String toString()
      JSON-style toString.
      Overrides:
      toString in class MetadataSourceRequestBody
      Returns:
      list of properties and their values.
    • equals

      public boolean equals(Object objectToCompare)
      Equals method that returns true if containing properties are the same.
      Overrides:
      equals in class MetadataSourceRequestBody
      Parameters:
      objectToCompare - object to compare
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Return hash code for this object
      Overrides:
      hashCode in class MetadataSourceRequestBody
      Returns:
      int hash code