com.ptc.windchill.uwgm.common.pdm
Class AbstractRetriever

java.lang.Object
  extended bycom.ptc.windchill.uwgm.common.pdm.AbstractRetriever
All Implemented Interfaces:
PartDocumentFinder
Direct Known Subclasses:
FolderPartDocumentRetriever, PartDocumentRetriever, WorkspacePartDocumentRetriever

public abstract class AbstractRetriever
extends Object
implements PartDocumentFinder

base class for PartDocsRetrievers


Field Summary
protected  ConfigSpec configSpec
           
private static Log log
          logging
protected  WorkspaceContent workspaceContent
           
 
Constructor Summary
AbstractRetriever()
           
 
Method Summary
protected abstract  Persistable getRetrieverScope()
          returns retriever scope: EPMWorkspace, WTContainer, Folder
protected  WTKeyedMap postprocessFindOfSpecs(WTKeyedMap persistableSpecMap)
           
private  EPMDocument[] processFindOfSpec(EPMDocument document, FindOfRetrieverSpec findOfSpec)
           
 WTKeyedMap retrieveEPMDocumentMap(Collection retrieverSpecs)
          retrieves WTKeyedMap[EPMDocument, RetrieverSpec] by collection of RetrieverSpecs
 EPMDocument[] retrieveEPMDocuments(Collection retrieverSpecs)
          retrives an array of EPMDocument by a Collections of RetrieverSpec
protected  WTKeyedMap retrievePartDocuments(RetrieverSpec.Type[] types, Collection retrieverSpecs, Class clazz)
          internal retriever mechanizm
protected abstract  WTKeyedMap retrievePartDocuments(RetrieverSpec.Type specType, Collection retrieverSpecs, Class iterCl)
          retrieves Persistables of given iterCl class specified in Collection of retrieverSpecs
protected abstract  WTKeyedMap retrievePartDocumentsByOID(Collection retrieverSpecs, Class iterCl)
          retrieves Persistables specified in Collection of retrieverSpecs by OID
protected  WTKeyedMap retrievePartDocumentsFromWorkspace(WorkspaceContent workspaceContent, Collection retrieverSpecs, Class clazz)
          returns the collection of EPMDocument or WTPArts found by specs in WS
 WTKeyedMap retrieveWTPartMap(Collection retrieverSpecs)
          retrieves WTKeyedMap[WTPart, RetrieverSpec] by collection of RetrieverSpecs
 WTPart[] retrieveWTParts(Collection retrieverSpecs)
          retrives an array of WTPart by a Collections of RetrieverSpec
 void setConfigSpec(ConfigSpec configSpec)
           
 void setWorkspaceContent(WorkspaceContent workspaceContent)
          set WorkspaceContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configSpec

protected ConfigSpec configSpec

workspaceContent

protected WorkspaceContent workspaceContent

log

private static Log log
logging

Constructor Detail

AbstractRetriever

public AbstractRetriever()
Method Detail

setWorkspaceContent

public void setWorkspaceContent(WorkspaceContent workspaceContent)
set WorkspaceContent

use setWorkspaceContent to merge the results with WS content


setConfigSpec

public void setConfigSpec(ConfigSpec configSpec)

retrieveEPMDocuments

public EPMDocument[] retrieveEPMDocuments(Collection retrieverSpecs)
                                   throws WTException
retrives an array of EPMDocument by a Collections of RetrieverSpec

Specified by:
retrieveEPMDocuments in interface PartDocumentFinder
Parameters:
retrieverSpecs - Collection
Returns:
EPMDocument[]
Throws:
WTException

retrieveEPMDocumentMap

public WTKeyedMap retrieveEPMDocumentMap(Collection retrieverSpecs)
                                  throws WTException
retrieves WTKeyedMap[EPMDocument, RetrieverSpec] by collection of RetrieverSpecs

Specified by:
retrieveEPMDocumentMap in interface PartDocumentFinder
Parameters:
retrieverSpecs - Collection
Returns:
WTKeyedMap
Throws:
WTException

retrieveWTParts

public WTPart[] retrieveWTParts(Collection retrieverSpecs)
                         throws WTException
retrives an array of WTPart by a Collections of RetrieverSpec

Specified by:
retrieveWTParts in interface PartDocumentFinder
Parameters:
retrieverSpecs - Collection
Returns:
EPMDocument[]
Throws:
WTException

retrieveWTPartMap

public WTKeyedMap retrieveWTPartMap(Collection retrieverSpecs)
                             throws WTException
retrieves WTKeyedMap[WTPart, RetrieverSpec] by collection of RetrieverSpecs

Specified by:
retrieveWTPartMap in interface PartDocumentFinder
Parameters:
retrieverSpecs - Collection
Returns:
WTKeyedMap
Throws:
WTException

retrievePartDocuments

protected WTKeyedMap retrievePartDocuments(RetrieverSpec.Type[] types,
                                           Collection retrieverSpecs,
                                           Class clazz)
                                    throws WTException
internal retriever mechanizm

Parameters:
types - SpecType[]
retrieverSpecs - Collection
Returns:
WTCollection
Throws:
WTException

retrievePartDocumentsFromWorkspace

protected WTKeyedMap retrievePartDocumentsFromWorkspace(WorkspaceContent workspaceContent,
                                                        Collection retrieverSpecs,
                                                        Class clazz)
                                                 throws WTException
returns the collection of EPMDocument or WTPArts found by specs in WS

Throws:
WTException

postprocessFindOfSpecs

protected WTKeyedMap postprocessFindOfSpecs(WTKeyedMap persistableSpecMap)
                                     throws WTException
Throws:
WTException

processFindOfSpec

private EPMDocument[] processFindOfSpec(EPMDocument document,
                                        FindOfRetrieverSpec findOfSpec)
                                 throws WTException
Throws:
WTException

retrievePartDocuments

protected abstract WTKeyedMap retrievePartDocuments(RetrieverSpec.Type specType,
                                                    Collection retrieverSpecs,
                                                    Class iterCl)
                                             throws WTException
retrieves Persistables of given iterCl class specified in Collection of retrieverSpecs

Parameters:
specType - SpecType
retrieverSpecs - Collection
iterCl - Class
Returns:
WTKeyedMap [Persistable, Spec]
Throws:
WTException

retrievePartDocumentsByOID

protected abstract WTKeyedMap retrievePartDocumentsByOID(Collection retrieverSpecs,
                                                         Class iterCl)
                                                  throws WTException
retrieves Persistables specified in Collection of retrieverSpecs by OID

Parameters:
retrieverSpecs - Collection
iterCl - Class
Returns:
WTKeyedMap [Persistable, Spec]
Throws:
WTException

getRetrieverScope

protected abstract Persistable getRetrieverScope()
returns retriever scope: EPMWorkspace, WTContainer, Folder