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.PropertyEditorSupportPropertyEditor 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.StringgetAsText()booleanisPaintable()No, we don't do GUIs.voidsetAsText(java.lang.String text)static java.util.DatestringToDate(java.lang.String text)
-
-
-
Method Detail
-
getAsText
public java.lang.String getAsText()
- Specified by:
getAsTextin interfacejava.beans.PropertyEditor- Overrides:
getAsTextin classjava.beans.PropertyEditorSupport
-
setAsText
public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException- Specified by:
setAsTextin interfacejava.beans.PropertyEditor- Overrides:
setAsTextin classjava.beans.PropertyEditorSupport- Throws:
java.lang.IllegalArgumentException
-
isPaintable
public boolean isPaintable()
No, we don't do GUIs. Sod off- Specified by:
isPaintablein interfacejava.beans.PropertyEditor- Overrides:
isPaintablein classjava.beans.PropertyEditorSupport
-
stringToDate
public static java.util.Date stringToDate(java.lang.String text) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException- Throws:
java.lang.IllegalArgumentExceptionjava.lang.UnsupportedOperationException
-
-