wt.epm.upload
Class CacheDocument

java.lang.Object
  extended bywt.epm.upload.CacheObject
      extended bywt.epm.upload.CacheDocument
All Implemented Interfaces:
Cache.Iterated, Cache.Named, CacheObjectOwner
Direct Known Subclasses:
Cache.CacheDocument

public class CacheDocument
extends CacheObject
implements Cache.Iterated, Cache.Named


Nested Class Summary
 class CacheDocument.CacheContainedInLink
           
 class CacheDocument.CacheDependencyLink
           
 class CacheDocument.CacheFamilyTableCell
           
 class CacheDocument.CacheFeatureValue
           
 class CacheDocument.CacheParameterMap
           
 class CacheDocument.CacheParameterValue
           
 class CacheDocument.CacheVariantLink
           
private  class CacheDocument.Instance
           
 
Field Summary
static String CACHE_SCOPE_EPMDOCUMENT
           
private  Map dependencies
           
private  Map featureValues
           
private  CacheDocument.Instance instance
           
private  Set instances
           
private  Map parameterValues
           
private  Map paramNameMaps
           
private static String RESOURCE
           
static int STATUS_ADD_TO_WORKSPACE
           
static int STATUS_FT_MAMBER_MODIFIED
           
static int STATUS_IMMUNE_TO_GHOST_IGNORING
           
static int STATUS_NEW_IN_WORKSPACE
           
 
Fields inherited from class wt.epm.upload.CacheObject
 
Constructor Summary
CacheDocument(CacheObjectOwner owner, EPMDocument document)
           
 
Method Summary
protected  boolean addInstance(CacheDocument instance)
           
protected  void checkFamilyTableMemberModifiability()
           
private  void checkInstance()
           
protected  void checkModifiability()
           
protected  void checkModifiability(String msgKey)
           
 void clearFamilyTableMemberAsModified()
           
 CacheDocument.CacheContainedInLink createCacheContainedInLink(EPMContainedIn link)
           
 CacheDocument.CacheDependencyLink createCacheDependencyLink(EPMDependencyLink link)
           
 CacheDocument.CacheFamilyTableCell createCacheFamilyTableCell(String name, EPMFamilyTableCell cell)
           
 CacheDocument.CacheFeatureValue createCacheFeatureValue(EPMFeatureValue feat)
           
 CacheDocument.CacheParameterMap createCacheParameterMap(EPMParameterMap map)
           
 CacheDocument.CacheParameterValue createCacheParameterValue(EPMParameterValue param)
           
 CacheDocument.CacheVariantLink createCacheVariantLink(EPMVariantLink link)
           
private  CacheDocument.CacheVariantLink createCacheVariantLink(EPMVariantLink link, boolean init)
           
 CacheDocument.CacheContainedInLink createNewContainedInLink(CacheFamilyTable familyTable, String asStoredName, int verifyStatus, boolean locked)
           
 CacheDocument.CacheFamilyTableCell createNewFamilyTableCell(String name, boolean inherited, boolean isDefinition, EPMFamilyTableColumn epmColumn)
           
 CacheDocument.CacheFamilyTableCell createNewFamilyTableDependencyCell(String name, boolean inherited, boolean isDefinition, EPMFamilyTableColumn epmColumn)
           
 CacheDocument.CacheFeatureValue createNewFeatureValue(String name, Object value)
           
 CacheDocument.CacheDependencyLink createNewMemberLink(CacheDocument target, String linkUniqueId, int depType, String toModelNameAsStored)
           
 CacheDocument.CacheParameterMap createNewParameterMap(String parameterName, AttributeDefDefaultView ibaDef)
           
 CacheDocument.CacheParameterValue createNewParameterValue(String name, Object value)
           
 CacheDocument.CacheDependencyLink createNewReferenceLink(CacheDocument target, String linkUniqueId, int depType, String toModelNameAsStored)
           
 CacheDocument.CacheVariantLink createNewVariantLink(CacheDocument generic)
           
 void deleteFamilyTable()
           
 void deleteFamilyTableUnless(String topGenericCadName)
           
 void deleteGeneric()
           
 void deleteGenericAndKeepVariantLink()
           
 void deleteGenericUnless(String genericCadName)
           
 void dump(PrintStream out, String shift)
           
 void extractFromFamilyTable()
           
 void extractUnless(String genericCadName, String topGenericCadName)
           
 CacheDocument.CacheContainedInLink getCacheContainedInLink()
           
 CacheDocument.CacheDependencyLink getCacheDependencyLink(String linkUniqueId)
           
 CacheFamilyTable getCacheFamilyTable()
           
 CacheDocument.CacheFamilyTableCell getCacheFamilyTableCell(String name)
           
 Map getCacheFamilyTableCells()
           
 CacheDocument.CacheFeatureValue getCacheFeatureValue(String name)
           
 Map getCacheFeatureValues()
           
 CacheDocument getCacheGeneric()
           
 String getCacheName()
           
 CacheDocument.CacheParameterMap getCacheParameterMap(String parameterName)
           
 CacheDocument.CacheParameterValue getCacheParameterValue(String name)
           
 Map getCacheParameterValues()
           
 String getCacheScope()
           
 CacheDocument getCacheTopGeneric()
           
 CacheDocument.CacheVariantLink getCacheVariantLink()
           
 EPMDependencyLink getDependencyLink(String linkUniqueId)
           
 Map getDependencyLinks()
           
