com.jalios.jcms
Class TypeFieldEntry

java.lang.Object
  extended by com.jalios.jcms.TypeFieldEntry

public class TypeFieldEntry
extends Object

This class holds all informations of a type's field.

Version:
$Revision: 57410 $
Author:
Jean-Philippe Encausse , Olivier Jaquemet

Field Summary
protected  int abstractLength
           
protected  String chooser
           
protected  int cols
           
protected  String dataSource
           
protected  String dateFormat
           
protected  String dbrColumns
           
protected  String dbrKeyCol
           
protected  String dbrLabelCol
           
protected  String dbrOrderBy
           
protected  String dbrTable
           
protected  int decimals
           
protected  HashMap defaultTextMap
           
protected  String defaultValue
           
protected  Map descriptionMap
           
protected  String editor
           
protected  String[] enumerateLabels
           
protected  boolean enumerateML
           
protected  String[] enumerateValues
           
protected  boolean escapeHtml
           
protected  boolean fieldML
           
protected  boolean fieldWiki
           
protected  boolean fieldWikiwyg
           
protected  String[] gids
           
protected  boolean isAbstract
           
protected  boolean isDataImage
           
protected  boolean isDateOnly
           
protected  boolean isDisplayRoot
           
protected  boolean isEnumerate
           
protected  boolean isExclusive
           
protected  boolean isHidden
           
protected  boolean isImageMap
           
protected  boolean isInline
           
protected  boolean isKeyword
           
protected  boolean isOpenWindow
           
protected  boolean isRequired
           
protected  boolean isResize
           
protected  boolean isSearchable
           
protected  boolean isSuper
           
protected  boolean isTypeArray
           
protected  boolean isTypeBoolean
           
protected  boolean isTypeBooleanArray
           
protected  boolean isTypeCategory
           
protected  boolean isTypeDate
           
protected  boolean isTypeDateArray
           
protected  boolean isTypeDocument
           
protected  boolean isTypeDocumentMV
           
protected  boolean isTypeDouble
           
protected  boolean isTypeDoubleArray
           
protected  boolean isTypeInt
           
protected  boolean isTypeIntArray
           
protected  boolean isTypeList
           
protected  boolean isTypeLong
           
protected  boolean isTypeLongArray
           
protected  boolean isTypePrimitive
           
protected  boolean isTypePrimitiveArray
           
protected  boolean isTypePublication
           
protected  boolean isTypePublicationArray
           
protected  boolean isTypePublicationMV
           
protected  boolean isTypeScalar
           
protected  boolean isTypeSet
           
protected  boolean isTypeString
           
protected  boolean isTypeStringArray
           
protected  boolean isWidget
           
protected  boolean isWysiwyg
           
protected  Map labelMap
           
protected  int maxlength
           
protected  int maxRows
           
protected  Number maxValue
           
protected  Number minValue
           
protected  String name
           
protected  String nameCap
           
protected  Map offLabelMap
           
protected  Map onLabelMap
           
protected  int resizeHeight
           
protected  int resizeWidth
           
static String REVISION
           
protected  String root
           
protected  int rows
           
protected  int size
           
protected  String tab
           
protected  String tabGroup
           
protected  String type
           
protected  Class typeClass
           
protected  String typeShort
           
protected  String unit
           
protected  String unitAfter
           
protected  String unitBefore
           
protected  int widgetDescription
           
protected  int widgetEditor
           
protected  String wysiwygParams
           
