wt.epm.upload
Class EPMUpload

java.lang.Object
  extended bywt.epm.upload.EPMUpload

public class EPMUpload
extends Object


Nested Class Summary
protected static class EPMUpload.DocumentOptions
           
static class EPMUpload.icEPMNeutralDataPatch
           
(package private) static class EPMUpload.Tracer
           
 
Field Summary
private  Cache cache
           
static QuantityUnit DEFAULT_QUANTITY_UNIT
           
protected static Map docSubTypesMap
           
protected static Map docTypesMap
           
private  EPMUpload.DocumentOptions documentOptions
           
static boolean log
           
static boolean logCache
           
static boolean logNdi
           
static boolean logTrace
           
private  EPMGhostResolver m_ghostResolver
           
private  Set m_NDDocNames
           
private  Map m_nonOverridableConflicts
           
private  Map m_overridableConflicts
           
private  EPMNeutralData neutralData
           
private static String RESOURCE
           
(package private) static EPMUpload.Tracer tracer
           
 
Constructor Summary
EPMUpload(EPMNeutralData neutralData, Cache cache)
           
 
Method Summary
private  void accumulateDependents(Collection c, EPMNDDocument doc)
           
private  void checkConflicts()
           
protected  CacheDocument createCacheDocument(EPMDocument epmDocument)
           
 EPMDocument createNewEPMDocument(String number, String cadName, String name, String type, String docSubType, int revisionNumber, boolean isVerified, EPMAuthoringAppVersion authoringApplicationVersion, WTContainer container, WTOrganization organization, QuantityUnit defaultUnit)
           
protected  EPMUploadInstance createUploadInstance(EPMNDFamilyTable familyTable, EPMNDFamilyTableMember member, EPMNDDocument memberDocument, EPMUploadGeneric generic)
           
protected  EPMUploadGeneric createUploadMiddleGeneric(EPMNDFamilyTable familyTable, EPMNDFamilyTableMember member, EPMNDDocument memberDocument, EPMUploadGeneric generic)
           
protected  EPMUploadStandalone createUploadStandalone(EPMNDDocument doc)
           
protected  EPMUploadTopGeneric createUploadTopGeneric(EPMNDFamilyTable familyTable, EPMNDFamilyTableMember member, EPMNDDocument memberDocument)
           
static boolean equal(Object o1, Object o2)
           
 void execute()
           
private  void fixResolution(ConflictType conflictCode)
           
 Cache getCache()
           
protected  EPMUpload.DocumentOptions getDocumentOptions()
           
static EPMDocSubType getDocumentSubTypeByNDSubType(String ndSubType)
           
static EPMDocumentType getDocumentTypeByExtention(String ext)
           
private  Collection getFamilyTables()
           
protected  EPMGhostResolver getGhostResolver()
           
protected  Set getNDDocNames()
           
protected  EPMNeutralData getNeutralData()
           
private  EPMNonoverridableConflicts getNonOverridableConflicts(Class confType)
          Returns an instance of EPMNonoverridableConflicts of certain type
private  EPMOverridableActions.EPMOverridableActionImpl getOverridableConflicts(ConflictType confType)
          Returns an instance of EPMOverridableActionImpl of certain type
 boolean isNDForCADName(String CADName)
           
private  void preUpload(Collection c)
           
 boolean processConflictException(EPMUploadConflictException ex)
           
private  void processConflicts()
          If any non overridable conflict has occured it throws a non overridable conflict (if several non overidable conflicts are available it throws one of them).
private  EPMUploadInstance processMember(EPMNDFamilyTable familyTable, EPMNDFamilyTableMember member, EPMUploadGeneric uploadGeneric, Map documentsByCadName, Collection dependentCadNames)
           
protected  void setNeutralData(EPMNeutralData neutralData)
           