protected  String getDisplayName()
           
 EPMDocument getDocument()
           
 EPMContainedIn getEPMContainedInLink()
           
 EPMVariantLink getEPMVariantLink()
           
 EPMFamilyTable getFamilyTable()
           
 EPMFamilyTableCell getFamilyTableCell(String name)
           
 EPMFeatureValue getFeatureValue(String name)
           
 EPMDocument getGeneric()
           
 Set getInstances()
           
 CacheId getMasterCacheId()
           
 EPMParameterMap getParameterMap(String parameterName)
           
 Map getParameterNameMaps()
           
 EPMParameterValue getParameterValue(String name)
           
protected  String getStatusAsString()
           
 CacheDocument.CacheVariantLink initCacheVariantLink(EPMVariantLink link)
           
 boolean isCheckedOut()
           
 boolean isFamilyTableMemberModified()
           
 boolean isGeneric()
           
 boolean isInstance()
           
 boolean isModifiable()
           
 boolean isNew()
           
 boolean isNewInWorkspace()
           
 void markFamilyTableMemberAsModified()
           
 void prepareCreating()
           
 void prepareDeleting()
           
 void prepareUpdating()
           
 void release()
           
 void releaseChildObject(CacheObject cacheObject)
          Removes child cache object from this owner cache object.
 CacheDocument.CacheDependencyLink removeDependencyLink(String linkUniqueId)
           
 CacheDocument.CacheFamilyTableCell removeFamilyTableCell(String name)
           
 CacheDocument.CacheFeatureValue removeFeatureValue(String name)
           
protected  boolean removeInstance(CacheDocument instance)
           
 CacheDocument.CacheParameterMap removeParameterMap(String parameterName)
           
 CacheDocument.CacheParameterValue removeParameterValue(String name)
           
private  void setFamilyTableAndContainedInLink(CacheDocument.CacheContainedInLink link)
           
private  void setFamilyTableCell(String name, CacheDocument.CacheFamilyTableCell cell)
           
private  void setFeatureValue(String name, CacheDocument.CacheFeatureValue cacheFeat)
           
 void setGeneric(CacheDocument generic)
           
private  void setGenericAndVariantLink(CacheDocument.CacheVariantLink link, boolean init)
           
 void setNewInWorkspace(boolean value)
           
private  void setParameterValue(String name, CacheDocument.CacheParameterValue cacheParam)
           
 String toString()
           
 CacheDocument.CacheContainedInLink updateContainedInLink(CacheDocument member, CacheDocument.CacheContainedInLink cacheLink, CacheFamilyTable familyTable, String asStoredName, int verifyStatus, boolean locked)
           
 void updateFamilyTableStatusFlag()
          updateFamilyTableStatusFlag
 CacheDocument.CacheVariantLink updateVariantLink(CacheDocument member, CacheDocument.CacheVariantLink cacheLink, CacheDocument generic)
           
 
Methods inherited from class wt.epm.upload.CacheObject
cacheCollection, cacheObject, clearStatus, delete, equals, getAttributeNames, getCache, getCacheId, getObjectIdentifier, getPersistableObject, hashCode, isCreated, isDeleted, isHasAttributeDefinition, isMarkedAsCreated, isMarkedAsModified, isMarkedForDeletion, isModified, isPersisted, isStatusSet, markAsCreated, markAsModified, markAsModified, markForDeletion, markForDeletion, markForDeletion, refresh, releaseCollection, releaseMap, releaseObject, removeValueFromMap, save, setMarkedAsCreated, setMarkedAsModified, setMarkedForDeletion, setPersistableObject, setStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CACHE_SCOPE_EPMDOCUMENT

