Class MetadataExpertRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.metadataexpert.server.MetadataExpertRESTServices
The MetadataExpertRESTServices provides the server-side implementation of the Metadata Expert Open Metadata
View Service (OMVS). This interface provides access to a person's profile, roles and network.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarchiveMetadataElementInStore
(String serverName, String urlMarker, String metadataElementGUID, DeleteRequestBody requestBody) Archive a specific metadata element.classifyMetadataElementInStore
(String serverName, String urlMarker, String metadataElementGUID, String classificationName, NewOpenMetadataClassificationRequestBody requestBody) Add a new classification to the metadata element.createMetadataElementFromTemplate
(String serverName, String urlMarker, OpenMetadataTemplateRequestBody requestBody) Create a new metadata element in the metadata store using a template.createMetadataElementInStore
(String serverName, String urlMarker, NewOpenMetadataElementRequestBody requestBody) Create a new metadata element in the metadata store.createRelatedElementsInStore
(String serverName, String urlMarker, NewRelatedElementsRequestBody requestBody) Create a relationship between two metadata elements.declassifyMetadataElementInStore
(String serverName, String urlMarker, String metadataElementGUID, String classificationName, MetadataSourceRequestBody requestBody) Remove the named classification from a specific metadata element.deleteMetadataElementInStore
(String serverName, String urlMarker, String metadataElementGUID, OpenMetadataDeleteRequestBody requestBody) Delete a specific metadata element.deleteRelatedElementsInStore
(String serverName, String urlMarker, String relationshipGUID, OpenMetadataDeleteRequestBody requestBody) Delete a relationship between two metadata elements.detachRelatedElementsInStore
(String serverName, String urlMarker, String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, OpenMetadataDeleteRequestBody requestBody) Delete all relationships of a particular type between two metadata elements.reclassifyMetadataElementInStore
(String serverName, String urlMarker, 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 urlMarker, String metadataElementGUID, String classificationName, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates of a specific classification attached to a metadata element.updateMetadataElementEffectivityInStore
(String serverName, String urlMarker, String metadataElementGUID, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates control the visibility of the element through specific APIs.updateMetadataElementInStore
(String serverName, String urlMarker, String metadataElementGUID, UpdatePropertiesRequestBody requestBody) Update the properties of a specific metadata element.updateMetadataElementStatusInStore
(String serverName, String urlMarker, String metadataElementGUID, UpdateStatusRequestBody requestBody) Update the status of specific metadata element.updateRelatedElementsEffectivityInStore
(String serverName, String urlMarker, String relationshipGUID, UpdateEffectivityDatesRequestBody requestBody) Update the effectivity dates of a specific relationship between metadata elements.updateRelatedElementsInStore
(String serverName, String urlMarker, String relationshipGUID, UpdatePropertiesRequestBody requestBody) Update the properties associated with a relationship.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
MetadataExpertRESTServices
public MetadataExpertRESTServices()Default constructor
-
-
Method Details
-
createMetadataElementInStore
public GUIDResponse createMetadataElementInStore(String serverName, String urlMarker, 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 tourlMarker
- view service URL markerrequestBody
- 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, String urlMarker, OpenMetadataTemplateRequestBody 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 tourlMarker
- view service URL markerrequestBody
- 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 urlMarker, 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 tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, 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 tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, 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 tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, String metadataElementGUID, OpenMetadataDeleteRequestBody requestBody) Delete a specific metadata element.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markermetadataElementGUID
- unique identifier of the metadata element to updaterequestBody
- delete 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 urlMarker, String metadataElementGUID, DeleteRequestBody requestBody) Archive a specific metadata element.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, String metadataElementGUID, String classificationName, NewOpenMetadataClassificationRequestBody 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 tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, 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 tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, 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 tourlMarker
- view service URL markermetadataElementGUID
- 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 urlMarker, String metadataElementGUID, String classificationName, MetadataSourceRequestBody requestBody) Remove the named classification from a specific metadata element.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markermetadataElementGUID
- 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, String urlMarker, 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 tourlMarker
- view service URL markerrequestBody
- 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 urlMarker, String relationshipGUID, UpdatePropertiesRequestBody requestBody) Update the properties associated with a relationship.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrelationshipGUID
- 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 urlMarker, 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 tourlMarker
- view service URL markerrelationshipGUID
- 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 urlMarker, String relationshipGUID, OpenMetadataDeleteRequestBody requestBody) Delete a relationship between two metadata elements.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrelationshipGUID
- unique identifier of the relationship to deleterequestBody
- options to control access to open metadata- 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
-
detachRelatedElementsInStore
public VoidResponse detachRelatedElementsInStore(String serverName, String urlMarker, String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, OpenMetadataDeleteRequestBody requestBody) Delete all relationships of a particular type between two metadata elements.- Parameters:
serverName
- name of server instance to route request tourlMarker
- view service URL markerrelationshipTypeName
- name of the type of relationship to create. This will determine the types of metadata elements that can be related and the properties that can be associated with this relationship.metadataElement1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID
- unique identifier of the metadata element at end 2 of the relationshiprequestBody
- options to control access to open metadata- 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
-