Class RESTRegistryService

java.lang.Object
org.exoplatform.services.jcr.ext.registry.RESTRegistryService
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class RESTRegistryService extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
RESTRegistryService is RESTfull service intended to manage registry nodes.
Author:
Andrey Parfonov
  • Constructor Summary

    Constructors
    Constructor
    Description
    RESTRegistryService(RegistryService regService, SessionProviderService sessionProviderService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    createEntry(InputStream entryStream, String groupName, javax.ws.rs.core.UriInfo uriInfo)
    Creates an entry in the group.
    javax.ws.rs.core.Response
    getEntry(String entryPath)
    Returns the corresponding registry entry which wraps a node of type "exo:registryEntry"
    javax.ws.rs.core.Response
    getRegistry(javax.ws.rs.core.UriInfo uriInfo)
    Returns the registry node which wraps a node of type "exo:registry" (the whole registry tree)
    javax.ws.rs.core.Response
    recreateEntry(InputStream entryStream, String groupName, javax.ws.rs.core.UriInfo uriInfo, boolean createIfNotExist)
    Recreates a registry entry
    javax.ws.rs.core.Response
    removeEntry(String entryPath)
    Removes the entry at the given absolute path (concatenation of group path / entry name)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getRegistry

      public javax.ws.rs.core.Response getRegistry(@Context javax.ws.rs.core.UriInfo uriInfo)
      Returns the registry node which wraps a node of type "exo:registry" (the whole registry tree)
      eXo level API
      Experimental
      eXo response for generated doc on REST API
      {code} "entryStream" : the output stream corresponding registry node which wraps a node of type "exo:registry" (the whole registry tree) {code} Example : <registry xlinks:href="http://localhost:8080/portal/rest/registry/"> <GroovyScript2RestLoader xlinks:href="http://localhost:8080/portal/rest/registry/exo:services/GroovyScript2RestLoader"/> <Audit xlinks:href="http://localhost:8080/portal/rest/registry/exo:services/Audit"/> </registry>
    • getEntry

      public javax.ws.rs.core.Response getEntry(String entryPath)
      Returns the corresponding registry entry which wraps a node of type "exo:registryEntry"
      Parameters:
      entryPath - The relative path to the registry entry
      eXo level API
      Experimental
      eXo response for generated doc on REST API
      {code} "entryStream" : the output stream corresponding registry entry which wraps a node of type "exo:registryEntry {code} Example : <Audit jcr:primaryType="exo:registryEntry"> <adminIdentity jcr:primaryType="nt:unstructured" value="*:/Platform/Administrators"/> </Audit>
    • createEntry

      public javax.ws.rs.core.Response createEntry(InputStream entryStream, String groupName, @Context javax.ws.rs.core.UriInfo uriInfo)
      Creates an entry in the group. In a case the group does not exist already it will be automatically created.
      Parameters:
      entryStream - the input stream corresponding to the content of the registry entry
      groupName - the relative path to the group
      eXo level API
      Experimental
      eXo anchor for generated doc on REST API
      {code} "entryStream" : the input stream corresponding to the content of the registry entry {code} Example : <registry xlinks:href="http://localhost:8080/portal/rest/registry/"> <GroovyScript2RestLoader xlinks:href="http://localhost:8080/portal/rest/registry/exo:services/GroovyScript2RestLoader"/> <Audit xlinks:href="http://localhost:8080/portal/rest/registry/exo:services/Audit"/> </registry>
    • recreateEntry

      public javax.ws.rs.core.Response recreateEntry(InputStream entryStream, String groupName, @Context javax.ws.rs.core.UriInfo uriInfo, boolean createIfNotExist)
      Recreates a registry entry
      Parameters:
      entryStream - the input stream corresponding to the content of the registry entry
      groupName - the relative path to the group
      createIfNotExist - if set to true, it will try to create the registry if it doesn't exist yet
      eXo level API
      Experimental
      eXo anchor for generated doc on REST API
      {code} "entryStream" : the input stream corresponding to the content of the registry entry {code} Example : <Audit jcr:primaryType="exo:registryEntry"> <adminIdentity jcr:primaryType="nt:unstructured" value="*:/Platform/Administrators"/> </Audit>
    • removeEntry

      public javax.ws.rs.core.Response removeEntry(String entryPath)
      Removes the entry at the given absolute path (concatenation of group path / entry name)
      Parameters:
      entryPath - the absolute path of the entry to remove
      eXo level API
      Experimental