public static final String CACHE_SCOPE_EPMDOCUMENT
See Also:
Constant Field Values

STATUS_ADD_TO_WORKSPACE

public static final int STATUS_ADD_TO_WORKSPACE
See Also:
Constant Field Values

STATUS_IMMUNE_TO_GHOST_IGNORING

public static final int STATUS_IMMUNE_TO_GHOST_IGNORING
See Also:
Constant Field Values

STATUS_NEW_IN_WORKSPACE

public static final int STATUS_NEW_IN_WORKSPACE
See Also:
Constant Field Values

STATUS_FT_MAMBER_MODIFIED

public static final int STATUS_FT_MAMBER_MODIFIED
See Also:
Constant Field Values

dependencies

private Map dependencies

parameterValues

private Map parameterValues

featureValues

private Map featureValues

instances

private Set instances

instance

private CacheDocument.Instance instance

paramNameMaps

private Map paramNameMaps
Constructor Detail

CacheDocument

public CacheDocument(CacheObjectOwner owner,
                     EPMDocument document)
              throws WTException
Method Detail

getDocument

public EPMDocument getDocument()

getCacheScope

public String getCacheScope()
Specified by:
getCacheScope in interface Cache.Named

getCacheName

public String getCacheName()
Specified by:
getCacheName in interface Cache.Named

getMasterCacheId

public CacheId getMasterCacheId()
                         throws WTException
Specified by:
getMasterCacheId in interface Cache.Iterated
Throws:
WTException

releaseChildObject

public void releaseChildObject(CacheObject cacheObject)
                        throws WTException
Description copied from class: CacheObject
Removes child cache object from this owner cache object. This method is called by CacheObject.release(). DO NOT USE THIS METHOD DIRECTLY.

Specified by:
releaseChildObject in interface CacheObjectOwner
Overrides:
releaseChildObject in class CacheObject
Parameters:
cacheObject - CacheObject
Throws:
WTException

release

public void release()
             throws WTException
Overrides:
release in class CacheObject
Throws:
WTException

checkModifiability

protected void checkModifiability()
                           throws WTException
Overrides:
checkModifiability in class CacheObject
Throws:
WTException

checkFamilyTableMemberModifiability

protected void checkFamilyTableMemberModifiability()
                                            throws WTException
Throws:
WTException

checkModifiability

protected void checkModifiability(String msgKey)
                           throws WTException
Overrides:
checkModifiability in class CacheObject
Throws:
WTException

isModifiable

public boolean isModifiable()
                     throws WTException
Throws:
WTException

isCheckedOut

public boolean isCheckedOut()
                     throws WTException
Specified by:
isCheckedOut in interface Cache.Iterated
Throws:
WTException

isNewInWorkspace

public boolean isNewInWorkspace()
                         throws WTException
Throws:
WTException

setNewInWorkspace

public void setNewInWorkspace(boolean value)
                       throws WTException
Throws:
WTException

isNew

public boolean isNew()
              throws WTException
Throws:
WTException

createCacheDependencyLink

public CacheDocument.CacheDependencyLink createCacheDependencyLink(EPMDependencyLink link)
                                                            throws WTException
Throws:
WTException

createNewMemberLink

public CacheDocument.CacheDependencyLink createNewMemberLink(CacheDocument target,
                                                             String linkUniqueId,
                                                             int depType,
                                                             String toModelNameAsStored)
                                                      throws WTException
Throws:
WTException

createNewReferenceLink

public CacheDocument.CacheDependencyLink createNewReferenceLink(CacheDocument target,
                                                                String linkUniqueId,
                                                                int depType,
                                                                String toModelNameAsStored)
                                                         throws WTException
Throws:
WTException

getDependencyLinks

public Map getDependencyLinks()

getCacheDependencyLink

public CacheDocument.CacheDependencyLink getCacheDependencyLink(String linkUniqueId)

getDependencyLink

public EPMDependencyLink getDependencyLink(String linkUniqueId)

removeDependencyLink

public CacheDocument.CacheDependencyLink removeDependencyLink(String linkUniqueId)
                                                       throws WTException
Throws:
WTException

isGeneric

public boolean isGeneric()

getInstances

public Set getInstances()

addInstance

protected boolean addInstance(CacheDocument instance)
                       throws WTException
Throws:
WTException

removeInstance

protected boolean removeInstance(CacheDocument instance)
                          throws WTException
Throws:
WTException

markFamilyTableMemberAsModified

public void markFamilyTableMemberAsModified()
                                     throws WTException
