com.dyuproject.web.rest
Interface ValidatingConsumer

All Superinterfaces:
LifeCycle
All Known Implementing Classes:
AbstractConsumer, SimpleJSONConsumer, SimpleParameterConsumer

public interface ValidatingConsumer
extends LifeCycle

Consumes request content based on their Content-Type - and at the same time validates the content.

Author:
David Yu
Date created:
Jan 14, 2009

Nested Class Summary
static interface ValidatingConsumer.FieldValidator
           
 
Field Summary
static String REQUEST_CONTENT_TYPE
           
 
Method Summary
 Object consume(RequestContext requestContext)
           
 String getContentType()
           
 String getHttpMethod()
           
 boolean merge(Object pojo, RequestContext rc)
           
 void preConfigure(String httpMethod, String contentType, Class<?> pojoClass, Map<?,?> fieldParams)
           
 
Methods inherited from interface com.dyuproject.web.rest.LifeCycle
destroy, init
 

Field Detail

REQUEST_CONTENT_TYPE

static final String REQUEST_CONTENT_TYPE
See Also:
Constant Field Values
Method Detail

preConfigure

void preConfigure(String httpMethod,
                  String contentType,
                  Class<?> pojoClass,
                  Map<?,?> fieldParams)

getContentType

String getContentType()

getHttpMethod

String getHttpMethod()

consume

Object consume(RequestContext requestContext)
               throws IOException,
                      ValidationException
Throws:
IOException
ValidationException

merge

boolean merge(Object pojo,
              RequestContext rc)
              throws IOException,
                     ValidationException
Throws:
IOException
ValidationException


Copyright © 2008-2013. All Rights Reserved.