Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.service.cmr.tagging
Interface TaggingService

public interface TaggingService
Tagging Service Interface
Author:
Roy Wetherall

Method Summary
addTag(NodeRef nodeRef, String tag)
          Add a tag to a node.
addTags(NodeRef nodeRef, List<String> tags)
          Adds a list of tags to a node.
void
addTagScope(NodeRef nodeRef)
          Adds a tag scope to the specified node
changeTag(StoreRef storeRef, String existingTag, String newTag)
void
clearTags(NodeRef nodeRef)
          Clears all tags from an already tagged node.
createTag(StoreRef storeRef, String tag)
          Create a new tag
void
deleteTag(StoreRef storeRef, String tag)
          Delete an existing tag
List<org.alfresco.service.cmr.tagging.TagScope>
findAllTagScopes(NodeRef nodeRef)
          Finds all the tag scopes for the specified node.
findTaggedNodes(StoreRef storeRef, String tag)
          Find all nodes that have been tagged with the specified tag.
findTaggedNodes(StoreRef storeRef, String tag, NodeRef nodeRef)
          Find all nodes that have been tagged with the specified tag and reside within the context of the node reference provided.
org.alfresco.service.cmr.tagging.TagScope
findTagScope(NodeRef nodeRef)
          Finds the 'nearest' tag scope for the specified node.
getPagedTags(StoreRef storeRef, int fromTag, int pageSize)
          Get page of the tags currently available
getPagedTags(StoreRef storeRef, String filter, int fromTag, int pageSize)
getTagName(NodeRef nodeRef)
getTagNodeRef(StoreRef storeRef, String tag)
          Gets the node reference for a given tag.
getTags(NodeRef nodeRef)
          Get all the tags on a node
getTags(NodeRef nodeRef, PagingRequest pagingRequest)
          Get a paged list of all the tags on a node
getTags(StoreRef storeRef)
          Get all the tags currently available
getTags(StoreRef storeRef, PagingRequest pagingRequest)
          Get a paged list of all the tags currently available
getTags(StoreRef storeRef, String filter)
          Get all the tags currently available that match the provided filter.
boolean
hasTag(NodeRef nodeRef, String tag)
          Indicates whether a node has the specified tag or not.
boolean
isTag(StoreRef storeRef, String tag)
          Indicates whether the tag already exists
boolean
isTagScope(NodeRef nodeRef)
          Indicates whether the node reference is a tag scope
void
refreshTagScope(NodeRef nodeRef, boolean async)
          Refreshes the tag count of the passed tag scope by recounting all the tags of the children of the scope.
void
removeTag(NodeRef nodeRef, String tag)
          Remove a tag from a node.
void
removeTags(NodeRef nodeRef, List<String> tags)
          Removes a list of tags from a node.
void
removeTagScope(NodeRef nodeRef)
          Removes a tag scope from a specified node.
void
setTags(NodeRef nodeRef, List<String> tags)
          Sets the list of tags that are applied to a node, replaces any existing tags with those provided.
Method Detail
isTag
@NotAuditable
boolean isTag(StoreRef storeRef,
              String tag)
Indicates whether the tag already exists
Parameters:
storeRef - store reference
tag - tag name
Returns:
boolean true if the tag exists, false otherwise

getTagName
String getTagName(NodeRef nodeRef)

getTags
@NotAuditable
List<StringgetTags(StoreRef storeRef)
Get all the tags currently available
Returns:
List list of tags

getTags
@NotAuditable
PagingResults<Pair<NodeRef,String>> getTags(StoreRef storeRef,
                                            PagingRequest pagingRequest)
Get a paged list of all the tags currently available
Parameters:
storeRef - StoreRef
pagingRequest - PagingRequest
Returns:
PagingResults

getTags
@NotAuditable
List<StringgetTags(StoreRef storeRef,
                     String filter)
Get all the tags currently available that match the provided filter.
Parameters:
storeRef - store reference
filter - tag filter
Returns:
List list of tags

createTag
@Auditable(parameters="tag")
NodeRef createTag(StoreRef storeRef,
                  String tag)
Create a new tag
Parameters:
storeRef - store reference
tag - tag name

deleteTag
@Auditable(parameters="tag")
void deleteTag(StoreRef storeRef,
               String tag)
Delete an existing tag
Parameters:
storeRef - store reference
tag - tag name

changeTag
@Auditable(parameters={
  "existingTag",
  "newTag"
})
NodeRef changeTag(StoreRef storeRef,
                  String existingTag,
                  String newTag)

hasTag
@Auditable(parameters="tag")
boolean hasTag(NodeRef nodeRef,
               String tag)
Indicates whether a node has the specified tag or not.
Parameters:
nodeRef - node reference
tag - tag name
Returns:
boolean true if the node has the tag, false otherwise

addTag
@Auditable(parameters="tag")
NodeRef addTag(NodeRef nodeRef,
               String tag)
