Class DataAssetExchangeRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.assetmanager.server.DataAssetExchangeRESTServices
DataAssetExchangeRESTServices is the server-side implementation of the Asset Manager OMAS's
support for relational databases. It matches the DataAssetExchangeClient.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclearAssetRelationship
(String serverName, String userId, String relationshipTypeName, String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Remove the relationship between two elements.clearDataAssetAsReferenceData
(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Remove the reference data designation from the asset.createDataAsset
(String serverName, String userId, boolean assetManagerIsHome, DataAssetRequestBody requestBody) Create a new metadata element to represent the root of an asset.createDataAssetFromTemplate
(String serverName, String userId, boolean assetManagerIsHome, String templateGUID, TemplateRequestBody requestBody) Create a new metadata element to represent an asset using an existing metadata element as a template.findDataAssets
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, SearchStringRequestBody requestBody) Retrieve the list of asset metadata elements that contain the search string.getAssetRelationship
(String serverName, String userId, String relationshipTypeName, String fromAssetGUID, String toAssetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the relationship between two elements.getDataAssetByGUID
(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the asset metadata element with the supplied unique identifier.getDataAssetsByName
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the list of asset metadata elements with a matching qualified or display name.getDataAssetsForAssetManager
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the list of assets created on behalf of the named asset manager.getRelatedAssetsAtEnd1
(String serverName, String userId, String relationshipTypeName, String toAssetGUID, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the relationships linked from a specific element at end 2 of the relationship.getRelatedAssetsAtEnd2
(String serverName, String userId, String relationshipTypeName, String fromAssetGUID, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the requested relationships linked from a specific element at end 2.publishDataAsset
(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Update the zones for the asset so that it becomes visible to consumers.removeDataAsset
(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Remove the metadata element representing an asset.scanDataAssets
(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Step through the assets visible to this caller.setDataAssetAsReferenceData
(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Classify the asset to indicate that it can be used as reference data.setupRelatedDataAsset
(String serverName, String userId, boolean assetManagerIsHome, String relationshipTypeName, String fromAssetGUID, String toAssetGUID, boolean forLineage, boolean forDuplicateProcessing, RelationshipRequestBody requestBody) Link two asset together.updateAssetRelationship
(String serverName, String userId, String relationshipTypeName, String relationshipGUID, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, RelationshipRequestBody requestBody) Update relationship between two elements.updateDataAsset
(String serverName, String userId, String assetGUID, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, DataAssetRequestBody requestBody) Update the metadata element representing an asset.withdrawDataAsset
(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Update the zones for the asset so that it is no longer visible to consumers.
-
Constructor Details
-
DataAssetExchangeRESTServices
public DataAssetExchangeRESTServices()Default constructor
-
-
Method Details
-
createDataAsset
public GUIDResponse createDataAsset(String serverName, String userId, boolean assetManagerIsHome, DataAssetRequestBody requestBody) Create a new metadata element to represent the root of an asset.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetManagerIsHome
- ensure that only the asset manager can update this assetrequestBody
- properties to store- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
createDataAssetFromTemplate
public GUIDResponse createDataAssetFromTemplate(String serverName, String userId, boolean assetManagerIsHome, String templateGUID, TemplateRequestBody requestBody) Create a new metadata element to represent an asset using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new asset.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetManagerIsHome
- ensure that only the asset manager can update this assettemplateGUID
- unique identifier of the metadata element to copyrequestBody
- properties that override the template and correlate to external identifiers- Returns:
- unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
updateDataAsset
public VoidResponse updateDataAsset(String serverName, String userId, String assetGUID, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, DataAssetRequestBody requestBody) Update the metadata element representing an asset.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?forLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- new properties for this element- Returns:
- void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
publishDataAsset
public VoidResponse publishDataAsset(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Update the zones for the asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Asset Manager OMAS).- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the metadata element to publishforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- correlation properties- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
withdrawDataAsset
public VoidResponse withdrawDataAsset(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Update the zones for the asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Asset Manager OMAS. This is the setting when the database is first created).- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the metadata element to withdrawforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- correlation properties- Returns:
- void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
removeDataAsset
public VoidResponse removeDataAsset(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Remove the metadata element representing an asset. This will delete the asset and all anchored elements such as schema and comments.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the metadata element to removeforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- correlation properties- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setDataAssetAsReferenceData
public VoidResponse setDataAssetAsReferenceData(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Classify the asset to indicate that it can be used as reference data.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the metadata element to updateforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- correlation properties- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearDataAssetAsReferenceData
public VoidResponse clearDataAssetAsReferenceData(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, UpdateRequestBody requestBody) Remove the reference data designation from the asset.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the metadata element to updateforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- correlation properties- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setupRelatedDataAsset
public GUIDResponse setupRelatedDataAsset(String serverName, String userId, boolean assetManagerIsHome, String relationshipTypeName, String fromAssetGUID, String toAssetGUID, boolean forLineage, boolean forDuplicateProcessing, RelationshipRequestBody requestBody) Link two asset together. Use information from the relationship type definition to ensure the fromAssetGUID and toAssetGUID are the right way around.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetManagerIsHome
- ensure that only the process manager can update this processrelationshipTypeName
- type name of relationship to createfromAssetGUID
- unique identifier of the asset at end 1 of the relationshiptoAssetGUID
- unique identifier of the asset at end 2 of the relationshipforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- unique identifier for this relationship- Returns:
- unique identifier of the relationship or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getAssetRelationship
public RelationshipElementResponse getAssetRelationship(String serverName, String userId, String relationshipTypeName, String fromAssetGUID, String toAssetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the relationship between two elements.- Parameters:
serverName
- name of the server to route the request touserId
- calling userrelationshipTypeName
- type name of relationship to createfromAssetGUID
- unique identifier of the asset at end 1 of the relationshiptoAssetGUID
- unique identifier of the asset at end 2 of the relationshipforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- optional date for effective time of the query. Null means any effective time- Returns:
- unique identifier and properties of the relationship or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
updateAssetRelationship
public VoidResponse updateAssetRelationship(String serverName, String userId, String relationshipTypeName, String relationshipGUID, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, RelationshipRequestBody requestBody) Update relationship between two elements.- Parameters:
serverName
- name of the server to route the request touserId
- calling userrelationshipTypeName
- type name of relationship to updaterelationshipGUID
- unique identifier of the relationshipisMergeUpdate
- should the new properties be merged with the existing properties, or replace them entirelyforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- description and/or purpose of the relationship- Returns:
- void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
clearAssetRelationship
public VoidResponse clearAssetRelationship(String serverName, String userId, String relationshipTypeName, String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Remove the relationship between two elements.- Parameters:
serverName
- name of the server to route the request touserId
- calling userrelationshipTypeName
- type name of relationship to deleterelationshipGUID
- unique identifier of the relationshipforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- external source ids- Returns:
- void or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getRelatedAssetsAtEnd2
public RelationshipElementsResponse getRelatedAssetsAtEnd2(String serverName, String userId, String relationshipTypeName, String fromAssetGUID, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the requested relationships linked from a specific element at end 2.- Parameters:
serverName
- name of the server to route the request touserId
- calling userrelationshipTypeName
- type name of relationship to deletefromAssetGUID
- unique identifier of the asset at end 1 of the relationshipstartFrom
- start position for resultspageSize
- maximum number of resultsforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- unique identifier and properties of the relationships or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getRelatedAssetsAtEnd1
public RelationshipElementsResponse getRelatedAssetsAtEnd1(String serverName, String userId, String relationshipTypeName, String toAssetGUID, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the relationships linked from a specific element at end 2 of the relationship.- Parameters:
serverName
- name of the server to route the request touserId
- calling userrelationshipTypeName
- type name of relationship to deletetoAssetGUID
- unique identifier of the asset at end 2 of the relationshipstartFrom
- start position for resultspageSize
- maximum number of resultsforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- unique identifier and properties of the relationships or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
findDataAssets
public DataAssetElementsResponse findDataAssets(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, SearchStringRequestBody requestBody) Retrieve the list of asset metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of the server to route the request touserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- search parameter and correlation properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
scanDataAssets
public DataAssetElementsResponse scanDataAssets(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Step through the assets visible to this caller.- Parameters:
serverName
- name of the server to route the request touserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- search parameter and correlation properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getDataAssetsByName
public DataAssetElementsResponse getDataAssetsByName(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, NameRequestBody requestBody) Retrieve the list of asset metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName
- name of the server to route the request touserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- search parameter and correlation properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getDataAssetsForAssetManager
public DataAssetElementsResponse getDataAssetsForAssetManager(String serverName, String userId, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the list of assets created on behalf of the named asset manager.- Parameters:
serverName
- name of the server to route the request touserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- search parameters and correlation properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
getDataAssetByGUID
public DataAssetElementResponse getDataAssetByGUID(String serverName, String userId, String assetGUID, boolean forLineage, boolean forDuplicateProcessing, EffectiveTimeQueryRequestBody requestBody) Retrieve the asset metadata element with the supplied unique identifier.- Parameters:
serverName
- name of the server to route the request touserId
- calling userassetGUID
- unique identifier of the requested metadata elementforLineage
- return elements marked with the Memento classification?forDuplicateProcessing
- do not merge elements marked as duplicates?requestBody
- correlation properties- Returns:
- matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-