protected  org.jdom.Element xmlElt
           
 
Constructor Summary
TypeFieldEntry(org.jdom.Element xmlElement)
           
 
Method Summary
 boolean escapeHtml()
          Returns true if the HTML contained in this field must be escaped.
 int getAbstractLength()
          Abstract/Summary length
 boolean getBoolean(Data data)
          Gets the value of this boolean field for the given Data.
 TreeSet getCategory(Data data, Member mbr)
          Gets the value of the given Category field name for the given Data.
 String getChooser()
          Return the internal "chooser" of this field.
 String getCollectionTypeMapping()
           
 int getCols()
          TextInput/TextArea columns number.
 String getDataSource()
          SQLQuery/DBRecord/SQLResult: data source of this SQL related field.
 String getDateFormat()
          DateChooser: date format
 String getDbrColumns()
          DBRecord: columns to be listed for this DB record field (coma separated)
 String getDbrKeyCol()
          DBRecord: primary key column of this DB record field.
 String getDbrLabelCol()
          DBRecord: column used as label for this DB record field
 String getDbrOrderBy()
          DBRecord: ORDER BY SQL criteria DB record field
 String getDbrTable()
          DBRecord: table of this DB record field.
 int getDecimals()
          Double decimals count
 HashMap getDefaultTextMap()
          Returns a copy of the language map of default value for this textual field.
 String getDefaultTextString()
          Returns the default value (in the main language) of this textual field.
 String getDefaultValue()
          Default value of field that can be expressed/converted into a string.
 String getDescription()
          Deprecated. since jcms-5.7.0.
 String getDescription(String lang)
          Returns the localized description of this field.
 Map getDescriptionMap()
          Returns the localized map of description of this field.
 double getDouble(Data data)
          Gets the value of this double field for the given Data.
 String getEditor()
          Return the internal editor type of this field.
 String[] getEnumerateLabels()
          Enumerate: Labels of the current field, e.g { "Red", "Green", "Blue"} for the default language of the type/site.
 String[] getEnumerateValues()
          Enumerate: Values of the current field, e.g { "00FF00", "00FF00", "0000FF"}.
 String getFieldValueAsString(Data data, String lang)
          Gets value of the field as String for field of the following type: int long double boolean String
 String[] getFieldValueAsStringArray(Data data, String lang)
          Gets value of the field as String[] for field of the following type: int[] long[] double[] boolean[] String[] List Set
 String[] getGids()
          Member chooser: Group IDs
 int getInt(Data data)
          Gets the value of this int field for the given Data.
 String getLabel()
          Deprecated. since jcms-5.7.0.
 String getLabel(String lang)
          Returns the localized label of this field.
 Map getLabelMap()
          Returns the Map of localized label of this field.
 long getLong(Data data)
          Gets the value of this long field for the given Data.
 int getMaxlength()
          TextInput maximum length.
 int getMaxRows()
          SQLQuery/DBRecord/SQLResult: maximum row to be retrieved (0 means no limit)
 Number getMaxValue()
          Returns the maximum value authorized for this number field (integer or decimal), if available.
 Number getMinValue()
          Returns the mininum value authorized for this number field (integer or decimal), if available.
 String getName()
          Java name of this field.
 String getNameCap()
          Recapitalized java name of this field, (first letter capitalized).
 Object getObject(Data data)
          Gets the value of this Object field for the given Data.
 Object getObject(Data data, String lang)
          Gets the value of this Object field for the given Data.
 String getOffLabel(String lang)
          Returns the localized offLabel for to this field.
 Map getOffLabelMap()
          Boolean: false/OFF Label of a boolean field.
 String getOnLabel(String lang)
          Returns the localized onLabel for to this field.
 Map getOnLabelMap()
          Boolean: true/ON Label of a boolean field.
 int getResizeHeight()
          Returns the resize height
 int getResizeWidth()
          Returns the resize width
 String getRoot()
          Categories: Root Category ID of this category field
 int getRows()
          TextArea/WYSIWYG rows number.
 int getSize()
          Enumerate: html Select size.
 String getTab()
          Tab: tab name in which this field will be displayed.
 String getTabGroup()
          TabGroup: group name for multivalued fields, all field having the same value will be display together.
 String getType()
          Retrieve type of this field as String.
 String getTypeShort()
          Short type of this field.
 String getUnit()
          TextInput unit
e.g.
 String getUnitAfter()
          TextInput unit, displayed after input.
 String getUnitBefore()
          TextInput unit, displayed before input.
 int getWidgetDescription()
          Type of description to be used by widget: AbstractWidget.UI_DESCRIPTION_NONE AbstractWidget.UI_DESCRIPTION_TEXT AbstractWidget.UI_DESCRIPTION_TOOLTIP
 int getWidgetEditor()
          Type of widget editor.
 String getWysiwygParams()
          WYSIWYG toolbar options.
 org.jdom.Element getXmlElement()
          XML Parsing: jdom Element for this field.
protected  void initDefault()
          Init the default value.
protected  void initDescription()
           
protected  void initEnumerate()
          Init the enumerate values.
protected  void initUnits()
          Init the field units
protected  void initWidgetEditor()
          Find the right Widget editor
 boolean isAbstract()
          Abstract/Summary field?
 boolean isAnyLink()
          Is field's editor any type of link (i.e.
 boolean isCatEditor()
          Widget Type.
 boolean isCatTreeEditor()
          Widget Type.
 boolean isDataImage()
          Image field?
 boolean isDateChsr()
          Widget Type.
 boolean isDateOnly()
          DateChooser: use date only, or date and time?
 boolean isDBRecordChsr()
          Widget Type.
 boolean isDisplayRoot()
          Categories: Display Root
 boolean isEnumerate()
          Enumerate.
 boolean isEnumerateML()
          Enumerate: multilanguage.
 boolean isExclusive()
          Categories: Exclusive.
 boolean isFieldML()
           
 boolean isFieldWiki()
          TextArea.
 boolean isFieldWikiwyg()
          TextArea.
 boolean isGrpChsr()
          Widget Type.
 boolean isGrpEnum()
          Widget Type.
 boolean isHidden()
          Hidden field?
 boolean isImageMap()
          Returns true if this is an image field with imageMap option enabled.
 boolean isInline()
          Inline editing ?
 boolean isKeyword()
          Return true if the field display keywords
 boolean isLink()
          Is field's editor a link (as opposed to a chooser for example).
 boolean isMasterImageMap()
          Returns true if this field is the image field of an image map field.
 boolean isMbrChsr()
          Widget Type.
 boolean isMbrEnum()
          Widget Type.
 boolean isOpenWindow()
          Returns true if this is an URL field which must be open in a new window.
 boolean isRequired()
          Required field?
 boolean isResize()
          Returns true if this is an image field which must be resized.
 boolean isSearchable()
          Searchable field
 boolean isSimpleString()
           
 boolean isSlaveImageMap()
          Returns true if this field is the text area field generated aside the real image field.
