Spring Web Services Framework

org.springframework.ws.transport.http
Class XsdSchemaHandlerAdapter

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.transport.http.XsdSchemaHandlerAdapter
All Implemented Interfaces:
HandlerAdapter

public class XsdSchemaHandlerAdapter
extends TransformerObjectSupport
implements HandlerAdapter

Adapter to use the XsdSchema interface with the generic DispatcherServlet.

Reads the source from the mapped XsdSchema implementation, and writes that as the result to the HttpServletResponse. Allows for post-processing the schema in subclasses.

Since:
1.5.3
Author:
Arjen Poutsma
See Also:
XsdSchema, getSchemaSource(XsdSchema)

Field Summary
 
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
 
Constructor Summary
XsdSchemaHandlerAdapter()
           
 
Method Summary
 long getLastModified(HttpServletRequest request, Object handler)
           
protected  Source getSchemaSource(XsdSchema schema)
          Returns the Source of the given schema.
 ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler)
           
 boolean supports(Object handler)
           
 
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsdSchemaHandlerAdapter

public XsdSchemaHandlerAdapter()
Method Detail

supports

public boolean supports(Object handler)
Specified by:
supports in interface HandlerAdapter

getLastModified

public long getLastModified(HttpServletRequest request,
                            Object handler)
Specified by:
getLastModified in interface HandlerAdapter

handle

public ModelAndView handle(HttpServletRequest request,
                           HttpServletResponse response,
                           Object handler)
                    throws Exception
Specified by:
handle in interface HandlerAdapter
Throws:
Exception

getSchemaSource

protected Source getSchemaSource(XsdSchema schema)
                          throws Exception
Returns the Source of the given schema. Allows for post-processing and transformation of the schema in sub-classes.

Default implementation simply returns XsdSchema.getSource().

Parameters:
schema - the schema
Returns:
the source of the given schema
Throws:
Exception - in case of errors

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.