org.apache.wsif.providers.jca.toolplugin
Interface FormatHandlerGenerator


public interface FormatHandlerGenerator

This interface allows Resource Adapter to provide a code generation contribution to the tool environment. The tooling delegates to the implementation of this interface the generation of all format handlers for the particular encoding and style.

Author:
Hesham Fahmy , Piotr Przybylski , Harlod Gartner

Field Summary
static int XSD_ELEMENT
           
static int XSD_TYPE
           
 
Method Summary
 java.lang.Object createGenerationContext()
          Creates a new context for format handler generation.
 java.util.Hashtable generate(java.lang.String generationPackage, java.lang.String beanClass, javax.wsdl.Definition aDefinition, javax.wsdl.Binding aBinding, java.lang.String anEncoding, java.lang.String aStyle, javax.xml.namespace.QName xsdQname, int elementType, java.lang.Object generationContext)
          Generates a Custom Format Handler for a particular XSD Type or Element.
 

Field Detail

XSD_TYPE

public static final int XSD_TYPE

XSD_ELEMENT

public static final int XSD_ELEMENT
Method Detail

generate

public java.util.Hashtable generate(java.lang.String generationPackage,
                                    java.lang.String beanClass,
                                    javax.wsdl.Definition aDefinition,
                                    javax.wsdl.Binding aBinding,
                                    java.lang.String anEncoding,
                                    java.lang.String aStyle,
                                    javax.xml.namespace.QName xsdQname,
                                    int elementType,
                                    java.lang.Object generationContext)
                             throws WSIFException
Generates a Custom Format Handler for a particular XSD Type or Element.
Parameters:
generationPackage - The fully qualified package that the generator should use to generate its classes in.
beanClass - The fully qualified name of the Java bean class that represents the XSD type (or element) for which a format handler is being generated.
aDefinition - The WSDL definition from which the XSD type is derived.
aBinding - The WSDL binding element that contains the type mapping for the XSD type that is being used.
anEncoding - The encoding attribute off the TypeMapping element associated with the format handler to be generated.
aStyle - The style attribute off the TypeMapping element associated with the format handler to be generated.
xsdQname - The QName of the XSD element(or type) for which the format handler is being generated.
elementType - The type of element represented by the xsdQname parameter. This is either CustomFormatHandlerGenerator.XSD_TYPE
generationContext - The generation context or CustomFormatHandlerGenerator.XSD_ELEMENT.
generationContext - The generation context or null is no context is required.
Returns:
a HashTable that contains a set of java.io.InputStream s. Each input stream contains the generated code for a particular class generated by the format handler generator. The number of input streams returned depends on the number of classes that are generated by the format handler generator. The keys of the HashTable must be the name of each class (unqualified) that is represented by its corresponding InputStream value. The class name keys are unqualified because they must all be in the generationPackage that is passed in as an input parameter.
Throws:
org.apache.wsif.WSIFException - thrown if an error occurs during format handler generation.

createGenerationContext

public java.lang.Object createGenerationContext()
Creates a new context for format handler generation. The context is an optional object that can be used by a FormatHandlerGenerator to assist in code generation, or in keeping track of artifacts generated. The details, and implementation, of the object are specific to each FormatHandlerGenerator. Tooling environments must call this method first, before invoking the FormatHandlerGenerator to generate code. The context that is returned must be used by the tooling environment for all subsequent calls to the FormatHandlerGenerator.
Returns:
A new generation context.


Copyright © 2002, 2002 Apache XML Project. All Rights Reserved.