Package org.ametys.runtime.workspace
Class WorkspaceMatcher
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.matching.AbstractWildcardMatcher
-
- org.apache.cocoon.matching.WildcardURIMatcher
-
- org.ametys.runtime.workspace.WorkspaceMatcher
-
- All Implemented Interfaces:
Component
,LogEnabled
,ThreadSafe
,Matcher
- Direct Known Subclasses:
FrontAwareWorkspaceMatcher
public class WorkspaceMatcher extends WildcardURIMatcher
Workspace aware Cocoon matcher.
Retrieve workspaces URI from names through the WorkspaceManager.
-
-
Field Summary
Fields Modifier and Type Field Description static String
IN_WORKSPACE_URL
The request attribute name where the current url inside the workspace is savedstatic String
WORKSPACE_NAME
The request attribute name where the current workspace is savedstatic String
WORKSPACE_THEME
The request attribute name where the current workspace theme name is savedstatic String
WORKSPACE_THEME_URL
The request attribute name where the current workspace theme url is savedstatic String
WORKSPACE_URI
The request attribute name where the current workspace uri is saved
-
Constructor Summary
Constructors Constructor Description WorkspaceMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getWildcardStartIndex()
In the wildcard expression where to find the first relevant informationprotected Workspace
getWorkspace(String workspaceName)
Get the selected workspaceMap
match(String pattern, Map objectModel, Parameters parameters)
-
Methods inherited from class org.apache.cocoon.matching.WildcardURIMatcher
getMatchString
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
WORKSPACE_NAME
public static final String WORKSPACE_NAME
The request attribute name where the current workspace is saved- See Also:
- Constant Field Values
-
WORKSPACE_URI
public static final String WORKSPACE_URI
The request attribute name where the current workspace uri is saved- See Also:
- Constant Field Values
-
IN_WORKSPACE_URL
public static final String IN_WORKSPACE_URL
The request attribute name where the current url inside the workspace is saved- See Also:
- Constant Field Values
-
WORKSPACE_THEME
public static final String WORKSPACE_THEME
The request attribute name where the current workspace theme name is saved- See Also:
- Constant Field Values
-
WORKSPACE_THEME_URL
public static final String WORKSPACE_THEME_URL
The request attribute name where the current workspace theme url is saved- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WorkspaceMatcher
public WorkspaceMatcher()
-
-
Method Detail
-
getWildcardStartIndex
protected int getWildcardStartIndex()
In the wildcard expression where to find the first relevant information- Returns:
- An integer > 0
-
getWorkspace
protected Workspace getWorkspace(String workspaceName)
Get the selected workspace- Parameters:
workspaceName
- The workspace name to get- Returns:
- The workspace if it exists and is supported
-
match
public Map match(String pattern, Map objectModel, Parameters parameters) throws PatternException
- Specified by:
match
in interfaceMatcher
- Overrides:
match
in classAbstractWildcardMatcher
- Throws:
PatternException
-
-