use of org.alfresco.repo.tagging.TaggingException in project alfresco-remote-api by Alfresco.
the class TagsImpl method changeTag.
public Tag changeTag(StoreRef storeRef, String tagId, Tag tag) {
try {
NodeRef existingTagNodeRef = validateTag(storeRef, tagId);
String existingTagName = taggingService.getTagName(existingTagNodeRef);
String newTagName = tag.getTag();
NodeRef newTagNodeRef = taggingService.changeTag(storeRef, existingTagName, newTagName);
return new Tag(newTagNodeRef, newTagName);
} catch (NonExistentTagException e) {
throw new NotFoundException(e.getMessage());
} catch (TagExistsException e) {
throw new ConstraintViolatedException(e.getMessage());
} catch (TaggingException e) {
throw new InvalidArgumentException(e.getMessage());
}
}
Aggregations