Package org.opennms.web.api
Class ISO8601DateEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.opennms.web.api.ISO8601DateEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor
public class ISO8601DateEditor extends java.beans.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 java.lang.String
getAsText()
boolean
isPaintable()
No, we don't do GUIs.void
setAsText(java.lang.String text)
static java.util.Date
stringToDate(java.lang.String text)
-
-
-
Method Detail
-
getAsText
public java.lang.String getAsText()
- Specified by:
getAsText
in interfacejava.beans.PropertyEditor
- Overrides:
getAsText
in classjava.beans.PropertyEditorSupport
-
setAsText
public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
- Specified by:
setAsText
in interfacejava.beans.PropertyEditor
- Overrides:
setAsText
in classjava.beans.PropertyEditorSupport
- Throws:
java.lang.IllegalArgumentException
-
isPaintable
public boolean isPaintable()
No, we don't do GUIs. Sod off- Specified by:
isPaintable
in interfacejava.beans.PropertyEditor
- Overrides:
isPaintable
in classjava.beans.PropertyEditorSupport
-
stringToDate
public static java.util.Date stringToDate(java.lang.String text) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
- Throws:
java.lang.IllegalArgumentException
java.lang.UnsupportedOperationException
-
-