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

Versions Compared

Key

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

Once the Registry instance is in place (embedded registry or remote registry), navigation is straightforward. It is the same as working with the Registry API. If we have a resource called /foo/c1 in the Registry, you can access it using the Registry instance as given below:

Code Block
Resource resource = registry.get("/foo/c1");

The resource object will represent the actual resource object in the Registry. However, if the resource is a collection, then the object will represent the collection.

Info

Once we have a registry instance, we do not need to pass a complete URL for all invocations. It is adequate to pass only a relative path to a resource.

Managing Entries or Content - for information on how to read resources via the Management Console.