This documentation is for WSO2 Application Server 5.2.0. View documentation for the latest release.
Managing Tags of a Resource - Application Server 5.2.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »



Adding a Tag

You can perform tagging operations using the registry. To tag a resource, you need the resource path and the tagging words. For example, to tag a resource named "/c1/c2/r2" as "rename resource," do this as follows:

registry.applyTag("/c1/c2/r2" , "rename resource");

Retrieving All Tags of a Given Resource

You can use the registry to retrieve tags for a given resource. It will return an array of type Tag and you can iterate the array to see the content.

Tag[] tags = registry.getTags("/c1/c2/r2");

Deleting a Tag

You can remove a tag using the tag name. Use the following code:

registry.removeTag("/c1/c2/r2","rename resource");

Retrieving Resources with a Specific Tag

Resources that have a specific tag can be retrieved using the following code:

registry.getResourcePathsWithTag("wso2");

 

See also Searching by Tags to learn more information about tags in the Management Console.

  • No labels