public class TaggingHandler extends Object implements AssetConsumerTaggingInterface
| Constructor and Description |
|---|
TaggingHandler(String serviceName,
OMRSRepositoryConnector repositoryConnector)
Construct the feedback handler with a link to the property server's connector and this access service's
official name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTagToAsset(String userId,
String assetGUID,
String tagGUID)
Adds a tag (either private of public) to an asset.
|
String |
createPrivateTag(String userId,
String tagName,
String tagDescription)
Creates a new private informal tag and returns the unique identifier for it.
|
String |
createPublicTag(String userId,
String tagName,
String tagDescription)
Creates a new public informal tag and returns the unique identifier for it.
|
void |
deleteTag(String userId,
String tagGUID)
Removes a tag from the repository.
|
Tag |
getTag(String userId,
String guid)
Return the tag for the supplied unique identifier (guid).
|
List<Tag> |
getTagsByName(String userId,
String tag,
int startFrom,
int pageSize)
Return the list of tags matching the supplied name.
|
void |
removeTagFromAsset(String userId,
String assetGUID,
String tagGUID)
Removes a tag from the asset that was added by this user.
|
void |
updateTagDescription(String userId,
String tagGUID,
String tagDescription)
Updates the description of an existing tag (either private of public).
|
public TaggingHandler(String serviceName, OMRSRepositoryConnector repositoryConnector)
serviceName - name of this servicerepositoryConnector - connector to the property server.public String createPublicTag(String userId, String tagName, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
createPublicTag in interface AssetConsumerTaggingInterfaceuserId - 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.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 createPrivateTag(String userId, String tagName, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
createPrivateTag in interface AssetConsumerTaggingInterfaceuserId - 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.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 updateTagDescription(String userId, String tagGUID, String tagDescription) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
updateTagDescription in interface AssetConsumerTaggingInterfaceuserId - 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.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 deleteTag(String userId, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
deleteTag in interface AssetConsumerTaggingInterfaceuserId - userId of user making request.tagGUID - 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 Tag getTag(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getTag in interface AssetConsumerTaggingInterfaceuserId - userId of the user making the request.guid - unique identifier of the tag.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.public List<Tag> getTagsByName(String userId, String tag, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
getTagsByName in interface AssetConsumerTaggingInterfaceuserId - the name of the calling user.tag - name of tag. This may include wild card characters.startFrom - index of the list ot start from (0 for start)pageSize - maximum number of elements to return.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.public void addTagToAsset(String userId, String assetGUID, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addTagToAsset in interface AssetConsumerTaggingInterfaceuserId - userId of user making request.assetGUID - unique id for the asset.tagGUID - unique id of the tag.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 removeTagFromAsset(String userId, String assetGUID, String tagGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeTagFromAsset in interface AssetConsumerTaggingInterfaceuserId - userId of user making request.assetGUID - unique id for the asset.tagGUID - 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.Copyright © 2018–2019 ODPi. All rights reserved.