org.jasig.portal.url.support
Class ChannelRequestParameterManager

java.lang.Object
  extended by org.jasig.portal.url.support.ChannelRequestParameterManager
All Implemented Interfaces:
IChannelRequestParameterManager

public class ChannelRequestParameterManager
extends Object
implements IChannelRequestParameterManager

Manages access to channel request parameters using a request attribute.

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
protected static String CHANNEL_PARAMETER_MAP_ATTRIBUTE
           
protected static Map<String,Map<String,Object[]>> NO_PARAMETERS
           
 
Constructor Summary
ChannelRequestParameterManager()
           
 
Method Summary
protected  Map<String,Map<String,Object[]>> getAndCheckChannelParameterMaps(HttpServletRequest request)
          Gets the Map of channel parameter Maps from the request, throws a RequestParameterProcessingIncompleteException if no attribute exists in the request and returns null if the NO_PARAMETERS map has been set.
 Map<String,Object[]> getChannelParameters(HttpServletRequest request, String channelId)
          Gets the parameter Map for the specified channel Id for the request.
protected  Map<String,Map<String,Object[]>> getChannelParametersMap(HttpServletRequest request)
          Get the Map of channel parameter Maps from the request, hiding the generics casting warning.
 Set<String> getTargetedChannelIds(HttpServletRequest request)
          Get all channelIds that have had parameters associated with them for this request.
 void setChannelParameters(HttpServletRequest request, String channelId, Map<String,Object[]> parameters)
          Associates the parameter Map with the specified channel ID for the request.
 void setNoChannelParameters(HttpServletRequest request)
          Mark this request as not having any channel request parameters associated with it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANNEL_PARAMETER_MAP_ATTRIBUTE

protected static final String CHANNEL_PARAMETER_MAP_ATTRIBUTE

NO_PARAMETERS

protected static final Map<String,Map<String,Object[]>> NO_PARAMETERS
Constructor Detail

ChannelRequestParameterManager

public ChannelRequestParameterManager()
Method Detail

getChannelParameters

public Map<String,Object[]> getChannelParameters(HttpServletRequest request,
                                                 String channelId)
Description copied from interface: IChannelRequestParameterManager
Gets the parameter Map for the specified channel Id for the request.

Specified by:
getChannelParameters in interface IChannelRequestParameterManager
Parameters:
request - The current request.
channelId - The ID of the channel to get parameters for.
Returns:
The parameter map for the channel id, null if the request did not target the channel.

getTargetedChannelIds

public Set<String> getTargetedChannelIds(HttpServletRequest request)
Description copied from interface: IChannelRequestParameterManager
Get all channelIds that have had parameters associated with them for this request.

Specified by:
getTargetedChannelIds in interface IChannelRequestParameterManager
Parameters:
request - The current request.
Returns:
A Set of channel ids that have had parameters associated with this request.

setChannelParameters

public void setChannelParameters(HttpServletRequest request,
                                 String channelId,
                                 Map<String,Object[]> parameters)
Description copied from interface: IChannelRequestParameterManager
Associates the parameter Map with the specified channel ID for the request.

Specified by:
setChannelParameters in interface IChannelRequestParameterManager
Parameters:
request - The current request.
channelId - The ID of the channel to store parameters for.
parameters - The parameter map for the channel.

setNoChannelParameters

public void setNoChannelParameters(HttpServletRequest request)
Description copied from interface: IChannelRequestParameterManager
Mark this request as not having any channel request parameters associated with it.

Specified by:
setNoChannelParameters in interface IChannelRequestParameterManager
Parameters:
request - The current request.

getAndCheckChannelParameterMaps

protected Map<String,Map<String,Object[]>> getAndCheckChannelParameterMaps(HttpServletRequest request)
Gets the Map of channel parameter Maps from the request, throws a RequestParameterProcessingIncompleteException if no attribute exists in the request and returns null if the NO_PARAMETERS map has been set.

Parameters:
request - Current request.
Returns:
Map of channel ids to parameter Maps, null if NO_PARAMETERS object is set.
Throws:
RequestParameterProcessingIncompleteException - if no channel parameter processing has happened for the request yet.

getChannelParametersMap

protected Map<String,Map<String,Object[]>> getChannelParametersMap(HttpServletRequest request)
Get the Map of channel parameter Maps from the request, hiding the generics casting warning.



Copyright © 2010 Jasig. All Rights Reserved.