Class DataAssetManagerClient
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.itinfrastructure.client.AssetManagerClientBase
-
- org.odpi.openmetadata.accessservices.itinfrastructure.client.DataAssetManagerClient
-
- All Implemented Interfaces:
DataAssetManagerInterface,DeploymentManagementInterface,ServerPurposeManagerInterface
public class DataAssetManagerClient extends AssetManagerClientBase implements DataAssetManagerInterface
PlatformManagerClient supports the APIs to maintain software server platforms and their related objects.
-
-
Constructor Summary
Constructors Constructor Description DataAssetManagerClient(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.DataAssetManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.DataAssetManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.DataAssetManagerClient(String serverName, String serverPlatformURLRoot, ITInfrastructureRESTClient restClient, int maxPageSize)Create a new client that is going to be used in an OMAG Server.DataAssetManagerClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Create a new client with no authentication embedded in the HTTP request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearDataAssetAsReferenceData(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, Date effectiveTime)Remove the reference data designation from the asset.StringcreateDataAsset(String userId, String infrastructureManagerGUID, String infrastructureManagerName, boolean infrastructureManagerIsHome, DataAssetProperties dataAssetProperties)Create a new metadata element to represent the root of an asset.StringcreateDataAssetFromTemplate(String userId, String infrastructureManagerGUID, String infrastructureManagerName, boolean infrastructureManagerIsHome, String templateGUID, TemplateProperties templateProperties)Create a new metadata element to represent an asset using an existing metadata element as a template.List<DataAssetElement>findDataAssets(String userId, String searchString, Date effectiveTime, int startFrom, int pageSize)Retrieve the list of asset metadata elements that contain the search string.DataAssetElementgetDataAssetByGUID(String userId, String guid)Retrieve the asset metadata element with the supplied unique identifier.List<DataAssetElement>getDataAssetsByName(String userId, String name, Date effectiveTime, int startFrom, int pageSize)Retrieve the list of asset metadata elements with a matching qualified or display name.List<DataAssetElement>getDataAssetsForInfrastructureManager(String userId, String infrastructureManagerGUID, String infrastructureManagerName, Date effectiveTime, int startFrom, int pageSize)Retrieve the list of assets created on behalf of the named infrastructure manager.voidpublishDataAsset(String userId, String assetGUID)Update the zones for the asset so that it becomes visible to consumers.voidremoveDataAsset(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID)Remove the metadata element representing an asset.voidsetDataAssetAsReferenceData(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, Date effectiveFrom, Date effectiveTo)Classify the asset to indicate that it can be used as reference data.voidupdateDataAsset(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, boolean isMergeUpdate, DataAssetProperties dataAssetProperties)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.accessservices.itinfrastructure.client.AssetManagerClientBase
addServerPurpose, clearDeployment, clearServerPurpose, deployITAsset, getDeployedITAssets, getDeploymentDestinations, updateITAssetDeployment, updateServerPurpose
-
-
-
-
Constructor Detail
-
DataAssetManagerClient
public DataAssetManagerClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DataAssetManagerClient
public DataAssetManagerClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servers- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DataAssetManagerClient
public DataAssetManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DataAssetManagerClient
public DataAssetManagerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
DataAssetManagerClient
public DataAssetManagerClient(String serverName, String serverPlatformURLRoot, ITInfrastructureRESTClient restClient, int maxPageSize) throws InvalidParameterException
Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- client that issues the REST API callsmaxPageSize- maximum number of results supported by this server- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
createDataAsset
public String createDataAsset(String userId, String infrastructureManagerGUID, String infrastructureManagerName, boolean infrastructureManagerIsHome, DataAssetProperties dataAssetProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent the root of an asset.- Specified by:
createDataAssetin interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callerinfrastructureManagerIsHome- ensure that only the infrastructure manager can update this assetdataAssetProperties- 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(String userId, String infrastructureManagerGUID, String infrastructureManagerName, boolean infrastructureManagerIsHome, String templateGUID, 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.- Specified by:
createDataAssetFromTemplatein interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callerinfrastructureManagerIsHome- ensure that only the infrastructure manager can update this assettemplateGUID- 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 infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, boolean isMergeUpdate, DataAssetProperties dataAssetProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing an asset.- Specified by:
updateDataAssetin interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to updateisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?dataAssetProperties- 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)
-
setDataAssetAsReferenceData
public void setDataAssetAsReferenceData(String userId, String infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Classify the asset to indicate that it can be used as reference data.- Specified by:
setDataAssetAsReferenceDatain interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to updateeffectiveFrom- when should classification be effective - null means immediatelyeffectiveTo- when should classification no longer be effective - null means never- 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 infrastructureManagerGUID, String infrastructureManagerName, String assetGUID, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the reference data designation from the asset.- Specified by:
clearDataAssetAsReferenceDatain interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to updateeffectiveTime- time when the classification is effective- 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 IT Infrastructure OMAS).- Specified by:
publishDataAssetin interfaceDataAssetManagerInterface- 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 IT Infrastructure OMAS).- Specified by:
withdrawDataAssetin interfaceDataAssetManagerInterface- 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 infrastructureManagerGUID, String infrastructureManagerName, String assetGUID) 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.- Specified by:
removeDataAssetin interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callerassetGUID- unique identifier of the metadata element to remove- 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 userId, String searchString, Date effectiveTime, 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.- Specified by:
findDataAssetsin interfaceDataAssetManagerInterface- Parameters:
userId- calling usersearchString- string to find in the propertieseffectiveTime- effective time for the querystartFrom- 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 userId, String name, Date effectiveTime, 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.- Specified by:
getDataAssetsByNamein interfaceDataAssetManagerInterface- Parameters:
userId- calling username- name to search foreffectiveTime- effective time for the querystartFrom- 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)
-
getDataAssetsForInfrastructureManager
public List<DataAssetElement> getDataAssetsForInfrastructureManager(String userId, String infrastructureManagerGUID, String infrastructureManagerName, Date effectiveTime, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of assets created on behalf of the named infrastructure manager.- Specified by:
getDataAssetsForInfrastructureManagerin interfaceDataAssetManagerInterface- Parameters:
userId- calling userinfrastructureManagerGUID- unique identifier of software server capability representing the callerinfrastructureManagerName- unique name of software server capability representing the callereffectiveTime- effective time for the querystartFrom- 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 guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the asset metadata element with the supplied unique identifier.- Specified by:
getDataAssetByGUIDin interfaceDataAssetManagerInterface- Parameters:
userId- calling userguid- 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)
-
-