JBoss.orgCommunity Documentation

TaxonomyService

Taxonomy service is used to work with taxonomies. In this service, there are many functions which enable you to add, find, or delete taxonomies from a node.

Method Param Return Description
getTaxonomyTree(String repository, String taxonomyName, boolean system) throws ReposioryException;

repository: The name of repository.

taxonomyName: The name of the taxonomy.

system: Indicates whether the nodes must be retrieved using a session system or user session.

node Return the root node of the given taxonomy tree.
getTaxonomyTree(String repository, String taxonomyName) throws RepositoryException;

repository: The name of repository.

taxonomyName: The name of the taxonomy.

node Return the root node of the given taxonomy tree with the user session.
getAllTaxonomyTrees(String repository, boolean system) throws RepositoryException;

repository: The name of repository.

system: Indicates whether the nodes must be retrieved using a session system or user session.

List<Node> Return the list of all the root nodes of the taxonomy tree available.
getAllTaxonomyTrees(String repository) throws RepositoryException; repository: The name of repository. List<Node> Return the list of all the root nodes of the taxonomy tree available with the user session.
hasTaxonomyTree(String repository, String taxonomyName) throws RepositoryException;

repository: The name of repository.

taxonomyName: The name of the taxonomy.

boolean Check if a taxonomy tree with the given name has already been defined.
addTaxonomyTree(Node taxonomyTree) throws RepositoryException, TaxonomyAlreadyExistsException; taxonomyTree: The taxonomy tree to define. void Define a node as a new taxonomy tree.
updateTaxonomyTree(String taxonomyName, Node taxonomyTree) throws RepositoryException;

taxonomyName: The name of the taxonomy to update.

taxonomyTree: The taxonomy tree to define.

void Re-define a node as a taxonomy tree.
removeTaxonomyTree(String taxonomyName) throws RepositoryException taxonomyName: The name of the taxonomy to remove. void Remove the taxonomy tree definition.
addTaxonomyNode(String repository, String workspace, String parentPath, String taxoNodeName, String creator) throws RepositoryException, TaxonomyNodeAlreadyExistsException;

repository: The name of the repository. workspace: The name of the workspace

parentPath: The place where the taxonomy node will be added.

taxoNodeName: The name of taxonomy node.

creator: The name of the user creating this node.

void Add a new taxonomy node at the given location.
removeTaxonomyNode(String repository, String workspace, String absPath) throws RepositoryException;

repository: The name of the repository

workspace: The name of the workspace.

absPath: The absolute path of the taxonomy node to remove.

void Remove the taxonomy node located at the given absolute path.
moveTaxonomyNode(String repository, String workspace, String srcPath, String destPath, String type) throws RepositoryException;

repository: The name of the repository.

workspace: The name of the workspace.

srcPath: The source path of this taxonomy.

destPath: The destination path of the taxonomy.

type: If type is equal to cut, the process will be cut. If type is equal to copy, the process will be copied.

void Copy or cut the taxonomy node from the source path to the destination path. The parameter type indicates if the node must be cut or copied.
hasCategories(Node node, String taxonomyName) throws RepositoryException;

node: The node to check.

taxonomyName: The name of the taxonomy.

boolean Return true if the given node has categories in the given taxonomy.
hasCategories((Node node, String taxonomyName, boolean system) throws RepositoryException;

node: The node to check.

taxonomyName: The name of the taxonomy.

system: Check system provider or not.

boolean Return true if the given node has categories in the given taxonomy.
getCategories (Node node, String taxonomyName) throws RepositoryException;

node: The node for which we seek the categories.

taxonomyName: The name of the taxonomy.

List<Node> Return all the paths of the categories (relative to the root node of the given taxonomy) which have been associated to the given node for the given taxonomy.
getCategories(Node node, String taxonomyName, boolean system) throws RepositoryException;

node: The node for which we seek the categories.

taxonomyName: The name of the taxonomy.

system: Check system provider or not.

List<Node> Return all the paths of the categories(relative to the root node of the given taxonomy) which have been associated to the given node for the given taxonomy.
getAllCategories(Node node) throws RepositoryException;

node: The node for which we seek the categories

List<Node> Return all the paths of the categories which have been associated to the given node.
getAllCategories(Node node, boolean system) throws RepositoryException;

node: The node for which we seek the categories

system: Check system provider or not.

List<Node> Return all the paths of the categories which have been associated to the given node.
removeCategory(Node node, String taxonomyName, String categoryPath) throws RepositoryException;

node: The node from which the category is removed.

taxonomyName: The name of the taxonomy.

categoryPath: The path of the category relative to the root node of the given taxonomy

void Remove a category to the given node.
removeCategory(Node node, String taxonomyName, String categoryPath, boolean system) throws RepositoryException;

node: The node from which the category is removed.

taxonomyName: The name of the taxonomy.

categoryPath: The path of the category relative to the root node of the given taxonomy.

system: Check system provider or not.

void Remove a category to the given node.
addCategories(Node node, String taxonomyName, String[] categoryPaths) throws RepositoryException;

node: The node to which we add the categories.

taxonomyName: The name of the taxonomy.

categoryPaths: An array of category paths relative to the given taxonomy.

void Add several categories to the given node.
addCategories(Node node, String taxonomyName, String[] categoryPaths, boolean system) throws RepositoryException;

node: The node to which we add the categories.

taxonomyName: The name of the taxonomy.

categoryPaths: An array of category paths relative to the given taxonomy.

system: Check system provider or not.

void Add several categories to the given node.
addCategory(Node node, String taxonomyName, String categoryPath) throws RepositoryException;

node: The node to which we add the category.

taxonomyName: The name of the taxonomy.

categoryPath: The path of the category relative to the given taxonomy.

void Add a new category path to the given node.
addCategory(Node node, String taxonomyName, String categoryPath, boolean system) throws RepositoryException;

node: The node to which we add the category.

taxonomyName: The name of the taxonomy.

categoryPath: The path of the category relative to the given taxonomy.

system: Check system provider or not.

void Add a new category path to the given node.
getTaxonomyTreeDefaultUserPermission(); N/AMap<String, String[]> Get the default permission for the user in taxonomy tree.
addTaxonomyPlugin(ComponentPlugin plugin); plugin: The plugin to add. void Add a new taxonomy plugin to the service.
init(String repository) throws Exception; repository: The name of repository. void Initialize all taxonomy plugins that have been already configured in .xml files.
getCategoryNameLength(); N/A string Get the limited length of the category name.