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

org.exoplatform.services.jcr.ext.repository
Class RestRepositoryService

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.repository.RestRepositoryService
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class RestRepositoryService
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

Created by The eXo Platform SAS. RestRepositoryService is a RESTfull service allowing to manage the repositories.

Version:
$Id: NamesList.java 111 2008-11-11 11:11:11Z rainf0x $
Author:
Alex Reshetnyak

Nested Class Summary
static class RestRepositoryService.Constants
          Definition the constants.
 
Constructor Summary
RestRepositoryService(RepositoryService repositoryService)
           
 
Method Summary
 javax.ws.rs.core.Response createRepository(javax.ws.rs.core.UriInfo uriInfo, RepositoryEntry newRepository)
          Creates a repository based on the given repository configuration
 javax.ws.rs.core.Response createWorkspace(javax.ws.rs.core.UriInfo uriInfo, String repositoryName, WorkspaceEntry newWorkspace)
          Adds a new workspace based on the given configuration to the given repository.
 javax.ws.rs.core.Response getDefaultWorkspaceConfig(String repositoryName)
          Gives the configuration of the default workspace of the given repository
 javax.ws.rs.core.Response getRepositoryNames()
          Gives the name of all the existing repositories.
 javax.ws.rs.core.Response getRepositoryServiceConfiguration()
          Gives the repository service configuration which is composed of the configuration of all the repositories and workspaces
 javax.ws.rs.core.Response getWorkspaceNames(String repositoryName)
          Gives the name of all the existing workspaces for a given repository.
 javax.ws.rs.core.Response removeRepository(javax.ws.rs.core.UriInfo uriInfo, String repositoryName, Boolean forseSessionClose)
          Removes an existing repository
 javax.ws.rs.core.Response removeWorkspace(javax.ws.rs.core.UriInfo uriInfo, String repositoryName, String workspaceName, Boolean forseSessionClose)
          Removes an existing workspace from a given repository.
 javax.ws.rs.core.Response updateWorkspaceConfiguration(String repositoryName, String workspaceName, WorkspaceEntry workspaceEntry)
          Updates the configuration of a given workspace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestRepositoryService

public RestRepositoryService(RepositoryService repositoryService)
Parameters:
repositoryService -
Method Detail

getRepositoryServiceConfiguration

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response getRepositoryServiceConfiguration()
Gives the repository service configuration which is composed of the configuration of all the repositories and workspaces

Returns:
Response return the Response with RepositoryServiceConf

getDefaultWorkspaceConfig

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response getDefaultWorkspaceConfig(String repositoryName)
Gives the configuration of the default workspace of the given repository

Parameters:
repositoryName - the name of the repository
Returns:
Response return the Response with WorkspaceEntry

createRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response createRepository(@Context
                                                               javax.ws.rs.core.UriInfo uriInfo,
                                                               RepositoryEntry newRepository)
                                           throws URISyntaxException
Creates a repository based on the given repository configuration

Parameters:
uriInfo - the uri location
newRepository - the configuration of the new repository
Returns:
Response return the Response
Throws:
URISyntaxException - will be generated the URISyntaxException

createWorkspace

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response createWorkspace(@Context
                                                              javax.ws.rs.core.UriInfo uriInfo,
                                                              String repositoryName,
                                                              WorkspaceEntry newWorkspace)
                                          throws URISyntaxException
Adds a new workspace based on the given configuration to the given repository.

Parameters:
uriInfo - the uri location
repositoryName - the name of the repository
newWorkspace - the configuration of the new workspace
Returns:
Response return the Response
Throws:
URISyntaxException - will be generated the URISyntaxException

removeRepository

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response removeRepository(@Context
                                                               javax.ws.rs.core.UriInfo uriInfo,
                                                               String repositoryName,
                                                               Boolean forseSessionClose)
Removes an existing repository

Parameters:
uriInfo - the uri location
repositoryName - the name of the repository
forseSessionClose - a flag indicating whether or not the current sessions must be closed
Returns:
Response return the Response

removeWorkspace

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response removeWorkspace(@Context
                                                              javax.ws.rs.core.UriInfo uriInfo,
                                                              String repositoryName,
                                                              String workspaceName,
                                                              Boolean forseSessionClose)
Removes an existing workspace from a given repository.

Parameters:
uriInfo - the uri location
repositoryName - the name of the repository
workspaceName - the name of the workspace
forseSessionClose - a flag indicating whether or not the current sessions must be closed
Returns:
Response return the Response

getRepositoryNames

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response getRepositoryNames()
Gives the name of all the existing repositories.

Returns:
Response return the Response with list of repository names

getWorkspaceNames

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response getWorkspaceNames(String repositoryName)
Gives the name of all the existing workspaces for a given repository.

Parameters:
repositoryName - the name of the repository
Returns:
Response return the Response with list of workspace names

updateWorkspaceConfiguration

@RolesAllowed(value="administrators")
public javax.ws.rs.core.Response updateWorkspaceConfiguration(String repositoryName,
                                                                           String workspaceName,
                                                                           WorkspaceEntry workspaceEntry)
Updates the configuration of a given workspace.

Parameters:
repositoryName - the name of the repository
workspaceName - the name of the workspace
workspaceEntry - the configuration of the workspace
Returns:
Response return the Response

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

Copyright © 2014 eXo Platform SAS. All Rights Reserved.