Throws:
WTException

clearFamilyTableMemberAsModified

public void clearFamilyTableMemberAsModified()
                                      throws WTException
Throws:
WTException

isFamilyTableMemberModified

public boolean isFamilyTableMemberModified()

extractFromFamilyTable

public void extractFromFamilyTable()
                            throws WTException
Throws:
WTException

deleteGenericUnless

public void deleteGenericUnless(String genericCadName)
                         throws WTException
Throws:
WTException

deleteFamilyTableUnless

public void deleteFamilyTableUnless(String topGenericCadName)
                             throws WTException
Throws:
WTException

extractUnless

public void extractUnless(String genericCadName,
                          String topGenericCadName)
                   throws WTException
Throws:
WTException

isInstance

public boolean isInstance()

checkInstance

private void checkInstance()

initCacheVariantLink

public CacheDocument.CacheVariantLink initCacheVariantLink(EPMVariantLink link)
                                                    throws WTException
Throws:
WTException

createCacheVariantLink

public CacheDocument.CacheVariantLink createCacheVariantLink(EPMVariantLink link)
                                                      throws WTException
Throws:
WTException

createCacheVariantLink

private CacheDocument.CacheVariantLink createCacheVariantLink(EPMVariantLink link,
                                                              boolean init)
                                                       throws WTException
Throws:
WTException

setGenericAndVariantLink

private void setGenericAndVariantLink(CacheDocument.CacheVariantLink link,
                                      boolean init)
                               throws WTException
Throws:
WTException

createNewVariantLink

public CacheDocument.CacheVariantLink createNewVariantLink(CacheDocument generic)
                                                    throws WTException
Throws:
WTException

updateVariantLink

public CacheDocument.CacheVariantLink updateVariantLink(CacheDocument member,
                                                        CacheDocument.CacheVariantLink cacheLink,
                                                        CacheDocument generic)
                                                 throws WTException
Throws:
WTException

setGeneric

public void setGeneric(CacheDocument generic)
                throws WTException
Throws:
WTException

deleteGeneric

public void deleteGeneric()
                   throws WTException
Throws:
WTException

deleteGenericAndKeepVariantLink

public void deleteGenericAndKeepVariantLink()
                                     throws WTException
Throws:
WTException

getCacheGeneric

public CacheDocument getCacheGeneric()

getGeneric

public EPMDocument getGeneric()

getCacheVariantLink

public CacheDocument.CacheVariantLink getCacheVariantLink()

getEPMVariantLink

public EPMVariantLink getEPMVariantLink()

getCacheTopGeneric

public CacheDocument getCacheTopGeneric()

createCacheContainedInLink

public CacheDocument.CacheContainedInLink createCacheContainedInLink(EPMContainedIn link)
                                                              throws WTException
Throws:
WTException

setFamilyTableAndContainedInLink

private void setFamilyTableAndContainedInLink(CacheDocument.CacheContainedInLink link)
                                       throws WTException
Throws:
WTException

createNewContainedInLink

public CacheDocument.CacheContainedInLink createNewContainedInLink(CacheFamilyTable familyTable,
                                                                   String asStoredName,
                                                                   int verifyStatus,
                                                                   boolean locked)
                                                            throws WTException
Throws:
WTException

updateContainedInLink

public CacheDocument.CacheContainedInLink updateContainedInLink(CacheDocument member,
                                                                CacheDocument.CacheContainedInLink cacheLink,
                                                                CacheFamilyTable familyTable,
                                                                String asStoredName,
                                                                int verifyStatus,
                                                                boolean locked)
                                                         throws WTException
Throws:
WTException

deleteFamilyTable

public void deleteFamilyTable()
                       throws WTException
Throws:
WTException

getCacheFamilyTable

public CacheFamilyTable getCacheFamilyTable()

getFamilyTable

public EPMFamilyTable getFamilyTable()

getCacheContainedInLink

public CacheDocument.CacheContainedInLink getCacheContainedInLink()

getEPMContainedInLink

public EPMContainedIn getEPMContainedInLink()

createCacheFamilyTableCell

public CacheDocument.CacheFamilyTableCell createCacheFamilyTableCell(String name,
                                                                     EPMFamilyTableCell cell)
                                                              throws WTException
Throws:
WTException

setFamilyTableCell

private void setFamilyTableCell(String name,
                                CacheDocument.CacheFamilyTableCell cell)
                         throws WTException
Throws:
WTException

createNewFamilyTableCell

