com.acsinet_solutions.cetia4.controller.map
Interface Mapping

All Known Implementing Classes:
AbstractMapping, IntKeyDTO_SetMapping, MultipartBeanRequestMapper.MultipartDTOMapping, SimpleMapping, TimeMapping

public interface Mapping

Interface that allows a mapping between one or more form fields and one or more properties in a class.


Method Summary
 java.lang.String getPropertyName()
          Get the mapped property name for simple mappings; it may be a complex string for multiple or nested mappings.
 ValidationIssue performMapping(ParameterAccessor request, java.lang.Object bean)
          Perform a single mapping obtaining date from the provided request object and setting values in the provided bean.
 

Method Detail

performMapping

ValidationIssue performMapping(ParameterAccessor request,
                               java.lang.Object bean)
                               throws ValidationException
Perform a single mapping obtaining date from the provided request object and setting values in the provided bean.

Parameters:
request - A not-null HttpServletRequest object
bean - A not-null Object instance
Returns:
A not-null String object if validation issues were raised; null if the mapping performed correctly
Throws:
ValidationException - Alternative way to raise exceptions, useful when more than one issue is to be reported.

getPropertyName

java.lang.String getPropertyName()
Get the mapped property name for simple mappings; it may be a complex string for multiple or nested mappings. This is used to obtain a reference to a mapping in a RequestMapper, so it may be added and removed. If not provided ( for multiple property mappings ) a mapping may not be removed or searched once assigned ( this may not be a problem in most cases ). For multiple property mappings, possible default mappings on a RequestMapper must be first inidividually unassigned before setting this instance, or unexpected behavior may occur.

Returns:
A not-null String value of the property being mapped if there is a single property being mapped; a maybe null value for multiple property mappings. As this property may be null or not really a property ( multiple property mapping ) it should not be used for uses outside the ones internally implemented by the framework.
See Also:
RequestMapper.getMapping(String), RequestMapper.removeMapping(String)