Package org.ametys.web.workspace
Class FrontAwareWorkspaceMatcher
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.matching.AbstractWildcardMatcher
-
- org.apache.cocoon.matching.WildcardURIMatcher
-
- org.ametys.runtime.workspace.WorkspaceMatcher
-
- org.ametys.web.workspace.FrontAwareWorkspaceMatcher
-
- All Implemented Interfaces:
Component
,LogEnabled
,ThreadSafe
,Matcher
public class FrontAwareWorkspaceMatcher extends WorkspaceMatcher
Same asFrontAwareWorkspaceMatcher
but that :
- add an offset in wildcard expression,
- will refuse workspaces that are not front-aware,
- will set the "site" attribute
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.workspace.WorkspaceMatcher
IN_WORKSPACE_URL, WORKSPACE_NAME, WORKSPACE_THEME, WORKSPACE_THEME_URL, WORKSPACE_URI
-
-
Constructor Summary
Constructors Constructor Description FrontAwareWorkspaceMatcher()
-
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
-
-
-
-
Constructor Detail
-
FrontAwareWorkspaceMatcher
public FrontAwareWorkspaceMatcher()
-
-
Method Detail
-
getWildcardStartIndex
protected int getWildcardStartIndex()
Description copied from class:WorkspaceMatcher
In the wildcard expression where to find the first relevant information- Overrides:
getWildcardStartIndex
in classWorkspaceMatcher
- Returns:
- An integer > 0
-
getWorkspace
protected Workspace getWorkspace(String workspaceName)
Description copied from class:WorkspaceMatcher
Get the selected workspace- Overrides:
getWorkspace
in classWorkspaceMatcher
- 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 classWorkspaceMatcher
- Throws:
PatternException
-
-