This service is used to manage all tags and their styles. Currently, it just supports adding/editing/removing the Private & Public tags.

_Package org.exoplatform.services.cms.folksonomy.NewFolksonomyService_;

|| *Method* || *Return* || *Prototype* || *Description* ||
| *addPrivateTag*(String\[\] tagsName, Node documentNode, String repository, String workspace, String userName) throws Exception ; |{{tagNames}}: The array of tag name as the children of tree.{example}{example} {{documentNode}}: Tag this node by creating a folksonomy link to the node in the tag.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.{example}{example} {{userName}}: The username. | {{void}} |Add a private tag to a document. A folksonomy link will be created in a tag node.|
| *addGroupsTag*(String\[\] tagsName, Node documentNode,String repository, String workspace, String\[\] roles) throws Exception ; |{{tagNames}}: The array of tag name as the children of tree.{example}{example} {{documentNode}}: Tag this node by creating a folksonomy link to the node in tag.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.{example}{example} {{roles}}: The user roles. | {{void}} | Add a group tag to a document. A folksonomy link will be created in a tag node.|
| *addPublicTag*(String treePath, String\[\] tagsName, Node documentNode, String repository, String workspace) throws Exception ; |{{treePath}}: The path of folksonomy tree.{example}{example} {{tagNames}}: The array of the tag name as the children of tree.{example}{example} {{documentNode}}: Tag this node by creating a folksonomy link to the node in the tag.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.| {{void}} | Add a public tag to a document. A folksonomy link will be created in a tag node.|
| *addSiteTag*(String siteName, String\[\] tagsName, Node node, String repository, String workspace) throws Exception ; |{{siteName}}: The portal name.{example}{example} {{treePath}}: The path of folksonomy tree.{example}{example} {{tagNames}}: The array of the tag name as the children of tree.{example}{example} {{documentNode}}: Tag this node by creating a folksonomy link to the node in tag.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.| {{void}} | Add a site tag to a document. A folksonomy link will be created in a tag node.|
| *getAllPrivateTags*(String userName, String repository, String workspace) throws Exception ;|{{userName}}: The user name.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.   | {{ List<Node> }} |Get all private tags.|
| *getAllPublicTags*(String treePath, String repository, String workspace) throws Exception ; |{{treePath}}: The folksonomy tree path.{example}{example} {{repository}}: The repository name. {example}{example} {{workspace}}: The workspace name. | {{ List<Node> }} | Get all public tags.|
| *getAllGroupTags*String\[\] roles, String repository, String workspace) throws Exception ; |{{roles}}: The roles of user.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.   | {{ List<Node> }} | Get all tags by groups.|
| *getAllGroupTags*(String role, String repository, String workspace) throws Exception ; |{{role}}: The role of user.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name. | {{ List<Node> }} | Get all tags by a group.|
| *getAllSiteTags*(String siteName, String repository, String workspace) throws Exception ;| {{siteName}}: The portal name.{example}{example} {{treePath}}: Folksonomy tree path.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.| {{ List<Node> }} | Get all tags of Site.|
| *getAllDocumentsByTag*(String tagPath, String repository, String workspace, SessionProvider sessionProvider) throws Exception ; | {example}{example} {{treeName}}: The name of folksonomy tree.{example}{example} {{tagName}}: The name of a tag.{example}{example} {{repository}}: The repository name.| {{ List<Node> }}| Get all documents which are stored in a tag and return a list of documents in a tag.|
| *getTagStyle*(String tagPath, String repository, String workspace) throws Exception ; | {{tagPath}} {example}{example} {{workspace}}: The workspace name. {example}{example} {{repository}}: The repository name. | {{string}} | Get {{{HTML_STYLE_PROP}}} property in styleName node in the repository.|
| *addTagStyle*(String styleName, String tagRange, String htmlStyle, String repository, String workspace) throws Exception ; | {{styleName}}: The style name.{example}{example} {{tagRate}}: The range of tag numbers.{example}{example} {{htmlStyle}}: The tag style.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.| {{void}} | Update the properties {{{TAG_RATE_PROP}}} and {{{HTML_STYLE_PROP}}}, following the values tagRate, htmlStyle for a node in tagPath in repository.|
| *updateTagStyle*(String styleName, String tagRange, String htmlStyle, String repository, String workspace) throws Exception ; |{{styleName}}: The style name.{example}{example} {{tagRate}}: The range of tag numbers.{example}{example} {{htmlStyle}}: The tag style.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.| {{void}} | Update the properties {{{TAG_RATE_PROP}}} and {{{HTML_STYLE_PROP}}}, following the value tagRate, htmlStyle for a node in tagPath in repository.|
| *getAllTagStyle*(String repository, String workspace) throws Exception ; |{{repository}}: The repository name{example}{example} {{workspace}}: The workspace name. | {{ List<Node> }} |  Get all tag style bases of a folksonomy tree.|
| *init*(String repository) throws Exception ; |{{repository}}: The repository name.| {{void}} |Initialize all TagStylePlugin with session in repository name.|
| *removeTagOfDocument*(String tagPath, Node document, String repository, String workspace) throws Exception; |{{treeName}}: The name of a folksonomy tree.{example}{example} {{tagName}}: The name of a tag.{example}{example} {{document}}: The document which is added a link to tagName.{example}{example} {{repository}}: The repository name.  | {{void}} | Remove a tag of a given document.|
| *removeTag*(String tagPath, String repository, String workspace) throws Exception; |{{tagPath}}: The path of the tag.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name.   | {{void}} | Remove a tag.|
| *modifyTagName*(String tagPath, String newTagName, String repository, String workspace) throws Exception; |{{tagPath}}: The name of the tag.{example}{example} {{newTagName}}: The new tag name.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name. | {{Node}} | Modify the tag name.|
| *getLinkedTagsOfDocument*(Node documentNode, String repository, String workspace) throws Exception; |{{documentNode}}: The document node.{example}{example} {{repository}} {example}{example} {{workspace}}| {{ List<Node> }} |Get all tags linked to a given document.|
| *getLinkedTagsOfDocumentByScope*(int scope, String value, Node documentNode, String repository, String workspace) throws Exception; |{{documentNode}}: The document node.{example}{example} {{repository}}: The repository name.{example}{example} {{workspace}}: The workspace name. | {{ List<Node> }} | Get all tags linked to a given document by scope.|
| *removeTagsOfNodeRecursively*(Node node, String repository, String workspace, String username, String groups) throws Exception; |{{node}} {example}{example} {{repository}} {example}{example} {{workspace}} | {{void}} | Remove all tags linked to the child nodes of a given node.|
| *addTagPermission*(String usersOrGroups); |{{usersOrGroups}}  | {{void}} | Add given users or groups to tagPermissionList.|
| *removeTagPermission*(String usersOrGroups); |{{usersOrGroups}} | {{void}}  | Remove given users or groups from tagPermissionList.|
| *getTagPermissionList*();| {{N/A}} | {{ List<String> }} | Return tagPermissionList.|
| *canEditTag*(int scope, List<String> memberships); |{{scope}} {example}{example} {{memberships}} | {{boolean}} | Set the permission to edit a tag for a user.|
| *getAllTagNames*(String repository, String workspace, int scope, String value) throws Exception;|{{repository}} {example}{example} {{workspace}} {example}{example} {{scope}}: The scope of tags.{example}{example} {{value}}: The value, according to scope, can be understood differently.  | {{ List<String> }} | Get all tag names which start within a given scope.|