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 asFrontAwareWorkspaceMatcherbut 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 intgetWildcardStartIndex()In the wildcard expression where to find the first relevant informationprotected WorkspacegetWorkspace(String workspaceName)Get the selected workspaceMapmatch(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:WorkspaceMatcherIn the wildcard expression where to find the first relevant information- Overrides:
getWildcardStartIndexin classWorkspaceMatcher- Returns:
- An integer > 0
-
getWorkspace
protected Workspace getWorkspace(String workspaceName)
Description copied from class:WorkspaceMatcherGet the selected workspace- Overrides:
getWorkspacein 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:
matchin interfaceMatcher- Overrides:
matchin classWorkspaceMatcher- Throws:
PatternException
-
-