This documentation is for WSO2 Application Server 5.2.0. View documentation for the latest release.
Page Comparison - Managing Tags of a Resource (v.2 vs v.3) - Application Server 5.2.0 - WSO2 Documentation

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

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 the following:

Code Block
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.

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

Deleting a tag

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

Code Block
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:

Code Block