com.ptc.netmarkets.nmixb
Class FolderContentsCopyHelper

java.lang.Object
  extended bywt.inf.template.containercopy.AbstractContainerCopyHandler
      extended bycom.ptc.netmarkets.nmixb.FolderContentsCopyHelper
All Implemented Interfaces:
ContainerCopyHandler, Serializable

public class FolderContentsCopyHelper
extends AbstractContainerCopyHandler
implements Serializable



Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
private  class FolderContentsCopyHelper.ForumTemplateProxy
           
 
Field Summary
private static AccessPermission[] ALL_PERMS
           
private static String CLASSNAME
           
private  Object[] DEF_PARAMS
           
private  Map docAclMap
           
private static int[] FROM_INDICES
           
private static String OBJECT_FORUM_TEMPLATE
           
private static String RESOURCE
           
private  List sourceDocs
           
private  List sourceForums
           
(package private)  FolderContentsCopyHelper.ForumTemplateProxy sourceTemplate
           
private  List targetDocs
           
private  String targetRootFolder
           
private  CommonCopyWorklist workList
           
 
Fields inherited from class wt.inf.template.containercopy.AbstractContainerCopyHandler
VERBOSE
 
Constructor Summary
FolderContentsCopyHelper()
           
 
Method Summary
private  void addForumToProxy(NMDocProxy proxy, WTDocument currDoc)
           
private  NMDocProxy[] constructDocProxies(WTContainerRef contRef, boolean isSource)
           
protected  void copyAddedObjects()
          Most of the time this is the only method that needs to be over-ridden.
private  WTDocument copyDocAcls(ObjectIdentifier sourceOid, WTDocument newDoc)
           
private  void copySharedObjects()
           
private  WTDocument createDocFromProxy(NMDocProxy proxy)
           
static WTDocument createDocFromProxy(WTContainerRef srcRef, WTContainerRef trgRef, WorklistDrivenCopier copier, NMDocProxy proxy)
           
private  DiscussionForumTemplate createForumTemplate()
           
private static boolean exportSourceContent(WTContainerRef srcRef, WTContainerRef targRef, NMDocProxy proxy)
           
private  WTDocument[] findContainerDocuments(WTContainerRef contRef)
          If this is turned on we are looking for ALL the documents for each project.
static WTDocumentMaster getDocMasterFromNameAndNumber(WTContainerRef contRef, String name, String number)
           
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.
private  void nukeTargetDocuments(WTContainerRef contRef)
           
private  void populateDocForums(NMDocProxy proxy, WTDocument newDoc)
           
 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 pruneObjects()
          This is not necessary for every type of object, but there are times when it is most efficient to prune objects that are present in the target container, but are absent in the source container.
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()
          If you need to prune the container, you had better know what the template left you with.
private  void setSourceTemplate(DiscussionForumTemplate dft)
           
private  void updateDocAclMap(WTDocument currDoc)
           
private static void uploadProxyContent(WTDocument newDoc, NMDocProxy proxy)
           
 
Methods inherited from class wt.inf.template.containercopy.AbstractContainerCopyHandler
copyObjects, getCopier, getSourceContainer, getTargetContainer, getWorklist, postFeedback, setCopier, setSourceContainer, setTargetContainer, setWorklist
 
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

FROM_INDICES

private static final int[] FROM_INDICES

targetRootFolder

private String targetRootFolder

targetDocs

private List targetDocs

sourceForums

private List sourceForums

OBJECT_FORUM_TEMPLATE

private static final String OBJECT_FORUM_TEMPLATE

sourceDocs

private List sourceDocs

workList

private CommonCopyWorklist workList

docAclMap

private Map docAclMap

sourceTemplate

FolderContentsCopyHelper.ForumTemplateProxy sourceTemplate

DEF_PARAMS

private Object[] DEF_PARAMS

ALL_PERMS

private static final AccessPermission[] ALL_PERMS
Constructor Detail

FolderContentsCopyHelper

public FolderContentsCopyHelper()
Method Detail

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

Overrides:
initialize in class AbstractContainerCopyHandler
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
Overrides:
printPreCopyVerbose in class AbstractContainerCopyHandler
Throws:
WTException

postPreCopyFeedback

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

Supported API: false

Specified by:
postPreCopyFeedback in interface ContainerCopyHandler
Overrides:
postPreCopyFeedback in class AbstractContainerCopyHandler
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

Overrides:
rememberSourceContainerObjects in class AbstractContainerCopyHandler
Throws:
WTException

rememberTargetContainerObjects

protected void rememberTargetContainerObjects()
                                       throws WTException
If you need to prune the container, you had better know what the template left you with.

Supported API: false

Overrides:
rememberTargetContainerObjects in class AbstractContainerCopyHandler
Throws:
WTException

pruneObjects

protected void pruneObjects()
                     throws WTException
This is not necessary for every type of object, but there are times when it is most efficient to prune objects that are present in the target container, but are absent in the source container.

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

Overrides:
copyAddedObjects in class AbstractContainerCopyHandler
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
Overrides:
postPostCopyFeedback in class AbstractContainerCopyHandler
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
Overrides:
printPostCopyVerbose in class AbstractContainerCopyHandler
Throws:
WTException

copyDocAcls

private WTDocument copyDocAcls(ObjectIdentifier sourceOid,
                               WTDocument newDoc)
                        throws WTException
Throws:
WTException

populateDocForums

private void populateDocForums(NMDocProxy proxy,
                               WTDocument newDoc)
                        throws WTException
Throws:
WTException

createDocFromProxy

private WTDocument createDocFromProxy(NMDocProxy proxy)
                               throws WTException
Throws:
WTException

createDocFromProxy

public static WTDocument createDocFromProxy(WTContainerRef srcRef,
                                            WTContainerRef trgRef,
                                            WorklistDrivenCopier copier,
                                            NMDocProxy proxy)
                                     throws WTException
Throws:
WTException

uploadProxyContent

private static void uploadProxyContent(WTDocument newDoc,
                                       NMDocProxy proxy)
                                throws WTException
Throws:
WTException

exportSourceContent

private static boolean exportSourceContent(WTContainerRef srcRef,
                                           WTContainerRef targRef,
                                           NMDocProxy proxy)
                                    throws WTException
Throws:
WTException

constructDocProxies

private NMDocProxy[] constructDocProxies(WTContainerRef contRef,
                                         boolean isSource)
                                  throws WTException
Throws:
WTException

updateDocAclMap

private void updateDocAclMap(WTDocument currDoc)
                      throws WTException
Throws:
WTException

findContainerDocuments

private WTDocument[] findContainerDocuments(WTContainerRef contRef)
                                     throws WTException
If this is turned on we are looking for ALL the documents for each project.

Throws:
WTException

addForumToProxy

private void addForumToProxy(NMDocProxy proxy,
                             WTDocument currDoc)
                      throws WTException
Throws:
WTException

getDocMasterFromNameAndNumber

public static WTDocumentMaster getDocMasterFromNameAndNumber(WTContainerRef contRef,
                                                             String name,
                                                             String number)
                                                      throws WTException
Throws:
WTException

nukeTargetDocuments

private void nukeTargetDocuments(WTContainerRef contRef)
                          throws WTException
Throws:
WTException

setSourceTemplate

private void setSourceTemplate(DiscussionForumTemplate dft)
                        throws WTException
Throws:
WTException

createForumTemplate

private DiscussionForumTemplate createForumTemplate()
                                             throws WTException
Throws:
WTException

copySharedObjects

private void copySharedObjects()
                        throws WTException
Throws:
WTException