public class NewFolksonomyServiceImpl extends Object implements NewFolksonomyService, org.picocontainer.Startable
EXO_TAGGED, EXO_TAGSTYLE, EXO_TOTAL, EXO_UUID, GROUP, HTML_STYLE_PROP, PRIVATE, PUBLIC, SITE, TAG_RATE_PROP| Constructor and Description |
|---|
NewFolksonomyServiceImpl(org.exoplatform.container.xml.InitParams initParams,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
LinkManager linkManager,
org.exoplatform.services.jcr.ext.distribution.DataDistributionManager dataDistributionManager,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.cache.CacheService cacheService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGroupsTag(String[] tagsName,
javax.jcr.Node documentNode,
String workspace,
String[] roles)
Adds a group tag to a document.
|
void |
addPrivateTag(String[] tagsName,
javax.jcr.Node documentNode,
String workspace,
String userName)
Adds a private tag to a document.
|
void |
addPublicTag(String treePath,
String[] tagsName,
javax.jcr.Node documentNode,
String workspace)
Adds a public tag to a document.
|
void |
addSiteTag(String siteName,
String[] tagsName,
javax.jcr.Node node,
String workspace)
Adds a site tag to a document.
|
void |
addTagPermission(String usersOrGroups)
Adds a given user or group to the list of tag permissions.
|
void |
addTagPermissionPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Add new users or groups into tagPermissionPlugin_
|
void |
addTagStyle(String styleName,
String tagRange,
String htmlStyle,
String workspace)
Adds a tag style.
|
void |
addTagStylePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Add new TagStylePlugin in plugin_
|
boolean |
canEditTag(int scope,
List<String> memberships)
Checks if a given user has the "edit tag" permission.
|
List<javax.jcr.Node> |
getAllDocumentsByTag(String tagPath,
String workspace,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
Gets all documents which are marked with a given tag.
|
List<javax.jcr.Node> |
getAllDocumentsByTagsAndPath(String selectedPath,
Set<String> tagPaths,
String workspace,
org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
Gets all documents which are marked with given tags and that are located in a selected path.
|
List<javax.jcr.Node> |
getAllGroupTags(String[] roles,
String workspace)
Gets all tags of groups that a given user belongs to.
|
List<javax.jcr.Node> |
getAllGroupTags(String role,
String workspace)
Gets all tags of a group that a given user belongs to.
|
List<javax.jcr.Node> |
getAllPrivateTags(String userName)
Gets all private tags of a given user.
|
List<javax.jcr.Node> |
getAllPublicTags(String treePath,
String workspace)
Gets all public tags.
|
List<javax.jcr.Node> |
getAllSiteTags(String siteName,
String workspace)
Gets all site tags.
|
List<String> |
getAllTagNames(String workspace,
int scope,
String value)
Gets names of all tags under a given scope.
|
List<javax.jcr.Node> |
getAllTagStyle(String workspace)
Gets all tag styles of a folksonomy tree.
|
org.exoplatform.services.jcr.ext.distribution.DataDistributionType |
getDataDistributionType()
Gets a type of data distribution.
|
List<javax.jcr.Node> |
getLinkedTagsOfDocument(javax.jcr.Node documentNode,
String workspace)
Gets all tags linked to a given document.
|
List<javax.jcr.Node> |
getLinkedTagsOfDocumentByScope(int scope,
String value,
javax.jcr.Node documentNode,
String workspace)
Get all tags linked to a given document by scope.
|
List<String> |
getTagPermissionList()
Gets a list of users and groups who have the tag permission.
|
String |
getTagStyle(String tagStylePath,
String workspace)
Gets a tag style.
|
void |
init()
init all available TagStylePlugin
|
void |
initTagPermissionListCache()
init the cache tagPermissionList
|
javax.jcr.Node |
modifyPublicTagName(String tagPath,
String newTagName,
String workspace,
String treePath)
Renames a public tag.
|
javax.jcr.Node |
modifyTagName(String tagPath,
String newTagName,
String workspace)
Deprecated.
|
void |
removeTag(String tagPath,
String workspace)
Removes a tag.
|
void |
removeTagOfDocument(String tagPath,
javax.jcr.Node document,
String workspace)
Removes tag from a given document.
|
void |
removeTagPermission(String usersOrGroups)
Removes a given user or group from the list of tag permissions.
|
void |
removeTagsOfNodeRecursively(javax.jcr.Node node,
String workspace,
String username,
String groups)
Removes all tags linked to the child nodes of a given node.
|
void |
start()
Implement method in Startable Call init() method
|
void |
stop()
Implement method in Startable
|
void |
updateTagStyle(String styleName,
String tagRange,
String htmlStyle,
String workspace)
Updates a tag style.
|
public NewFolksonomyServiceImpl(org.exoplatform.container.xml.InitParams initParams,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
LinkManager linkManager,
org.exoplatform.services.jcr.ext.distribution.DataDistributionManager dataDistributionManager,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.cache.CacheService cacheService)
throws Exception
Exceptionpublic void start()
start in interface org.picocontainer.Startableinit()public void stop()
stop in interface org.picocontainer.Startablepublic void addPrivateTag(String[] tagsName, javax.jcr.Node documentNode, String workspace, String userName) throws Exception
addPrivateTag in interface NewFolksonomyServicetagsName - The array of tag names.documentNode - The document node to which the private tag is added.workspace - Name of the workspace that contains the document node.userName - The user who added the private tag.Exception - The exceptionpublic void addGroupsTag(String[] tagsName, javax.jcr.Node documentNode, String workspace, String[] roles) throws Exception
addGroupsTag in interface NewFolksonomyServicetagsName - The array of tag names.documentNode - The document node to which the group tag is added.workspace - Name of the workspace that contains the document node.roles - Roles of the user who added the group tag.Exception - The exceptionpublic void addPublicTag(String treePath, String[] tagsName, javax.jcr.Node documentNode, String workspace) throws Exception
addPublicTag in interface NewFolksonomyServicetreePath - Path of the folksonomy tree.tagsName - The array of the tag names.documentNode - The document node to which the public tag is added.workspace - Name of the workspace that contains the document node.Exception - The exceptionpublic void addSiteTag(String siteName, String[] tagsName, javax.jcr.Node node, String workspace) throws Exception
addSiteTag in interface NewFolksonomyServicesiteName - The site name.tagsName - The array of tag names.node - The document node to which the site tag is added.workspace - Name of the workspace that contains the document node.Exception - The exceptionpublic List<javax.jcr.Node> getAllDocumentsByTagsAndPath(String selectedPath, Set<String> tagPaths, String workspace, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) throws Exception
getAllDocumentsByTagsAndPath in interface NewFolksonomyServiceselectedPath - Parent path to filter nodestagPaths - list of tags JCR pathsworkspace - the workspace of resulted nodessessionProvider - use session provider to query JCRList of NodeExceptionpublic List<javax.jcr.Node> getAllDocumentsByTag(String tagPath, String workspace, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) throws Exception
getAllDocumentsByTag in interface NewFolksonomyServicetagPath - Path of the given tag.workspace - Name of the workspace that contains the given tag.sessionProvider - The session provider.Exception - The exceptionpublic List<javax.jcr.Node> getAllGroupTags(String[] roles, String workspace) throws Exception
getAllGroupTags in interface NewFolksonomyServiceroles - Roles of the given user.workspace - Name of the workspace that contains tags.Exception - The exceptionpublic List<javax.jcr.Node> getAllGroupTags(String role, String workspace) throws Exception
getAllGroupTags in interface NewFolksonomyServicerole - Roles of the given user.workspace - Name of the workspace that contains tags.Exception - The exceptionpublic List<javax.jcr.Node> getAllPrivateTags(String userName) throws Exception
getAllPrivateTags in interface NewFolksonomyServiceuserName - Name of the given user.Exception - The exceptionpublic List<javax.jcr.Node> getAllPublicTags(String treePath, String workspace) throws Exception
getAllPublicTags in interface NewFolksonomyServicetreePath - Path of the folksonomy tree.workspace - Name of the workspace that contains public tags.Exception - The exceptionpublic List<javax.jcr.Node> getAllSiteTags(String siteName, String workspace) throws Exception
getAllSiteTags in interface NewFolksonomyServicesiteName - The site name.workspace - Name of the workspace that contains the site tags.Exception - The exceptionpublic List<javax.jcr.Node> getAllTagStyle(String workspace) throws Exception
getAllTagStyle in interface NewFolksonomyServiceworkspace - Name of the workspace that contains the tag styles.Exception - The exceptionpublic String getTagStyle(String tagStylePath, String workspace) throws Exception
getTagStyle in interface NewFolksonomyServicetagStylePath - Path to the tag.workspace - Name of the workspace that contains the tag.Exception - The exceptionpublic void addTagStylePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - public void init()
throws Exception
init in interface NewFolksonomyServiceExceptionpublic void initTagPermissionListCache()
throws Exception
initTagPermissionListCache in interface NewFolksonomyServiceException@Deprecated public javax.jcr.Node modifyTagName(String tagPath, String newTagName, String workspace) throws Exception
modifyTagName in interface NewFolksonomyServicetagPath - Path of the tag.newTagName - New name of the tag.workspace - Name of the workspace that contains the renamed tag.Exception - The exceptionpublic javax.jcr.Node modifyPublicTagName(String tagPath, String newTagName, String workspace, String treePath) throws Exception
modifyPublicTagName in interface NewFolksonomyServicetagPath - Path of the public tag.newTagName - New name of the public tag.workspace - Name of the workspace that contains the renamed public tag.treePath - Path of the folksonomy tree.Exception - The exceptionpublic void removeTag(String tagPath, String workspace) throws Exception
removeTag in interface NewFolksonomyServicetagPath - Path of the tag.workspace - Name of the workspace that contains the removed tag.Exception - The exceptionpublic void removeTagOfDocument(String tagPath, javax.jcr.Node document, String workspace) throws Exception
removeTagOfDocument in interface NewFolksonomyServicetagPath - Path of the tag.document - The document from which the tag is removed.Exception - The exceptionpublic void updateTagStyle(String styleName, String tagRange, String htmlStyle, String workspace) throws Exception
updateTagStyle in interface NewFolksonomyServicestyleName - Name of the tag style.tagRange - The number of times the tag is used for the tag style.htmlStyle - The tag style.workspace - Name of the workspace that contains the tag style.Exception - The exceptionpublic void addTagStyle(String styleName, String tagRange, String htmlStyle, String workspace) throws Exception
addTagStyle in interface NewFolksonomyServicestyleName - Name of the tag style.tagRange - The number of times the tag is used for the tag style.htmlStyle - The tag style.workspace - Name of the workspace that contains the tag style.Exception - The exceptionpublic void removeTagsOfNodeRecursively(javax.jcr.Node node,
String workspace,
String username,
String groups)
throws Exception
removeTagsOfNodeRecursively in interface NewFolksonomyServicenode - The given node.workspace - Name of the workspace that contains all tags.username - The user who removed all tags.Exception - The exceptionpublic List<javax.jcr.Node> getLinkedTagsOfDocument(javax.jcr.Node documentNode, String workspace) throws Exception
NewFolksonomyServicegetLinkedTagsOfDocument in interface NewFolksonomyServicedocumentNode - The document node.workspace - Name of the workspace that contains all tags.Exception - The exceptionpublic List<javax.jcr.Node> getLinkedTagsOfDocumentByScope(int scope, String value, javax.jcr.Node documentNode, String workspace) throws Exception
NewFolksonomyServicegetLinkedTagsOfDocumentByScope in interface NewFolksonomyServicescope - The tag's scope.documentNode - The document node.workspace - Name of the workspace that contains all tags.Exception - The exceptionpublic void addTagPermissionPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - public void addTagPermission(String usersOrGroups)
addTagPermission in interface NewFolksonomyServiceusersOrGroups - Name of the given user or group.public void removeTagPermission(String usersOrGroups)
removeTagPermission in interface NewFolksonomyServiceusersOrGroups - Name of the user or group.public List<String> getTagPermissionList()
getTagPermissionList in interface NewFolksonomyServicepublic boolean canEditTag(int scope,
List<String> memberships)
canEditTag in interface NewFolksonomyServicescope - The tag's scope.memberships - The memberships.public List<String> getAllTagNames(String workspace, int scope, String value) throws Exception
getAllTagNames in interface NewFolksonomyServiceworkspace - Name of the workspace that contains the tags.scope - The tags' scope.value - Path of the folksonomy tree.Exception - The exceptionpublic org.exoplatform.services.jcr.ext.distribution.DataDistributionType getDataDistributionType()
getDataDistributionType in interface NewFolksonomyServiceCopyright © 2003–2019 eXo Platform SAS. All rights reserved.