wt.folder
Class DefaultFolderCache.WindchillPDMCabinets

java.lang.Object
  extended bywt.folder.DefaultFolderCache.WindchillPDMCabinets
Enclosing class:
DefaultFolderCache

static final class DefaultFolderCache.WindchillPDMCabinets
extends Object

Preserve the behavior of the old folder cache, for Windchill PDM. This is to cache all shared cabinets, and optionally to cache personal cabinets. The cache is needed so that to improve the performance of the display of the Windchill Explorer.


Field Summary
(package private)  DefaultFolderCache.WindchillPDMMessenger messenger
           
(package private)  DirtyMap oidsToPersonalCabinets
           
(package private)  DirtyMap oidsToSharedCabinets
           
 
Constructor Summary
(package private) DefaultFolderCache.WindchillPDMCabinets()
           
 
Method Summary
(package private)  void addAll(WTSet target, Collection cabinets, boolean read_only)
          Add the given collection of cabinets to the target set.
(package private)  WTSet get(boolean shared_only, boolean read_only)
          Get all the requested Windchill PDM cabinets
(package private)  Cabinet get(ObjectIdentifier oid)
          Get the cabinet with the given oid, or null if it isn't cached
(package private)  int getCacheType(Cabinet c)
          Determines whether the given cabinet should be cached, and if so, what cache to put it in
(package private)  void initializeCaches()
          Put all cacheable cabinets in the cache
(package private)  void insertOrUpdateCabinets(WTCollection cabinets)
          Add the given cabinets to the cache, if necessary
(package private)  void removeCabinets(WTCollection cabinets)
          Remove the given cabinets from the cache, if necessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oidsToSharedCabinets

final DirtyMap oidsToSharedCabinets

oidsToPersonalCabinets

final DirtyMap oidsToPersonalCabinets

messenger

final DefaultFolderCache.WindchillPDMMessenger messenger
Constructor Detail

DefaultFolderCache.WindchillPDMCabinets

DefaultFolderCache.WindchillPDMCabinets()
Method Detail

initializeCaches

void initializeCaches()
                throws WTException
Put all cacheable cabinets in the cache

Throws:
ClassicContainerNotFoundException - If the classic container hasn't been created yet. This can happen during load
WTException

insertOrUpdateCabinets

void insertOrUpdateCabinets(WTCollection cabinets)
                      throws WTException
Add the given cabinets to the cache, if necessary

Parameters:
cabinets -
Throws:
WTException

removeCabinets

void removeCabinets(WTCollection cabinets)
              throws WTException
Remove the given cabinets from the cache, if necessary

Parameters:
cabinets -
Throws:
WTException

getCacheType

int getCacheType(Cabinet c)
           throws WTException
Determines whether the given cabinet should be cached, and if so, what cache to put it in

Parameters:
c -
Returns:
  • WINDCHILL_PDM_ALL_CABINETS If the cabinet is a personal cabinet and should be cached
  • WINDCHILL_PDM_SHARED_CABINETS If the cabinet is a shared cabinet in the classic container, or the site default or system cabinet
  • WINDCHILL_PDM_NO_CABINETS If the cabinet is not in the classic container, and personal cabinets aren't being cached
Throws:
WTException

get

WTSet get(boolean shared_only,
          boolean read_only)
    throws WTException
Get all the requested Windchill PDM cabinets

Parameters:
shared_only - Whether or not to return shared cabinets
read_only - Whether or not to clone the cabinets
Throws:
WTException

get

Cabinet get(ObjectIdentifier oid)
      throws WTException
Get the cabinet with the given oid, or null if it isn't cached

Parameters:
oid - The oid of the Cabinet
Throws:
WTException

addAll

void addAll(WTSet target,
            Collection cabinets,
            boolean read_only)
Add the given collection of cabinets to the target set.

Parameters:
target -
cabinets - Contains cabinets and placeholder objects
read_only - Whether or not to clone the cabinets