|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.bebop.parameters.ParameterModel
com.arsdigita.bebop.parameters.TimeParameter
A class that represents the model for a time form parameter.
DateTimeParameter| Field Summary |
| Fields inherited from class com.arsdigita.bebop.parameters.ParameterModel |
m_defaultValue, m_locked, m_name, m_parameterListeners, versionId |
| Constructor Summary | |
TimeParameter(String name)
|
|
| Method Summary | |
protected Calendar |
getCalendar(javax.servlet.http.HttpServletRequest request)
This method returns a new Calendar object that is manipulated within transformValue to create a Date Object. |
Class |
getValueClass()
Return the class that all values produced by the model will have. |
String |
marshal(Object value)
Produce a string representation of the given value. |
Object |
transformValue(javax.servlet.http.HttpServletRequest request)
Computes a dateTime object from multiple parameters in the request. |
Object |
unmarshal(String encoded)
Reconstruct the parameter value from an encoded string produced by marshal. |
| Methods inherited from class com.arsdigita.bebop.parameters.ParameterModel |
addParameterListener, createParameterData, createParameterData, createParameterData, getDefaultOverridesNull, getDefaultValue, getName, isLocked, isPassIn, lock, setDefaultOverridesNull, setDefaultValue, setName, setPassIn, transformSingleValue, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TimeParameter(String name)
| Method Detail |
protected Calendar getCalendar(javax.servlet.http.HttpServletRequest request)
request - the servlet request from which Locale can be
extracted if needed
public Object transformValue(javax.servlet.http.HttpServletRequest request)
throws IllegalArgumentException
getName() + ".hour",
getName() + ".minute",
getName() + ".second", and
getName() + ".amOrPm".
- Specified by:
transformValue in class ParameterModel
- Parameters:
request - The HttpServletRequest of the form submission.
- Throws:
IllegalArgumentException - if there is an
error transforming form/URL variables to an object.
public Object unmarshal(String encoded)
ParameterModelmarshal. This is an optional operation, which needs
to be implemented by specific subclasses; this implementation just
throws an UnsupportedOperationException.
The contract between marshal and
unmarshal is that for any possible object
obj this parameter model can produce
obj.equals(unmarshal(marshal(obj)).
unmarshal in class ParameterModelencoded - a string produced by marshal
encodedpublic String marshal(Object value)
ParameterModelo so that
value.equals(o).
marshal in class ParameterModelvalue - a value previously produced by this parameter model
nullpublic Class getValueClass()
ParameterModelObject.class
getValueClass in class ParameterModel
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||