public class DateClass extends PropertyClass
cachedCustomDisplayer
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
documentReference, 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, validateProperty
addField, 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, toXMLString
fromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLString
finalize, getClass, notify, notifyAll, wait, wait, wait
displayView
get, put, safeget, safeput
apply, getDocumentReference, getReference, merge, setDocumentReference, toString
public 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 PropertyClassInterface
fromString
in class PropertyClass
public BaseProperty newProperty()
newProperty
in interface PropertyClassInterface
newProperty
in class PropertyClass
public 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 PropertyClass
Copyright © 2004–2022 XWiki. All rights reserved.