public class RequestAttributeWorkspaceSelector extends Object implements LogEnabled, Contextualizable, WorkspaceSelector, Serviceable
Modifier and Type | Field and Description |
---|---|
private static String |
__WORKSPACE_ATTRIBUTE |
private Context |
_context |
private Logger |
_logger |
protected Repository |
_repository
The repository.
|
ROLE
Constructor and Description |
---|
RequestAttributeWorkspaceSelector() |
Modifier and Type | Method and Description |
---|---|
void |
contextualize(Context context) |
void |
enableLogging(Logger logger) |
static String |
getForcedWorkspace(Request request)
Retrieves the workspace forced.
|
String |
getWorkspace()
Returns the current JCR workspace
|
String[] |
getWorkspaces()
Returns the all JCR workspaces
|
void |
service(ServiceManager smanager) |
static void |
setForcedWorkspace(Request request,
String workspaceName)
Forces the workspace to use.
|
private static final String __WORKSPACE_ATTRIBUTE
protected Repository _repository
public RequestAttributeWorkspaceSelector()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
public static void setForcedWorkspace(Request request, String workspaceName)
request
- the current requestworkspaceName
- the workspace name.public static String getForcedWorkspace(Request request)
request
- the current requestnull
for the default one.public String getWorkspace()
WorkspaceSelector
getWorkspace
in interface WorkspaceSelector
public String[] getWorkspaces() throws RepositoryException
WorkspaceSelector
getWorkspaces
in interface WorkspaceSelector
RepositoryException
- if an error occurred