Class DefaultWorkspaceSelector
- java.lang.Object
-
- org.ametys.plugins.repository.provider.DefaultWorkspaceSelector
-
- All Implemented Interfaces:
WorkspaceSelector,Serviceable
public class DefaultWorkspaceSelector extends Object implements WorkspaceSelector, Serviceable
Default implementation of aWorkspaceSelector, always selecting the "default" workspace.
-
-
Field Summary
Fields Modifier and Type Field Description protected Repository_repositoryThe repository.-
Fields inherited from interface org.ametys.plugins.repository.provider.WorkspaceSelector
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultWorkspaceSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetWorkspace()Returns the current JCR workspaceString[]getWorkspaces()Returns the all JCR workspacesvoidservice(ServiceManager smanager)
-
-
-
Field Detail
-
_repository
protected Repository _repository
The repository.
-
-
Constructor Detail
-
DefaultWorkspaceSelector
public DefaultWorkspaceSelector()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getWorkspace
public String getWorkspace()
Description copied from interface:WorkspaceSelectorReturns the current JCR workspace- Specified by:
getWorkspacein interfaceWorkspaceSelector- Returns:
- the current JCR workspace
-
getWorkspaces
public String[] getWorkspaces() throws RepositoryException
Description copied from interface:WorkspaceSelectorReturns the all JCR workspaces- Specified by:
getWorkspacesin interfaceWorkspaceSelector- Returns:
- the available workspaces
- Throws:
RepositoryException- if an error occurred
-
-