Warning: this field was not really saved in the type's xml, but is instead only created at JSP generation time.
 boolean isSQLQuery()
          Widget Type.
 boolean isSuper()
           
 boolean isTypeArray()
           
 boolean isTypeBoolean()
          Type: boolean?
 boolean isTypeBooleanArray()
          Type: boolean[]?
 boolean isTypeCategory()
           
 boolean isTypeCollection()
           
 boolean isTypeDate()
          Type: Date?
 boolean isTypeDateArray()
          Type: Date[]?
 boolean isTypeDocument()
          Type: FileDocument? or DBFileDocument?
 boolean isTypeDocumentMV()
          Type: FileDocument MV? or DBFileDocument MV?
 boolean isTypeDouble()
          Type: double?
 boolean isTypeDoubleArray()
          Type: double[]?
 boolean isTypeInt()
          Type: int?
 boolean isTypeIntArray()
          Type: int[]?
 boolean isTypeList()
           
 boolean isTypeLong()
          Type: long?
 boolean isTypeLongArray()
          Type: long[]?
 boolean isTypeMV()
           
 boolean isTypePrimitive()
           
 boolean isTypePrimitiveArray()
           
 boolean isTypePublication()
          Type: Publication?
 boolean isTypePublicationArray()
          Type: Publication[]?
 boolean isTypePublicationMV()
          Type: Publication MV
 boolean isTypeScalar()
           
 boolean isTypeSet()
           
 boolean isTypeString()
          Type: String?
 boolean isTypeStringArray()
          Type: String[]?
 boolean isUrl()
          URL.
 boolean isWidget()
          Is this field manage through a widget
 boolean isWysiwyg()
          Wysiwyg.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

xmlElt

protected final org.jdom.Element xmlElt

type

protected String type

typeShort

protected String typeShort

typeClass

protected Class typeClass

isTypeInt

protected boolean isTypeInt

isTypeIntArray

protected boolean isTypeIntArray

isTypeLong

protected boolean isTypeLong

isTypeLongArray

protected boolean isTypeLongArray

isTypeDouble

protected boolean isTypeDouble

isTypeDoubleArray

protected boolean isTypeDoubleArray

isTypeBoolean

protected boolean isTypeBoolean

isTypeBooleanArray

protected boolean isTypeBooleanArray

isTypePrimitive

protected boolean isTypePrimitive

isTypePrimitiveArray

protected boolean isTypePrimitiveArray

isTypeString

protected boolean isTypeString

isTypeStringArray

protected boolean isTypeStringArray

isTypeDate

protected boolean isTypeDate

isTypeDateArray

protected boolean isTypeDateArray

isTypeArray

protected boolean isTypeArray

isTypeList

protected boolean isTypeList

isTypeSet

protected boolean isTypeSet

isTypeScalar

protected boolean isTypeScalar

isTypePublication

protected boolean isTypePublication

isTypePublicationArray

protected boolean isTypePublicationArray

isTypePublicationMV

protected boolean isTypePublicationMV

isTypeDocument

protected boolean isTypeDocument

isTypeDocumentMV

protected boolean isTypeDocumentMV

isTypeCategory

protected boolean isTypeCategory

isEnumerate

protected boolean isEnumerate

isWidget

protected boolean isWidget

isWysiwyg

protected boolean isWysiwyg

labelMap

protected Map labelMap

editor

protected String editor

name

protected String name

nameCap

protected String nameCap

tab

protected String tab

descriptionMap

protected Map descriptionMap

widgetEditor

protected int widgetEditor

widgetDescription

protected int widgetDescription

isSuper

protected boolean isSuper

isRequired

protected boolean isRequired

isInline

protected boolean isInline

isHidden

protected boolean isHidden

isAbstract

protected boolean isAbstract

abstractLength

protected int abstractLength

isDataImage

protected boolean isDataImage

isSearchable

protected boolean isSearchable

isKeyword

protected boolean isKeyword

fieldML

protected boolean fieldML

fieldWiki

protected boolean fieldWiki

fieldWikiwyg

protected boolean fieldWikiwyg

cols

protected int cols

maxlength

protected int maxlength

rows

protected int rows

size

protected int size

enumerateLabels

protected String[] enumerateLabels

enumerateValues

protected String[] enumerateValues

enumerateML

protected boolean enumerateML

dataSource

protected String dataSource

maxRows

protected int maxRows

dbrTable

protected String dbrTable

dbrKeyCol

protected String dbrKeyCol

dbrColumns

protected String dbrColumns

dbrLabelCol

protected String dbrLabelCol

dbrOrderBy

protected String dbrOrderBy

isDateOnly

protected boolean isDateOnly

dateFormat

protected String dateFormat

wysiwygParams

protected String wysiwygParams

tabGroup

protected String tabGroup

onLabelMap

protected Map onLabelMap

offLabelMap

protected Map offLabelMap

unit

protected String unit

unitAfter

