Class TemplateRequestBody
java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.rest.MetadataSourceRequestBody
org.odpi.openmetadata.frameworkservices.gaf.rest.TemplateRequestBody
TemplateRequestBody provides a structure for passing the properties for a new metadata element
that is to be created via a template.
-
Constructor Summary
ConstructorDescriptionDefault constructorTemplateRequestBody
(TemplateRequestBody template) Copy/clone constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
Equals method that returns true if containing properties are the same.boolean
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).Return the unique identifier of the element that should be the anchor for the new element.Return the date/time that this new element becomes effective in the governance program (null means immediately).Return the effective time use on any queries for related elements.Return the date/time when the new element is no longer effective in the governance program (null means until deleted).Return the map of classification name to properties describing the initial classification for the new metadata element.Return the initial status of the metadata element (typically ACTIVE).boolean
Return whether this element should be classified as its own anchor or not.boolean
Return which end any parent entity sits on the relationship.Return the optional unique identifier for an element that should be connected to the newly created element.Return any properties that should be included in the parent relationship.Return the name of the relationship, if any, that should be established between the new element and the parent element.Return the property values to replace placeholders in the template.Return the properties for the new metadata element.Returns the unique identifier of the element to use as a template (optional).Return the open metadata type name for the new metadata element.int
hashCode()
Return hash code for this objectvoid
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).void
setAnchorGUID
(String anchorGUID) Set up the unique identifier of the element that should be the anchor for the new element.void
setEffectiveFrom
(Date effectiveFrom) Set up the date/time that this new element becomes effective in the governance program (null means immediately).void
setEffectiveTime
(Date effectiveTime) Set up the effective time use on any queries for related elements.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).void
setInitialClassifications
(Map<String, ElementProperties> initialClassifications) Set up the map of classification name to properties describing the initial classification for the new metadata element.void
setInitialStatus
(ElementStatus initialStatus) Set up the initial status of the metadata element (typically ACTIVE).void
setIsOwnAnchor
(boolean ownAnchor) Set up whether this element should be classified as its own anchor or not.void
setParentAtEnd1
(boolean parentAtEnd1) Set up which end any parent entity sits on the relationship.void
setParentGUID
(String parentGUID) Set up the optional unique identifier for an element that should be connected to the newly created element.void
setParentRelationshipProperties
(ElementProperties parentRelationshipProperties) Set up any properties that should be included in the parent relationship.void
setParentRelationshipTypeName
(String parentRelationshipTypeName) Set up the name of the optional relationship from the newly created element to a parent element.void
setPlaceholderPropertyValues
(Map<String, String> placeholderPropertyValues) Set up the property values to replace placeholders in the template.void
setReplacementProperties
(ElementProperties templateProperties) Set up the properties for the new metadata element.void
setTemplateGUID
(String templateGUID) Set up the unique identifier of the element to use as a template (optional).void
setTypeName
(String typeName) Set up the open metadata type name for the new metadata element.toString()
JSON-style toString.Methods inherited from class org.odpi.openmetadata.frameworkservices.gaf.rest.MetadataSourceRequestBody
getExternalSourceGUID, getExternalSourceName, setExternalSourceGUID, setExternalSourceName
-
Constructor Details
-
TemplateRequestBody
public TemplateRequestBody()Default constructor -
TemplateRequestBody
Copy/clone constructor- Parameters:
template
- object to copy
-
-
Method Details
-
getTypeName
Return the open metadata type name for the new metadata element.- Returns:
- string name
-
setTypeName
Set up the open metadata type name for the new metadata element.- Parameters:
typeName
- string name
-
getInitialStatus
Return the initial status of the metadata element (typically ACTIVE).- Returns:
- element status enum value
-
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
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
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
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
Set up the initial status of the metadata element (typically ACTIVE).- Parameters:
initialStatus
- element status enum value
-
getEffectiveFrom
Return the date/time that this new element becomes effective in the governance program (null means immediately).- Returns:
- date object
-
setEffectiveFrom
Set up the date/time that this new element becomes effective in the governance program (null means immediately).- Parameters:
effectiveFrom
- date object
-
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
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
Return the properties for the new metadata element.- Returns:
- list of properties
-
setReplacementProperties
Set up the properties for the new metadata element.- Parameters:
templateProperties
- list of properties
-
setTemplateGUID
Set up the unique identifier of the element to use as a template (optional).- Parameters:
templateGUID
- String guid
-
getTemplateGUID
Returns the unique identifier of the element to use as a template (optional).- Returns:
- string guid
-
getPlaceholderPropertyValues
Return the property values to replace placeholders in the template.- Returns:
- map of property name to property value
-
setPlaceholderPropertyValues
Set up the property values to replace placeholders in the template.- Parameters:
placeholderPropertyValues
- map of property name to property value
-
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
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
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
Set up the name of the optional relationship from the newly created element to a parent element.- Parameters:
parentRelationshipTypeName
- string type name
-
getParentRelationshipProperties
Return any properties that should be included in the parent relationship.- Returns:
- element properties
-
setParentRelationshipProperties
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
Return the effective time use on any queries for related elements.- Returns:
- date object
-
setEffectiveTime
Set up the effective time use on any queries for related elements.- Parameters:
effectiveTime
- date object
-
toString
JSON-style toString.- Overrides:
toString
in classMetadataSourceRequestBody
- Returns:
- list of properties and their values.
-
equals
Equals method that returns true if containing properties are the same.- Overrides:
equals
in classMetadataSourceRequestBody
- Parameters:
objectToCompare
- object to compare- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()Return hash code for this object- Overrides:
hashCode
in classMetadataSourceRequestBody
- Returns:
- int hash code
-