org.jboss.seam.remoting.validation
Class ConstraintTranslator

java.lang.Object
  extended by org.jboss.seam.remoting.validation.ConstraintTranslator
All Implemented Interfaces:
RequestHandler

public class ConstraintTranslator
extends Object
implements RequestHandler

This class reads constraints metadata from all requested beans, translate them and send them back to client

Author:
Amir Sadri

Field Summary
 
Fields inherited from interface org.jboss.seam.remoting.RequestHandler
BODY_TAG_CLOSE, BODY_TAG_OPEN, CALL_ID_TAG_CLOSE, CALL_ID_TAG_OPEN, CONTEXT_TAG_CLOSE, CONTEXT_TAG_OPEN, CONVERSATION_ID_TAG_CLOSE, CONVERSATION_ID_TAG_OPEN, ENVELOPE_TAG_CLOSE, ENVELOPE_TAG_OPEN, HEADER_CLOSE, HEADER_OPEN, REF_TAG_CLOSE, REF_TAG_OPEN_END, REF_TAG_OPEN_START, REFS_TAG_CLOSE, REFS_TAG_OPEN
 
Constructor Summary
ConstraintTranslator()
           
 
Method Summary
protected  String[] convertConstraint(javax.validation.metadata.ConstraintDescriptor<?> constraint, HashMap<String,ArrayList<String>> gh, OutputStream out, String parent)
           
protected  javax.enterprise.inject.spi.Bean<?> getTargetBean(String beanName, String qualifiers)
           
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  Map<String,Object[]> translateConstraints(String beanName, String qualifiers, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintTranslator

public ConstraintTranslator()
Method Detail

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws Exception
Specified by:
handle in interface RequestHandler
Throws:
Exception

translateConstraints

protected Map<String,Object[]> translateConstraints(String beanName,
                                                    String qualifiers,
                                                    OutputStream out)
                                             throws IOException
Throws:
IOException

convertConstraint

protected String[] convertConstraint(javax.validation.metadata.ConstraintDescriptor<?> constraint,
                                     HashMap<String,ArrayList<String>> gh,
                                     OutputStream out,
                                     String parent)
                              throws IOException
Throws:
IOException

getTargetBean

protected javax.enterprise.inject.spi.Bean<?> getTargetBean(String beanName,
                                                            String qualifiers)


Copyright © 2011 Seam Framework. All Rights Reserved.