Add a tag to a node. Creating the tag if it does not already exist.
Parameters:
nodeRef - node reference
tag - tag name

getTagNodeRef
@NotAuditable
NodeRef getTagNodeRef(StoreRef storeRef,
                      String tag)
Gets the node reference for a given tag.

Returns null if tag is not present.

Parameters:
storeRef - store reference
tag - tag
Returns:
NodeRef tag node reference or null not exist

addTags
@Auditable(parameters="tags")
List<Pair<String,NodeRef>> addTags(NodeRef nodeRef,
                                   List<String> tags)
Adds a list of tags to a node.

Tags are created if they do not exist.

Parameters:
nodeRef - node reference
tags - list of tags

removeTag
@Auditable(parameters="tag")
void removeTag(NodeRef nodeRef,
               String tag)
Remove a tag from a node.
Parameters:
nodeRef - node reference
tag - tag name

removeTags
@Auditable(parameters="tags")
void removeTags(NodeRef nodeRef,
                List<String> tags)
Removes a list of tags from a node.
Parameters:
nodeRef - node reference
tags - list of tags

getTags
@NotAuditable
List<StringgetTags(NodeRef nodeRef)
Get all the tags on a node
Parameters:
nodeRef - node reference
Returns:
List list of tags on the node

getTags
@NotAuditable
PagingResults<Pair<NodeRef,String>> getTags(NodeRef nodeRef,
                                            PagingRequest pagingRequest)
Get a paged list of all the tags on a node
Parameters:
nodeRef - node reference
Returns:
PagingResults list of tags on the node

setTags
@Auditable(parameters="tags")
void setTags(NodeRef nodeRef,
             List<String> tags)
Sets the list of tags that are applied to a node, replaces any existing tags with those provided.
Parameters:
nodeRef - node reference
tags - list of tags

clearTags
@Auditable
void clearTags(NodeRef nodeRef)
Clears all tags from an already tagged node.
Parameters:
nodeRef - node reference

isTagScope
@NotAuditable
boolean isTagScope(NodeRef nodeRef)
Indicates whether the node reference is a tag scope
Parameters:
nodeRef - node reference
Returns:
boolean true if node is a tag scope, false otherwise

addTagScope
@Auditable
void addTagScope(NodeRef nodeRef)
Adds a tag scope to the specified node
Parameters:
nodeRef - node reference

refreshTagScope
@Auditable
void refreshTagScope(NodeRef nodeRef,
                     boolean async)
Refreshes the tag count of the passed tag scope by recounting all the tags of the children of the scope.
Parameters:
nodeRef - tag scope node reference
async - indicates whether the tag scope refresh should happen asynchronously or not

removeTagScope
@Auditable
void removeTagScope(NodeRef nodeRef)
Removes a tag scope from a specified node. Note that any tag count information will be lost when the scope if removed.
Parameters:
nodeRef - node reference

findTagScope
@NotAuditable
org.alfresco.service.cmr.tagging.TagScope findTagScope(NodeRef nodeRef)
Finds the 'nearest' tag scope for the specified node.

The 'nearest' tag scope is discovered by walking up the primary parent path until a tag scope is found or the root node is reached.

If no tag scope if found then a null value is returned.

Parameters:
nodeRef - node reference
Returns:
the 'nearest' tag scope or null if none found

findAllTagScopes
@NotAuditable
List<org.alfresco.service.cmr.tagging.TagScope> findAllTagScopes(NodeRef nodeRef)
Finds all the tag scopes for the specified node.

The resulting list of tag scopes is ordered with the 'nearest' at the bedining of the list.

If no tag scopes are found an empty list is returned.

Parameters:
nodeRef - node reference
Returns:
List list of tag scopes

findTaggedNodes
@NotAuditable
List<NodeReffindTaggedNodes(StoreRef storeRef,
                              String tag)
Find all nodes that have been tagged with the specified tag.
Parameters:
tag - tag name
Returns:
List list of nodes tagged with specified tag, empty of none found

findTaggedNodes
@NotAuditable
List<NodeReffindTaggedNodes(StoreRef storeRef,
                              String tag,
                              NodeRef nodeRef)
Find all nodes that have been tagged with the specified tag and reside within the context of the node reference provided.
Parameters:
tag - tag name
nodeRef - node providing context for the search
Returns:
List list of nodes tagged in the context specified, empty if none found

getPagedTags
@NotAuditable
Pair<List<String>,IntegergetPagedTags(StoreRef storeRef,
                                        int fromTag,
                                        int pageSize)
Get page of the tags currently available
Parameters:
storeRef - node reference
fromTag - offset
pageSize - page size
Returns:
pair of tag names and total count

getPagedTags
@NotAuditable
Pair<List<String>,IntegergetPagedTags(StoreRef storeRef,
                                        String filter,
                                        int fromTag,
                                        int pageSize)
Parameters:
storeRef - node reference
filter - tag filter
fromTag - page offset
pageSize - page size
Returns:
pair of tag names and total count

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2016 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.