com.fatwire.gst.foundation.mobile.action
Class DeviceAwareRenderPageAction
java.lang.Object
com.fatwire.gst.foundation.controller.BaseRenderPage
com.fatwire.gst.foundation.controller.action.RenderPage
com.fatwire.gst.foundation.mobile.action.DeviceAwareRenderPageAction
- All Implemented Interfaces:
- Action
public class DeviceAwareRenderPageAction
- extends RenderPage
RenderPage action extension that handles translations as well as device
detection to direct the visitor to the device specific template.
The
rule is straight forward. If the template is X then a lookup is done if there
is a Template with the name X_mobile and that is used if the visitor is using
a mobile device. The same for _desktop and _tablet. If such a template does
not exist, the 'normal' template is used.
- Author:
- Dolf Dijkstra
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
detector
@InjectForRequest
public DeviceDetector detector
localeService
@InjectForRequest
public LocaleService localeService
DeviceAwareRenderPageAction
public DeviceAwareRenderPageAction()
resolveAssetId
protected AssetIdWithSite resolveAssetId()
- Description copied from class:
BaseRenderPage
- In this method the AssetId and the site are resolved. Based on either
c/cid or the virtual-webroot/url-path arguments the site which this asset
belongs to is discovered from the AssetPublication table.
- Overrides:
resolveAssetId
in class BaseRenderPage
- Returns:
- the AssetId and the site that the asset belongs to.
callTemplate
protected void callTemplate(AssetIdWithSite id,
String tname)
- Overrides:
callTemplate
in class BaseRenderPage
callPage
protected void callPage(AssetIdWithSite id,
String pagename,
String packedArgs)
- Overrides:
callPage
in class BaseRenderPage
findTranslation
protected AssetIdWithSite findTranslation(AssetIdWithSite id)
getPostfix
protected String getPostfix(DeviceType type)
checkForDeviceTName
protected String checkForDeviceTName(AssetIdWithSite id,
String tname,
DeviceType type)
checkForDevicePagename
protected String checkForDevicePagename(AssetIdWithSite id,
String pagename,
DeviceType type)
Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.