com.fatwire.gst.foundation.taglib
Class MultilingualGsfSimpleTag
java.lang.Object
javax.servlet.jsp.tagext.SimpleTagSupport
com.fatwire.gst.foundation.taglib.GsfSimpleTag
com.fatwire.gst.foundation.taglib.MultilingualGsfSimpleTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
- Direct Known Subclasses:
- MultilingualNavigationTag, TranslateAssetTag, TranslateListTag
public abstract class MultilingualGsfSimpleTag
- extends GsfSimpleTag
simple tag for translating an asset
- Since:
- 2011-11-28
- Author:
- Tony Field
Field Summary |
protected static org.apache.commons.logging.Log |
LOG
|
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.commons.logging.Log LOG
MultilingualGsfSimpleTag
public MultilingualGsfSimpleTag()
setDimset
public final void setDimset(String s)
setLocale
public final void setLocale(String s)
getDimensionFilter
protected final com.fatwire.mda.DimensionFilterInstance getDimensionFilter()
- Return a dimension filter instance corresponding to the dimension set specified by the user (or discovered by
the tag). The dimension filter is configured with the preferred dimensions of the user (also onfigured).
The preferred locales are identified by checking the following locations, in the order specified:
1) set by the locale attribute by id of locale
2) set by locale attribute by name of locale
3) detected by finding the locale dimension id in the ics variable "locale"
4) detected by finding the locale name in the ics variable "locale"
5) detected by finding the locale dimension id in the ics session variable "locale"
6) detected by finding the locale name in the ics session variable "locale"
7) detected by reading the Accept-Language header
The dimension set is identified by checking in the following places, in order:
1) set by the dimset attribute by name of dimension set
2) set by dimset attribute by the id of the dimension set
3) looked up by finding the site name in the ics variable "site" and loading the single dimension set associated with that site
- Returns:
- a dimension filter, configured with the set preferred locales, or null, if either the dimenion set or the
preferred dimensions could not be found (with extensive errors)
getExplicitlySpecifiedLocale
protected final com.fatwire.assetapi.data.AssetId getExplicitlySpecifiedLocale()
- Get the locale that the user explicitly specified. If not set, null is returned.
- Returns:
- the id of the locale that the user explicitly set. Handles setting by name or assetid.
getPreferredLocales
protected final Collection<com.fatwire.assetapi.data.AssetId> getPreferredLocales()
- Get the ordered list of preferred locales that the user wants. Multiple attempts are made to figure out the right locale.
- Returns:
- collection of asset identifiers of the preferred locales
Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.