Class AssetConsumer
java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
org.odpi.openmetadata.accessservices.assetconsumer.client.AssetConsumer
- All Implemented Interfaces:
AssetConsumerAssetInterface
,AssetConsumerFeedbackInterface
,AssetConsumerGlossaryInterface
,AssetConsumerLoggingInterface
,AssetConsumerTaggingInterface
,ConnectorFactoryInterface
public class AssetConsumer
extends ConnectedAssetClientBase
implements AssetConsumerAssetInterface, AssetConsumerFeedbackInterface, AssetConsumerGlossaryInterface, AssetConsumerLoggingInterface, AssetConsumerTaggingInterface
The Asset Consumer Open Metadata Access Service (OMAS) is used by applications and tools as a factory for Open
Connector Framework (OCF) connectors. The configuration for the connectors is managed as open metadata in
a Connection definition. The caller to the Asset Consumer OMAS passes either the name, GUID or URL for the
connection to the appropriate method to retrieve a connector. The Asset Consumer OMAS retrieves the connection
from the metadata repository and creates an appropriate connector as described the connection and
returns it to the caller.
The Asset Consumer OMAS supports access to the asset properties either through the connector, or by a direct
call to Asset Consumer API. It is also possible to look up the definitions of terms associated with the assets.
It supports the ability to add and remove feedback for an asset.
This feedback may be in the form of reviews, likes and comments.
Asset Consumer OMAS also supports the maintenance of informal tags and their attachments to assets.
Finally, Asset Consumer OMAS supports the ability to add audit log records to the local server's audit log
about an asset.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
auditLog, invalidParameterHandler, nullRequestBody, serverName, serverPlatformURLRoot
-
Constructor Summary
ConstructorDescriptionAssetConsumer
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.AssetConsumer
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.AssetConsumer
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.AssetConsumer
(String serverName, String serverPlatformURLRoot, AssetConsumerRESTClient restClient, int maxPageSize, AuditLog auditLog) Create a new client that is going to be used in an OMAG Server (view service or integration service typically).AssetConsumer
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionaddCommentReply
(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) Adds a comment to another comment.addCommentToAsset
(String userId, String assetGUID, CommentType commentType, String commentText, boolean isPublic) Adds a comment to the asset.void
addLikeToAsset
(String userId, String assetGUID, boolean isPublic) Adds a "LikeProperties" to the asset.void
addLogMessageToAsset
(String userId, String assetGUID, String connectorInstanceId, String connectionName, String connectorType, String contextId, String message) Creates an Audit log record about the asset.void
addRatingToAsset
(String userId, String assetGUID, StarRating starRating, String review, boolean isPublic) Adds a star rating and optional review text to the asset.void
addTagToAsset
(String userId, String assetGUID, String tagGUID, boolean isPublic) Adds a tag (either private of public) to an asset.void
addTagToElement
(String userId, String elementGUID, String tagGUID, boolean isPublic) Adds a tag (either private of public) to an element attached to an asset - such as schema element, glossary term, ...createPrivateTag
(String userId, String tagName, String tagDescription) Creates a new private informal tag and returns the unique identifier for it.createPublicTag
(String userId, String tagName, String tagDescription) Creates a new public informal tag and returns the unique identifier for it.void
Removes a tag from the repository.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.findAssetsInDomain
(String userId, String searchString, int startFrom, int pageSize) Locate string value in elements that are anchored to assets.findMeanings
(String userId, String term, int startFrom, int pageSize) Return the full definition (meaning) of the terms matching the supplied name.findMyTags
(String userId, String tag, int startFrom, int pageSize) Return the list of the calling user's private tags containing the supplied string in either the name or description.Return the list of tags containing the supplied string in either the name or description.getAssetForConnection
(String userId, String connectionGUID) Returns the unique identifier for the asset connected to the requested connection.getAssetForConnectionName
(String userId, String connectionName) Returns the asset corresponding to the supplied connection name.getAssetGraph
(String userId, String assetGUID, int startFrom, int pageSize) Return all the elements that are anchored to an asset plus relationships between these elements and to other elements.getAssetLineageGraph
(String userId, String assetGUID, List<String> relationshipTypes, int startFrom, int pageSize) Return all the elements that are linked to an asset using lineage relationships.getAssetsByMeaning
(String userId, String termGUID, int startFrom, int pageSize) Return the list of unique identifiers for assets that are linked to a specific (meaning) either directly or via fields in the schema.getAssetsByMetadataCollectionId
(String userId, String metadataCollectionId, String typeName, int startFrom, int pageSize) Return a list of assets with the requested name.getAssetsByName
(String userId, String name, int startFrom, int pageSize) Return a list of assets with the requested name.getAssetsByTag
(String userId, String tagGUID, int startFrom, int pageSize) Return the list of unique identifiers for assets that are linked to a specific tag either directly, or via one of its schema elements.getAssetsByToken
(String userId, String assetToken, int startFrom, int pageSize) Returns a list of assets that match the token.getMeaning
(String userId, String guid) Return the full definition (meaning) of a term using the unique identifier of the glossary term that contains the definition.getMeaningByName
(String userId, String term, int startFrom, int pageSize) Return the full definition (meaning) of the terms exactly matching the supplied name.getMyTagsByName
(String userId, String tag, int startFrom, int pageSize) Return the list of the calling user's private tags exactly matching the supplied name.Return the tag for the supplied unique identifier (guid).getTagsByName
(String userId, String tag, int startFrom, int pageSize) Return the list of tags exactly matching the supplied name.void
removeComment
(String userId, String assetGUID, String commentGUID) Removes a comment added to the asset by this user.void
removeLikeFromAsset
(String userId, String assetGUID) Removes a "LikeProperties" added to the asset by this user.void
removeRatingFromAsset
(String userId, String assetGUID) Removes of a review that was added to the asset by this user.void
removeTagFromAsset
(String userId, String assetGUID, String tagGUID) Removes a tag from the asset that was added by this user.void
removeTagFromElement
(String userId, String elementGUID, String tagGUID) Removes a tag from an element attached to an asset - such as schema element, glossary term, ...void
updateComment
(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) Update an existing comment.void
updateTagDescription
(String userId, String tagGUID, String tagDescription) Updates the description of an existing tag (either private or public).Methods inherited from class org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
getAnchorAssetFromGUID, getAssetForConnection, getAssetProperties, getAssetSummary, getConnectionByGUID, getConnectionByName, getConnectionForAsset, getConnectorByConnection, getConnectorByGUID, getConnectorByName, getConnectorForAsset, getConnectorForAsset, getConnectorForConnection, logAssetAuditMessage, saveConnection, saveConnection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.accessservices.assetconsumer.api.AssetConsumerAssetInterface
getAssetProperties
-
Constructor Details
-
AssetConsumer
public AssetConsumer(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 servicesauditLog
- logging destination- Throws:
InvalidParameterException
- null URL or server name
-
AssetConsumer
public AssetConsumer(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 services- Throws:
InvalidParameterException
- null URL or server name
-
AssetConsumer
public AssetConsumer(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 servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsauditLog
- logging destination- Throws:
InvalidParameterException
- null URL or server name
-
AssetConsumer
public AssetConsumer(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 servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- null URL or server name
-
AssetConsumer
public AssetConsumer(String serverName, String serverPlatformURLRoot, AssetConsumerRESTClient restClient, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client that is going to be used in an OMAG Server (view service or integration service typically).- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- client that issues the REST API callsmaxPageSize
- maximum number of results supported by this serverauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
getAssetForConnection
public String getAssetForConnection(String userId, String connectionGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns the unique identifier for the asset connected to the requested connection.- Specified by:
getAssetForConnection
in interfaceAssetConsumerAssetInterface
- Parameters:
userId
- the userId of the requesting user.connectionGUID
- unique identifier for the connection.- Returns:
- unique identifier of asset.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getAssetForConnectionName
public String getAssetForConnectionName(String userId, String connectionName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns the asset corresponding to the supplied connection name.- Specified by:
getAssetForConnectionName
in interfaceAssetConsumerAssetInterface
- Parameters:
userId
- userId of user making request.connectionName
- this may be the qualifiedName or displayName of the connection.- Returns:
- unique identifier of asset.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getAssetsByMetadataCollectionId
public List<AssetElement> getAssetsByMetadataCollectionId(String userId, String metadataCollectionId, String typeName, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return a list of assets with the requested name. The name must match exactly.- Parameters:
userId
- calling usermetadataCollectionId
- unique identifier of the metadata collection to search fortypeName
- optional type name to limit the search resultsstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- list of unique identifiers of assets with matching name.
- Throws:
InvalidParameterException
- the name is invalidPropertyServerException
- there is a problem access in the property serverUserNotAuthorizedException
- the user does not have access to the properties
-
getAssetGraph
public AssetGraph getAssetGraph(String userId, String assetGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return all the elements that are anchored to an asset plus relationships between these elements and to other elements.- Parameters:
userId
- calling userassetGUID
- unique identifier of the assetstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- graph of elements
- Throws:
InvalidParameterException
- the name is invalidPropertyServerException
- there is a problem access in the property serverUserNotAuthorizedException
- the user does not have access to the properties
-
getAssetLineageGraph
public AssetLineageGraph getAssetLineageGraph(String userId, String assetGUID, List<String> relationshipTypes, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return all the elements that are linked to an asset using lineage relationships. The relationships are retrieved both from the asset, and the anchored schema elements- Parameters:
userId
- the userId of the requesting userassetGUID
- unique identifier for the assetrelationshipTypes
- list of relationship type names to use in the searchstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- graph of elements or InvalidParameterException - one of the parameters is null or invalid or PropertyServerException - there is a problem retrieving the connected asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
- Throws:
InvalidParameterException
PropertyServerException
UserNotAuthorizedException
-
findAssetsInDomain
public List<AssetSearchMatches> findAssetsInDomain(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Locate string value in elements that are anchored to assets. The search string may be a regEx.- Parameters:
userId
- calling usersearchString
- value to search for (maybe regEx)startFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- found elements organized by asset
- Throws:
InvalidParameterException
- the searchString is invalidPropertyServerException
- there is a problem access in the property serverUserNotAuthorizedException
- the user does not have access to the properties
-
findAssets
public List<String> findAssets(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return a list of assets with the requested search string in their name, qualified name or description. The search string is interpreted as a regular expression (RegEx).- Specified by:
findAssets
in interfaceAssetConsumerAssetInterface
- Parameters:
userId
- calling usersearchString
- string to search for in textstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- list of assets that match the search string.
- Throws:
InvalidParameterException
- the searchString is invalidPropertyServerException
- there is a problem access in the property serverUserNotAuthorizedException
- the user does not have access to the properties
-
getAssetsByName
public List<String> getAssetsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return a list of assets with the requested name.- Specified by:
getAssetsByName
in interfaceAssetConsumerAssetInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- list of unique identifiers of assets with matching name.
- Throws:
InvalidParameterException
- the name is invalidPropertyServerException
- there is a problem access in the property serverUserNotAuthorizedException
- the user does not have access to the properties
-
getAssetsByToken
public List<String> getAssetsByToken(String userId, String assetToken, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns a list of assets that match the token. The following calls are issued in order for find the asset. - getAssetProperties passing the token as the GUID - getAssetByName passing the token as the name- Specified by:
getAssetsByToken
in interfaceAssetConsumerAssetInterface
- Parameters:
userId
- userId of user making request.assetToken
- token used to find the Asset - may be a name or GUIDstartFrom
- starting element (used in paging through large result sets)pageSize
- maximum number of results to return- Returns:
- a list of unique identifiers for the matching assets
- Throws:
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.
-
addRatingToAsset
public void addRatingToAsset(String userId, String assetGUID, StarRating starRating, String review, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a star rating and optional review text to the asset. If the user has already attached a rating then the original one is over-ridden.- Specified by:
addRatingToAsset
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset.starRating
- StarRating enumeration for not recommended, one to five stars.review
- user review of asset. This can be null.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeRatingFromAsset
public void removeRatingFromAsset(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes of a review that was added to the asset by this user.- Specified by:
removeRatingFromAsset
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the attached asset.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the asset properties in the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addLikeToAsset
public void addLikeToAsset(String userId, String assetGUID, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a "LikeProperties" to the asset.- Specified by:
addLikeToAsset
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making requestassetGUID
- unique identifier for the assetisPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeLikeFromAsset
public void removeLikeFromAsset(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a "LikeProperties" added to the asset by this user.- Specified by:
removeLikeFromAsset
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the like object.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the asset properties in the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addCommentToAsset
public String addCommentToAsset(String userId, String assetGUID, CommentType commentType, String commentText, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a comment to the asset.- Specified by:
addCommentToAsset
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset.commentType
- type of comment enum.commentText
- the text of the comment.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Returns:
- guid of new comment.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addCommentReply
public String addCommentReply(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a comment to another comment.- Specified by:
addCommentReply
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- String - unique id of asset that this chain of comments is linked.commentGUID
- unique identifier for an existing comment. Used to add a reply to a comment.commentType
- type of comment enum.commentText
- the text of the comment.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Returns:
- guid of new comment.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
updateComment
public void updateComment(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update an existing comment.- Specified by:
updateComment
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset that the comment is attached to (directly or indirectly).commentGUID
- unique identifier for the comment to change.commentType
- type of comment enum.commentText
- the text of the comment.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeComment
public void removeComment(String userId, String assetGUID, String commentGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a comment added to the asset by this user.- Specified by:
removeComment
in interfaceAssetConsumerFeedbackInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset object.commentGUID
- unique identifier for the comment object.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the asset properties in the property server.UserNotAuthorizedException
- the user does not have permission to perform this request.
-
getMeaning
public MeaningElement getMeaning(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the full definition (meaning) of a term using the unique identifier of the glossary term that contains the definition.- Specified by:
getMeaning
in interfaceAssetConsumerGlossaryInterface
- Parameters:
userId
- userId of the user making the request.guid
- unique identifier of the glossary term.- Returns:
- properties that describe the meaning
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getMeaningByName
public List<MeaningElement> getMeaningByName(String userId, String term, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the full definition (meaning) of the terms exactly matching the supplied name.- Specified by:
getMeaningByName
in interfaceAssetConsumerGlossaryInterface
- Parameters:
userId
- the name of the calling user.term
- name of term.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of glossary terms that contain the properties that describe the term name, and it's meaning.
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
findMeanings
public List<MeaningElement> findMeanings(String userId, String term, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the full definition (meaning) of the terms matching the supplied name.- Specified by:
findMeanings
in interfaceAssetConsumerGlossaryInterface
- Parameters:
userId
- the name of the calling user.term
- name of term. This may include wild card characters.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- meaning list response or
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getAssetsByMeaning
public List<String> getAssetsByMeaning(String userId, String termGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of unique identifiers for assets that are linked to a specific (meaning) either directly or via fields in the schema.- Specified by:
getAssetsByMeaning
in interfaceAssetConsumerGlossaryInterface
- Parameters:
userId
- the name of the calling user.termGUID
- unique identifier of term.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- asset guid list
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addLogMessageToAsset
public void addLogMessageToAsset(String userId, String assetGUID, String connectorInstanceId, String connectionName, String connectorType, String contextId, String message) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Creates an Audit log record about the asset. This log record is stored in the local server's Audit Log.- Specified by:
addLogMessageToAsset
in interfaceAssetConsumerLoggingInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique id for the asset.connectorInstanceId
- (optional) id of connector in use (if any).connectionName
- (optional) name of the connection (extracted from the connector).connectorType
- (optional) type of connector in use (if any).contextId
- (optional) function name, or processId of the activity that the caller is performing.message
- log record content.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- There is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
createPublicTag
public String createPublicTag(String userId, String tagName, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Creates a new public informal tag and returns the unique identifier for it.- Specified by:
createPublicTag
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.tagName
- name of the tag.tagDescription
- (optional) description of the tag. Setting a description, particularly in a public tag makes the tag more valuable to other users and can act as an embryonic glossary term.- Returns:
- GUID for new tag.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
createPrivateTag
public String createPrivateTag(String userId, String tagName, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Creates a new private informal tag and returns the unique identifier for it.- Specified by:
createPrivateTag
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.tagName
- name of the tag.tagDescription
- (optional) description of the tag. Setting a description, particularly in a public tag makes the tag more valuable to other users and can act as an embryonic glossary term.- Returns:
- GUID for new tag.
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
updateTagDescription
public void updateTagDescription(String userId, String tagGUID, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Updates the description of an existing tag (either private or public).- Specified by:
updateTagDescription
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.tagGUID
- unique identifier for the tag.tagDescription
- description of the tag. Setting a description, particularly in a public tag makes the tag more valuable to other users and can act as an embryonic glossary term.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
deleteTag
public void deleteTag(String userId, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a tag from the repository. A private tag can be deleted by its creator and all the references are lost; a public tag can be deleted by anyone, but only if it is not attached to any referenceable.- Specified by:
deleteTag
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.tagGUID
- unique id for the tag.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the asset properties in the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getTag
public InformalTagElement getTag(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the tag for the supplied unique identifier (guid).- Specified by:
getTag
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of the user making the request.guid
- unique identifier of the tag.- Returns:
- tag
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getTagsByName
public List<InformalTagElement> getTagsByName(String userId, String tag, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of tags exactly matching the supplied name.- Specified by:
getTagsByName
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- the name of the calling user.tag
- name of tag.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- tag list
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getMyTagsByName
public List<InformalTagElement> getMyTagsByName(String userId, String tag, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of the calling user's private tags exactly matching the supplied name.- Specified by:
getMyTagsByName
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- the name of the calling user.tag
- name of tag.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- tag list
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
findTags
public List<InformalTagElement> findTags(String userId, String tag, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of tags containing the supplied string in either the name or description.- Specified by:
findTags
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- the name of the calling user.tag
- name of tag. This may include wild card characters.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- tag list
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
findMyTags
public List<InformalTagElement> findMyTags(String userId, String tag, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of the calling user's private tags containing the supplied string in either the name or description.- Specified by:
findMyTags
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- the name of the calling user.tag
- name of tag. This may include wild card characters.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- tag list
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addTagToAsset
public void addTagToAsset(String userId, String assetGUID, String tagGUID, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a tag (either private of public) to an asset.- Specified by:
addTagToAsset
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique id for the asset.tagGUID
- unique id of the tag.isPublic
- flag indicating whether the attachment of the tag is public or not- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
addTagToElement
public void addTagToElement(String userId, String elementGUID, String tagGUID, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a tag (either private of public) to an element attached to an asset - such as schema element, glossary term, ...- Specified by:
addTagToElement
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.elementGUID
- unique id for the element.tagGUID
- unique id of the tag.isPublic
- flag indicating whether the attachment of the tag is public or not- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem adding the asset properties to the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeTagFromAsset
public void removeTagFromAsset(String userId, String assetGUID, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a tag from the asset that was added by this user.- Specified by:
removeTagFromAsset
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique id for the asset.tagGUID
- unique id for the tag.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the asset properties in the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeTagFromElement
public void removeTagFromElement(String userId, String elementGUID, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a tag from an element attached to an asset - such as schema element, glossary term, ... that was added by this user.- Specified by:
removeTagFromElement
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- userId of user making request.elementGUID
- unique id for the element.tagGUID
- unique id for the tag.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem updating the asset properties in the property server.UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getAssetsByTag
public List<String> getAssetsByTag(String userId, String tagGUID, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of unique identifiers for assets that are linked to a specific tag either directly, or via one of its schema elements. An Asset's GUID may appear multiple times in the results if it is tagged multiple times with the requested tag.- Specified by:
getAssetsByTag
in interfaceAssetConsumerTaggingInterface
- Parameters:
userId
- the name of the calling user.tagGUID
- unique identifier of tag.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- asset guid list
- Throws:
InvalidParameterException
- the userId is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-