public class AssetConsumer extends Object implements AssetConsumerInterface
| Constructor and Description |
|---|
AssetConsumer(String newServerURL)
Create a new AssetConsumer client.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addCommentReply(String userId,
String commentGUID,
CommentType commentType,
String commentText)
Adds a comment to the asset.
|
String |
addCommentToAsset(String userId,
String assetGUID,
CommentType commentType,
String commentText)
Adds a comment to the asset.
|
String |
addLikeToAsset(String userId,
String assetGUID)
Adds a "Like" to the asset.
|
void |
addLogMessageToAsset(String userId,
String assetGUID,
String connectorInstanceId,
String connectionName,
String connectorType,
String contextId,
String message)
Creates an Audit log record for the asset.
|
String |
addPrivateTagToAsset(String userId,
String assetGUID,
String tagName,
String tagDescription)
Adds a new private tag to the asset's properties.
|
String |
addRatingToAsset(String userId,
String assetGUID,
StarRating starRating,
String review)
Adds a rating to the asset.
|
String |
addTagToAsset(String userId,
String assetGUID,
String tagName,
String tagDescription)
Adds a new public tag to the asset's properties.
|
AssetUniverse |
getAssetProperties(String userId,
String assetGUID)
Returns a comprehensive collection of properties about the requested asset.
|
Connector |
getConnectorByConnection(String userId,
Connection connection)
Returns the connector corresponding to the supplied connection.
|
Connector |
getConnectorByGUID(String userId,
String connectionGUID)
Returns the connector corresponding to the supplied connection GUID.
|
Connector |
getConnectorByName(String userId,
String connectionName)
Returns the connector corresponding to the supplied connection name.
|
void |
removeComment(String userId,
String commentGUID)
Removes a comment added to the asset by this user.
|
void |
removeLike(String userId,
String likeGUID)
Removes a "Like" added to the asset by this user.
|
void |
removePrivateTag(String userId,
String tagGUID)
Removes a tag from the asset that was added by this user.
|
void |
removeRating(String userId,
String ratingGUID)
Removes of a star rating that was added to the asset by this user.
|
void |
removeTag(String userId,
String tagGUID)
Removes a tag from the asset that was added by this user.
|
public AssetConsumer(String newServerURL)
newServerURL - the network address of the server running the OMAS REST servicespublic Connector getConnectorByName(String userId, String connectionName) throws InvalidParameterException, UnrecognizedConnectionNameException, AmbiguousConnectionNameException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
getConnectorByName in interface AssetConsumerInterfaceuserId - String - userId of user making request.connectionName - this may be the qualifiedName or displayName of the connection.InvalidParameterException - one of the parameters is null or invalid.UnrecognizedConnectionNameException - there is no connection defined for this name.AmbiguousConnectionNameException - there is more than one connection defined for this name.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 (metadata) server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public Connector getConnectorByGUID(String userId, String connectionGUID) throws InvalidParameterException, UnrecognizedConnectionGUIDException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
getConnectorByGUID in interface AssetConsumerInterfaceuserId - String - userId of user making request.connectionGUID - the unique id for the connection within the property server.InvalidParameterException - one of the parameters is null or invalid.UnrecognizedConnectionGUIDException - the supplied GUID is not recognized by the property server.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.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public Connector getConnectorByConnection(String userId, Connection connection) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException
getConnectorByConnection in interface AssetConsumerInterfaceuserId - String userId of user making request. This userId is stored in the connector forconnection - the connection object that contains the properties needed to create the connection.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 (metadata) server.public AssetUniverse getAssetProperties(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getAssetProperties in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for asset.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - There is a problem retrieving the asset properties from
the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void addLogMessageToAsset(String userId, String assetGUID, String connectorInstanceId, String connectionName, String connectorType, String contextId, String message) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addLogMessageToAsset in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for the asset.connectorInstanceId - String - (optional) id of connector in use (if any).connectionName - String - (optional) name of the connection (extracted from the connector).connectorType - String - (optional) type of connector in use (if any).contextId - String - (optional) function name, or processId of the activity that the caller is performing.message - log record content.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.public String addTagToAsset(String userId, String assetGUID, String tagName, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addTagToAsset in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for the asset.tagName - String - name of the tag.tagDescription - String - (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.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.public String addPrivateTagToAsset(String userId, String assetGUID, String tagName, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addPrivateTagToAsset in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for the asset.tagName - String - name of the tag.tagDescription - String - (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.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.public String addRatingToAsset(String userId, String assetGUID, StarRating starRating, String review) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addRatingToAsset in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for the asset.starRating - StarRating - enumeration for none, one to five stars.review - String - user review of asset.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.public String addLikeToAsset(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addLikeToAsset in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for the assetInvalidParameterException - 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.public String addCommentToAsset(String userId, String assetGUID, CommentType commentType, String commentText) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addCommentToAsset in interface AssetConsumerInterfaceuserId - String - userId of user making request.assetGUID - String - unique id for the asset.commentType - type of comment enum.commentText - String - the text of the comment.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.public String addCommentReply(String userId, String commentGUID, CommentType commentType, String commentText) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addCommentReply in interface AssetConsumerInterfaceuserId - String - userId of user making request.commentGUID - String - unique id for an existing comment. Used to add a reply to a comment.commentType - type of comment enum.commentText - String - the text of the comment.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.public void removeTag(String userId, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeTag in interface AssetConsumerInterfaceuserId - String - userId of user making request.tagGUID - String - unique id for the tag.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.public void removePrivateTag(String userId, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removePrivateTag in interface AssetConsumerInterfaceuserId - String - userId of user making request.tagGUID - String - unique id for the tag.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.public void removeRating(String userId, String ratingGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeRating in interface AssetConsumerInterfaceuserId - String - userId of user making request.ratingGUID - String - unique id for the rating objectInvalidParameterException - 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.public void removeLike(String userId, String likeGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeLike in interface AssetConsumerInterfaceuserId - String - userId of user making request.likeGUID - String - unique id for the like objectInvalidParameterException - 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.public void removeComment(String userId, String commentGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeComment in interface AssetConsumerInterfaceuserId - String - userId of user making request.commentGUID - String - unique id for the comment object.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.Copyright © 2017–2018 ODPi. All rights reserved.