org.dspace.app.xmlui.cocoon
Class ThemeMatcher
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.dspace.app.xmlui.cocoon.ThemeMatcher
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.matching.Matcher
public class ThemeMatcher
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements org.apache.cocoon.matching.Matcher
This class determines the correct Aspect to use. This is determined by the
url string, if it is prepended with a number followed by a slash (such as 1/
or 3/) then the Aspect identified by the number is used. When the URL does
not start with an integer then the first Aspect (aspect zero) is loaded.
Once the Aspect has been identified the following sitemap parameters are
provided: {ID} is the Aspect ID, {aspect} is the path to the aspect,
{aspectName} is a unique name for the aspect, and {prefix} is the aspect
identifier prepending the URL (if one exists!).
This class determines the correct Theme to apply to the URL. This is
determined by the Theme rules defined in the xmlui.xml configuration file.
Each rule is evaluated in order and the first rule to match is the selected
Theme.
Once the Theme has been selected the following sitemap parameters are
provided: {themeName} is a unique name for the Theme, and {theme} is the
theme's path.
- Author:
- Scott Phillips
| Fields inherited from interface org.apache.cocoon.matching.Matcher |
ROLE |
|
Method Summary |
Map |
match(String src,
Map objectModel,
org.apache.avalon.framework.parameters.Parameters parameters)
|
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThemeMatcher
public ThemeMatcher()
match
public Map match(String src,
Map objectModel,
org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.cocoon.sitemap.PatternException
- Specified by:
match in interface org.apache.cocoon.matching.Matcher
- Parameters:
pattern - name of sitemap parameter to findobjectModel - environment passed through via cocoon
- Returns:
- null or map containing value of sitemap parameter 'pattern'
- Throws:
org.apache.cocoon.sitemap.PatternException
Copyright © 2010 The DSpace Foundation. All Rights Reserved.