org.jasig.portal.url.processing
Class UrlRequestParameterProcessor

java.lang.Object
  extended by org.jasig.portal.url.processing.UrlRequestParameterProcessor
All Implemented Interfaces:
IRequestParameterProcessor

public class UrlRequestParameterProcessor
extends Object
implements IRequestParameterProcessor

This implementation of IRequestParameterProcessor sets the value of specified structure and theme parameters by evaluating RegEx patterns against the request URL. Use capturing groups to specify the information you want; the first capturing group of each expression specifies the value of the parameter.


Constructor Summary
UrlRequestParameterProcessor()
           
 
Method Summary
 boolean processParameters(IWritableHttpServletRequest req, HttpServletResponse res)
          Analyze current request, process necessary URL parameters, delivering information to the appropriate components.
 void setStructureParameters(Map<String,String> params)
          Called by Spring to set the structure parameters that will be processed by this instance.
 void setThemeParameters(Map<String,String> params)
          Called by Spring to set the theme parameters that will be processed by this instance.
 void setUserInstanceManager(IUserInstanceManager uim)
          Called by Spring to inject the IUserInstanceManager dependency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlRequestParameterProcessor

public UrlRequestParameterProcessor()
Method Detail

setUserInstanceManager

public void setUserInstanceManager(IUserInstanceManager uim)
Called by Spring to inject the IUserInstanceManager dependency.

Parameters:
uim - The IUserInstanceManager from which user preferences are accessed

setStructureParameters

public void setStructureParameters(Map<String,String> params)
Called by Spring to set the structure parameters that will be processed by this instance. The key of each entry is the name of a parameter, and the value is a regular expression that will be evaluated against the request URL. Call this method only once per instance.

Parameters:
params - A collection of name/regex pairs that define structure parameters processed by this instance

setThemeParameters

public void setThemeParameters(Map<String,String> params)
Called by Spring to set the theme parameters that will be processed by this instance. The key of each entry is the name of a parameter, and the value is a regular expression that will be evaluated against the request URL. Call this method only once per instance.

Parameters:
params - A collection of name/regex pairs that define theme parameters processed by this instance

processParameters

public boolean processParameters(IWritableHttpServletRequest req,
                                 HttpServletResponse res)
Description copied from interface: IRequestParameterProcessor
Analyze current request, process necessary URL parameters, delivering information to the appropriate components. This method can also add, modify and remove parameters on the request. If the request is not yet in a state where it can be completely processed this method may return false so that it can be called again after other processors have been allowed to execute. Even if false is returned as much processing as possible should happen for each pass.

Specified by:
processParameters in interface IRequestParameterProcessor


Copyright © 2010 Jasig. All Rights Reserved.