org.xins.server
Class XSLTCallingConvention

java.lang.Object
  extended byorg.xins.common.manageable.Manageable
      extended byorg.xins.server.CallingConvention
          extended byorg.xins.server.StandardCallingConvention
              extended byorg.xins.server.XSLTCallingConvention

public class XSLTCallingConvention
extends StandardCallingConvention

XSLT calling convention. The XSLT calling convention input is the same as for the standard calling convention. The XSLT calling convention output is the result of the XML normally returned by the standard calling convention and the specified XSLT. The Mime type of the return data can be specified in the XSLT using the media-type or method attribute of the XSL output element. More information about the XSLT calling convention can be found in the user guide.

Version:
$Revision: 1.56 $ $Date: 2008/07/04 10:22:50 $
Author:
Anthony Goubard, Ernst de Haan

Nested Class Summary
 
Nested classes inherited from class org.xins.common.manageable.Manageable
Manageable.State
 
Field Summary
protected static String CLEAR_TEMPLATE_CACHE_PARAMETER
          The name of the input parameter used to clear the template cache.
protected static String TEMPLATE_PARAMETER
          The name of the input parameter that specifies the location of the XSLT template to use.
protected static String TEMPLATES_CACHE_PROPERTY
          The name of the runtime property that defines if the templates should be cached.
 
Fields inherited from class org.xins.server.StandardCallingConvention
RESPONSE_CONTENT_TYPE, RESPONSE_ENCODING
 
Fields inherited from class org.xins.common.manageable.Manageable
BOOTSTRAPPED, BOOTSTRAPPING, DEINITIALIZING, INITIALIZING, UNUSABLE, USABLE
 
Constructor Summary
XSLTCallingConvention()
          Constructs a new XSLTCallingConvention object.
 
Method Summary
protected  void convertResultImpl(FunctionResult xinsResult, HttpServletResponse httpResponse, HttpServletRequest httpRequest)
          Converts a XINS result to an HTTP response (implementation method).
protected  void initImpl(PropertyReader runtimeProperties)
          Performs the initialization procedure (actual implementation).
 
Methods inherited from class org.xins.server.StandardCallingConvention
convertRequestImpl, getAPI, getSupportedMethods, getSupportedMethods, matches, parseXMLRequest, parseXMLRequest
 
Methods inherited from class org.xins.common.manageable.Manageable
assertUsable, bootstrap, bootstrapImpl, deinit, deinitImpl, getState, init, isBootstrapped, isUsable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATES_CACHE_PROPERTY

protected static final String TEMPLATES_CACHE_PROPERTY
The name of the runtime property that defines if the templates should be cached. Should be either "true" or "false". By default the cache is enabled.

See Also:
Constant Field Values

TEMPLATE_PARAMETER

protected static final String TEMPLATE_PARAMETER
The name of the input parameter that specifies the location of the XSLT template to use.

See Also:
Constant Field Values

CLEAR_TEMPLATE_CACHE_PARAMETER

protected static final String CLEAR_TEMPLATE_CACHE_PARAMETER
The name of the input parameter used to clear the template cache.

See Also:
Constant Field Values
Constructor Detail

XSLTCallingConvention

public XSLTCallingConvention()
Constructs a new XSLTCallingConvention object.

Method Detail

initImpl

protected void initImpl(PropertyReader runtimeProperties)
                 throws MissingRequiredPropertyException,
                        InvalidPropertyValueException,
                        InitializationException
Description copied from class: Manageable
Performs the initialization procedure (actual implementation). When this method is called from Manageable.init(PropertyReader), the state and the argument will have been checked and the state will have been set to Manageable.INITIALIZING.

The implementation of this method in class Manageable is empty.

Overrides:
initImpl in class Manageable
Parameters:
runtimeProperties - the initialization properties, not null.
Throws:
MissingRequiredPropertyException - if a required property is not given.
InvalidPropertyValueException - if the value of a certain property is invalid.
InitializationException - if the initialization failed, for any other reason.

convertResultImpl

protected void convertResultImpl(FunctionResult xinsResult,
                                 HttpServletResponse httpResponse,
                                 HttpServletRequest httpRequest)
                          throws IOException
Description copied from class: StandardCallingConvention
Converts a XINS result to an HTTP response (implementation method).

Overrides:
convertResultImpl in class StandardCallingConvention
Parameters:
xinsResult - the XINS result object that should be converted to an HTTP response, will not be null.
httpResponse - the HTTP response object to configure, will not be null.
httpRequest - the HTTP request, will not be null.
Throws:
IOException - if calling any of the methods in httpResponse causes an I/O error.


See http://www.xins.org/.