public class AssetOwner extends ConnectedAssetClientBase implements AssetOnboardingInterface, AssetClassificationInterface, AssetReviewInterface, AssetDecommissioningInterface
invalidParameterHandler, nullRequestBody, serverName, serverPlatformRootURL| Constructor and Description |
|---|
AssetOwner(String serverName,
String serverPlatformRootURL)
Create a new client with no authentication embedded in the HTTP request.
|
AssetOwner(String serverName,
String serverPlatformRootURL,
String userId,
String password)
Create a new client that passes userId and password in each HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAssetOrigin(String userId,
String assetGUID,
String organizationGUID,
String businessCapabilityGUID,
Map<String,String> otherOriginValues)
Add the asset origin classification to an asset.
|
String |
addAssetToCatalog(String userId,
String typeName,
String qualifiedName,
String displayName,
String description,
Map<String,String> additionalProperties,
Map<String,Object> extendedProperties)
Add a simple asset description to the catalog.
|
void |
addConnectionToAsset(String userId,
String assetGUID,
String assetSummary,
Connection connection)
Adds a connection to an asset.
|
void |
addSchemaAttributesToSchema(String userId,
String schemaTypeGUID,
List<SchemaAttribute> schemaAttributes)
Adds attributes to a complex schema type like a relational table or a structured document.
|
String |
addSchemaToAsset(String userId,
String assetGUID,
SchemaType schemaType,
List<SchemaAttribute> schemaAttributes)
Links the supplied schema to the asset.
|
void |
addSecurityTags(String userId,
String assetGUID,
String assetElementGUID,
List<String> securityLabels,
Map<String,Object> securityProperties)
Add or replace the security tags for an asset or one of its elements.
|
void |
addSemanticAssignment(String userId,
String assetGUID,
String glossaryTermGUID,
String assetElementGUID)
Create a simple relationship between a glossary term and an element in an Asset description (typically
a field in the schema).
|
void |
deleteAsset(String userId,
String assetGUID)
Deletes an asset and all of its associated elements such as schema, connections (unless they are linked to
another asset), discovery reports and associated feedback.
|
List<Asset> |
findAssets(String userId,
String searchString,
int startFrom,
int pageSize)
Return a list of assets with the requested search string in their name, qualified name
or description.
|
AssetUniverse |
getAssetProperties(String userId,
String assetGUID)
Returns a comprehensive collection of properties about the requested asset.
|
List<Asset> |
getAssetsByName(String userId,
String name,
int startFrom,
int pageSize)
Return a list of assets with the requested name.
|
Asset |
getAssetSummary(String userId,
String assetGUID)
Return the basic attributes of an asset.
|
Connector |
getConnectorToAsset(String userId,
String assetGUID)
Return a connector for the asset to enable the calling user to access the content.
|
List<DiscoveryAnalysisReport> |
getDiscoveryAnalysisReports(String userId,
String assetGUID,
int startingFrom,
int maximumResults)
Return the discovery analysis reports about the asset.
|
List<Annotation> |
getDiscoveryReportAnnotations(String userId,
String discoveryReportGUID,
AnnotationStatus annotationStatus,
int startingFrom,
int maximumResults)
Return the annotations linked directly to the report.
|
List<Annotation> |
getExtendedAnnotations(String userId,
String annotationGUID,
AnnotationStatus annotationStatus,
int startingFrom,
int maximumResults)
Return any annotations attached to this annotation.
|
void |
removeAssetOrigin(String userId,
String assetGUID)
Remove the asset origin classification to an asset.
|
void |
removeSecurityTags(String userId,
String assetGUID,
String assetElementGUID)
Remove the security tags classification to an asset or one of its elements.
|
void |
removeSemanticAssignment(String userId,
String assetGUID,
String glossaryTermGUID,
String assetElementGUID)
Remove the relationship between a glossary term and an element in an Asset description (typically
a field in the schema).
|
void |
updateAssetOwner(String userId,
String assetGUID,
String ownerId,
OwnerType ownerType)
Update the owner information for a specific asset.
|
void |
updateAssetZones(String userId,
String assetGUID,
List<String> assetZones)
Update the zones for a specific asset.
|
getAssetForConnection, getAssetProperties, getAssetSummary, getConnectionByGUID, getConnectionForAsset, getConnectorForConnectionpublic AssetOwner(String serverName, String serverPlatformRootURL) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformRootURL - the network address of the server running the OMAS REST serversInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public AssetOwner(String serverName, String serverPlatformRootURL, String userId, String password) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformRootURL - 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 requestsInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public String addAssetToCatalog(String userId, String typeName, String qualifiedName, String displayName, String description, Map<String,String> additionalProperties, Map<String,Object> extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAssetToCatalog in interface AssetOnboardingInterfaceuserId - calling user (assumed to be the owner)typeName - specific type of the asset - this must match a defined subtypequalifiedName - unique name for the asset in the catalogdisplayName - display name for the asset in the catalogdescription - description of the asset in the catalogInvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic String addSchemaToAsset(String userId, String assetGUID, SchemaType schemaType, List<SchemaAttribute> schemaAttributes) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addSchemaToAsset in interface AssetOnboardingInterfaceuserId - calling userassetGUID - unique identifier of the asset that the schema is to be attached toschemaType - schema to attachschemaAttributes - list of schema attribute objects.InvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void addSchemaAttributesToSchema(String userId, String schemaTypeGUID, List<SchemaAttribute> schemaAttributes) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addSchemaAttributesToSchema in interface AssetOnboardingInterfaceuserId - calling userschemaTypeGUID - unique identifier if the schema to anchor these attributes to.schemaAttributes - list of schema attribute objects.InvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void addConnectionToAsset(String userId, String assetGUID, String assetSummary, Connection connection) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addConnectionToAsset in interface AssetOnboardingInterfaceuserId - calling userassetGUID - unique identifier of the attest to attach the connection toassetSummary - summary of the asset that is stored in the relationship between the asset and the connection.connection - connection object. If the connection is already stored (matching guid)
then the existing connection is used.InvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void addSemanticAssignment(String userId, String assetGUID, String glossaryTermGUID, String assetElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addSemanticAssignment in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier of assetglossaryTermGUID - unique identifier of the glossary termassetElementGUID - element to link it to - its type must inherit from Referenceable.
If null then the assetGUID is used.InvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void removeSemanticAssignment(String userId, String assetGUID, String glossaryTermGUID, String assetElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
removeSemanticAssignment in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier of assetglossaryTermGUID - unique identifier of the glossary termassetElementGUID - element to link it to - its type must inherit from Referenceable.
If null then the assetGUID is used.InvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void addAssetOrigin(String userId, String assetGUID, String organizationGUID, String businessCapabilityGUID, Map<String,String> otherOriginValues) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAssetOrigin in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier of assetorganizationGUID - Unique identifier (GUID) of the organization where this asset originated from - or nullbusinessCapabilityGUID - Unique identifier (GUID) of the business capability where this asset originated from.otherOriginValues - Descriptive labels describing origin of the assetInvalidParameterException - entity not known, null userId or guidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void removeAssetOrigin(String userId, String assetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
removeAssetOrigin in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier of assetInvalidParameterException - entity not known, null userId or guidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void addSecurityTags(String userId, String assetGUID, String assetElementGUID, List<String> securityLabels, Map<String,Object> securityProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addSecurityTags in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier of assetassetElementGUID - element to link it to - its type must inherit from Referenceable.
If null then the assetGUID is used.securityLabels - list of security labels defining the security characteristics of the elementsecurityProperties - Descriptive labels describing origin of the assetInvalidParameterException - entity not known, null userId or guidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void removeSecurityTags(String userId, String assetGUID, String assetElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
removeSecurityTags in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier of assetassetElementGUID - element where the security tags need to be removed.
If null then the assetGUID is used.InvalidParameterException - entity not known, null userId or guidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateAssetZones(String userId, String assetGUID, List<String> assetZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateAssetZones in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier for the asset to updateassetZones - list of zones for the asset - these values override the current values - null means belongs
to no zones.InvalidParameterException - guid or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateAssetOwner(String userId, String assetGUID, String ownerId, OwnerType ownerType) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateAssetOwner in interface AssetClassificationInterfaceuserId - calling userassetGUID - unique identifier for the asset to updateownerId - userId or profileGUID of the owner - or null to clear the fieldownerType - indicator of the type of Id provides above - or null to clear the fieldInvalidParameterException - userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<Asset> getAssetsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getAssetsByName in interface AssetReviewInterfaceuserId - calling username - name to search forstartFrom - starting element (used in paging through large result sets)pageSize - maximum number of results to returnInvalidParameterException - the name is invalidPropertyServerException - there is a problem access in the property serverUserNotAuthorizedException - the user does not have access to the propertiespublic List<Asset> findAssets(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
findAssets in interface AssetReviewInterfaceuserId - calling usersearchString - string to search for in textstartFrom - starting element (used in paging through large result sets)pageSize - maximum number of results to returnInvalidParameterException - the searchString is invalidPropertyServerException - there is a problem access in the property serverUserNotAuthorizedException - the user does not have access to the propertiespublic Asset getAssetSummary(String userId, String assetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getAssetSummary in interface AssetReviewInterfaceuserId - calling userassetGUID - unique identifier of the assetInvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public AssetUniverse getAssetProperties(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getAssetProperties in interface AssetReviewInterfaceuserId - userId of user making request.assetGUID - unique identifier for asset.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem retrieving the asset properties from the property servers).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public Connector getConnectorToAsset(String userId, String assetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getConnectorToAsset in interface AssetReviewInterfaceuserId - calling userassetGUID - unique identifier of the assetInvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public List<DiscoveryAnalysisReport> getDiscoveryAnalysisReports(String userId, String assetGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getDiscoveryAnalysisReports in interface AssetReviewInterfaceuserId - calling userassetGUID - unique identifier of the assetstartingFrom - position in the list (used when there are so many reports that paging is neededmaximumResults - maximum number of elements to return an this callInvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public List<Annotation> getDiscoveryReportAnnotations(String userId, String discoveryReportGUID, AnnotationStatus annotationStatus, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getDiscoveryReportAnnotations in interface AssetReviewInterfaceuserId - identifier of calling userdiscoveryReportGUID - identifier of the discovery request.annotationStatus - status of the desired annotations - null means all statuses.startingFrom - initial position in the stored list.maximumResults - maximum number of definitions to return on this call.InvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public List<Annotation> getExtendedAnnotations(String userId, String annotationGUID, AnnotationStatus annotationStatus, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getExtendedAnnotations in interface AssetReviewInterfaceuserId - identifier of calling userannotationGUID - anchor annotationannotationStatus - status of the desired annotations - null means all statuses.startingFrom - starting position in the listmaximumResults - maximum number of annotations that can be returned.InvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public void deleteAsset(String userId, String assetGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteAsset in interface AssetDecommissioningInterfaceuserId - calling userassetGUID - unique identifier of the attest to attach the connection toInvalidParameterException - full path or userId is nullPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problemCopyright © 2018–2019 ODPi. All rights reserved.