Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To add a resource to the registry instance, create a Resource object and then pass the created resource object to the registry instance's  put method:1.

  1. Create a collection called "/c1/c2."

    Code Block
    Collection collection = registry.newCollection();

...

...

  1. Call the put method.

    Code Block
    registry.put("/c1/c2", collection);

...

If you call the the get method method, then you will be able to access that created resource. You can also use the set method to set the value of the resource. For example:

Code Block
//set property
registry.setProperty("propertyName", "value")

//get property
registry.getProperty("propertyName");

To add a resource with content, create a Resource object and then set content.

...