wt.epm.ndi.impl
Class NDICache

java.lang.Object
  extended bywt.epm.ndi.impl.NDICache

class NDICache
extends Object

Cache used by various NDI Implementations This functionality is available from server side only Supported API: false Extendable: false


Field Summary
private  Map column2depId
           
private  WTValuedMap doc2containedIn
           
private  WTKeyedMap doc2counter
           
private  WTKeyedMap doc2dependencies
           
private  WTKeyedMap doc2FeatureValues
           
private  WTKeyedMap doc2ParameterValues
           
private  boolean docAttrRefreshed
           
private  EPMCache.ObjectCache documents
           
private static Class EPMDOWNLOAD_CLASS
           
private static String EPMRESOURCE
           
private  WTKeyedMap ft2columns
           
private  WTKeyedMap ft2containedIn
           
private  WTCollection fts
           
private  WTKeyedMap generic2variantLink
           
private  WTKeyedMap holder2defMap
           
private  WTKeyedMap holder2paramMap
           
private  WTKeyedMap link2cells
           
private  boolean linkAttrRefreshed
           
private  Map name2attributeDef
           
private  WTValuedMap orig2working
           
private  NDICacheProfiler profiler
           
private  EPMWorkspace workspace
           
 
Constructor Summary
(package private) NDICache(EPMWorkspace workspace, WTCollection objects)
          Constructs instance of NDICache using documents and family tables
 
Method Summary
private  void checkDocumentIterations()
           
 EPMDependencyLink findDependencyLink(EPMDependencyLink link)
           
 EPMDocument findDocument(EPMDocument doc)
           
 EPMDocument findDocument(ObjectIdentifier oid)
           
 EPMFamilyTable findFamilyTable(EPMFamilyTable familyTable)
           
private  WTList getAllFTColumns()
           
 WTCollection getAllInstances(EPMFamilyTable ft)
          Returns all documents that are member of given EPMFamilyTable
 String getColumnUniqueId(EPMFamilyTableColumn column)
          Returns dependency uniqueId for a given family table columns
 EPMContainedIn getContainedIn(EPMDocument instance)
          Returns EPMContainedIn link to the familyTable in workspace
private  WTSet getContainedIn(EPMFamilyTable ft)
           
private  WTList getContainedInLinks()
           
 WTSet getDependencies(EPMDocument doc)
          Returns WTSet of EPM Dependency links for the given document.
private  WTList getDependencyLinks()
           
 Collection getDocuments()
          Return all the cache EPMDocuments
 EPMFamilyTable getFamilyTable(EPMDocument document)
          Returns documents EPMFamilyTable in workspace
 Map getFeatureValues(EPMDocument doc)
          Returns Feature Map for the given document.
 EPMFamilyTableCell getFTCell(EPMContainedIn link, EPMFamilyTableColumn column)
           
 WTCollection getFTColumns(EPMFamilyTable ft)
           
 AttributeDefDefaultView getIBADefinitionByName(String name)
           
 WTCollection getInstances(EPMDocument generic, EPMFamilyTable ft)
          Returns one level instances of given generic in the given family table.
 AttributeDefinitionReference getMappedDefinition(QueryKey holderKey, String paramName)
           
 String getMappedParameterName(QueryKey holderKey, AttributeDefDefaultView definition)
           
 Map getParameterValues(EPMDocument doc)
          Returns Parameter Map for the given document.
 NDICacheProfiler getProfiler()
           
private  List getStaleHolders(Collection ibaHolders)
           
 int getUpdateCounter(EPMDocument doc)
           
 EPMDocument getWorkingCopy(EPMDocument doc)
          Returns working copy of document if is checked out the #workspace.
 void initAll()
          Usually NDICache initializes cache lazily.
private  void initCheckoutInfo()
           
private  void initColumnDependencyIds()
           
private  void initDependencyInfo()
           
private  void initFamilyTableInfo()
           
private  void initFeatureValues()
           
private  void initFTCells()
           
private  void initFTColumns()
           
private  void initIBADefinitionInfo(WTList holders)
           
private  void initMappingInfo(WTCollection allHolders)
           
private  void initNestedFamilyInfo()
           
private  void initParameterValues()
           
private  void initUpdateCounter()
           
 void refreshAttributes()
          Refresh attributes of all documents and dependency links together
private  void validateFTCompatibility()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values

workspace

private EPMWorkspace workspace

documents

private EPMCache.ObjectCache documents

fts

private WTCollection fts

doc2dependencies

private WTKeyedMap doc2dependencies

orig2working

private WTValuedMap orig2working

doc2containedIn

private WTValuedMap doc2containedIn

ft2containedIn

private WTKeyedMap ft2containedIn

generic2variantLink

private WTKeyedMap generic2variantLink

name2attributeDef

private Map name2attributeDef

ft2columns

private WTKeyedMap ft2columns

link2cells

private WTKeyedMap link2cells

doc2counter

private WTKeyedMap doc2counter

holder2paramMap

private WTKeyedMap holder2paramMap

holder2defMap

private WTKeyedMap holder2defMap

column2depId

private Map column2depId

docAttrRefreshed

private boolean docAttrRefreshed

linkAttrRefreshed

private boolean linkAttrRefreshed

doc2ParameterValues

private WTKeyedMap doc2ParameterValues

doc2FeatureValues

private WTKeyedMap doc2FeatureValues

EPMDOWNLOAD_CLASS

private static final Class EPMDOWNLOAD_CLASS

profiler

private NDICacheProfiler profiler
Constructor Detail

NDICache

NDICache(EPMWorkspace workspace,
         WTCollection objects)
   throws WTException
Constructs instance of NDICache using documents and family tables

