Class RestRepositoryService
- java.lang.Object
-
- 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
Nested Classes Modifier and Type Class Description static classRestRepositoryService.ConstantsDefinition the constants.
-
Constructor Summary
Constructors Constructor Description RestRepositoryService(org.exoplatform.services.jcr.RepositoryService repositoryService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsecreateRepository(javax.ws.rs.core.UriInfo uriInfo, org.exoplatform.services.jcr.config.RepositoryEntry newRepository)Creates a repository based on the given repository configurationjavax.ws.rs.core.ResponsecreateWorkspace(javax.ws.rs.core.UriInfo uriInfo, String repositoryName, org.exoplatform.services.jcr.config.WorkspaceEntry newWorkspace)Adds a new workspace based on the given configuration to the given repository.javax.ws.rs.core.ResponsegetDefaultWorkspaceConfig(String repositoryName)Gives the configuration of the default workspace of the given repositoryjavax.ws.rs.core.ResponsegetRepositoryNames()Gives the name of all the existing repositories.javax.ws.rs.core.ResponsegetRepositoryServiceConfiguration()Gives the repository service configuration which is composed of the configuration of all the repositories and workspacesjavax.ws.rs.core.ResponsegetWorkspaceNames(String repositoryName)Gives the name of all the existing workspaces for a given repository.javax.ws.rs.core.ResponseremoveRepository(javax.ws.rs.core.UriInfo uriInfo, String repositoryName, Boolean forseSessionClose)Removes an existing repositoryjavax.ws.rs.core.ResponseremoveWorkspace(javax.ws.rs.core.UriInfo uriInfo, String repositoryName, String workspaceName, Boolean forseSessionClose)Removes an existing workspace from a given repository.javax.ws.rs.core.ResponseupdateWorkspaceConfiguration(String repositoryName, String workspaceName, org.exoplatform.services.jcr.config.WorkspaceEntry workspaceEntry)Updates the configuration of a given workspace.
-
-
-
Method Detail
-
getRepositoryServiceConfiguration
@RolesAllowed("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
- eXo level API
- Experimental
- eXo response for generated doc on REST API
- {code:json} {"repositoryEntry": the configuration of the repository } {code}
-
getDefaultWorkspaceConfig
@RolesAllowed("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
- eXo level API
- Experimental
- eXo response for generated doc on REST API
- {code:json} {"workspaceEntry" : the configuration of the default workspace } {code}
-
createRepository
@RolesAllowed("administrators") public javax.ws.rs.core.Response createRepository(@Context javax.ws.rs.core.UriInfo uriInfo, org.exoplatform.services.jcr.config.RepositoryEntry newRepository) throws URISyntaxExceptionCreates a repository based on the given repository configuration- Parameters:
uriInfo- the uri locationnewRepository- the configuration of the new repository- Returns:
- Response return the Response
- Throws:
URISyntaxException- will be generated the URISyntaxException- eXo level API
- Experimental
- eXo anchor for generated doc on REST API
- {code:json} {"newRepository": the configuration of the new repository } {code}
-
createWorkspace
@RolesAllowed("administrators") public javax.ws.rs.core.Response createWorkspace(@Context javax.ws.rs.core.UriInfo uriInfo, String repositoryName, org.exoplatform.services.jcr.config.WorkspaceEntry newWorkspace) throws URISyntaxExceptionAdds a new workspace based on the given configuration to the given repository.- Parameters:
uriInfo- the uri locationrepositoryName- the name of the repositorynewWorkspace- the configuration of the new workspace- Returns:
- Response return the Response
- Throws:
URISyntaxException- will be generated the URISyntaxException- eXo level API
- Experimental
- eXo anchor for generated doc on REST API
- {code:json} {"newWorkspace" : the configuration of the new workspace} {code}
-
removeRepository
@RolesAllowed("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 locationrepositoryName- the name of the repositoryforseSessionClose- a flag indicating whether or not the current sessions must be closed- Returns:
- Response return the Response
- eXo level API
- Experimental
-
removeWorkspace
@RolesAllowed("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 locationrepositoryName- the name of the repositoryworkspaceName- the name of the workspaceforseSessionClose- a flag indicating whether or not the current sessions must be closed- Returns:
- Response return the Response
- eXo level API
- Experimental
-
getRepositoryNames
@RolesAllowed("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
- eXo level API
- Experimental
- eXo response for generated doc on REST API
- {code:json} {"names" : the name of all the existing repositories } {code}
-
getWorkspaceNames
@RolesAllowed("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
- eXo level API
- Experimental
- eXo response for generated doc on REST API
- {code:json} {"names" : the name of all the existing workspaces for a given repository } {code}
-
updateWorkspaceConfiguration
@RolesAllowed("administrators") public javax.ws.rs.core.Response updateWorkspaceConfiguration(String repositoryName, String workspaceName, org.exoplatform.services.jcr.config.WorkspaceEntry workspaceEntry)Updates the configuration of a given workspace.- Parameters:
repositoryName- the name of the repositoryworkspaceName- the name of the workspaceworkspaceEntry- the configuration of the workspace- Returns:
- Response return the Response
- eXo level API
- Unsupported
- eXo anchor for generated doc on REST API
- {code:json} {"workspaceEntry" : the configuration of the workspace} {code}
-
-