Class TemplateManagerRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.templatemanager.server.TemplateManagerRESTServices
The TemplateManagerRESTServices provides the server-side implementation of the Template Manager Open Metadata
View Service (OMVS). This interface provides access to a person's profile, roles and network.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionarchiveMetadataElementInStore
(String serverName, String metadataElementGUID, ArchiveRequestBody requestBody) Archive a specific metadata element.classifyMetadataElementInStore
(String serverName, String metadataElementGUID, String classificationName, NewClassificationRequestBody requestBody) Add a new classification to the metadata element.createMetadataElementFromTemplate
(String serverName, TemplateRequestBody requestBody) Create a new metadata element in the metadata store using a template.createMetadataElementInStore
(String serverName, NewOpenMetadataElementRequestBody requestBody) Create a new metadata element in the metadata store.createRelatedElementsInStore
(String serverName, NewRelatedElementsRequestBody requestBody) Create a relationship between two metadata elements.declassifyMetadataElementInStore
(String serverName, String metadataElementGUID, String classificationName, UpdateRequestBody requestBody) Remove the named classification from a specific metadata element.deleteMetadataElementInStore
(String serverName, String metadataElementGUID, UpdateRequestBody requestBody) Delete a specific metadata element.deleteRelatedElementsInStore
(String serverName, String relationshipGUID, UpdateRequestBody requestBody) Delete a relationship between two metadata elements.reclassifyMetadataElementInStore
(String serverName, String metadataElementGUID, String classificationName, UpdatePropertiesRequestBody requestBody) Update the properties of a classification that is currently attached to a specific metadata element.updateClassificationEffectivityInStore
(String serverName, String metadataElementGUID, String classificationName, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates of a specific classification attached to a metadata element.updateMetadataElementEffectivityInStore
(String serverName, String metadataElementGUID, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates control the visibility of the element through specific APIs.updateMetadataElementInStore
(String serverName, String metadataElementGUID, UpdatePropertiesRequestBody requestBody) Update the properties of a specific metadata element.updateMetadataElementStatusInStore
(String serverName, String metadataElementGUID, UpdateStatusRequestBody requestBody) Update the status of specific metadata element.updateRelatedElementsEffectivityInStore
(String serverName, String relationshipGUID, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates of a specific relationship between metadata elements.updateRelatedElementsInStore
(String serverName, String relationshipGUID, UpdatePropertiesRequestBody requestBody) Update the properties associated with a relationship.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
TemplateManagerRESTServices
public TemplateManagerRESTServices()Default constructor
-
-
Method Details
-
createMetadataElementInStore
public GUIDResponse createMetadataElementInStore(String serverName, NewOpenMetadataElementRequestBody requestBody) Create a new metadata element in the metadata store. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed. This version of the method allows access to advanced features such as multiple states and effectivity dates.- Parameters:
serverName
- name of server instance to route request torequestBody
- properties for the new element- Returns:
- unique identifier of the new metadata element InvalidParameterException the type name, status or one of the properties is invalid UserNotAuthorizedException the governance action service is not authorized to create this type of element PropertyServerException there is a problem with the metadata store
-
createMetadataElementFromTemplate
public GUIDResponse createMetadataElementFromTemplate(String serverName, TemplateRequestBody requestBody) Create a new metadata element in the metadata store using a template. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed.- Parameters:
serverName
- name of server instance to route request torequestBody
- properties for the new element- Returns:
- unique identifier of the new metadata element InvalidParameterException the type name, status or one of the properties is invalid UserNotAuthorizedException the governance action service is not authorized to create this type of element PropertyServerException there is a problem with the metadata store
-
updateMetadataElementInStore
public VoidResponse updateMetadataElementInStore(String serverName, String metadataElementGUID, UpdatePropertiesRequestBody requestBody) Update the properties of a specific metadata element. The properties must match the type definition associated with the metadata element when it was created. However, it is possible to update a few properties, or replace all them by the value used in the replaceProperties flag.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updaterequestBody
- new properties- Returns:
- void or InvalidParameterException either the unique identifier or the properties are invalid in some way UserNotAuthorizedException the governance action service is not authorized to update this element PropertyServerException there is a problem with the metadata store
-
updateMetadataElementStatusInStore
public VoidResponse updateMetadataElementStatusInStore(String serverName, String metadataElementGUID, UpdateStatusRequestBody requestBody) Update the status of specific metadata element. The new status must match a status value that is defined for the element's type assigned when it was created.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updaterequestBody
- new status values - use null to leave as is- Returns:
- void or InvalidParameterException either the unique identifier or the status are invalid in some way UserNotAuthorizedException the governance action service is not authorized to update this element PropertyServerException there is a problem with the metadata store
-
updateMetadataElementEffectivityInStore
public VoidResponse updateMetadataElementEffectivityInStore(String serverName, String metadataElementGUID, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates control the visibility of the element through specific APIs.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updaterequestBody
- new status values - use null to leave as is- Returns:
- void or InvalidParameterException either the unique identifier or the status are invalid in some way UserNotAuthorizedException the governance action service is not authorized to update this element PropertyServerException there is a problem with the metadata store
-
deleteMetadataElementInStore
public VoidResponse deleteMetadataElementInStore(String serverName, String metadataElementGUID, UpdateRequestBody requestBody) Delete a specific metadata element.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updaterequestBody
- null request body- Returns:
- void or InvalidParameterException the unique identifier is null or invalid in some way UserNotAuthorizedException the governance action service is not authorized to delete this element PropertyServerException there is a problem with the metadata store
-
archiveMetadataElementInStore
public VoidResponse archiveMetadataElementInStore(String serverName, String metadataElementGUID, ArchiveRequestBody requestBody) Archive a specific metadata element.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updaterequestBody
- null request body- Returns:
- void or InvalidParameterException the unique identifier is null or invalid in some way UserNotAuthorizedException the governance action service is not authorized to archive this element PropertyServerException there is a problem with the metadata store
-
classifyMetadataElementInStore
public VoidResponse classifyMetadataElementInStore(String serverName, String metadataElementGUID, String classificationName, NewClassificationRequestBody requestBody) Add a new classification to the metadata element. Note that only one classification with the same name can be attached to a metadata element.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- name of the classification to add (if the classification is already present then use reclassify)requestBody
- properties to store in the new classification. These must conform to the valid properties associated with the classification name- Returns:
- void or InvalidParameterException the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definition UserNotAuthorizedException the governance action service is not authorized to update this element PropertyServerException there is a problem with the metadata store
-
reclassifyMetadataElementInStore
public VoidResponse reclassifyMetadataElementInStore(String serverName, String metadataElementGUID, String classificationName, UpdatePropertiesRequestBody requestBody) Update the properties of a classification that is currently attached to a specific metadata element.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to updaterequestBody
- new properties for the classification- Returns:
- void or InvalidParameterException the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definition UserNotAuthorizedException the governance action service is not authorized to update this element/classification PropertyServerException there is a problem with the metadata store
-
updateClassificationEffectivityInStore
public VoidResponse updateClassificationEffectivityInStore(String serverName, String metadataElementGUID, String classificationName, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates of a specific classification attached to a metadata element. The effectivity dates control the visibility of the classification through specific APIs.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to updaterequestBody
- the dates when this element is active / inactive - null for no restriction- Returns:
- void or InvalidParameterException either the unique identifier or the status are invalid in some way UserNotAuthorizedException the governance action service is not authorized to update this element PropertyServerException there is a problem with the metadata store
-
declassifyMetadataElementInStore
public VoidResponse declassifyMetadataElementInStore(String serverName, String metadataElementGUID, String classificationName, UpdateRequestBody requestBody) Remove the named classification from a specific metadata element.- Parameters:
serverName
- name of server instance to route request tometadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to removerequestBody
- null request body- Returns:
- void or InvalidParameterException the unique identifier or classification name is null or invalid in some way UserNotAuthorizedException the governance action service is not authorized to remove this classification PropertyServerException there is a problem with the metadata store
-
createRelatedElementsInStore
public GUIDResponse createRelatedElementsInStore(String serverName, NewRelatedElementsRequestBody requestBody) Create a relationship between two metadata elements. It is important to put the right element at each end of the relationship according to the type definition since this will affect how the relationship is interpreted.- Parameters:
serverName
- name of server instance to route request torequestBody
- the properties of the relationship- Returns:
- unique identifier of the new relationship or InvalidParameterException the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationship UserNotAuthorizedException the governance action service is not authorized to create this type of relationship PropertyServerException there is a problem with the metadata store
-
updateRelatedElementsInStore
public VoidResponse updateRelatedElementsInStore(String serverName, String relationshipGUID, UpdatePropertiesRequestBody requestBody) Update the properties associated with a relationship.- Parameters:
serverName
- name of server instance to route request torelationshipGUID
- unique identifier of the relationship to updaterequestBody
- new properties for the relationship- Returns:
- void or InvalidParameterException the unique identifier of the relationship is null or invalid in some way; the properties are not valid for this type of relationship UserNotAuthorizedException the governance action service is not authorized to update this relationship PropertyServerException there is a problem with the metadata store
-
updateRelatedElementsEffectivityInStore
public VoidResponse updateRelatedElementsEffectivityInStore(String serverName, String relationshipGUID, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates of a specific relationship between metadata elements. The effectivity dates control the visibility of the classification through specific APIs.- Parameters:
serverName
- name of server instance to route request torelationshipGUID
- unique identifier of the relationship to updaterequestBody
- the dates when this element is active / inactive - null for no restriction- Returns:
- void or InvalidParameterException either the unique identifier or the status are invalid in some way UserNotAuthorizedException the governance action service is not authorized to update this element PropertyServerException there is a problem with the metadata store
-
deleteRelatedElementsInStore
public VoidResponse deleteRelatedElementsInStore(String serverName, String relationshipGUID, UpdateRequestBody requestBody) Delete a relationship between two metadata elements.- Parameters:
serverName
- name of server instance to route request torelationshipGUID
- unique identifier of the relationship to deleterequestBody
- null request body- Returns:
- void or InvalidParameterException the unique identifier of the relationship is null or invalid in some way UserNotAuthorizedException the governance action service is not authorized to delete this relationship PropertyServerException there is a problem with the metadata store
-