public class DateClass extends PropertyClass
cachedCustomDisplayercurrentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolverdocumentReference, ownerDocument, referenceCache| Constructor and Description |
|---|
DateClass()
Default constructor.
|
DateClass(PropertyMetaClass metaClass)
Creates a new Date property that is described by the given meta class.
|
| Modifier and Type | Method and Description |
|---|---|
BaseProperty |
fromString(String value) |
String |
getDateFormat() |
int |
getEmptyIsToday() |
int |
getPicker() |
int |
getSize() |
BaseProperty |
newProperty() |
BaseProperty |
newPropertyfromXML(org.dom4j.Element element) |
void |
setDateFormat(String format)
Sets the date format.
|
void |
setEmptyIsToday(int emptyIsToday)
Sets whether an empty date value represents the current date or not.
|
void |
setPicker(int picker)
Sets whether to use a date picker or not to select the date in edit mode.
|
void |
setSize(int size)
Sets the size of the date input in edit mode.
|
String |
toFormString(BaseProperty property) |
clone, compareTo, createReference, displayCustom, displayEdit, displayEdit, displayEdit, displayHidden, displayHidden, displayHidden, displayView, displayView, displayView, flushCache, fromStringArray, fromValue, fromXML, getCachedDefaultCustomDisplayer, getClassName, getClassType, getCustomDisplay, getDefaultCustomDisplayer, getFieldFullName, getFullQueryPropertyName, getHint, getId, getName, getNumber, getObject, getPrettyName, getPrettyName, getTooltip, getTooltip, getTranslatedPrettyName, getValidationMessage, getValidationRegExp, getXClass, getxWikiClass, initLazyCollections, isCustomDisplayed, isDisabled, isUnmodifiable, isValidColumnTypes, mergeProperty, renderContentInContext, renderContentInContext, setClassType, setCustomDisplay, setDisabled, setHint, setId, setName, setNumber, setObject, setPrettyName, setTooltip, setUnmodifiable, setValidationMessage, setValidationRegExp, setxWikiClass, toFormString, toString, toXML, toXML, validatePropertyaddField, addPropertyForRemoval, apply, equals, get, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClassReference, merge, merge, mergeField, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toXMLStringfromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLStringfinalize, getClass, notify, notifyAll, wait, wait, waitdisplayViewget, put, safeget, safeputapply, getDocumentReference, getReference, merge, setDocumentReference, toStringpublic DateClass(PropertyMetaClass metaClass)
metaClass - the meta class that defines the list of meta properties associated with this property typepublic DateClass()
public int getPicker()
1 if a date picker should be used to choose the date, 0 otherwisepublic void setPicker(int picker)
picker - 1 to use a date picker, 0 otherwisepublic int getSize()
public void setSize(int size)
size - the size of the date input in edit modepublic int getEmptyIsToday()
1 if an empty date value represents the current date, 0 otherwisepublic void setEmptyIsToday(int emptyIsToday)
emptyIsToday - 1 if an empty date value should represent the current date, 0 otherwisepublic String getDateFormat()
public void setDateFormat(String format)
format - the new date formatpublic BaseProperty fromString(String value)
fromString in interface PropertyClassInterfacefromString in class PropertyClasspublic BaseProperty newProperty()
newProperty in interface PropertyClassInterfacenewProperty in class PropertyClasspublic String toFormString(BaseProperty property)
property - a date propertygetDateFormat() formatpublic BaseProperty newPropertyfromXML(org.dom4j.Element element)
We have to overwrite this method because the value of a date property is not serialized using the date format specified in the XClass nor the time stamp but a custom hard-coded date format.. Changing this now will break existing XARs..
newPropertyfromXML in class PropertyClassCopyright © 2004–2021 XWiki. All rights reserved.