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 String
getAsText()
boolean
isPaintable()
No, we don't do GUIs.void
setAsText(String text)
static Date
stringToDate(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:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-
setAsText
public void setAsText(String text) throws IllegalArgumentException
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Throws:
IllegalArgumentException
-
isPaintable
public boolean isPaintable()
No, we don't do GUIs. Sod off- Specified by:
isPaintable
in interfacePropertyEditor
- Overrides:
isPaintable
in classPropertyEditorSupport
-
stringToDate
public static Date stringToDate(String text) throws IllegalArgumentException, UnsupportedOperationException
-
-