net.anotheria.maf.util
Class FormObjectMapper

java.lang.Object
  extended by net.anotheria.maf.util.FormObjectMapper

public final class FormObjectMapper
extends Object

Model Object mapper.

Version:
1.0 Date: Jan 12, 2010 Time: 1:42:18 AM
Author:
vitaliy

Method Summary
static FormBean getModelObjectMapped(javax.servlet.http.HttpServletRequest req, Action action)
          Map http request to model object by action annotations.
static void map(javax.servlet.http.HttpServletRequest req, Object destination)
          Map request parameters to model bean.
static List<ValidationError> validate(javax.servlet.http.HttpServletRequest req, Object bean)
          Validate mapped bean according defined preconditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

map

public static void map(javax.servlet.http.HttpServletRequest req,
                       Object destination)
Map request parameters to model bean.

Internal model bean content can be mapped using Dozer notation (arrays, collections) for parameter name

Parameters:
req - http request object
destination - given model bean

getModelObjectMapped

public static FormBean getModelObjectMapped(javax.servlet.http.HttpServletRequest req,
                                            Action action)
Map http request to model object by action annotations.

Parameters:
req - http request
action - given action
Returns:
instantiated bean

validate

public static List<ValidationError> validate(javax.servlet.http.HttpServletRequest req,
                                             Object bean)
Validate mapped bean according defined preconditions.

Parameters:
req - http request
bean - backing bean


Copyright © 2010-2013 anotheria.net. All Rights Reserved.