org.jaffa.tools.patternmetaengine
Interface IBuilder

All Known Implementing Classes:
BuildObjectFinder, BuildObjectFinder_1, BuildObjectFinder_2, BuildObjectLookup, BuildObjectLookup_1, BuildObjectLookup_2, BuildObjectMaintenance, BuildObjectMaintenance_1, BuildObjectMaintenance_2, BuildObjectViewer, BuildObjectViewer_1, BuildObjectViewer_2

public interface IBuilder

Interface for any type of builder that can be called.

Author:
PaulE

Method Summary
 void buildPhase1(boolean fullPackage)
          Phase 1 of the build should create the initial skeleton component in as much detail as possible.
 void buildPhase2(boolean fullPackage)
          Phase 2 allows any inter-conponent linking to be performed.
 String getApplication()
          Get Application Name
 String getComponentControllerClass()
          Get Component Controller Class
 String getComponentControllerPackage()
          Get Component Controller Package
 String getComponentName()
          Get Component Name
 String getComponentType()
          Get Component Type
 String getDomain()
          Get the domain object
 String getModule()
          Get Module Name
 String getName()
          Get Component Name
 boolean save()
          Saves the generated meta data to the prespecified location as an XML file NOTE: assumes that the buildPhase1() and buildPhase2() methods have already been called!
 

Method Detail

buildPhase1

public void buildPhase1(boolean fullPackage)
                 throws Exception
Phase 1 of the build should create the initial skeleton component in as much detail as possible. It is the job of this phase to write out any module labels if some need to be produced. It should also guarentee that the 'getters' provided by this interface provide the correct data so that any component in phase 2 can use this information for linking

Note: To writing out module labels, the label object should be supplied in the construtor of the implementing class to facilitate this.

Parameters:
fullPackage - If true then the .applications. and .modules. package names are used. If this is false, these are ommited for a much more condensed package naming convention
Throws:
Exception - thrown in the event of a critical error

buildPhase2

public void buildPhase2(boolean fullPackage)
                 throws Exception
Phase 2 allows any inter-conponent linking to be performed. At this point all components have initially been build (by Phase 1), and are available (via the ComponentRegistry) for access. If you nee to perform linking in this phase via the Registry, then you should make sure it was passed into the constructor of the implementing class.
It is assumed that one the Phase 2 build has been completed, the component is now ready to have the save() method invoked.

Parameters:
fullPackage - If true then the .applications. and .modules. package names are used. If this is false, these are ommited for a much more condensed package naming convention
Throws:
Exception - thrown in the event of a critical error

save

public boolean save()
Saves the generated meta data to the prespecified location as an XML file NOTE: assumes that the buildPhase1() and buildPhase2() methods have already been called!

Returns:
returns true if the file saved ok, false if it failed

getName

public String getName()
Get Component Name

Returns:
The name this component typically this is the same as 'ComponentName' but does not include the module name

getDomain

public String getDomain()
Get the domain object

Returns:
The full class name of the domain object this component pattern is based on

getApplication

public String getApplication()
Get Application Name

Returns:
The name of the application this component is in

getModule

public String getModule()
Get Module Name

Returns:
The name of the module this component is in. The initial letter will always be capitalized

getComponentControllerPackage

public String getComponentControllerPackage()
Get Component Controller Package

Returns:
The package name that the component controller will be in

getComponentControllerClass

public String getComponentControllerClass()
Get Component Controller Class

Returns:
The class name of the component controller

getComponentType

public String getComponentType()
Get Component Type

Returns:
The type of component this is "Finder","Viewer","Maintenance","Lookup"

getComponentName

public String getComponentName()
Get Component Name

Returns:
The name this component is referenced by in Jaffa by the component manager


Copyright © 2002-2004 JAFFA Project.