com.ptc.windchill.upgrade.tool
Class QueueUpgradeEvolvableObjectsState

java.lang.Object
  extended bycom.ptc.windchill.upgrade.util.fsm.State
      extended bycom.ptc.windchill.upgrade.tool.AbstractState
          extended bycom.ptc.windchill.upgrade.tool.AbstractStateWithThreadedWork
              extended bycom.ptc.windchill.upgrade.tool.QueueUpgradeEvolvableObjectsState

public class QueueUpgradeEvolvableObjectsState
extends AbstractStateWithThreadedWork


Nested Class Summary
 
Nested classes inherited from class com.ptc.windchill.upgrade.tool.AbstractStateWithThreadedWork
AbstractState.NonExpressPhaseDone, AbstractStateWithThreadedWork.Cancel, AbstractStateWithThreadedWork.IsStateWithThreadedWorkDone, AbstractStateWithThreadedWork.IsThreadedWorkRunningAndNotCanceled, AbstractStateWithThreadedWork.Outcome, AbstractStateWithThreadedWork.WasThreadedWorkOutcomeSuccessful
 
Field Summary
private  ApplicabilitySnapshotModel applicabilityModel_
           
private  UpgradeContext context_
           
private  DisplayProgressList displayList_
           
private static String EXECUTE_QUEUES_PROP
           
private  IndividualMigrators individualMigrator_
           
private static String LINE_SEPARATOR
           
private  String METHOD_SERVER_UP
           
private  boolean pageUp_
           
private  String phase_
           
private  JProgressBar progressBar_
           
private  String SERVLET_ENGINE_UP
           
private  int size_
           
private  UpdateRunnerReport updateRunnerReport_
           
private  String user_
           
private  JComponent viewComponent_
           
 
Fields inherited from class com.ptc.windchill.upgrade.tool.AbstractStateWithThreadedWork
 
Fields inherited from class com.ptc.windchill.upgrade.util.fsm.State
 
Constructor Summary
QueueUpgradeEvolvableObjectsState(StateMachine sm, StateDefinition def)
          Create a new instance.
 
Method Summary
private  void attemptToStartMethodServerIfNeeded(UpgradePhaseType current_phase)
          The last few steps after 'Add Constraints' require the use of the MethodServer to be successfully execited.
private  void attemptToStopMethodServerIfNeeded(UpgradePhaseType current_phase)
           
private  void checkForCancellation()
           
(package private) static void disableQueueProcessing()
           
private  UpgradeToolStateMachine getUpgradeToolStateMachine()
           
(package private)  JComponent getViewComponent()
          Creates the GUI look for the steps that are excuting Incremental Updates.
private  Properties obtainServerStatus()
           
(package private) static void resetQueueProcessingEnabled()
           
protected  AbstractStateWithThreadedWork.Outcome runThreadedWork()
          Determines if the step requires the MethodServer or not, if not it executesUpdateRunner() method.
 
Methods inherited from class com.ptc.windchill.upgrade.tool.AbstractStateWithThreadedWork
activate, clearStatus, deactivate, getApplication, getCancellationMonitor, getCancelPromptMessage, getCancelPromptTitle, getTitle, onCancelRequested, setApplication, setStatus, shouldBeEnclosed, toString
 
Methods inherited from class com.ptc.windchill.upgrade.util.fsm.State
getStateMachine, getStateMachine, isStartState, isStopState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

applicabilityModel_

private ApplicabilitySnapshotModel applicabilityModel_

size_

private int size_

viewComponent_

private JComponent viewComponent_

progressBar_

private JProgressBar progressBar_

individualMigrator_

private IndividualMigrators individualMigrator_

displayList_

private DisplayProgressList displayList_

phase_

private String phase_

user_

private String user_

context_

private UpgradeContext context_

updateRunnerReport_

private UpdateRunnerReport updateRunnerReport_

SERVLET_ENGINE_UP

private String SERVLET_ENGINE_UP

METHOD_SERVER_UP

private String METHOD_SERVER_UP

pageUp_

private boolean pageUp_

LINE_SEPARATOR

private static String LINE_SEPARATOR

EXECUTE_QUEUES_PROP

private static final String EXECUTE_QUEUES_PROP
See Also:
Constant Field Values
Constructor Detail

QueueUpgradeEvolvableObjectsState

public QueueUpgradeEvolvableObjectsState(StateMachine sm,
                                         StateDefinition def)
Create a new instance.

Method Detail

getViewComponent

JComponent getViewComponent()
Creates the GUI look for the steps that are excuting Incremental Updates. This method is required because it extends AbstractStateWithThreadedWork all classes that extend that class are required use this method.

Specified by:
getViewComponent in class AbstractState

checkForCancellation

private void checkForCancellation()
                           throws CanceledException
Throws:
CanceledException

runThreadedWork

protected AbstractStateWithThreadedWork.Outcome runThreadedWork()
                                                         throws Throwable
Determines if the step requires the MethodServer or not, if not it executesUpdateRunner() method. Once, it has completed its execution, it creates an instance of UpdateRunnerResults with all the necessary information that is needed to create the next state and the report.

Specified by:
runThreadedWork in class AbstractStateWithThreadedWork
Returns:
Outcome the state was successful in everything it needed to do and includes an instance of UpdateRunnerResults
Throws:
Throwable

attemptToStartMethodServerIfNeeded

private void attemptToStartMethodServerIfNeeded(UpgradePhaseType current_phase)
                                         throws CanceledException,
                                                Throwable
The last few steps after 'Add Constraints' require the use of the MethodServer to be successfully execited. For these steps the web server/servlet engine, method server, and administrators user name and password are required. This method makes sure that all of these are up and running and then execute the applicable migrators.

Throws:
CanceledException
Throwable

obtainServerStatus

private Properties obtainServerStatus()
                               throws WTException,
                                      CanceledException
Throws:
WTException
CanceledException

attemptToStopMethodServerIfNeeded

private void attemptToStopMethodServerIfNeeded(UpgradePhaseType current_phase)
                                        throws IOException,
                                               StructConfManagerException
Throws:
IOException
StructConfManagerException

getUpgradeToolStateMachine

private UpgradeToolStateMachine getUpgradeToolStateMachine()
Returns:
UpgradeToolStateMachine

disableQueueProcessing

static void disableQueueProcessing()
                            throws IOException,
                                   StructConfManagerException
Throws:
IOException
StructConfManagerException

resetQueueProcessingEnabled

static void resetQueueProcessingEnabled()
                                 throws IOException,
                                        StructConfManagerException
Throws:
IOException
StructConfManagerException