|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.objects.BaseElement<R>
com.xpn.xwiki.objects.BaseCollection<ClassPropertyReference>
com.xpn.xwiki.objects.classes.PropertyClass
com.xpn.xwiki.objects.classes.DateClass
public class DateClass
Defines an XClass property type whose value is a Date.
Field Summary |
---|
Fields inherited from class com.xpn.xwiki.objects.classes.PropertyClass |
---|
cachedCustomDisplayer |
Fields inherited from class com.xpn.xwiki.objects.BaseCollection |
---|
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver |
Fields inherited from class com.xpn.xwiki.objects.BaseElement |
---|
localEntityReferenceSerializer, referenceCache |
Constructor Summary | |
---|---|
DateClass()
Default constructor. |
|
DateClass(PropertyMetaClass metaClass)
Creates a new Date property that is described by the given meta class. |
Method Summary | |
---|---|
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)
|
Methods inherited from class com.xpn.xwiki.objects.BaseElement |
---|
getDocumentReference, getLocalKey, getLocalUidStringEntityReferenceSerializer, getReference, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.xpn.xwiki.objects.ObjectInterface |
---|
get, put, safeget, safeput |
Methods inherited from interface com.xpn.xwiki.objects.ElementInterface |
---|
apply, getDocumentReference, getReference, merge, setDocumentReference, toString |
Constructor Detail |
---|
public DateClass(PropertyMetaClass metaClass)
metaClass
- the meta class that defines the list of meta properties associated with this property typepublic DateClass()
Method Detail |
---|
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 property
getDateFormat()
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |