|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.repository.search.indexing.formatter.PropertyFormatterImpl
public class PropertyFormatterImpl
A minimal implementation of a PropertyFormatter
. This
class serves both as the default implementation if no
specific formatter is specified, and a base class which
can be subclassed to custom PropertyFormatters.
Created: April 27 2005
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Constructor Summary | |
---|---|
PropertyFormatterImpl()
|
Method Summary | |
---|---|
protected java.lang.String |
format(java.lang.String pPropertyName,
java.lang.String pOutputPropertyName,
PropertyTypeEnum pType,
java.lang.Object pValue)
Format the specified text or meta property value. |
java.lang.String |
formatMeta(java.lang.String pPropertyName,
java.lang.String pOutputPropertyName,
PropertyTypeEnum pType,
java.lang.Object pValue)
Format the specified meta property value. |
java.lang.String |
formatText(java.lang.String pPropertyName,
java.lang.String pOutputPropertyName,
java.lang.Object pValue)
Format the specified text property value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public PropertyFormatterImpl()
Method Detail |
---|
protected java.lang.String format(java.lang.String pPropertyName, java.lang.String pOutputPropertyName, PropertyTypeEnum pType, java.lang.Object pValue)
formatText(java.lang.String, java.lang.String, java.lang.Object)
and formatMeta(java.lang.String, java.lang.String, atg.repository.search.indexing.specifier.PropertyTypeEnum, java.lang.Object)
methods call through to this
method, so subclasses can simply override this method should
they will to change both behaviors. By default, pValue is converted to a string by invoking pValue.toString(). The only exceptoin is that if the pType is a date or an integer, it will attempt to invite Date.getTime() on date values, and Number.longValue() on numbers to try to extract numeric information.
pPropertyName
- the source name of the propertypOutputPropertyName
- the output property namepPropertyType
- the type of the meta property. Will be
UNKNOWN for text properties.pValue
- the property's value
public java.lang.String formatText(java.lang.String pPropertyName, java.lang.String pOutputPropertyName, java.lang.Object pValue)
formatText
in interface PropertyFormatter
pPropertyName
- the source name of the propertypOutputPropertyName
- the output property namepValue
- the property's value
public java.lang.String formatMeta(java.lang.String pPropertyName, java.lang.String pOutputPropertyName, PropertyTypeEnum pType, java.lang.Object pValue)
formatMeta
in interface PropertyFormatter
pPropertyName
- the source name of the propertypOutputPropertyName
- the output property namepType
- the type of the meta propertypValue
- the property's value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |