com.endeca.portal.format
Class BooleanFormatter
java.lang.Object
com.endeca.portal.format.Formatter
com.endeca.portal.format.BooleanFormatter
- All Implemented Interfaces:
- BooleanFormatSettings, FormatSettings, java.io.Serializable
public class BooleanFormatter
- extends Formatter
- implements BooleanFormatSettings
Formatter for formatting Boolean type based on locale and format settings.
If the value of a format setting is DEFAULT, the value of the format setting of its parent will be used if it is not DEFAULT.
Otherwise, system default value of that format setting will be used.
The default true/false values are locale sensitive, therefore the string resources are stored in a resource bundle.
It is caller's responsibility to call setLocalizedDefaultValues() to pass in the localized resources.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_DISPLAY_OPTION
public static final BooleanFormatSettings.DisplayOption DEFAULT_DISPLAY_OPTION
BooleanFormatter
public BooleanFormatter()
loadResources
protected void loadResources(javax.portlet.PortletRequest request)
- Description copied from class:
Formatter
- Subclasses need to override this method to load resources when needed.
- Overrides:
loadResources in class Formatter
getDisplayOption
public BooleanFormatSettings.DisplayOption getDisplayOption()
- Specified by:
getDisplayOption in interface BooleanFormatSettings
setDisplayOption
public void setDisplayOption(BooleanFormatSettings.DisplayOption displayOption)
getMergedDisplayOption
public BooleanFormatSettings.DisplayOption getMergedDisplayOption()
- Specified by:
getMergedDisplayOption in interface BooleanFormatSettings
getCustomTrueValue
public java.lang.String getCustomTrueValue()
- Specified by:
getCustomTrueValue in interface BooleanFormatSettings
setCustomTrueValue
public void setCustomTrueValue(java.lang.String trueValue)
getMergedTrueValue
public java.lang.String getMergedTrueValue()
- Specified by:
getMergedTrueValue in interface BooleanFormatSettings
getCustomFalseValue
public java.lang.String getCustomFalseValue()
- Specified by:
getCustomFalseValue in interface BooleanFormatSettings
setCustomFalseValue
public void setCustomFalseValue(java.lang.String falseValue)
getMergedFalseValue
public java.lang.String getMergedFalseValue()
- Specified by:
getMergedFalseValue in interface BooleanFormatSettings
format
public java.lang.String format(java.lang.String s)
- Specified by:
format in class Formatter
format
public java.lang.String format(boolean b)
- Format a boolean value