Class DataAssetExchangeService
- java.lang.Object
-
- org.odpi.openmetadata.integrationservices.catalog.connector.SchemaExchangeService
-
- org.odpi.openmetadata.integrationservices.catalog.connector.DataAssetExchangeService
-
public class DataAssetExchangeService extends SchemaExchangeService
DataAssetExchangeService is the context for managing data assets and associated elements such as schemas.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearDataAssetAsReferenceData(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier)Remove the reference data designation from the asset.StringcreateDataAsset(boolean assetManagerIsHome, String assetExternalIdentifier, String assetExternalIdentifierName, String assetExternalIdentifierUsage, KeyPattern assetExternalIdentifierKeyPattern, Map<String,String> mappingProperties, DataAssetProperties assetProperties)Create a new metadata element to represent the root of an asset.StringcreateDataAssetFromTemplate(boolean assetManagerIsHome, String templateGUID, String assetExternalIdentifier, String assetExternalIdentifierName, String assetExternalIdentifierUsage, KeyPattern assetExternalIdentifierKeyPattern, Map<String,String> mappingProperties, TemplateProperties templateProperties)Create a new metadata element to represent an asset using an existing metadata element as a template.List<DataAssetElement>findDataAssets(String searchString, int startFrom, int pageSize)Retrieve the list of asset metadata elements that contain the search string.DataAssetElementgetDataAssetByGUID(String userId, String assetManagerGUID, String assetManagerName, String dataAssetGUID)Retrieve the asset metadata element with the supplied unique identifier.List<DataAssetElement>getDataAssetsByName(String name, int startFrom, int pageSize)Retrieve the list of asset metadata elements with a matching qualified or display name.List<DataAssetElement>getDataAssetsForAssetManager(int startFrom, int pageSize)Retrieve the list of assets created on behalf of the named asset manager.voidpublishDataAsset(String userId, String assetGUID)Update the zones for the asset so that it becomes visible to consumers.voidremoveDataAsset(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier)Remove the metadata element representing an asset.voidsetDataAssetAsReferenceData(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier)Classify the asset to indicate that it can be used as reference data.voidupdateDataAsset(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier, boolean isMergeUpdate, DataAssetProperties assetProperties)Update the metadata element representing an asset.voidwithdrawDataAsset(String userId, String assetGUID)Update the zones for the asset so that it is no longer visible to consumers.-
Methods inherited from class org.odpi.openmetadata.integrationservices.catalog.connector.SchemaExchangeService
clearColumnAsPrimaryKey, clearForeignKeyRelationship, clearSchemaElementAsCalculatedValue, clearSchemaTypeParent, createSchemaAttribute, createSchemaAttributeFromTemplate, createSchemaType, createSchemaTypeFromTemplate, findSchemaAttributes, findSchemaType, getNestedAttributes, getSchemaAttributeByGUID, getSchemaAttributesByName, getSchemaTypeByGUID, getSchemaTypeByName, getSchemaTypeForElement, getSchemaTypeParent, removeSchemaAttribute, removeSchemaType, setSchemaElementAsCalculatedValue, setupColumnAsPrimaryKey, setupForeignKeyRelationship, setupSchemaTypeParent, updateForeignKeyRelationship, updateSchemaAttribute, updateSchemaType
-
-
-
-
Method Detail
-
createDataAsset
public String createDataAsset(boolean assetManagerIsHome, String assetExternalIdentifier, String assetExternalIdentifierName, String assetExternalIdentifierUsage, KeyPattern assetExternalIdentifierKeyPattern, Map<String,String> mappingProperties, DataAssetProperties assetProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent the root of an asset.- Parameters:
assetManagerIsHome- ensure that only the asset manager can update this assetassetExternalIdentifier- unique identifier of the asset in the external asset managerassetExternalIdentifierName- name of property for the external identifier in the external asset managerassetExternalIdentifierUsage- optional usage description for the external identifier when calling the external asset managerassetExternalIdentifierKeyPattern- pattern for the external identifier within the external asset manager (default is LOCAL_KEY)mappingProperties- additional properties to help with the mapping of the elements in the external asset manager and open metadataassetProperties- properties to store- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createDataAssetFromTemplate
public String createDataAssetFromTemplate(boolean assetManagerIsHome, String templateGUID, String assetExternalIdentifier, String assetExternalIdentifierName, String assetExternalIdentifierUsage, KeyPattern assetExternalIdentifierKeyPattern, Map<String,String> mappingProperties, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
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:
assetManagerIsHome- ensure that only the asset manager can update this processassetExternalIdentifier- unique identifier of the asset in the external asset managerassetExternalIdentifierName- name of property for the external identifier in the external asset managerassetExternalIdentifierUsage- optional usage description for the external identifier when calling the external asset managerassetExternalIdentifierKeyPattern- pattern for the external identifier within the external asset manager (default is LOCAL_KEY)mappingProperties- additional properties to help with the mapping of the elements in the external asset manager and open metadatatemplateGUID- unique identifier of the metadata element to copytemplateProperties- properties that override the template- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateDataAsset
public void updateDataAsset(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier, boolean isMergeUpdate, DataAssetProperties assetProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing an asset.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to updateassetExternalIdentifier- unique identifier of the asset in the external asset managerisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?assetProperties- new properties for this element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
publishDataAsset
public void publishDataAsset(String userId, String assetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
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:
userId- calling userassetGUID- unique identifier of the metadata element to publish- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
withdrawDataAsset
public void withdrawDataAsset(String userId, String assetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
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:
userId- calling userassetGUID- unique identifier of the metadata element to withdraw- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removeDataAsset
public void removeDataAsset(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing an asset. This will delete the asset and all anchored elements such as schema and comments.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to removeassetExternalIdentifier- unique identifier of the asset in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setDataAssetAsReferenceData
public void setDataAssetAsReferenceData(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Classify the asset to indicate that it can be used as reference data.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to updateassetExternalIdentifier- unique identifier of the asset in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearDataAssetAsReferenceData
public void clearDataAssetAsReferenceData(String userId, String assetManagerGUID, String assetManagerName, String assetGUID, String assetExternalIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the reference data designation from the asset.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to updateassetExternalIdentifier- unique identifier of the asset in the external asset manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findDataAssets
public List<DataAssetElement> findDataAssets(String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of asset metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
searchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDataAssetsByName
public List<DataAssetElement> getDataAssetsByName(String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of asset metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
name- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDataAssetsForAssetManager
public List<DataAssetElement> getDataAssetsForAssetManager(int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of assets created on behalf of the named asset manager.- Parameters:
startFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getDataAssetByGUID
public DataAssetElement getDataAssetByGUID(String userId, String assetManagerGUID, String assetManagerName, String dataAssetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the asset metadata element with the supplied unique identifier.- Parameters:
userId- calling userassetManagerGUID- unique identifier of software server capability representing the callerassetManagerName- unique name of software server capability representing the callerdataAssetGUID- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
-