wt.inf.template.containercopy
Class AbstractContainerCopyHandler

java.lang.Object
  extended bywt.inf.template.containercopy.AbstractContainerCopyHandler
All Implemented Interfaces:
ContainerCopyHandler
Direct Known Subclasses:
DocTemplateCopyHelper, DomainStructCopyHelper, FolderContentsCopyHelper, FolderLinkCopyHelper, FolderStructureCopyHelper, ForumTopicCopyHelper, PolicyRuleCopyHelper, ProductStructCopyHelper, ProjectDataCopyHelper, ProjectPlanStructCopyHelper, RoleMemberMapCopyHelper, RuleChangesCopyHelper, SubscriptionsCopyHelper

public abstract class AbstractContainerCopyHandler
extends Object
implements ContainerCopyHandler



Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private  WorklistDrivenCopier copier
           
private static String RESOURCE
           
private  WTContainerRef sourceContainer
           
private  WTContainerRef targetContainer
           
protected static boolean VERBOSE
           
private  ContainerCopyWorklist worklist
           
 
Constructor Summary
AbstractContainerCopyHandler()
           
 
Method Summary
protected  void copyAddedObjects()
          Most of the time this is the only method that needs to be over-ridden.
 WTContainerRef copyObjects(WTContainerRef sourceContainer, WTContainerRef targetContainer, ContainerCopyWorklist workList)
          This implementation calls the following methods.
 WorklistDrivenCopier getCopier()
          Gets the value of the attribute: copier.
 WTContainerRef getSourceContainer()
          Gets the value of the attribute: sourceContainer.
 WTContainerRef getTargetContainer()
          Gets the value of the attribute: targetContainer.
 ContainerCopyWorklist getWorklist()
          Gets the value of the attribute: worklist.
protected  void initialize()
          This method provides an opportunity to do any initializion beyond setting the three target member variables that is performed in at the start of the method.
protected  void postFeedback(String resource, String resourceKey, Object[] params)
          Helper method to that posts WTMessage objects to the Feedback mechanism

Supported API: false
 void postPostCopyFeedback()
          Posts post copy feedback.
 void postPreCopyFeedback()
          Posts pre-copy user feedback.
 void printPostCopyVerbose()
          Prints verbose post-copy statements.
 void printPreCopyVerbose()
          Prints verbose pre-copy statements.
protected  void rememberSourceContainerObjects()
          Depending on the template being employed it may be necessary to to remember what was in the source container in order to do pruning.
protected  void rememberTargetContainerObjects()
          There may be some objects created by the creator delegate even if no XML is present.
 void setCopier(WorklistDrivenCopier a_Copier)
          Sets the value of the attribute: copier.
 void setSourceContainer(WTContainerRef a_SourceContainer)
          Sets the value of the attribute: sourceContainer.
 void setTargetContainer(WTContainerRef a_TargetContainer)
          Sets the value of the attribute: targetContainer.
 void setWorklist(ContainerCopyWorklist a_Worklist)
          Sets the value of the attribute: worklist.
 
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

copier

private WorklistDrivenCopier copier

sourceContainer

private WTContainerRef sourceContainer

targetContainer

private WTContainerRef targetContainer

worklist

private ContainerCopyWorklist worklist

VERBOSE

protected static final boolean VERBOSE
Constructor Detail

AbstractContainerCopyHandler

public AbstractContainerCopyHandler()
Method Detail

getCopier

public WorklistDrivenCopier getCopier()
Gets the value of the attribute: copier.

Supported API: false

Returns:
WorklistDrivenCopier

setCopier

public void setCopier(WorklistDrivenCopier a_Copier)
Sets the value of the attribute: copier.

Supported API: false

Specified by:
setCopier in interface ContainerCopyHandler
Parameters:
a_Copier -

getSourceContainer

public WTContainerRef getSourceContainer()
Gets the value of the attribute: sourceContainer.

Supported API: false

Returns:
WTContainerRef

setSourceContainer

public void setSourceContainer(WTContainerRef a_SourceContainer)
Sets the value of the attribute: sourceContainer.

Supported API: false

Parameters:
a_SourceContainer -

getTargetContainer

public WTContainerRef getTargetContainer()
Gets the value of the attribute: targetContainer.

Supported API: false

Returns:
WTContainerRef

setTargetContainer

public void setTargetContainer(WTContainerRef a_TargetContainer)
Sets the value of the attribute: targetContainer.

Supported API: false

Parameters:
a_TargetContainer -

getWorklist

public ContainerCopyWorklist getWorklist()
Gets the value of the attribute: worklist.

Supported API: false

Returns:
ContainerCopyWorklist

setWorklist

public void setWorklist(ContainerCopyWorklist a_Worklist)
Sets the value of the attribute: worklist.

Supported API: false

Specified by:
setWorklist in interface ContainerCopyHandler
Parameters:
a_Worklist -

copyObjects

public final WTContainerRef copyObjects(WTContainerRef sourceContainer,
                                        WTContainerRef targetContainer,
                                        ContainerCopyWorklist workList)
                                 throws WTException
This implementation calls the following methods. initialize printPreCopyVerbose postPreCopyFeedback rememberSourceContainerObjects rememberTargetContainerObjects pruneRemovedObjects copyAddedObjects printPostCopyVerbose postPostCopyFeedback

Supported API: false

Specified by:
copyObjects in interface ContainerCopyHandler
Parameters:
sourceContainer -
targetContainer -
workList -
Returns:
WTContainerRef
Throws:
WTException

initialize

protected void initialize()
                   throws WTException
This method provides an opportunity to do any initializion beyond setting the three target member variables that is performed in at the start of the method.

Supported API: false

Throws:
WTException

printPreCopyVerbose

public void printPreCopyVerbose()
                         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:
printPreCopyVerbose in interface ContainerCopyHandler
Throws:
WTException

postPreCopyFeedback

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

Supported API: false

Specified by:
postPreCopyFeedback in interface ContainerCopyHandler
Throws:
WTException

rememberTargetContainerObjects

protected void rememberTargetContainerObjects()
                                       throws WTException
There may be some objects created by the creator delegate even if no XML is present. This allows you to gather up references to those objects if they are needed in memory.

Supported API: false

Throws:
WTException

rememberSourceContainerObjects

protected void rememberSourceContainerObjects()
                                       throws WTException
Depending on the template being employed it may be necessary to to remember what was in the source container in order to do pruning. This method is the hook that enables that to happen.

Supported API: false

Throws:
WTException

copyAddedObjects

protected void copyAddedObjects()
                         throws WTException
Most of the time this is the only method that needs to be over-ridden.

Supported API: false

Throws:
WTException

postPostCopyFeedback

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

Supported API: false

Specified by:
postPostCopyFeedback in interface ContainerCopyHandler
Throws:
WTException

printPostCopyVerbose

public void printPostCopyVerbose()
                          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:
printPostCopyVerbose in interface ContainerCopyHandler
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