Class AssetConsumer
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
-
- org.odpi.openmetadata.accessservices.assetconsumer.client.AssetConsumer
-
- All Implemented Interfaces:
AssetConsumerAssetInterface
,AssetConsumerConnectorFactoryInterface
,AssetConsumerFeedbackInterface
,AssetConsumerGlossaryInterface
,AssetConsumerLoggingInterface
,AssetConsumerTaggingInterface
public class AssetConsumer extends ConnectedAssetClientBase implements AssetConsumerAssetInterface, AssetConsumerConnectorFactoryInterface, 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.commonservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
auditLog, invalidParameterHandler, nullRequestBody, serverName, serverPlatformURLRoot
-
-
Constructor Summary
Constructors Constructor Description AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot)
Create a new client with no authentication embedded in the HTTP request.AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.String password)
Create a new client that passes userId and password in each HTTP request.AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.String password, AuditLog auditLog)
Create a new client that passes userId and password in each HTTP request.AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot, org.odpi.openmetadata.accessservices.assetconsumer.client.rest.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(java.lang.String serverName, java.lang.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 java.lang.String
addCommentReply(java.lang.String userId, java.lang.String assetGUID, java.lang.String commentGUID, CommentType commentType, java.lang.String commentText, boolean isPublic)
Adds a comment to another comment.java.lang.String
addCommentToAsset(java.lang.String userId, java.lang.String assetGUID, CommentType commentType, java.lang.String commentText, boolean isPublic)
Adds a comment to the asset.void
addLikeToAsset(java.lang.String userId, java.lang.String assetGUID, boolean isPublic)
Adds a "LikeProperties" to the asset.void
addLogMessageToAsset(java.lang.String userId, java.lang.String assetGUID, java.lang.String connectorInstanceId, java.lang.String connectionName, java.lang.String connectorType, java.lang.String contextId, java.lang.String message)
Creates an Audit log record about the asset.void
addRatingToAsset(java.lang.String userId, java.lang.String assetGUID, StarRating starRating, java.lang.String review, boolean isPublic)
Adds a star rating and optional review text to the asset.void
addTagToAsset(java.lang.String userId, java.lang.String assetGUID, java.lang.String tagGUID, boolean isPublic)
Adds a tag (either private of public) to an asset.void
addTagToElement(java.lang.String userId, java.lang.String elementGUID, java.lang.String tagGUID, boolean isPublic)
Adds a tag (either private of public) to an element attached to an asset - such as schema element, glossary term, ...java.lang.String
createPrivateTag(java.lang.String userId, java.lang.String tagName, java.lang.String tagDescription)
Creates a new private informal tag and returns the unique identifier for it.java.lang.String
createPublicTag(java.lang.String userId, java.lang.String tagName, java.lang.String tagDescription)
Creates a new public informal tag and returns the unique identifier for it.void
deleteTag(java.lang.String userId, java.lang.String tagGUID)
Removes a tag from the repository.java.util.List<java.lang.String>
findAssets(java.lang.String userId, java.lang.String searchString, int startFrom, int pageSize)
Return a list of assets with the requested search string in their name, qualified name or description.java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement>
findMeanings(java.lang.String userId, java.lang.String term, int startFrom, int pageSize)
Return the full definition (meaning) of the terms matching the supplied name.java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement>
findMyTags(java.lang.String userId, java.lang.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.java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement>
findTags(java.lang.String userId, java.lang.String tag, int startFrom, int pageSize)
Return the list of tags containing the supplied string in either the name or description.java.lang.String
getAssetForConnection(java.lang.String userId, java.lang.String connectionGUID)
Returns the unique identifier for the asset connected to the requested connection.java.lang.String
getAssetForConnectionName(java.lang.String userId, java.lang.String connectionName)
Returns the asset corresponding to the supplied connection name.AssetUniverse
getAssetProperties(java.lang.String userId, java.lang.String assetGUID)
Returns a comprehensive collection of properties about the requested asset.java.util.List<java.lang.String>
getAssetsByMeaning(java.lang.String userId, java.lang.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.java.util.List<java.lang.String>
getAssetsByName(java.lang.String userId, java.lang.String name, int startFrom, int pageSize)
Return a list of assets with the requested name.java.util.List<java.lang.String>
getAssetsByTag(java.lang.String userId, java.lang.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.java.util.List<java.lang.String>
getAssetsByToken(java.lang.String userId, java.lang.String assetToken, int startFrom, int pageSize)
Returns a list of assets that match the token.Connector
getConnectorByConnection(java.lang.String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection)
Returns the connector corresponding to the supplied connection.Connector
getConnectorByGUID(java.lang.String userId, java.lang.String connectionGUID)
Returns the connector corresponding to the supplied connection GUID.Connector
getConnectorByName(java.lang.String userId, java.lang.String connectionName)
Returns the connector corresponding to the supplied connection name.Connector
getConnectorForAsset(java.lang.String userId, java.lang.String assetGUID)
Returns the connector corresponding to the supplied asset GUID.org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement
getMeaning(java.lang.String userId, java.lang.String guid)
Return the full definition (meaning) of a term using the unique identifier of the glossary term that contains the definition.java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement>
getMeaningByName(java.lang.String userId, java.lang.String term, int startFrom, int pageSize)
Return the full definition (meaning) of the terms exactly matching the supplied name.java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement>
getMyTagsByName(java.lang.String userId, java.lang.String tag, int startFrom, int pageSize)
Return the list of the calling user's private tags exactly matching the supplied name.org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement
getTag(java.lang.String userId, java.lang.String guid)
Return the tag for the supplied unique identifier (guid).java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement>
getTagsByName(java.lang.String userId, java.lang.String tag, int startFrom, int pageSize)
Return the list of tags exactly matching the supplied name.void
removeComment(java.lang.String userId, java.lang.String assetGUID, java.lang.String commentGUID)
Removes a comment added to the asset by this user.void
removeLikeFromAsset(java.lang.String userId, java.lang.String assetGUID)
Removes a "LikeProperties" added to the asset by this user.void
removeRatingFromAsset(java.lang.String userId, java.lang.String assetGUID)
Removes of a review that was added to the asset by this user.void
removeTagFromAsset(java.lang.String userId, java.lang.String assetGUID, java.lang.String tagGUID)
Removes a tag from the asset that was added by this user.void
removeTagFromElement(java.lang.String userId, java.lang.String elementGUID, java.lang.String tagGUID)
Removes a tag from an element attached to an asset - such as schema element, glossary term, ...void
updateComment(java.lang.String userId, java.lang.String assetGUID, java.lang.String commentGUID, CommentType commentType, java.lang.String commentText, boolean isPublic)
Update an existing comment.void
updateTagDescription(java.lang.String userId, java.lang.String tagGUID, java.lang.String tagDescription)
Updates the description of an existing tag (either private or public).-
Methods inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
getAssetForConnection, getAssetProperties, getAssetSummary, getConnectionByGUID, getConnectionByName, getConnectionForAsset, getConnectorForConnection
-
-
-
-
Constructor Detail
-
AssetConsumer
public AssetConsumer(java.lang.String serverName, java.lang.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
- null URL or server name
-
AssetConsumer
public AssetConsumer(java.lang.String serverName, java.lang.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
- null URL or server name
-
AssetConsumer
public AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.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
- null URL or server name
-
AssetConsumer
public AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.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
- null URL or server name
-
AssetConsumer
public AssetConsumer(java.lang.String serverName, java.lang.String serverPlatformURLRoot, org.odpi.openmetadata.accessservices.assetconsumer.client.rest.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 serversrestClient
- 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 Detail
-
getAssetForConnection
public java.lang.String getAssetForConnection(java.lang.String userId, java.lang.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 java.lang.String getAssetForConnectionName(java.lang.String userId, java.lang.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.
-
getAssetProperties
public AssetUniverse getAssetProperties(java.lang.String userId, java.lang.String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Returns a comprehensive collection of properties about the requested asset.- Specified by:
getAssetProperties
in interfaceAssetConsumerAssetInterface
- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for asset.- Returns:
- a comprehensive collection of properties about the asset.
- 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.
-
findAssets
public java.util.List<java.lang.String> findAssets(java.lang.String userId, java.lang.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 java.util.List<java.lang.String> getAssetsByName(java.lang.String userId, java.lang.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 java.util.List<java.lang.String> getAssetsByToken(java.lang.String userId, java.lang.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 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.
-
getConnectorByName
public Connector getConnectorByName(java.lang.String userId, java.lang.String connectionName) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
Returns the connector corresponding to the supplied connection name.- Specified by:
getConnectorByName
in interfaceAssetConsumerConnectorFactoryInterface
- Parameters:
userId
- userId of user making request.connectionName
- this may be the qualifiedName or displayName of the connection.- Returns:
- Connector connector instance - or null if there is no connection
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getConnectorForAsset
public Connector getConnectorForAsset(java.lang.String userId, java.lang.String assetGUID) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
Returns the connector corresponding to the supplied asset GUID.- Specified by:
getConnectorForAsset
in interfaceAssetConsumerConnectorFactoryInterface
- Parameters:
userId
- userId of user making request.assetGUID
- the unique id for the asset within the metadata repository.- Returns:
- Connector connector instance - or null if there is no connection
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getConnectorByGUID
public Connector getConnectorByGUID(java.lang.String userId, java.lang.String connectionGUID) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
Returns the connector corresponding to the supplied connection GUID.- Specified by:
getConnectorByGUID
in interfaceAssetConsumerConnectorFactoryInterface
- Parameters:
userId
- userId of user making request.connectionGUID
- the unique id for the connection within the metadata repository.- Returns:
- Connector connector instance - or null if there is no connection
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getConnectorByConnection
public Connector getConnectorByConnection(java.lang.String userId, org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException
Returns the connector corresponding to the supplied connection.- Specified by:
getConnectorByConnection
in interfaceAssetConsumerConnectorFactoryInterface
- Parameters:
userId
- userId of user making request.connection
- the connection object that contains the properties needed to create the connection.- Returns:
- Connector connector instance
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.ConnectionCheckedException
- there are errors in the configuration of the connection which is preventing the creation of a connector.ConnectorCheckedException
- there are errors in the initialization of the connector.
-
addRatingToAsset
public void addRatingToAsset(java.lang.String userId, java.lang.String assetGUID, StarRating starRating, java.lang.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(java.lang.String userId, java.lang.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(java.lang.String userId, java.lang.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(java.lang.String userId, java.lang.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 java.lang.String addCommentToAsset(java.lang.String userId, java.lang.String assetGUID, CommentType commentType, java.lang.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 java.lang.String addCommentReply(java.lang.String userId, java.lang.String assetGUID, java.lang.String commentGUID, CommentType commentType, java.lang.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(java.lang.String userId, java.lang.String assetGUID, java.lang.String commentGUID, CommentType commentType, java.lang.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(java.lang.String userId, java.lang.String assetGUID, java.lang.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 org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement getMeaning(java.lang.String userId, java.lang.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 java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement> getMeaningByName(java.lang.String userId, java.lang.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 and its 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 java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement> findMeanings(java.lang.String userId, java.lang.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 java.util.List<java.lang.String> getAssetsByMeaning(java.lang.String userId, java.lang.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(java.lang.String userId, java.lang.String assetGUID, java.lang.String connectorInstanceId, java.lang.String connectionName, java.lang.String connectorType, java.lang.String contextId, java.lang.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 java.lang.String createPublicTag(java.lang.String userId, java.lang.String tagName, java.lang.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 java.lang.String createPrivateTag(java.lang.String userId, java.lang.String tagName, java.lang.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(java.lang.String userId, java.lang.String tagGUID, java.lang.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(java.lang.String userId, java.lang.String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Removes a tag from the repository. A private tag can be deleted by its creator and all of 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 org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement getTag(java.lang.String userId, java.lang.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 java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement> getTagsByName(java.lang.String userId, java.lang.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 java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement> getMyTagsByName(java.lang.String userId, java.lang.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 java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement> findTags(java.lang.String userId, java.lang.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 java.util.List<org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement> findMyTags(java.lang.String userId, java.lang.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(java.lang.String userId, java.lang.String assetGUID, java.lang.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(java.lang.String userId, java.lang.String elementGUID, java.lang.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(java.lang.String userId, java.lang.String assetGUID, java.lang.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(java.lang.String userId, java.lang.String elementGUID, java.lang.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 java.util.List<java.lang.String> getAssetsByTag(java.lang.String userId, java.lang.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.
-
-