com.ptc.windchill.counterpart
Class StandardCounterPartService

java.lang.Object
  extended bywt.services.StandardManager
      extended bycom.ptc.windchill.counterpart.StandardCounterPartService
All Implemented Interfaces:
CounterPartService, Manager, NetFactor, Serializable

public class StandardCounterPartService
extends StandardManager
implements CounterPartService, Serializable

Use the newStandardCounterPartService static factory method(s), not the StandardCounterPartService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
private  class StandardCounterPartService.PersistenceChangeListener
          Listens on Persistance manager events
 
Field Summary
private static String CLASSNAME
           
private static boolean DEBUG
           
private static long fCounterPartContextID
           
private static long fLastNonCounterPartChange
           
private static HashMap fProtectedClasses
           
private static String fSystemID
           
private static DebugWriter LOG
           
private static String RESOURCE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardCounterPartService()
           
 
Method Summary
private static boolean checkBytes(byte[] imageBytes, byte[] attachmentBytes)
           
private  void checkCallerOwnsDeltaLock(WTPrincipalReference caller, CounterPartDelta delta)
           
private  void checkUploadHasntTimedOut(String sessionID, CounterPartDelta delta)
           
private  void createSnapshot(CounterPartDelta delta)
           
 CounterPartBundle download()
          

Supported API: false
 SerializedAttachment[] downloadAttachments(AttachmentLocator[] attachmentLocators)
          

Supported API: false
private  cUploadLock ensurePreviousUploadHasFinished(cUploadLock uploadLock, CounterPartDelta delta)
           
 CounterPartErrorReport finishUpload(String sessionID)
          

Supported API: false
private  void fixClassImagesFromAttachments(CounterPartDelta delta)
           
 String getConceptualClassname()
          Deprecated.  
private  CounterPartDelta getDelta(AccessPermission access)
           
private  nitidus.sil.be.clf.iMasterClassificationManager getUploadSnapshot(nitidus.sil.be.clf.iMasterClassificationManager cfnManager)
           
 void initializeDelta(CounterPartBundle bundle)
          

Supported API: false
 boolean isLockedByMe()
          

Supported API: false
 void lock()
          

Supported API: false
static StandardCounterPartService newStandardCounterPartService()
          Default factory for the class.
protected  void performShutdownProcess()
          see wt.services.StandardManager
protected  void performStartupProcess()
          see wt.services.StandardManager
 void registerEvents(ManagerService managerService)
          see wt.services.StandardManager
private  void setMinimumClassificationInDelta(CounterPartDelta delta)
           
 void unlock()
          

Supported API: false
 CounterPartUploadResults upload(CounterPartBundle bundle)
          

Supported API: false
 CounterPartErrorReport uploadAttachments(String sessionID, SerializedAttachment[] attachments)
          

Supported API: false
 CounterPartErrorReport validate(CounterPartBundle bundle)
          

Supported API: false
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

fSystemID

private static String fSystemID

fLastNonCounterPartChange

private static long fLastNonCounterPartChange

fCounterPartContextID

private static long fCounterPartContextID

fProtectedClasses

private static HashMap fProtectedClasses

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

StandardCounterPartService

public StandardCounterPartService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

newStandardCounterPartService

public static StandardCounterPartService newStandardCounterPartService()
                                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardCounterPartService
Throws:
WTException

lock

public void lock()
          throws WTException


Supported API: false

Specified by:
lock in interface CounterPartService
Throws:
WTException

unlock

public void unlock()
            throws WTException


Supported API: false

Specified by:
unlock in interface CounterPartService
Throws:
WTException

upload

public CounterPartUploadResults upload(CounterPartBundle bundle)
                                throws WTException


Supported API: false

Specified by:
upload in interface CounterPartService
Parameters:
bundle -
Returns:
CounterPartUploadResults
Throws:
WTException

uploadAttachments

public CounterPartErrorReport uploadAttachments(String sessionID,
                                                SerializedAttachment[] attachments)
                                         throws WTException


Supported API: false

Specified by:
uploadAttachments in interface CounterPartService
Parameters:
sessionID -
attachments -
Returns:
CounterPartErrorReport
Throws:
WTException

finishUpload

public CounterPartErrorReport finishUpload(String sessionID)
                                    throws WTException


Supported API: false

Specified by:
finishUpload in interface CounterPartService
Parameters:
sessionID -
Returns:
CounterPartErrorReport
Throws:
WTException

download

public CounterPartBundle download()
                           throws WTException


Supported API: false

Specified by:
download in interface CounterPartService
Returns:
CounterPartBundle
Throws:
WTException

downloadAttachments

public SerializedAttachment[] downloadAttachments(AttachmentLocator[] attachmentLocators)
                                           throws WTException


Supported API: false

Specified by:
downloadAttachments in interface CounterPartService
Parameters:
attachmentLocators -
Returns:
SerializedAttachment[]
Throws:
WTException

validate

public CounterPartErrorReport validate(CounterPartBundle bundle)
                                throws WTException


Supported API: false

Specified by:
validate in interface CounterPartService
Parameters:
bundle -
Returns:
CounterPartErrorReport
Throws:
WTException

isLockedByMe

public boolean isLockedByMe()
                     throws WTException


Supported API: false

Specified by:
isLockedByMe in interface CounterPartService
Returns:
boolean
Throws:
WTException

initializeDelta

public void initializeDelta(CounterPartBundle bundle)
                     throws WTException


Supported API: false

Specified by:
initializeDelta in interface CounterPartService
Parameters:
bundle -
Throws:
WTException

registerEvents

public void registerEvents(ManagerService managerService)
see wt.services.StandardManager

Specified by:
registerEvents in interface Manager
Overrides:
registerEvents in class StandardManager
Parameters:
managerService - the ManagerService with which to register events.

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
see wt.services.StandardManager

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

performShutdownProcess

protected void performShutdownProcess()
                               throws ManagerException
see wt.services.StandardManager

Overrides:
performShutdownProcess in class StandardManager
Throws:
ManagerException

getDelta

private final CounterPartDelta getDelta(AccessPermission access)
                                 throws WTException
Throws:
WTException

setMinimumClassificationInDelta

private void setMinimumClassificationInDelta(CounterPartDelta delta)
                                      throws WTException
Throws:
WTException

createSnapshot

private final void createSnapshot(CounterPartDelta delta)
                           throws WTException
Throws:
WTException

getUploadSnapshot

private final nitidus.sil.be.clf.iMasterClassificationManager getUploadSnapshot(nitidus.sil.be.clf.iMasterClassificationManager cfnManager)
                                                                         throws WTException
Throws:
WTException

fixClassImagesFromAttachments

private final void fixClassImagesFromAttachments(CounterPartDelta delta)
                                          throws WTException
Throws:
WTException

checkBytes

private static final boolean checkBytes(byte[] imageBytes,
                                        byte[] attachmentBytes)

checkCallerOwnsDeltaLock

private final void checkCallerOwnsDeltaLock(WTPrincipalReference caller,
                                            CounterPartDelta delta)
                                     throws WTException
Throws:
WTException

checkUploadHasntTimedOut

private final void checkUploadHasntTimedOut(String sessionID,
                                            CounterPartDelta delta)
                                     throws WTException
Throws:
WTException

ensurePreviousUploadHasFinished

private final cUploadLock ensurePreviousUploadHasFinished(cUploadLock uploadLock,
                                                          CounterPartDelta delta)
                                                   throws WTException
Throws:
WTException