com.ptc.windchill.uwgm.proesrv.rrc
Class RRCContentHelper

java.lang.Object
  extended bycom.ptc.windchill.uwgm.proesrv.rrc.RRCContentHelper

public final class RRCContentHelper
extends Object

Process Content attributes: EpmCadContent, SecondaryContents


Field Summary
private  RequestResultCache cache
           
private  WTKeyedMap contentMap
           
private static com.ptc.windchill.uwgm.soap.impl.uwgmdb.ContentSeq_i EMPTY_CONTENT_SEQ
           
private  WTKeyedMap ilInfoMap
           
private  Collection iterations
           
private static Log log
           
 
Constructor Summary
RRCContentHelper(Collection iterations, RequestResultCache cache)
          Construct helper for given collection of iterations
 
Method Summary
private  void fillContentInfo()
          Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects.
private  WTList getBoundUrlDataContentHolders()
          Gather all ContentHolders which have primary or secondary bound contene of type UrlData.
private  WTList getContentHolders()
          Gather all ContentHolders to retrieve Content (if requested).
private  WTList getFTContentHolders()
          Gather all SepFT content holders to retrieve Content (if requested).
private static boolean isFT(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)
           
private static boolean isPrimaryContent(EPMDocument epmDoc, ContentItem item)
           
static boolean isPrimaryContent(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter, com.ptc.windchill.uwgm.soap.uwgmdb.Content content)
           
private static boolean needFTContent(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra, com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)
           
private static boolean needPrimaryContent(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra, com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)
           
private static boolean needSecondaryContent(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra, com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)
           
private  void retrieveILInfoForFT()
          Retrieve ILInfos for FT objects (from contentMap) which have at least one content item of type URLData
 void setBoundContentInfo()
          Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects.
private static boolean setContent(com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i content_i, ContentItem item, ILFileInfo ilFileInfo, com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)
           
private static void setContentFromAppData(com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i content_i, ApplicationData appData, com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)
           
private static void setContentFromUrlData(com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i content_i, URLData urlData, ILFileInfo ilFileInfo, com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)
           
 void setContentInfo()
          Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects.
 void setContentInfo(EPMWorkspace epmWs)
          Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects from a particular workspace.
 void setContentInfo(Folder folder)
          Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects from a particular folder.
private static void setContentUrl(com.ptc.windchill.uwgm.soap.uwgmdb.Content.Iterator contentIter, WTKeyedMap urlMap)
           
private  void setContentUrl(WTKeyedMap itemsToQueryUrl)
           
 void setFTContentInfo()
          Set EpmCadContent attribute for a collection of EpmFamilyTable objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static Log log

EMPTY_CONTENT_SEQ

private static final com.ptc.windchill.uwgm.soap.impl.uwgmdb.ContentSeq_i EMPTY_CONTENT_SEQ

iterations

private final Collection iterations

cache

private final RequestResultCache cache

contentMap

private WTKeyedMap contentMap

ilInfoMap

private WTKeyedMap ilInfoMap
Constructor Detail

RRCContentHelper

public RRCContentHelper(Collection iterations,
                        RequestResultCache cache)
Construct helper for given collection of iterations

Parameters:
iterations - Collection
cache - RequestResultCache
Method Detail

setContentInfo

public void setContentInfo(EPMWorkspace epmWs)
Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects from a particular workspace.

Parameters:
epmWs - EPMWorkspace

setContentInfo

public void setContentInfo(Folder folder)
Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects from a particular folder.

Parameters:
folder - wt.folder.Folder

setContentInfo

public void setContentInfo()
Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects.


setFTContentInfo

public void setFTContentInfo()
Set EpmCadContent attribute for a collection of EpmFamilyTable objects.


retrieveILInfoForFT

private void retrieveILInfoForFT()
                          throws WTException
Retrieve ILInfos for FT objects (from contentMap) which have at least one content item of type URLData

Throws:
WTException - from WTCollection.persistableIterator()

setBoundContentInfo

public void setBoundContentInfo()
Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects. Process only iterations with content already retrieved and bound, so no requests to DB will be made.


getBoundUrlDataContentHolders

private WTList getBoundUrlDataContentHolders()
Gather all ContentHolders which have primary or secondary bound contene of type UrlData.

Returns:
List of ContentHolder objects

isPrimaryContent

public static boolean isPrimaryContent(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter,
                                       com.ptc.windchill.uwgm.soap.uwgmdb.Content content)

isPrimaryContent

private static boolean isPrimaryContent(EPMDocument epmDoc,
                                        ContentItem item)

getContentHolders

private WTList getContentHolders()
Gather all ContentHolders to retrieve Content (if requested).

Returns:
List of ContentHolder objects

getFTContentHolders

private WTList getFTContentHolders()
Gather all SepFT content holders to retrieve Content (if requested).

Returns:
List of ContentHolder objects

fillContentInfo

private void fillContentInfo()
Set EpmCadContent and SecondaryContents attributes for a collection of EpmIteration objects.


setContentUrl

private void setContentUrl(WTKeyedMap itemsToQueryUrl)

setContentUrl

private static void setContentUrl(com.ptc.windchill.uwgm.soap.uwgmdb.Content.Iterator contentIter,
                                  WTKeyedMap urlMap)

setContent

private static boolean setContent(com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i content_i,
                                  ContentItem item,
                                  ILFileInfo ilFileInfo,
                                  com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)

setContentFromAppData

private static void setContentFromAppData(com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i content_i,
                                          ApplicationData appData,
                                          com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)

setContentFromUrlData

private static void setContentFromUrlData(com.ptc.windchill.uwgm.soap.impl.uwgmdb.Content_i content_i,
                                          URLData urlData,
                                          ILFileInfo ilFileInfo,
                                          com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra)

needPrimaryContent

private static boolean needPrimaryContent(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra,
                                          com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)

needSecondaryContent

private static boolean needSecondaryContent(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra,
                                            com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)

isFT

private static boolean isFT(com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)

needFTContent

private static boolean needFTContent(com.ptc.windchill.uwgm.soap.uwgm.UwgmRequest.RequestedAttributes ra,
                                     com.ptc.windchill.uwgm.soap.uwgmdb.EpmIteration epmIter)