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 ServiceableServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void enableLogging(Logger logger)
enableLogging in interface LogEnabledpublic 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()
WorkspaceSelectorgetWorkspace in interface WorkspaceSelectorpublic String[] getWorkspaces() throws RepositoryException
WorkspaceSelectorgetWorkspaces in interface WorkspaceSelectorRepositoryException - if an error occurred