|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.endeca.portal.format.Formatter
public abstract class Formatter
Base formatter class that provides read/write interface (getter/setter) for visiting the format settings and the abstract format function.
| Nested Class Summary | |
|---|---|
static class |
Formatter.FormatParseException
|
| Nested classes/interfaces inherited from interface com.endeca.portal.format.FormatSettings |
|---|
FormatSettings.Type |
| Field Summary | |
|---|---|
protected FormatSettings |
parentFormatSettings
|
protected FormatSettings.Type |
type
|
| Constructor Summary | |
|---|---|
Formatter()
|
|
| Method Summary | |
|---|---|
abstract java.lang.String |
format(java.lang.String rawString)
|
java.util.Locale |
getLocale()
|
FormatSettings |
getParentFormatSettings()
|
FormatSettings.Type |
getType()
|
protected void |
loadResources(javax.portlet.PortletRequest request)
Subclasses need to override this method to load resources when needed. |
protected void |
localeChanged()
Subclasses can override this method to clear/reset some cached data that is dependent on locale, for example cached Java format. |
protected void |
parentFormatSettingsChanged()
Subclasses can override this method to clear/reset some cached data that is dependent on parent format settings, for example cached Java format. |
void |
setLocale(java.util.Locale locale)
Retrieve locale for specified locale. |
void |
setLocale(javax.portlet.PortletRequest request)
Retrieve locale and resources from PortletRequest. |
void |
setParentFormatSettings(FormatSettings parentFormatSettings)
Subclasses need to override this method and validate parentFormatSettings. |
void |
setType(FormatSettings.Type type)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected FormatSettings.Type type
protected FormatSettings parentFormatSettings
| Constructor Detail |
|---|
public Formatter()
| Method Detail |
|---|
public java.util.Locale getLocale()
public void setLocale(javax.portlet.PortletRequest request)
request - public void setLocale(java.util.Locale locale)
locale - protected void loadResources(javax.portlet.PortletRequest request)
request - public FormatSettings.Type getType()
getType in interface FormatSettingspublic void setType(FormatSettings.Type type)
public FormatSettings getParentFormatSettings()
public void setParentFormatSettings(FormatSettings parentFormatSettings)
parentFormatSettings - protected void localeChanged()
protected void parentFormatSettingsChanged()
public abstract java.lang.String format(java.lang.String rawString)
throws Formatter.FormatParseException
Formatter.FormatParseExceptionpublic java.lang.String toString()
toString in interface FormatSettingstoString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||