protected String unitAfter

unitBefore

protected String unitBefore

decimals

protected int decimals

root

protected String root

isExclusive

protected boolean isExclusive

isDisplayRoot

protected boolean isDisplayRoot

chooser

protected String chooser

gids

protected String[] gids

defaultValue

protected String defaultValue

defaultTextMap

protected HashMap defaultTextMap

isImageMap

protected boolean isImageMap

isOpenWindow

protected boolean isOpenWindow

isResize

protected boolean isResize

resizeWidth

protected int resizeWidth

resizeHeight

protected int resizeHeight

escapeHtml

protected boolean escapeHtml

minValue

protected Number minValue

maxValue

protected Number maxValue
Constructor Detail

TypeFieldEntry

public TypeFieldEntry(org.jdom.Element xmlElement)
Method Detail

initEnumerate

protected void initEnumerate()
Init the enumerate values.


initUnits

protected void initUnits()
Init the field units


initDefault

protected void initDefault()
Init the default value.


initWidgetEditor

protected void initWidgetEditor()
Find the right Widget editor


initDescription

protected void initDescription()

toString

public String toString()
Overrides:
toString in class Object

getXmlElement

public org.jdom.Element getXmlElement()
XML Parsing: jdom Element for this field.
Access, but do not modify.

Returns:
the Element of this field.

getInt

public int getInt(Data data)
           throws NoSuchFieldException
Gets the value of this int field for the given Data.

Parameters:
data - the Data from which to retrieve the field value.
Returns:
the int field value
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getIntFieldValue(String)

getLong

public long getLong(Data data)
             throws NoSuchFieldException
Gets the value of this long field for the given Data.

Parameters:
data - the Data from which to retrieve the field value.
Returns:
the long field value
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getLongFieldValue(String)

getDouble

public double getDouble(Data data)
                 throws NoSuchFieldException
Gets the value of this double field for the given Data.

Parameters:
data - the Data from which to retrieve the field value.
Returns:
the double field value
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getDoubleFieldValue(String)

getBoolean

public boolean getBoolean(Data data)
                   throws NoSuchFieldException
Gets the value of this boolean field for the given Data.

Parameters:
data - the Data from which to retrieve the field value.
Returns:
the boolean field value
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getBooleanFieldValue(String)

getCategory

public TreeSet getCategory(Data data,
                           Member mbr)
                    throws NoSuchFieldException
Gets the value of the given Category field name for the given Data.

Parameters:
data - the Data from which to retrieve the field value.
mbr - the member used to check rigth access to categories.
Returns:
a TreeSet of Category
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getCategoryFieldValue(String, Member)

getObject

public Object getObject(Data data)
                 throws NoSuchFieldException
Gets the value of this Object field for the given Data.
If the field is multilingual, the default language will be used.
Do not retrieve Category fields, see #getCategory(Member).

Parameters:
data - the Data from which to retrieve the field value.
Returns:
the Object field value
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getFieldValue(String)

getObject

public Object getObject(Data data,
                        String lang)
                 throws NoSuchFieldException
Gets the value of this Object field for the given Data.
If the field is multilingual, the given language will be used.
Do not retrieve Category fields, see #getCategory(Member).

Parameters:
data - the Data from which to retrieve the field value.
lang - the language (ISO 639: 2-letter codes) in which to retrieve the field value (used only for multilingual fields).
Returns:
the Object field value
Throws:
NoSuchFieldException - if the field was not found in the given Data.
NullPointerException - if the given Data is null.
See Also:
Data.getFieldValue(String, String)

getFieldValueAsString

public String getFieldValueAsString(Data data,
                                    String lang)
                             throws NoSuchFieldException
