org.opennms.web.rest
Class ISO8601DateEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.opennms.web.rest.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
ISO8601DateEditor()
           
 
Method Summary
 String getAsText()
           
 boolean isPaintable()
          No, we don't do GUIs.
 void setAsText(String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISO8601DateEditor

public ISO8601DateEditor()
Method Detail

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Throws:
IllegalArgumentException

isPaintable

public boolean isPaintable()
No, we don't do GUIs. Sod off

Specified by:
isPaintable in interface PropertyEditor
Overrides:
isPaintable in class PropertyEditorSupport


Copyright © 2009. All Rights Reserved.