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
_repository
The 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 String
getWorkspace()
Returns the current JCR workspaceString[]
getWorkspaces()
Returns the all JCR workspacesvoid
service(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
getWorkspace
public String getWorkspace()
Description copied from interface:WorkspaceSelector
Returns the current JCR workspace- Specified by:
getWorkspace
in interfaceWorkspaceSelector
- Returns:
- the current JCR workspace
-
getWorkspaces
public String[] getWorkspaces() throws RepositoryException
Description copied from interface:WorkspaceSelector
Returns the all JCR workspaces- Specified by:
getWorkspaces
in interfaceWorkspaceSelector
- Returns:
- the available workspaces
- Throws:
RepositoryException
- if an error occurred
-
-