org.alfresco.service.cmr.tagging
Interface TaggingService

All Known Implementing Classes:
TaggingServiceImpl

public interface TaggingService

Tagging Service Interface


Method Summary
 void addTag(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String tag)
          Add a tag to a node.
 void addTags(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List tags)
          Adds a list of tags to a node.
 void addTagScope(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Adds a tag scope to the specified node
 void clearTags(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Clears all tags from an already tagged node.
 org.alfresco.service.cmr.repository.NodeRef createTag(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String tag)
          Create a new tag
 void deleteTag(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String tag)
          Delete an existing tag
 java.util.List findAllTagScopes(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Finds all the tag scopes for the specified node.
 java.util.List findTaggedNodes(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String tag)
          Find all nodes that have been tagged with the specified tag.
 java.util.List findTaggedNodes(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String tag, org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Find all nodes that have been tagged with the specified tag and reside within the context of the node reference provided.
 TagScope findTagScope(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Finds the 'nearest' tag scope for the specified node.
 org.alfresco.service.cmr.repository.NodeRef getTagNodeRef(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String tag)
          Gets the node reference for a given tag.
 java.util.List getTags(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Get all the tags on a node
 java.util.List getTags(org.alfresco.service.cmr.repository.StoreRef storeRef)
          Get all the tags currently available
 java.util.List getTags(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String filter)
          Get all the tags currently available that match the provided filter.
 boolean hasTag(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String tag)
          Indicates whether a node has the specified tag or not.
 boolean isTag(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String tag)
          Indicates whether the tag already exists
 boolean isTagScope(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Indicates whether the node reference is a tag scope
 void refreshTagScope(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String tag)
          Remove a tag from a node.
 void removeTags(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List tags)
          Removes a list of tags from a node.
 void removeTagScope(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Removes a tag scope from a specified node.
 void setTags(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List 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(org.alfresco.service.cmr.repository.StoreRef storeRef,
                           java.lang.String tag)
Indicates whether the tag already exists

Parameters:
storeRef - store reference
tag - tag name
Returns:
boolean true if the tag exists, false otherwise

getTags

@NotAuditable
java.util.List getTags(org.alfresco.service.cmr.repository.StoreRef storeRef)
Get all the tags currently available

Returns:
List list of tags

getTags

@NotAuditable
java.util.List getTags(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                    java.lang.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")
org.alfresco.service.cmr.repository.NodeRef createTag(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                                                java.lang.String tag)
Create a new tag

Parameters:
storeRef - store reference
tag - tag name

deleteTag

@Auditable(parameters="tag")
void deleteTag(org.alfresco.service.cmr.repository.StoreRef storeRef,
                         java.lang.String tag)
Delete an existing tag

Parameters:
storeRef - store reference
tag - tag name

hasTag

@Auditable(parameters="tag")
boolean hasTag(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                         java.lang.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")
void addTag(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                      java.lang.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
org.alfresco.service.cmr.repository.NodeRef getTagNodeRef(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                                                       java.lang.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")
void addTags(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                       java.util.List 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(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                         java.lang.String tag)
Remove a tag from a node.

Parameters:
nodeRef - node reference
tag - tag name

removeTags

@Auditable(parameters="tags")
void removeTags(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                          java.util.List tags)
Removes a list of tags from a node.

Parameters:
nodeRef - node reference
tags - list of tags

getTags

@NotAuditable
java.util.List getTags(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get all the tags on a node

Parameters:
nodeRef - node reference
Returns:
List list of tags on the node

setTags

@Auditable(parameters="tags")
void setTags(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                       java.util.List 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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Clears all tags from an already tagged node.

Parameters:
nodeRef - node reference

isTagScope

@NotAuditable
boolean isTagScope(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Adds a tag scope to the specified node

Parameters:
nodeRef - node reference

refreshTagScope

@Auditable
void refreshTagScope(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.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
TagScope findTagScope(org.alfresco.service.cmr.repository.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
java.util.List findAllTagScopes(org.alfresco.service.cmr.repository.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
java.util.List findTaggedNodes(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                            java.lang.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
java.util.List findTaggedNodes(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                            java.lang.String tag,
                                            org.alfresco.service.cmr.repository.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


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.