Parameters:
workspace - EPMWorkspace
Method Detail

getWorkingCopy

public EPMDocument getWorkingCopy(EPMDocument doc)
                           throws WTException
Returns working copy of document if is checked out the #workspace. Returns null other

Throws:
WTException

getDependencies

public WTSet getDependencies(EPMDocument doc)
                      throws WTException
Returns WTSet of EPM Dependency links for the given document. Each element in the set is a link whose other-side object is inflated. Returns Empty WTSet if there are no dependencies

Throws:
WTException

refreshAttributes

public void refreshAttributes()
                       throws WTException
Refresh attributes of all documents and dependency links together

Throws:
WTException

initAll

public void initAll()
             throws WTException
Usually NDICache initializes cache lazily. This method provides one point access to load all the data.

Throws:
WTException

getDocuments

public Collection getDocuments()
                        throws WTException
Return all the cache EPMDocuments

Throws:
WTException

checkDocumentIterations

private void checkDocumentIterations()
                              throws WTException
Throws:
WTException

initIBADefinitionInfo

private void initIBADefinitionInfo(WTList holders)

initMappingInfo

private void initMappingInfo(WTCollection allHolders)
                      throws WTException
Throws:
WTException

getAllInstances

public WTCollection getAllInstances(EPMFamilyTable ft)
                             throws WTException
Returns all documents that are member of given EPMFamilyTable

Parameters:
ft - EPMFamilyTable
Returns:
WTSet of EPMDocuments
Throws:
WTException

getInstances

public WTCollection getInstances(EPMDocument generic,
                                 EPMFamilyTable ft)
                          throws WTException
Returns one level instances of given generic in the given family table.

Parameters:
generic - document
ft - EPMFamilyTable
Returns:
WTSet of EPMDocument instances
Throws:
WTException

getContainedIn

private WTSet getContainedIn(EPMFamilyTable ft)

getContainedIn

public EPMContainedIn getContainedIn(EPMDocument instance)
                              throws WTException
Returns EPMContainedIn link to the familyTable in workspace

Parameters:
instance - EPMDocument
Returns:
EPMContainedIn
Throws:
WTException

getFamilyTable

public EPMFamilyTable getFamilyTable(EPMDocument document)
                              throws WTException
Returns documents EPMFamilyTable in workspace

Parameters:
document - EPMDocument
Returns:
EPMFamilyTable
Throws:
WTException

initCheckoutInfo

private void initCheckoutInfo()
                       throws WTException
Throws:
WTException

initDependencyInfo

private void initDependencyInfo()
                         throws WTException
Throws:
WTException

getDependencyLinks

private WTList getDependencyLinks()

getContainedInLinks

private WTList getContainedInLinks()

getStaleHolders

private List getStaleHolders(Collection ibaHolders)
                      throws WTException
Throws:
WTException

initFamilyTableInfo

private void initFamilyTableInfo()
                          throws WTException
Throws:
WTException

validateFTCompatibility

private void validateFTCompatibility()
                              throws WTException
Throws:
WTException

initNestedFamilyInfo

private void initNestedFamilyInfo()
                           throws WTException
Throws:
WTException

getFTColumns

public WTCollection getFTColumns(EPMFamilyTable ft)
                          throws WTException
Throws:
WTException

initFTColumns

private void initFTColumns()
                    throws WTException
Throws:
WTException

getIBADefinitionByName

public AttributeDefDefaultView getIBADefinitionByName(String name)
                                               throws WTException
Throws:
WTException

getMappedParameterName

public String getMappedParameterName(QueryKey holderKey,
                                     AttributeDefDefaultView definition)
                              throws WTException
Throws:
WTException

getMappedDefinition

public AttributeDefinitionReference getMappedDefinition(QueryKey holderKey,
                                                        String paramName)
                                                 throws WTException
Throws:
WTException

getFTCell

public EPMFamilyTableCell getFTCell(EPMContainedIn link,
                                    EPMFamilyTableColumn column)
                             throws WTException
Throws:
WTException

initFTCells

private void initFTCells()
                  throws WTException
Throws:
WTException

getUpdateCounter

public int getUpdateCounter(EPMDocument doc)
                     throws WTException
Throws:
WTException

initUpdateCounter

private void initUpdateCounter()
                        throws WTException
Throws:
WTException

findDependencyLink

public EPMDependencyLink findDependencyLink(EPMDependencyLink link)
                                     throws WTException
Throws:
WTException

findFamilyTable

public EPMFamilyTable findFamilyTable(EPMFamilyTable familyTable)
                               throws WTException
Throws:
WTException

findDocument

public EPMDocument findDocument(EPMDocument doc)

getAllFTColumns

private WTList getAllFTColumns()

initColumnDependencyIds

private void initColumnDependencyIds()
                              throws WTException
Throws:
WTException

getColumnUniqueId

public String getColumnUniqueId(EPMFamilyTableColumn column)
                         throws WTException
Returns dependency uniqueId for a given family table columns

Parameters:
column - EPMFamilyTableReference
Returns:
String
Throws:
WTException

getParameterValues

public Map getParameterValues(EPMDocument doc)
                       throws WTException
Returns Parameter Map for the given document.

Throws:
WTException

initParameterValues

private void initParameterValues()
                          throws WTException
Throws:
WTException

getFeatureValues

public Map getFeatureValues(EPMDocument doc)
                     throws WTException
Returns Feature Map for the given document.

Throws:
WTException

initFeatureValues

private void initFeatureValues()
                        throws WTException
Throws:
WTException

findDocument

public EPMDocument findDocument(ObjectIdentifier oid)

getProfiler

public NDICacheProfiler getProfiler()