static boolean valuesEqual(Object o1, Object o2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_QUANTITY_UNIT

public static final QuantityUnit DEFAULT_QUANTITY_UNIT

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

cache

private Cache cache

neutralData

private EPMNeutralData neutralData

documentOptions

private EPMUpload.DocumentOptions documentOptions

m_NDDocNames

private Set m_NDDocNames

m_ghostResolver

private EPMGhostResolver m_ghostResolver

m_overridableConflicts

private Map m_overridableConflicts

m_nonOverridableConflicts

private Map m_nonOverridableConflicts

log

public static boolean log

logNdi

public static boolean logNdi

logCache

public static boolean logCache

logTrace

public static boolean logTrace

tracer

static EPMUpload.Tracer tracer

docSubTypesMap

protected static final Map docSubTypesMap

docTypesMap

protected static final Map docTypesMap
Constructor Detail

EPMUpload

public EPMUpload(EPMNeutralData neutralData,
                 Cache cache)
          throws WTException
Method Detail

getCache

public Cache getCache()

setNeutralData

protected void setNeutralData(EPMNeutralData neutralData)

getNeutralData

protected EPMNeutralData getNeutralData()

getGhostResolver

protected EPMGhostResolver getGhostResolver()

getDocumentOptions

protected EPMUpload.DocumentOptions getDocumentOptions()
                                                throws WTException
Throws:
WTException

getNDDocNames

protected Set getNDDocNames()
                     throws WTException
Throws:
WTException

getNonOverridableConflicts

private EPMNonoverridableConflicts getNonOverridableConflicts(Class confType)
Returns an instance of EPMNonoverridableConflicts of certain type

Parameters:
confType - - type of the conflicts
Returns:
EPMNonoverridableConflicts instance of that type (MAY BE NULL)

getOverridableConflicts

private EPMOverridableActions.EPMOverridableActionImpl getOverridableConflicts(ConflictType confType)
Returns an instance of EPMOverridableActionImpl of certain type

Parameters:
confType - - type of the conflicts
Returns:
EPMOverridableActionImpl instance of that type (MAY BE NULL)

processConflicts

private void processConflicts()
                       throws WTException
If any non overridable conflict has occured it throws a non overridable conflict (if several non overidable conflicts are available it throws one of them). Otherwise it validates an overridable conflict if available (in case of several overridable conflicts of different types it validates one of them)

Throws:
WTException - in case if conflicts are available

processConflictException

public boolean processConflictException(EPMUploadConflictException ex)
                                 throws WTException
Throws:
WTException

processMember

private EPMUploadInstance processMember(EPMNDFamilyTable familyTable,
                                        EPMNDFamilyTableMember member,
                                        EPMUploadGeneric uploadGeneric,
                                        Map documentsByCadName,
                                        Collection dependentCadNames)
                                 throws WTException
Throws:
WTException

accumulateDependents

private void accumulateDependents(Collection c,
                                  EPMNDDocument doc)
                           throws WTException
Throws:
WTException

getFamilyTables

private Collection getFamilyTables()
                            throws WTException
Throws:
WTException

execute

public void execute()
             throws WTException
Throws:
WTException

preUpload

private void preUpload(Collection c)
                throws WTException
Throws:
WTException

checkConflicts

private void checkConflicts()
                     throws WTException
Throws:
WTException

fixResolution

private void fixResolution(ConflictType conflictCode)

isNDForCADName

public boolean isNDForCADName(String CADName)
                       throws WTException
Throws:
WTException

createUploadStandalone

protected EPMUploadStandalone createUploadStandalone(EPMNDDocument doc)
                                              throws WTException
Throws:
WTException

createUploadTopGeneric

protected EPMUploadTopGeneric createUploadTopGeneric(EPMNDFamilyTable familyTable,
                                                     EPMNDFamilyTableMember member,
                                                     EPMNDDocument memberDocument)
                                              throws WTException
Throws:
WTException

createUploadMiddleGeneric

protected EPMUploadGeneric createUploadMiddleGeneric(EPMNDFamilyTable familyTable,
                                                     EPMNDFamilyTableMember member,
                                                     EPMNDDocument memberDocument,
                                                     EPMUploadGeneric generic)
                                              throws WTException
Throws:
WTException

createUploadInstance

protected EPMUploadInstance createUploadInstance(EPMNDFamilyTable familyTable,
                                                 EPMNDFamilyTableMember member,
                                                 EPMNDDocument memberDocument,
                                                 EPMUploadGeneric generic)
                                          throws WTException
Throws:
WTException

createCacheDocument

protected CacheDocument createCacheDocument(EPMDocument epmDocument)
                                     throws WTException
Throws:
WTException

createNewEPMDocument

public EPMDocument createNewEPMDocument(String number,
                                        String cadName,
                                        String name,
                                        String type,
                                        String docSubType,
                                        int revisionNumber,
                                        boolean isVerified,
                                        EPMAuthoringAppVersion authoringApplicationVersion,
                                        WTContainer container,
                                        WTOrganization organization,
                                        QuantityUnit defaultUnit)
                                 throws WTException
Throws:
WTException

equal

public static boolean equal(Object o1,
                            Object o2)

valuesEqual

public static boolean valuesEqual(Object o1,
                                  Object o2)

getDocumentTypeByExtention

public static EPMDocumentType getDocumentTypeByExtention(String ext)

getDocumentSubTypeByNDSubType

public static EPMDocSubType getDocumentSubTypeByNDSubType(String ndSubType)