org.ow2.jonas.generators.wsgen.generator
Class GeneratorFactory

java.lang.Object
  extended by org.ow2.jonas.generators.wsgen.generator.GeneratorFactory
All Implemented Interfaces:
GeneratorFactory
Direct Known Subclasses:
AxisGeneratorFactory, EWSGeneratorFactory

public abstract class GeneratorFactory
extends Object
implements GeneratorFactory

a GeneratorFactory has to be extended by specific generation mecanism. It will look in jonas.properties file for a property named :jonas.service.ws.wsgen.generator.factory that is a classname extending GeneratorFactory. By default Axis GeneratorFactory is used.

Author:
Guillaume Sauthier

Field Summary
static String GENERATOR_FACTORY
          Generator Factory property name in jonas.properties
static String GENERATOR_FACTORY_DEFAULT
          Default GeneratorFactory impl to use
 
Constructor Summary
GeneratorFactory()
           
 
Method Summary
 Config getConfiguration()
          Get the Configuration to use with newly created Generator.
static GeneratorFactory getInstance()
          Returns the unique GeneratorFactory instance.
abstract  WsEndpointGenerator newGenerator(ServiceDesc serviceDesc, WsEndpointDDModifier ddm, WebServicesDDModifier wsddm, Archive arch)
          Return a new WsEndpointGenerator for the specific generation mecanism.
abstract  WsClientGenerator newGenerator(ServiceRefDesc serviceRef, WsClientDDModifier ddm, Archive archive)
          Return a new WsClientGenerator for the specific generation mecanism.
 void setConfiguration(Config config)
          Set the Configuration to use with newly created Generator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATOR_FACTORY

public static final String GENERATOR_FACTORY
Generator Factory property name in jonas.properties

See Also:
Constant Field Values

GENERATOR_FACTORY_DEFAULT

public static final String GENERATOR_FACTORY_DEFAULT
Default GeneratorFactory impl to use

See Also:
Constant Field Values
Constructor Detail

GeneratorFactory

public GeneratorFactory()
Method Detail

getInstance

public static GeneratorFactory getInstance()
                                    throws WsGenException
Returns the unique GeneratorFactory instance.

Returns:
the unique GeneratorFactory instance.
Throws:
WsGenException - When instanciation fails

newGenerator

public abstract WsClientGenerator newGenerator(ServiceRefDesc serviceRef,
                                               WsClientDDModifier ddm,
                                               Archive archive)
                                        throws GenBaseException
Return a new WsClientGenerator for the specific generation mecanism.

Parameters:
serviceRef - the service-ref containing information for client side generation process.
ddm - the XML modifier.
archive - the Archive to be modified
Returns:
a new WsClientGenerator.
Throws:
GenBaseException - When Factory cannot instanciate WsClientGenerator

newGenerator

public abstract WsEndpointGenerator newGenerator(ServiceDesc serviceDesc,
                                                 WsEndpointDDModifier ddm,
                                                 WebServicesDDModifier wsddm,
                                                 Archive arch)
                                          throws GenBaseException
Return a new WsEndpointGenerator for the specific generation mecanism.

Parameters:
serviceDesc - the webservice-description containing information for server side generation process.
ddm - the XML modifier.
wsddm - the Webservices.xml DD modifier
arch - The archive to modify
Returns:
a new WsEndpointGenerator.
Throws:
GenBaseException - When Factory cannot instanciate WsEndpointGenerator

setConfiguration

public void setConfiguration(Config config)
Set the Configuration to use with newly created Generator.

Specified by:
setConfiguration in interface GeneratorFactory
Parameters:
config - the Configuration to use with newly created Generator.

getConfiguration

public Config getConfiguration()
Get the Configuration to use with newly created Generator.

Specified by:
getConfiguration in interface GeneratorFactory
Returns:
the Configuration to use with newly created Generator


Copyright © 2010 OW2 Consortium. All Rights Reserved.