ch.sahits.codegen.generator
Class BasicAxis2ModelGenerator

java.lang.Object
  extended by ch.sahits.codegen.model.BasicModelGenerator
      extended by ch.sahits.codegen.generator.BasicAxis2ModelGenerator
Direct Known Subclasses:
Axis2MessageInOutReciever, Axis2ServiceStubGenerator, Axis2ServiceXMLGenerator, WSDLGenerator

public abstract class BasicAxis2ModelGenerator
extends BasicModelGenerator

This abstract class implements some of the required methods that are te same for all Axsis2 artefact generations.

Since:
1.2.0
Author:
Andi Hotz, Sahits GmbH

Field Summary
protected  IOutputFileModel model
          Model that defines the setup
protected  IWebservice ws
          Model that is used for the generation
 
Constructor Summary
BasicAxis2ModelGenerator()
          Default constructor doing nothing special
 
Method Summary
 IGeneratedObject createModel(IProgressMonitor monitor, IOutputFileModel model)
          Create an arbitrary model for the generator class.
protected  java.lang.String getAbsolutOutputDirectory()
          Retrieve the absolute path to the directory where the output is stored in.
 void init(IOutputFileModel outputModel, IGeneratedObject model)
          Initialize the model this generators model The model must be an instance of IWebservice.
 boolean isGeneratedOutputFile()
          This generator class generate() method returns an IFile instance
 
Methods inherited from class ch.sahits.codegen.model.BasicModelGenerator
createModelWithDBInputFile, createModelWithoutDB, initModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected IOutputFileModel model
Model that defines the setup


ws

protected IWebservice ws
Model that is used for the generation

Constructor Detail

BasicAxis2ModelGenerator

public BasicAxis2ModelGenerator()
Default constructor doing nothing special

Method Detail

createModel

public IGeneratedObject createModel(IProgressMonitor monitor,
                                    IOutputFileModel model)
Create an arbitrary model for the generator class. Create an IWebservice from the object model.

Parameters:
monitor - to monitor the progress
model - Model of the data of the wizard
Returns:
Object model that is passed as the second parameter to init(IOutputFileModel, IGeneratedObject)

init

public void init(IOutputFileModel outputModel,
                 IGeneratedObject model)
Initialize the model this generators model The model must be an instance of IWebservice. If the model is not of this type a ClassCastException is thrown

Parameters:
outputModel - IOutputFileModel that defines the setup of the generation
model - IWebservice

isGeneratedOutputFile

public boolean isGeneratedOutputFile()
This generator class generate() method returns an IFile instance

Returns:
true

getAbsolutOutputDirectory

protected java.lang.String getAbsolutOutputDirectory()
Retrieve the absolute path to the directory where the output is stored in.

Returns:
absolute path to output directory with final '/'