eXo JCR :: Component :: Extension Service 1.16.0-CR2

org.exoplatform.services.jcr.ext.registry
Class RESTRegistryService

java.lang.Object
  extended by 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
RESTRegistryService(RegistryService regService, SessionProviderService sessionProviderService)
           
 
Method Summary
 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 Detail

RESTRegistryService

public RESTRegistryService(RegistryService regService,
                           SessionProviderService sessionProviderService)
                    throws Exception
Throws:
Exception
Method Detail

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)


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

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

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

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 JCR :: Component :: Extension Service 1.16.0-CR2

Copyright © 2014 eXo Platform SAS. All Rights Reserved.