com.acsinet_solutions.cetia4.controller.map
Class AbstractBasicParamBinder

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.map.AbstractBasicParamBinder
All Implemented Interfaces:
ParamBinder
Direct Known Subclasses:
MultipartParamBinder, PathInfoParamBinder

public abstract class AbstractBasicParamBinder
extends java.lang.Object
implements ParamBinder

Basic interface for parameter binders for simple objects ( integers and strings ). This class is not REST specific.

Author:
Santiago Arriaga

Constructor Summary
AbstractBasicParamBinder(RequestMapper mapper)
          Create a parameter binder based on the given mapper.
 
Method Summary
protected  java.lang.Object bind(java.lang.String value)
          Perform the binding using the given value as input and returning it's object representation as output using the internal request mapper.
 RequestMapper getRequestMapper()
          Obtain a reference to the internal request mapper, mainly for external configuration.
 void setRequestMapper(RequestMapper mapper)
          Allows an implementation to change completely the request mapper of a parameter binder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.acsinet_solutions.cetia4.controller.map.ParamBinder
bind
 

Constructor Detail

AbstractBasicParamBinder

public AbstractBasicParamBinder(RequestMapper mapper)
Create a parameter binder based on the given mapper. If the mapper is null the helper bind() method must not be used for binding. The provided RequestMapper parameter determines the datatype of the object being bound.

Method Detail

getRequestMapper

public final RequestMapper getRequestMapper()
Obtain a reference to the internal request mapper, mainly for external configuration.

Specified by:
getRequestMapper in interface ParamBinder
See Also:
ConfigurableModule

setRequestMapper

public final void setRequestMapper(RequestMapper mapper)
Description copied from interface: ParamBinder
Allows an implementation to change completely the request mapper of a parameter binder.

Specified by:
setRequestMapper in interface ParamBinder

bind

protected final java.lang.Object bind(java.lang.String value)
                               throws ValidationException
Perform the binding using the given value as input and returning it's object representation as output using the internal request mapper.

Throws:
ValidationException