org.dspace.app.xmlui.cocoon
Class ThemeMatcher

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by 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 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

Field Summary
 
Fields inherited from interface org.apache.cocoon.matching.Matcher
ROLE
 
Constructor Summary
ThemeMatcher()
           
 
Method Summary
 java.util.Map match(java.lang.String src, java.util.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
 

Constructor Detail

ThemeMatcher

public ThemeMatcher()
Method Detail

match

public java.util.Map match(java.lang.String src,
                           java.util.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:
src - name of sitemap parameter to find (ignored)
objectModel - environment passed through via cocoon
parameters - parameters passed to this matcher in the sitemap
Returns:
null or map containing value of sitemap parameter 'src'
Throws:
org.apache.cocoon.sitemap.PatternException


Copyright © 2010 DuraSpace. All Rights Reserved.