Gets value of the field as String for field of the following type:
  • int
  • long
  • double
  • boolean
  • String
  • Parameters:
    data - the data from which to retrive the given field
    lang - the lang in which to retrieve the field if multilang
    Returns:
    the value of this field as a String, null if the field value cannot be converted to the type String.
    Throws:
    NoSuchFieldException - if the field was not found in the given Data.

    getFieldValueAsStringArray

    public String[] getFieldValueAsStringArray(Data data,
                                               String lang)
                                        throws NoSuchFieldException
    Gets value of the field as String[] for field of the following type:
  • int[]
  • long[]
  • double[]
  • boolean[]
  • String[]
  • List
  • Set
  • Parameters:
    data - the data from which to retrive the given field
    lang - the lang in which to retrieve the field, if field is multi-lang
    Returns:
    the value of this field as a String[], null if the field value cannot be converted to the type String[].
    Throws:
    NoSuchFieldException - if the field was not found in the given Data.

    getLabel

    @Deprecated
    public String getLabel()
    Deprecated. since jcms-5.7.0.

    Returns the label of this field (localized in the main language).

    Returns:
    the label of this field (localized in the main language).
    See Also:
    getLabel(String)

    getLabel

    public String getLabel(String lang)
    Returns the localized label of this field.

    Parameters:
    lang - the language
    Returns:
    the localized label of this field.
    Since:
    jcms-5.7.0

    getLabelMap

    public Map getLabelMap()
    Returns the Map of localized label of this field.

    Returns:
    the Map of localized label of this field.
    Since:
    jcms-5.7.0

    getName

    public String getName()
    Java name of this field. e.g. "intro".

    Returns:
    the java name of this field as a String

    getNameCap

    public String getNameCap()
    Recapitalized java name of this field, (first letter capitalized). e.g. "Intro".

    Returns:
    the recapitalized java name of this field as a String

    getDescription

    @Deprecated
    public String getDescription()
    Deprecated. since jcms-5.7.0.

    Returns the description of this field (localized in the main language).

    Returns:
    the description of this field (localized in the main language).
    See Also:
    getDescription(String)

    getDescription

    public String getDescription(String lang)
    Returns the localized description of this field.

    Parameters:
    lang - the language
    Returns:
    the localized description of this field.
    Since:
    jcms-5.7.0

    getDescriptionMap

    public Map getDescriptionMap()
    Returns the localized map of description of this field.

    Returns:
    the localized map of description of this field.
    Since:
    jcms-5.7.0

    getType

    public String getType()
    Retrieve type of this field as String.
    Can be one of these values:
  • "int", "int[]"
  • "long", "long[]"
  • "double", "double[]"
  • "boolean", "boolean[]"
  • "String", "String[]"
  • "java.util.Date", "java.util.Date[]"

  • And also any types supported by JCMS (list not exhaustive):
  • "com.jalios.jcms.Publication", "com.jalios.jcms.Publication[]" and its subclasses
  • "com.jalios.jcms.Content", "com.jalios.jcms.Content[]" and its subclasses
  • "com.jalios.jcms.portlet.PortalElement", "com.jalios.jcms.portlet.PortalElement[]"
  • "com.jalios.jcms.Group", "com.jalios.jcms.Group[]"
  • "com.jalios.jcms.Member", "com.jalios.jcms.Member[]"
  • "java.util.TreeSet"(for Categories)

  • The value "super" marks the place (for the edit form) where the inherited field are located.

    Returns:
    the type of this field as a String or "super" if this field mark the place of inherited fields.

    getTypeShort

    public String getTypeShort()
    Short type of this field. e.g. if type is "String[]" or "List", short type is "String".

    Returns:
    the type of this field as a String if any, or "super" if this field mark the place of inherited fields.
    See Also:
    getType()

    getCollectionTypeMapping

    public String getCollectionTypeMapping()

    isTypeInt

    public boolean isTypeInt()
    Type: int?

    Returns:
    true if this field is an int.
    See Also:
    getType()

    isTypeIntArray

    public boolean isTypeIntArray()
    Type: int[]?

    Returns:
    true if this field is an int[].
    See Also:
    getType()

    isTypeLong

    public boolean isTypeLong()
    Type: long?

    Returns:
    true if this field is an long.
    See Also:
    getType()

    isTypeLongArray

    public boolean isTypeLongArray()
    Type: long[]?

    Returns:
    true if this field is an long[].
    See Also:
    getType()

    isTypeDouble

    public boolean isTypeDouble()
    Type: double?

    Returns:
    true if this field is an double.
    See Also:
    getType()

    isTypeDoubleArray

    public boolean isTypeDoubleArray()
    Type: double[]?

    Returns:
    true if this field is an double[].
    See Also:
    getType()

    isTypeBoolean

    public boolean isTypeBoolean()
    Type: boolean?

    Returns:
    true if this field is an boolean.
    See Also:
    getType()

    isTypeBooleanArray

    public boolean isTypeBooleanArray()
    Type: boolean[]?

    Returns:
    true if this field is an boolean[].
    See Also:
    getType()

    isTypePrimitive

    public boolean isTypePrimitive()
    Returns:
    true if the field's type is a primitive type (int, long, double or boolean).
    See Also:
    getType(), isTypeInt(), isTypeLong(), isTypeDouble(), isTypeBoolean()

    isTypePrimitiveArray

    public boolean isTypePrimitiveArray()
    Returns:
    true if the field's type is a primitive type (int[], long[], double[] or boolean[]).
    See Also:
    getType(), isTypeIntArray(), isTypeLongArray(), isTypeDoubleArray(), isTypeBooleanArray()

    isTypeString

    public boolean isTypeString()
    Type: String?

    Returns:
    true if this field is an String.
    See Also:
    getType()

    isTypeStringArray

    public boolean isTypeStringArray()
    Type: String[]?

    Returns:
    true if this field is an String[].
    See Also:
    getType()

    isTypeDate

    public boolean isTypeDate()
    Type: Date?

    Returns:
    true if this field is an Date.
    See Also:
    getType()

    isTypeDateArray

    public boolean isTypeDateArray()
    Type: Date[]?

    Returns:
    true if this field is an Date[].
    See Also:
    getType()

    isTypeScalar

    public boolean isTypeScalar()
    Returns:
    true if the field's type is a scalar of any possible type.
    See Also:
    getType()

    isTypeMV

    public boolean isTypeMV()
    Returns:
    true if the field's type is a multivalued (array, List or Set) of any possible type.
    See Also:
    getType()

    isTypeArray

    public boolean isTypeArray()
    Returns:
    true if the field's type is an array of any possible type.
    See Also:
    getType()

    isTypeList

    public boolean isTypeList()
    Returns:
    true if the field's type is a List of any possible type.
    See Also:
    getType()

    isTypeSet

    public boolean isTypeSet()
    Returns:
    true if the field's type is a Set of any possible type.
    See Also:
    getType()

    isTypeCollection

    public boolean isTypeCollection()
    Returns:
    true if the field's type is a Collection (List or Set) of any possible type.
    See Also:
    getType()

    isTypeCategory

    public boolean isTypeCategory()
    Returns:
    true if the field's type is "java.util.TreeSet" and editor is "category". (field is a TreeSet of Category).
    See Also:
    getEditor(), getType()

    isTypePublication

    public boolean isTypePublication()
    Type: Publication?

    Returns:
    true if this field is a Publication.
    See Also:
    getType()

    isTypePublicationArray

    public boolean isTypePublicationArray()
    Type: Publication[]?

    Returns:
    true if this field is a Publication[].
    See Also:
    getType()

    isTypePublicationMV

    public boolean isTypePublicationMV()
    Type: Publication MV

    Returns:
    true if this field is a Publication[], a List or Set.
    See Also:
    getType()

    isTypeDocument

    public boolean isTypeDocument()
    Type: FileDocument? or DBFileDocument?

    Returns:
    true if this field is a Document.
    See Also:
    getType()

    isTypeDocumentMV

    public boolean isTypeDocumentMV()
    Type: FileDocument MV? or DBFileDocument MV?

    Returns:
    true if this field is a FileDocument[], a List or Set.
    See Also:
    getType()

    isRequired

    public boolean isRequired()
    Required field?

    Returns:
    true if this field is required, false otherwise

    isInline

    public boolean isInline()
    Inline editing ?

    Returns:
    true if this field is to be edited directly in the form, false otherwise (through a popup or such)

    isHidden

    public boolean isHidden()
    Hidden field?

    Returns:
    true if this field is hidden, false otherwise

    isAbstract

    public boolean isAbstract()
    Abstract/Summary field?

    Returns:
    true if this field is the summary for the type, false otherwise

    getAbstractLength

    public int getAbstractLength()
    Abstract/Summary length

    Returns:
    the length of the abstract

    isDataImage

    public boolean isDataImage()
    Image field?

    Returns:
    true if this field is the image for the type, false otherwise

    isSearchable

    public boolean isSearchable()
    Searchable field

    Returns:
    true if this field is searchable, false otherwise

    isSimpleString

    public boolean isSimpleString()
    Returns:
    true if this field's type is a String or a String[] AND not an enumerate neither a wysywig.
    See Also:
    getType(), isEnumerate(), isWysiwyg()

    isSuper

    public boolean isSuper()
    Returns:
    true if this field is not really a field, but instead, the place (for the edit form) where the inherited field are located.
    See Also:
    getType()

    getEditor

    public String getEditor()
    Return the internal editor type of this field.
    Can be one of these values (list not exhaustive):
  • "category"
  • "color"
  • "date"
  • "email"
  • "enumerate"
  • "file"
  • "image"
  • "media"
  • "password"
  • "query"
  • "textarea"
  • "textfield"
  • "url"
  • "wysiwyg"
  • "radio"
  • "check"
  • "list"
  • "combo"
  • "int", "int[]"
  • "double", "double[]"
  • "boolean", "boolean[]"
  • "member", "member[]"
  • "group", "group[]"
  • "link", "link[]"
  • "duration", "duration[]"
  • "date", "date[]"
  • "sqlquery", "sqlquery[]"
  • "dbrecord", "dbrecord[]"
  • Returns:
    the field's editor as a String

    isLink

    public boolean isLink()
    Is field's editor a link (as opposed to a chooser for example). (UI related).

    Returns:
    true if this field is a link
    See Also:
    getEditor()

    isAnyLink

    public boolean isAnyLink()
    Is field's editor any type of link (i.e. link or member or group).

    Returns:
    true if this field is any type of link.
    Since:
    jcms-6.1.0

    getChooser

    public String getChooser()
    Return the internal "chooser" of this field.
    Can be one of these values (list not exhaustive):
  • "checkbox"
  • "combo"
  • "listbox"
  • "multilistbox"
  • "popup"
  • "tree"

  • isFieldML

    public boolean isFieldML()
    Returns:
    true if this field a multi-language field.

    getDefaultValue

    public String getDefaultValue()
    Default value of field that can be expressed/converted into a string.

    Returns:
    a String with the default value of this field.

    getDefaultTextMap

    public HashMap getDefaultTextMap()
    Returns a copy of the language map of default value for this textual field.

    Returns:
    the language map of default value for this field. Returns an empty map if there is no default value.
    Since:
    jcms-5.7.3

    getDefaultTextString

    public String getDefaultTextString()
    Returns the default value (in the main language) of this textual field.

    Returns:
    the default value (in the main language) of this textual field. Returns null if there is no default value.
    Since:
    jcms-5.7.3

    isUrl

    public boolean isUrl()
    URL.

    Returns:
    true if field is a url field, false otherwise.

    isFieldWiki

    public boolean isFieldWiki()
    TextArea.

    Returns:
    true if field is a wiki field, false otherwise.

    isFieldWikiwyg

    public boolean isFieldWikiwyg()
    TextArea.

    Returns:
    true if field is a wikiwyg field, false otherwise.

    isWysiwyg

    public boolean isWysiwyg()
    Wysiwyg.

    Returns:
    true if this field is a wysiwyg, false otherwise.

    getCols

    public int getCols()
    TextInput/TextArea columns number.
    (UI related)

    Returns:
    the number of columns to use in the form textinput or textarea.

    getMaxlength

    public int getMaxlength()
    TextInput maximum length.

    Returns:
    the maximum length of a text input.

    getRows

    public int getRows()
    TextArea/WYSIWYG rows number.
    (UI related)

    Returns:
    the number of rows to use in the form textarea or in a wysiwyg.

    getUnit

    public String getUnit()
    TextInput unit
    e.g. "$"

    Returns:
    the unit.

    getUnitBefore

    public String getUnitBefore()
    TextInput unit, displayed before input.
    e.g. "$"

    Returns:
    the unit displayed before a text input.

    getUnitAfter

    public String getUnitAfter()
    TextInput unit, displayed after input.
    e.g. "km"

    Returns:
    the unit displayed after a text input.

    getDecimals

    public int getDecimals()
    Double decimals count

    Returns:
    the decimals count for double fields.

    getWysiwygParams

    public String getWysiwygParams()
    WYSIWYG toolbar options.
    Computed from xml field attribute toolbar[0-4]. e.g. : &toolbar0=open&toolbar1=open&toolbar2=open&toolbar3=open&toolbar4=hidden (UI related)

    Returns:
    a string with wysiwyg toolbar options.

    isImageMap

    public boolean isImageMap()
    Returns true if this is an image field with imageMap option enabled.

    Returns:
    true if this is an image field with imageMap option enabled.
    Since:
    jcms-5.5.0

    isOpenWindow

    public boolean isOpenWindow()
    Returns true if this is an URL field which must be open in a new window.

    Returns:
    true if this is an URL field which must be open in a new window.
    Since:
    jcms-6.1.0

    isResize

    public boolean isResize()
    Returns true if this is an image field which must be resized.

    Returns:
    true if this is an image field which must be resized.
    Since:
    jcms-6.1.0

    getResizeWidth

    public int getResizeWidth()
    Returns the resize width

    Returns:
    the resize width
    Since:
    jcms-6.1.0

    getResizeHeight

    public int getResizeHeight()
    Returns the resize height

    Returns:
    the resize height
    Since:
    jcms-6.1.0

    escapeHtml

    public boolean escapeHtml()
    Returns true if the HTML contained in this field must be escaped.

    Returns:
    true if the HTML contained in this field must be escaped.
    Since:
    jcms-6.1.0

    isSlaveImageMap

    public boolean isSlaveImageMap()
    Returns true if this field is the text area field generated aside the real image field.
    Warning: this field was not really saved in the type's xml, but is instead only created at JSP generation time.

    Returns:
    true if this field is the text area associated with the image map field.

    isMasterImageMap

    public boolean isMasterImageMap()
    Returns true if this field is the image field of an image map field.

    Returns:
    true if this field is the image field of an image map field.

    getMinValue

    public Number getMinValue()
    Returns the mininum value authorized for this number field (integer or decimal), if available.

    Returns:
    the minimum value, or null if it was not defined for this field. Returns an Integer instance for integer field, or a Double instance for decimal fields.

    getMaxValue

    public Number getMaxValue()
    Returns the maximum value authorized for this number field (integer or decimal), if available.

    Returns:
    the maximum value, or null if it was not defined for this field. Returns an Integer instance for integer field, or a Double instance for decimal fields.

    getDataSource

    public String getDataSource()
    SQLQuery/DBRecord/SQLResult: data source of this SQL related field.

    Returns:
    the data source of the SQL field

    getMaxRows

    public int getMaxRows()
    SQLQuery/DBRecord/SQLResult: maximum row to be retrieved (0 means no limit)

    Returns:
    the maximum number of rows to be retrieved.

    getDbrTable

    public String getDbrTable()
    DBRecord: table of this DB record field.

    Returns:
    the name of the SQL table used for this DB record field.

    getDbrKeyCol

    public String getDbrKeyCol()
    DBRecord: primary key column of this DB record field.

    Returns:
    the name of primary key SQL column used for this DB record field.

    getDbrColumns

    public String getDbrColumns()
    DBRecord: columns to be listed for this DB record field (coma separated)

    Returns:
    a String with coma separated SQL columns name SQL listed for this DB record field.

    getDbrLabelCol

    public String getDbrLabelCol()
    DBRecord: column used as label for this DB record field

    Returns:
    a String with the SQL column name used a label for this DB record field

    getDbrOrderBy

    public String getDbrOrderBy()
    DBRecord: ORDER BY SQL criteria DB record field

    Returns:
    a String with the ORDER BY SQL criteria for this DB record field

    isEnumerate

    public boolean isEnumerate()
    Enumerate.

    Returns:
    true if this field a an enumerate.

    getSize

    public int getSize()
    Enumerate: html Select size.
    (UI related)

    Returns:
    the size of a select in a html form.

    getEnumerateLabels

    public String[] getEnumerateLabels()
    Enumerate: Labels of the current field, e.g { "Red", "Green", "Blue"} for the default language of the type/site.

    Returns:
    a String[] containing all labels for this field, or null if this field is not an enumerate

    getEnumerateValues

    public String[] getEnumerateValues()
    Enumerate: Values of the current field, e.g { "00FF00", "00FF00", "0000FF"}.

    Returns:
    a String[] containing all values for this field, or null if this field is not an enumerate.

    isEnumerateML

    public boolean isEnumerateML()
    Enumerate: multilanguage.

    Returns:
    true if this field has multilanguage labels (field contains labelList_en... etc).

    isDateOnly

    public boolean isDateOnly()
    DateChooser: use date only, or date and time?

    Returns:
    true if this field was specified to use date only (no time).

    getDateFormat

    public String getDateFormat()
    DateChooser: date format

    Returns:
    the date format.

    getRoot

    public String getRoot()
    Categories: Root Category ID of this category field

    Returns:
    a String with the ID of the root Category of this field

    isDisplayRoot

    public boolean isDisplayRoot()
    Categories: Display Root

    Returns:
    true if this Category field should display its root

    isExclusive

    public boolean isExclusive()
    Categories: Exclusive.
    (UI related)

    Returns:
    true if only one category can be selected in html form, false otherwise.

    getGids

    public String[] getGids()
    Member chooser: Group IDs

    Returns:
    a String[] containing the jcms id of the Group from which we choose Member.

    getOffLabelMap

    public Map getOffLabelMap()
    Boolean: false/OFF Label of a boolean field. e.g. "No", "Disabled"

    Returns:
    Map {language, label} with the label to use for the false/off value of this boolean.

    getOffLabel

    public String getOffLabel(String lang)
    Returns the localized offLabel for to this field.

    Parameters:
    lang - the language
    Returns:
    the localized offLabel for to this field.
    Since:
    jcms-5.7.0

    getOnLabelMap

    public Map getOnLabelMap()
    Boolean: true/ON Label of a boolean field. e.g. "Yes", "Enabled"

    Returns:
    Map {language, label} with the label to use for the true/on value of this boolean.

    getOnLabel

    public String getOnLabel(String lang)
    Returns the localized onLabel for to this field.

    Parameters:
    lang - the language
    Returns:
    the localized onLabel for to this field.
    Since:
    jcms-5.7.0

    getTab

    public String getTab()
    Tab: tab name in which this field will be displayed.

    Returns:
    a String with the name of the tab.

    getTabGroup

    public String getTabGroup()
    TabGroup: group name for multivalued fields, all field having the same value will be display together. (has nothing to do with Tab). e.g. Interview type has two multivalued fields, "questions" and "answers" with the same tabgroup, when switching to second value of "questions", we display the second value of "answers". (UI related)

    Returns:
    name of group name

    isWidget

    public boolean isWidget()
    Is this field manage through a widget

    Returns:
    true if this field manage through a widget.

    getWidgetEditor

    public int getWidgetEditor()
    Type of widget editor. see AbstractWidget#UI_EDITOR_*.
    e.g : AbstractWidget.UI_EDITOR_EMAIL

    Returns:
    an int indicating what type of widget editor is used.

    getWidgetDescription

    public int getWidgetDescription()
    Type of description to be used by widget:
  • AbstractWidget.UI_DESCRIPTION_NONE
  • AbstractWidget.UI_DESCRIPTION_TEXT
  • AbstractWidget.UI_DESCRIPTION_TOOLTIP
  • Returns:
    an int indicating what type of description will be display.

    isMbrChsr

    public boolean isMbrChsr()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_MEMBERCHOOSER

    isMbrEnum

    public boolean isMbrEnum()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_ENUMERATE_MEMBER

    isGrpChsr

    public boolean isGrpChsr()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_GROUPCHOOSER

    isGrpEnum

    public boolean isGrpEnum()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_ENUMERATE_GROUP

    isDateChsr

    public boolean isDateChsr()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_DATECHOOSER

    isCatEditor

    public boolean isCatEditor()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_ENUMERATE_CATEGORIES

    isSQLQuery

    public boolean isSQLQuery()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_SQLQUERY

    isDBRecordChsr

    public boolean isDBRecordChsr()
    Widget Type.

    Returns:
    true if the widget editor for this field is AbstractWidget.UI_EDITOR_DBRECORDCHOOSER

    isCatTreeEditor

    public boolean isCatTreeEditor()
    Widget Type.

    Returns:
    true if this field is not managed through widget editor but using a category tree editor

    isKeyword

    public boolean isKeyword()
    Return true if the field display keywords

    Returns:
    boolean true if


    Copyright © 2001-2010 Jalios SA. All Rights Reserved.