Package org.opennms.web.api
Class ISO8601DateEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.opennms.web.api.ISO8601DateEditor
-
- All Implemented Interfaces:
PropertyEditor
public class ISO8601DateEditor extends PropertyEditorSupport
PropertyEditor suitable for use by BeanWrapperImpl, so that we can accept xsd:datetime formatted dates in query strings. Also handles "epoch" style dates, if they exist. Could be extended to guess the date format and do something useful with it- Author:
- miskellc
-
-
Constructor Summary
Constructors Constructor Description ISO8601DateEditor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAsText()booleanisPaintable()No, we don't do GUIs.voidsetAsText(String text)static DatestringToDate(String text)-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
-
-
-
Method Detail
-
getAsText
public String getAsText()
- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-
setAsText
public void setAsText(String text) throws IllegalArgumentException
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Throws:
IllegalArgumentException
-
isPaintable
public boolean isPaintable()
No, we don't do GUIs. Sod off- Specified by:
isPaintablein interfacePropertyEditor- Overrides:
isPaintablein classPropertyEditorSupport
-
stringToDate
public static Date stringToDate(String text) throws IllegalArgumentException, UnsupportedOperationException
-
-