com.ptc.windchill.upgrade.tool
Class ProgressViewState
java.lang.Object
com.ptc.windchill.upgrade.util.fsm.State
com.ptc.windchill.upgrade.tool.AbstractState
com.ptc.windchill.upgrade.tool.AbstractStateWithThreadedWork
com.ptc.windchill.upgrade.tool.ProgressViewState
- public class ProgressViewState
- extends AbstractStateWithThreadedWork
Nested Class Summary |
static class |
ProgressViewState.UpdateRunnerReportExists
If a user cancels out of a step that uses this state before a migrator has been executed,
an UpdateRunnerReport has not been created, that when it goes to the PhaseCompleted state,
an unexpected error occurs. |
Fields inherited from class com.ptc.windchill.upgrade.util.fsm.State |
|
Methods inherited from class com.ptc.windchill.upgrade.tool.AbstractStateWithThreadedWork |
activate, clearStatus, deactivate, getApplication, getCancellationMonitor, getCancelPromptMessage, getCancelPromptTitle, getTitle, onCancelRequested, setApplication, setStatus, toString |
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
ProgressViewState
public ProgressViewState(StateMachine sm,
StateDefinition def)
- Create a new instance.
shouldBeEnclosed
protected boolean shouldBeEnclosed()
- Overrides the super classes value. The screens that display the migrators in a list
are already in a scrollpane and it is not desired to have a scrollpane within a scrollpane.
- Overrides:
shouldBeEnclosed
in class AbstractState
getViewComponent
public 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
executeUpdateRunner
private void executeUpdateRunner()
throws CanceledException,
Exception
- Executes the migrators that are applicable for the upgrade.
- Throws:
Throwable
- encounters an unexpected error
CanceledException
Exception
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
retrieveNumberOfSkippedUpdates
private int retrieveNumberOfSkippedUpdates()
- Returns:
- the number of migrators that were skipped can 0 or greater
retrieveNumberOfFailedUpdates
private int retrieveNumberOfFailedUpdates()
- Returns:
- the number of migrators that failed can 0 or greater
retrieveNumberOfSuccessfulUpdates
private int retrieveNumberOfSuccessfulUpdates()
- Returns:
- the number of migrators that failed can 0 or greater
retrieveNumberOfUpdatesExecuted
private int retrieveNumberOfUpdatesExecuted()
applicabilityModel
private ApplicabilitySnapshotModel applicabilityModel()
- Returns:
- ApplicabilitySnapshotModel
updateRunnerReport
private UpdateRunnerReport updateRunnerReport()
- Returns:
- UpdateRunnerReport
getUpgradeToolStateMachine
private UpgradeToolStateMachine getUpgradeToolStateMachine()
- Returns:
- UpgradeToolStateMachine
deletePolicyACLs
private void deletePolicyACLs()
throws Exception
- Throws:
Exception
disableQueueProcessing
static void disableQueueProcessing()
throws IOException,
StructConfManagerException
- Throws:
IOException
StructConfManagerException
resetQueueProcessingEnabled
static void resetQueueProcessingEnabled()
throws IOException,
StructConfManagerException
- Throws:
IOException
StructConfManagerException