wt.inf.template.ix
Class AbstractTemplateFragmentGenerator

java.lang.Object
  extended bywt.inf.template.ix.AbstractTemplateFragmentGenerator
All Implemented Interfaces:
TemplateFragmentGenerator
Direct Known Subclasses:
CreateForumTemplateGenerator, DocTemplateGenerator, ForumTemplateGenerator, OrgStructureTemplateGenerator, PolicyRulesTemplateGenerator, ProductStructureGenerator, ProjectMembershipTemplateGenerator, ProjectPlanTemplateGenerator, RulesTemplateGenerator, ShareMapGenerator, TemplateDocumentGenerator

public abstract class AbstractTemplateFragmentGenerator
extends Object
implements TemplateFragmentGenerator



Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
static Object[] DEF_PARAMS
           
private  WorklistDrivenTemplateGenerator generator
           
private static String RESOURCE
           
protected static boolean VERBOSE
           
private  TemplateGeneratorWorklist worklist
           
 
Constructor Summary
AbstractTemplateFragmentGenerator()
           
 
Method Summary
protected abstract  IxbElement exportObjectSet(IxbElement parentElement, Exporter exporter)
          Adds the found objects to the result list.
protected  void findObjects(Exporter exp)
          Each concrete TemplateGenerator is responsible for finding the appropriate level of objects to export and to determine the appropriate structure.
 IxbElement generateFragment(IxbElement topElem, Exporter exporter)
          

Supported API: false
 WorklistDrivenTemplateGenerator getGenerator()
           
 TemplateGeneratorWorklist getWorklist()
          

Supported API: false
 void initialize()
          

Supported API: false
protected  void postFeedback(String resource, String resourceKey, Object[] params)
          Helper method to that posts WTMessage objects to the Feedback mechanism

Supported API: false
 void postPostExportFeedback()
          Posts post copy feedback.
 void postPreExportFeedback()
          Posts pre-copy user feedback.
 void printPostExportVerbose()
          Prints verbose post-copy statements.
 void printPreExportVerbose()
          Prints verbose pre-copy statements.
 void setGenerator(WorklistDrivenTemplateGenerator generator)
          

Supported API: false
 void setWorkList(TemplateGeneratorWorklist a_workList)
          

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

generator

private WorklistDrivenTemplateGenerator generator

VERBOSE

protected static final boolean VERBOSE

worklist

private TemplateGeneratorWorklist worklist

DEF_PARAMS

public static final Object[] DEF_PARAMS
Constructor Detail

AbstractTemplateFragmentGenerator

public AbstractTemplateFragmentGenerator()
Method Detail

printPreExportVerbose

public void printPreExportVerbose()
                           throws WTException
Prints verbose pre-copy statements. Handler implementor is responsible for deciding what to use for this value. The handlers residing in wt.inf.template use the property wt.inf.template.verboseCopy

Supported API: false

Specified by:
printPreExportVerbose in interface TemplateFragmentGenerator
Throws:
WTException

printPostExportVerbose

public void printPostExportVerbose()
                            throws WTException
Prints verbose post-copy statements. Handler implementor is responsible for deciding what to use for this value. The handlers residing in wt.inf.template use the property wt.inf.template.verboseCopy

Supported API: false

Specified by:
printPostExportVerbose in interface TemplateFragmentGenerator
Throws:
WTException

postPreExportFeedback

public void postPreExportFeedback()
                           throws WTException
Posts pre-copy user feedback.

Supported API: false

Specified by:
postPreExportFeedback in interface TemplateFragmentGenerator
Throws:
WTException

postPostExportFeedback

public void postPostExportFeedback()
                            throws WTException
Posts post copy feedback. (Copy of foo succeeded).

Supported API: false

Specified by:
postPostExportFeedback in interface TemplateFragmentGenerator
Throws:
WTException

setGenerator

public void setGenerator(WorklistDrivenTemplateGenerator generator)
                  throws WTException


Supported API: false

Specified by:
setGenerator in interface TemplateFragmentGenerator
Parameters:
generator -
Throws:
WTException

initialize

public void initialize()


Supported API: false


findObjects

protected void findObjects(Exporter exp)
                    throws WTException
Each concrete TemplateGenerator is responsible for finding the appropriate level of objects to export and to determine the appropriate structure. The default is to do nothing.

Supported API: false

Parameters:
exp -
Throws:
WTException

exportObjectSet

protected abstract IxbElement exportObjectSet(IxbElement parentElement,
                                              Exporter exporter)
                                       throws WTException
Adds the found objects to the result list. The return value is the updated GenerationElement This must be over-ridden by the subclass.

Supported API: false

Parameters:
parentElement -
exporter - The container that we are working on can be obtained by calling exporter.getSourceContainerRef(). It also has some other context data that is usefull for export.
Returns:
IxbElement
Throws:
WTException

postFeedback

protected void postFeedback(String resource,
                            String resourceKey,
                            Object[] params)
                     throws WTException
Helper method to that posts WTMessage objects to the Feedback mechanism

Supported API: false

Parameters:
resource -
resourceKey -
params -
Throws:
WTException

generateFragment

public final IxbElement generateFragment(IxbElement topElem,
                                         Exporter exporter)
                                  throws WTException


Supported API: false

Specified by:
generateFragment in interface TemplateFragmentGenerator
Parameters:
topElem -
exporter -
Returns:
IxbElement
Throws:
WTException

setWorkList

public void setWorkList(TemplateGeneratorWorklist a_workList)


Supported API: false

Specified by:
setWorkList in interface TemplateFragmentGenerator
Parameters:
a_workList -

getWorklist

public TemplateGeneratorWorklist getWorklist()


Supported API: false

Returns:
TemplateGeneratorWorklist

getGenerator

public WorklistDrivenTemplateGenerator getGenerator()