org.jasig.portlet.calendar.mvc
Class ThemeNameViewSelectorImpl

java.lang.Object
  extended by org.jasig.portlet.calendar.mvc.ThemeNameViewSelectorImpl
All Implemented Interfaces:
IViewSelector

public class ThemeNameViewSelectorImpl
extends Object
implements IViewSelector

ThemeNameViewSelectorImpl determines appropriate views by examining a "themeName" portlet request property and comparing it to known mobile theme names. This implementation allows the portlet to delegate user agent inspection to the portal and also accounts for a potential user choice to use a portal version that does not match the automatic assignment.

Version:
$Revision: 24414 $
Author:
Jen Bourey, jennifer.bourey@gmail.com

Field Summary
protected static String[] MOBILE_THEMES_DEFAULT
           
protected static String MOBILE_THEMES_KEY
           
protected static String THEME_NAME_PROPERTY
           
 
Constructor Summary
ThemeNameViewSelectorImpl()
           
 
Method Summary
 String getCalendarViewName(javax.portlet.PortletRequest request)
          Return the JSP view name of the main calendar view for this request.
 String getEditViewName(javax.portlet.PortletRequest request)
           
 String getEventListViewName(javax.portlet.PortletRequest request)
          Return the JSP view name of the AJAX event list for this request.
protected  boolean isMobile(javax.portlet.PortletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THEME_NAME_PROPERTY

protected static final String THEME_NAME_PROPERTY
See Also:
Constant Field Values

MOBILE_THEMES_KEY

protected static final String MOBILE_THEMES_KEY
See Also:
Constant Field Values

MOBILE_THEMES_DEFAULT

protected static final String[] MOBILE_THEMES_DEFAULT
Constructor Detail

ThemeNameViewSelectorImpl

public ThemeNameViewSelectorImpl()
Method Detail

getCalendarViewName

public String getCalendarViewName(javax.portlet.PortletRequest request)
Description copied from interface: IViewSelector
Return the JSP view name of the main calendar view for this request.

Specified by:
getCalendarViewName in interface IViewSelector
Returns:

getEditViewName

public String getEditViewName(javax.portlet.PortletRequest request)
Specified by:
getEditViewName in interface IViewSelector

getEventListViewName

public String getEventListViewName(javax.portlet.PortletRequest request)
Description copied from interface: IViewSelector
Return the JSP view name of the AJAX event list for this request.

Specified by:
getEventListViewName in interface IViewSelector
Returns:

isMobile

protected boolean isMobile(javax.portlet.PortletRequest request)


Copyright © 2012 Jasig. All Rights Reserved.