|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.tagging.TaggingServiceImpl
public class TaggingServiceImpl
Tagging service implementation
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
|---|
Policy.Arg |
| Field Summary | |
|---|---|
static java.lang.String |
TAG_UPDATES
|
| Fields inherited from interface org.alfresco.repo.policy.Policy |
|---|
NAMESPACE |
| Constructor Summary | |
|---|---|
TaggingServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addTag(NodeRef nodeRef,
java.lang.String tagName)
Add a tag to a node. |
void |
addTags(NodeRef nodeRef,
java.util.List tags)
Adds a list of tags to a node. |
void |
addTagScope(NodeRef nodeRef)
Adds a tag scope to the specified node |
void |
afterCommit()
Invoked after transaction commit. |
void |
afterRollback()
Invoked after transaction rollback. |
void |
beforeCommit(boolean readOnly)
Called before a transaction is committed. |
void |
beforeCompletion()
Invoked before transaction commit/rollback. |
void |
beforeDeleteNode(NodeRef nodeRef)
Called before a node is deleted. |
void |
clearTags(NodeRef nodeRef)
Clears all tags from an already tagged node. |
void |
createTag(StoreRef storeRef,
java.lang.String tag)
Create a new tag |
void |
deleteTag(StoreRef storeRef,
java.lang.String tag)
Delete an existing tag |
java.util.List |
findAllTagScopes(NodeRef nodeRef)
Finds all the tag scopes for the specified node. |
java.util.List |
findTaggedNodes(StoreRef storeRef,
java.lang.String tag)
Find all nodes that have been tagged with the specified tag. |
java.util.List |
findTaggedNodes(StoreRef storeRef,
java.lang.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. |
TagScope |
findTagScope(NodeRef nodeRef)
Finds the 'nearest' tag scope for the specified node. |
void |
flush()
|
java.util.List |
getTags(NodeRef nodeRef)
Get all the tags on a node |
java.util.List |
getTags(StoreRef storeRef)
Get all the tags currently available |
java.util.List |
getTags(StoreRef storeRef,
java.lang.String filter)
Get all the tags currently available that match the provided filter. |
void |
init()
Init method |
boolean |
isTag(StoreRef storeRef,
java.lang.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,
java.lang.String tag)
Remove a tag from a node. |
void |
removeTags(NodeRef nodeRef,
java.util.List tags)
Removes a list of tags from a node. |
void |
removeTagScope(NodeRef nodeRef)
Removes a tag scope from a specified node. |
void |
setActionService(ActionService actionService)
Set the action service |
void |
setCategoryService(CategoryService categoryService)
Set the cateogry service |
void |
setContentService(ContentService contentService)
Set the content service |
void |
setNamespaceService(NamespaceService namespaceService)
Set the namespace service |
void |
setNodeService(NodeService nodeService)
Set the node service |
void |
setPolicyComponent(PolicyComponent policyComponent)
Policy component |
void |
setSearchService(SearchService searchService)
Set the search service |
void |
setTags(NodeRef nodeRef,
java.util.List tags)
Sets the list of tags that are applied to a node, replaces any existing tags with those provided. |
void |
setTransactionService(TransactionService transactionService)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TAG_UPDATES
| Constructor Detail |
|---|
public TaggingServiceImpl()
| Method Detail |
|---|
public void setCategoryService(CategoryService categoryService)
categoryService - trhe category servicepublic void setNodeService(NodeService nodeService)
nodeService - the node servicepublic void setSearchService(SearchService searchService)
searchService - the search servicepublic void setActionService(ActionService actionService)
public void setContentService(ContentService contentService)
contentService - content servicepublic void setNamespaceService(NamespaceService namespaceService)
namespaceService - namespace servicepublic void setPolicyComponent(PolicyComponent policyComponent)
policyComponent - public void setTransactionService(TransactionService transactionService)
public void init()
public void beforeDeleteNode(NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy
beforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicynodeRef - the node referenceNodeServicePolicies.BeforeDeleteNodePolicy.beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef)
public boolean isTag(StoreRef storeRef,
java.lang.String tag)
TaggingService
isTag in interface TaggingServicestoreRef - store referencetag - tag name
org.alfresco.service.cmr.tagging.TaggingService#isTag(java.lang.String)
public void createTag(StoreRef storeRef,
java.lang.String tag)
TaggingService
createTag in interface TaggingServicestoreRef - store referencetag - tag nameorg.alfresco.service.cmr.tagging.TaggingService#createTag(java.lang.String)
public void deleteTag(StoreRef storeRef,
java.lang.String tag)
TaggingService
deleteTag in interface TaggingServicestoreRef - store referencetag - tag nameTaggingService.deleteTag(org.alfresco.service.cmr.repository.StoreRef, java.lang.String)public java.util.List getTags(StoreRef storeRef)
TaggingService
getTags in interface TaggingServiceorg.alfresco.service.cmr.tagging.TaggingService#getTags()
public java.util.List getTags(StoreRef storeRef,
java.lang.String filter)
TaggingService
getTags in interface TaggingServicestoreRef - store referencefilter - tag filter
TaggingService.getTags(org.alfresco.service.cmr.repository.StoreRef, java.lang.String)
public void addTag(NodeRef nodeRef,
java.lang.String tagName)
TaggingService
addTag in interface TaggingServicenodeRef - node referencetagName - tag nameTaggingService.addTag(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
public void addTags(NodeRef nodeRef,
java.util.List tags)
TaggingServiceTags are created if they do not exist.
addTags in interface TaggingServicenodeRef - node referencetags - list of tagsTaggingService.addTags(org.alfresco.service.cmr.repository.NodeRef, java.util.List)
public void removeTag(NodeRef nodeRef,
java.lang.String tag)
TaggingService
removeTag in interface TaggingServicenodeRef - node referencetag - tag nameTaggingService.removeTag(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
public void removeTags(NodeRef nodeRef,
java.util.List tags)
TaggingService
removeTags in interface TaggingServicenodeRef - node referencetags - list of tagsTaggingService.removeTags(org.alfresco.service.cmr.repository.NodeRef, java.util.List)public java.util.List getTags(NodeRef nodeRef)
TaggingService
getTags in interface TaggingServicenodeRef - node reference
TaggingService.getTags(org.alfresco.service.cmr.repository.NodeRef)
public void setTags(NodeRef nodeRef,
java.util.List tags)
TaggingService
setTags in interface TaggingServicenodeRef - node referencetags - list of tagsTaggingService.setTags(org.alfresco.service.cmr.repository.NodeRef, java.util.List)public void clearTags(NodeRef nodeRef)
TaggingService
clearTags in interface TaggingServicenodeRef - node referenceTaggingService.clearTags(org.alfresco.service.cmr.repository.NodeRef)public boolean isTagScope(NodeRef nodeRef)
TaggingService
isTagScope in interface TaggingServicenodeRef - node reference
TaggingService.isTagScope(org.alfresco.service.cmr.repository.NodeRef)public void addTagScope(NodeRef nodeRef)
TaggingService
addTagScope in interface TaggingServicenodeRef - node referenceTaggingService.addTagScope(org.alfresco.service.cmr.repository.NodeRef)
public void refreshTagScope(NodeRef nodeRef,
boolean async)
TaggingService
refreshTagScope in interface TaggingServicenodeRef - tag scope node referenceasync - indicates whether the tag scope refresh should happen asynchronously or notorg.alfresco.service.cmr.tagging.TaggingService#refreshTagScopt(org.alfresco.service.cmr.repository.NodeRef, boolean)public void removeTagScope(NodeRef nodeRef)
TaggingService
removeTagScope in interface TaggingServicenodeRef - node referenceTaggingService.removeTagScope(org.alfresco.service.cmr.repository.NodeRef)public TagScope findTagScope(NodeRef nodeRef)
TaggingServiceThe 'nearest' tag scope is discovered by walking up the primary parent path untill a tag scope is found or the root node is reached.
If no tag scope if found then a null value is returned.
findTagScope in interface TaggingServicenodeRef - node reference
TaggingService.findTagScope(org.alfresco.service.cmr.repository.NodeRef)public java.util.List findAllTagScopes(NodeRef nodeRef)
TaggingServiceThe 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.
findAllTagScopes in interface TaggingServicenodeRef - node reference
TaggingService.findAllTagScopes(org.alfresco.service.cmr.repository.NodeRef)
public java.util.List findTaggedNodes(StoreRef storeRef,
java.lang.String tag)
TaggingService
findTaggedNodes in interface TaggingServicetag - tag name
org.alfresco.service.cmr.tagging.TaggingService#findTaggedNodes(java.lang.String)
public java.util.List findTaggedNodes(StoreRef storeRef,
java.lang.String tag,
NodeRef nodeRef)
TaggingService
findTaggedNodes in interface TaggingServicetag - tag namenodeRef - node providing context for the search
org.alfresco.service.cmr.tagging.TaggingService#findTaggedNodes(java.lang.String, org.alfresco.service.cmr.repository.NodeRef)public void afterCommit()
TransactionListenerAny exceptions generated here will cause the transaction to rollback.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.
afterCommit in interface TransactionListenerTransactionListener.afterCommit()public void afterRollback()
TransactionListenerAlthough all transaction resources are still available, this method should be used only for cleaning up resources after a rollback has occured.
afterRollback in interface TransactionListenerTransactionListener.afterRollback()public void beforeCommit(boolean readOnly)
TransactionListenerAll transaction resources are still available.
beforeCommit in interface TransactionListenerreadOnly - true if the transaction is read-onlyTransactionListener.beforeCommit(boolean)public void beforeCompletion()
TransactionListenerTransactionListener.beforeCommit(boolean) even if TransactionListener.beforeCommit(boolean)
failed.
Any exceptions generated here will only be logged and will have no effect on the state of the transaction.
All transaction resources are still available.
beforeCompletion in interface TransactionListenerTransactionListener.beforeCompletion()public void flush()
flush in interface TransactionListenerTransactionListener.flush()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||