public CacheDocument.CacheFamilyTableCell createNewFamilyTableCell(String name,
                                                                   boolean inherited,
                                                                   boolean isDefinition,
                                                                   EPMFamilyTableColumn epmColumn)
                                                            throws WTException
Throws:
WTException

createNewFamilyTableDependencyCell

public CacheDocument.CacheFamilyTableCell createNewFamilyTableDependencyCell(String name,
                                                                             boolean inherited,
                                                                             boolean isDefinition,
                                                                             EPMFamilyTableColumn epmColumn)
                                                                      throws WTException
Throws:
WTException

getCacheFamilyTableCells

public Map getCacheFamilyTableCells()

getCacheFamilyTableCell

public CacheDocument.CacheFamilyTableCell getCacheFamilyTableCell(String name)

getFamilyTableCell

public EPMFamilyTableCell getFamilyTableCell(String name)

removeFamilyTableCell

public CacheDocument.CacheFamilyTableCell removeFamilyTableCell(String name)
                                                         throws WTException
Throws:
WTException

createCacheParameterValue

public CacheDocument.CacheParameterValue createCacheParameterValue(EPMParameterValue param)
                                                            throws WTException
Throws:
WTException

setParameterValue

private void setParameterValue(String name,
                               CacheDocument.CacheParameterValue cacheParam)
                        throws WTException
Throws:
WTException

createNewParameterValue

public CacheDocument.CacheParameterValue createNewParameterValue(String name,
                                                                 Object value)
                                                          throws WTException
Throws:
WTException

getCacheParameterValues

public Map getCacheParameterValues()

getCacheParameterValue

public CacheDocument.CacheParameterValue getCacheParameterValue(String name)

getParameterValue

public EPMParameterValue getParameterValue(String name)

removeParameterValue

public CacheDocument.CacheParameterValue removeParameterValue(String name)
                                                       throws WTException
Throws:
WTException

createCacheFeatureValue

public CacheDocument.CacheFeatureValue createCacheFeatureValue(EPMFeatureValue feat)
                                                        throws WTException
Throws:
WTException

setFeatureValue

private void setFeatureValue(String name,
                             CacheDocument.CacheFeatureValue cacheFeat)
                      throws WTException
Throws:
WTException

createNewFeatureValue

public CacheDocument.CacheFeatureValue createNewFeatureValue(String name,
                                                             Object value)
                                                      throws WTException
Throws:
WTException

getCacheFeatureValues

public Map getCacheFeatureValues()

getCacheFeatureValue

public CacheDocument.CacheFeatureValue getCacheFeatureValue(String name)

getFeatureValue

public EPMFeatureValue getFeatureValue(String name)

removeFeatureValue

public CacheDocument.CacheFeatureValue removeFeatureValue(String name)
                                                   throws WTException
Throws:
WTException

updateFamilyTableStatusFlag

public void updateFamilyTableStatusFlag()
                                 throws WTException
updateFamilyTableStatusFlag

Throws:
WTException

prepareDeleting

public void prepareDeleting()
                     throws WTException
Overrides:
prepareDeleting in class CacheObject
Throws:
WTException

prepareCreating

public void prepareCreating()
                     throws WTException
Overrides:
prepareCreating in class CacheObject
Throws:
WTException

prepareUpdating

public void prepareUpdating()
                     throws WTException
Overrides:
prepareUpdating in class CacheObject
Throws:
WTException

createCacheParameterMap

public CacheDocument.CacheParameterMap createCacheParameterMap(EPMParameterMap map)
                                                        throws WTException
Throws:
WTException

createNewParameterMap

public CacheDocument.CacheParameterMap createNewParameterMap(String parameterName,
                                                             AttributeDefDefaultView ibaDef)
                                                      throws WTException
Throws:
WTException

getParameterNameMaps

public Map getParameterNameMaps()

getCacheParameterMap

public CacheDocument.CacheParameterMap getCacheParameterMap(String parameterName)

getParameterMap

public EPMParameterMap getParameterMap(String parameterName)

removeParameterMap

public CacheDocument.CacheParameterMap removeParameterMap(String parameterName)
                                                   throws WTException
Throws:
WTException

getStatusAsString

protected String getStatusAsString()
Overrides:
getStatusAsString in class CacheObject

getDisplayName

protected String getDisplayName()
Overrides:
getDisplayName in class CacheObject

toString

public String toString()
Overrides:
toString in class CacheObject

dump

public void dump(PrintStream out,
                 String shift)
          throws WTException
Overrides:
dump in class CacheObject
Throws:
WTException