Class DateClass

    • Constructor Detail

      • DateClass

        public DateClass​(PropertyMetaClass metaClass)
        Creates a new Date property that is described by the given meta class.
        Parameters:
        metaClass - the meta class that defines the list of meta properties associated with this property type
      • DateClass

        public DateClass()
        Default constructor.
    • Method Detail

      • getPicker

        public int getPicker()
        Returns:
        1 if a date picker should be used to choose the date, 0 otherwise
      • setPicker

        public void setPicker​(int picker)
        Sets whether to use a date picker or not to select the date in edit mode.
        Parameters:
        picker - 1 to use a date picker, 0 otherwise
      • getSize

        public int getSize()
        Returns:
        the size of the date input in edit mode
      • setSize

        public void setSize​(int size)
        Sets the size of the date input in edit mode.
        Parameters:
        size - the size of the date input in edit mode
      • getEmptyIsToday

        public int getEmptyIsToday()
        Returns:
        1 if an empty date value represents the current date, 0 otherwise
      • setEmptyIsToday

        public void setEmptyIsToday​(int emptyIsToday)
        Sets whether an empty date value represents the current date or not.
        Parameters:
        emptyIsToday - 1 if an empty date value should represent the current date, 0 otherwise
      • getDateFormat

        public String getDateFormat()
        Returns:
        the date format
      • setDateFormat

        public void setDateFormat​(String format)
        Sets the date format.
        Parameters:
        format - the new date format
      • toFormString

        public String toFormString​(BaseProperty property)
        Parameters:
        property - a date property
        Returns:
        the value of the given date property serialized using the getDateFormat() format
      • newPropertyfromXML

        public 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..

        Overrides:
        newPropertyfromXML in class PropertyClass