com.ptc.windchill.upgrade.tool
Class UpgradeToolStateMachine

java.lang.Object
  extended bycom.ptc.windchill.upgrade.util.fsm.StateMachine
      extended bycom.ptc.windchill.upgrade.tool.UpgradeToolStateMachine

public class UpgradeToolStateMachine
extends StateMachine


Nested Class Summary
static class UpgradeToolStateMachine.ConfirmQueuesCleared
           
static class UpgradeToolStateMachine.DbCorrect
           
static class UpgradeToolStateMachine.ExpressModeSet
           
static class UpgradeToolStateMachine.NonExpressModeSet
           
static class UpgradeToolStateMachine.VersionConfirmed
           
 
Nested classes inherited from class com.ptc.windchill.upgrade.util.fsm.StateMachine
 
Field Summary
private  boolean adminUserNameCorrect_
           
private  ApplicabilitySnapshotModel applicabilitySnapshotModel_
           
private  boolean canceled_
           
private  boolean errorStatus_
           
private  Boolean isDbCorrect_
           
private  Boolean isExpressMode_
           
private  Boolean isQueuesCleared_
           
private  Boolean isVersionConfirmed_
           
private  boolean questioning_
           
private  int size_
           
private  int skippedOrFailed_
           
private  HashMap storeUpgradePhaseTypeResults_
           
 
Fields inherited from class com.ptc.windchill.upgrade.util.fsm.StateMachine
 
Constructor Summary
UpgradeToolStateMachine()
          Creates a new UpgradeToolStateMachine object.
 
Method Summary
(package private)  void clearDbCorrect()
          Clear out the value of the isDbCorrect_ when the user cancels out and then restarts the Upgrade Manager the ReportCanceled screen.
(package private)  void clearExpressMode()
          Clear out the value of the isExpressMode_ when the user cancels out and then restarts the Upgrade Manager.
(package private)  void clearQueuesCleared()
          Clear out the value of the isQueuesCleared_ when the user cancels out and then restarts the Upgrade Manager from the ReportCanceled screen.
(package private)  void clearVersionConfirmed()
          Clear out the value of the isVersionConfirmed_ when the user cancels out and then restarts the Upgrade Manager from the ReportCanceled screen.
(package private)  boolean getAdminUserNameInCorrect()
           
(package private)  ApplicabilitySnapshotModel getApplicabilitySnapshot()
           
(package private)  int getApplicabilitySnapshotSize()
           
(package private)  boolean getCancelStatus()
          Default value of canceled_ is false
(package private)  boolean getErrorStatus()
          The value is set to true if the UpgradeManager fails unexpectedly.
(package private)  Boolean isDbCorrect()
           
(package private)  Boolean isExpressMode()
           
(package private)  Boolean isQueuesCleared()
           
(package private)  Boolean isVersionConfirmed()
           
(package private)  void setAdminUserNameInCorrect(boolean bad_admin_name)
          The value is set by ProgressViewState when the administrator's user name and/or password do not match up.
(package private)  void setApplicabilitySnapshot(ApplicabilitySnapshotModel applicability_model)
          Sets the ApplicabilitySnapshotModel in a place the information is easy to access.
(package private)  void setApplicabilitySnapshotSize(int size)
          Sets the size of the ApplicabilitySnapshotModel.
(package private)  void setCancelStatus(boolean cancel)
          If the user cancels out of the UpgradeManager the canceled_ variable is set to true.
(package private)  void setConfirmation(boolean use_version)
          The variable isVersionConfirmed_ is null until a user makes a selection on the ConfirmVersionState screen.
(package private)  void setDbCorrect(boolean db_confirmation)
          When the user makes a selection the value of isDbCorrect_ changes from null to a Boolean value.
(package private)  void setErrorStatus(boolean error_status)
          The value is set to true if the UpgradeManager fails unexpectedly.
(package private)  void setExpressMode(boolean use_express_mode)
          Sets the value of the variable isExpressMode_ from a null value to a Boolean value This occurs after the user makes a selection on the PromptForExpressMode screen.
(package private)  void setQueuesCleared(boolean queues_cleared)
          When the user makes a selection the value of isQueuesCleared_ changes from null to a Boolean value.
 
Methods inherited from class com.ptc.windchill.upgrade.util.fsm.StateMachine
addStateMachineListener, checkEventTypeEnabledStates, dispatchEvent, dispatchEvent, isEventTypeEnabled, join, removeStateMachineListener, start, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isDbCorrect_

private Boolean isDbCorrect_

isExpressMode_

private Boolean isExpressMode_

isQueuesCleared_

private Boolean isQueuesCleared_

isVersionConfirmed_

private Boolean isVersionConfirmed_

applicabilitySnapshotModel_

private ApplicabilitySnapshotModel applicabilitySnapshotModel_

skippedOrFailed_

private int skippedOrFailed_

size_

private int size_

canceled_

private boolean canceled_

questioning_

private boolean questioning_

adminUserNameCorrect_

private boolean adminUserNameCorrect_

errorStatus_

private boolean errorStatus_

storeUpgradePhaseTypeResults_

private HashMap storeUpgradePhaseTypeResults_
Constructor Detail

UpgradeToolStateMachine

public UpgradeToolStateMachine()
Creates a new UpgradeToolStateMachine object.

Method Detail

isDbCorrect

Boolean isDbCorrect()
Returns:
null if unknown, otherwise a Boolean

isQueuesCleared

Boolean isQueuesCleared()
Returns:
null if unknown, otherwise a Boolean

isVersionConfirmed

Boolean isVersionConfirmed()
Returns:
null if unknown, otherwise a Boolean

isExpressMode

Boolean isExpressMode()
Returns:
null if unknown, otherwise a Boolean

setDbCorrect

void setDbCorrect(boolean db_confirmation)
When the user makes a selection the value of isDbCorrect_ changes from null to a Boolean value.

Parameters:
db_confirmation - a boolean which initializes a Boolean

clearDbCorrect

void clearDbCorrect()
Clear out the value of the isDbCorrect_ when the user cancels out and then restarts the Upgrade Manager the ReportCanceled screen. When the user comes back to the CorrectDatabase state the selection will be un-selected.


setQueuesCleared

void setQueuesCleared(boolean queues_cleared)
When the user makes a selection the value of isQueuesCleared_ changes from null to a Boolean value.

Parameters:
queues_cleared - boolean which initializes a Boolean

clearQueuesCleared

void clearQueuesCleared()
Clear out the value of the isQueuesCleared_ when the user cancels out and then restarts the Upgrade Manager from the ReportCanceled screen. When the user comes back to the QueuesCleared state the selection will be un-selected.


setExpressMode

void setExpressMode(boolean use_express_mode)
Sets the value of the variable isExpressMode_ from a null value to a Boolean value This occurs after the user makes a selection on the PromptForExpressMode screen.

Parameters:
use_express_mode - boolean

clearExpressMode

void clearExpressMode()
Clear out the value of the isExpressMode_ when the user cancels out and then restarts the Upgrade Manager. from the ReportCanceled screen. When the user comes back to the PromptForExpressMode state the selection will be un-selected.


setConfirmation

void setConfirmation(boolean use_version)
The variable isVersionConfirmed_ is null until a user makes a selection on the ConfirmVersionState screen.

Parameters:
use_version -

clearVersionConfirmed

void clearVersionConfirmed()
Clear out the value of the isVersionConfirmed_ when the user cancels out and then restarts the Upgrade Manager from the ReportCanceled screen. When the user comes back to the ConfirmVersionState state the selection will be un-selected.


setApplicabilitySnapshot

void setApplicabilitySnapshot(ApplicabilitySnapshotModel applicability_model)
Sets the ApplicabilitySnapshotModel in a place the information is easy to access.

Parameters:
applicability_model - ApplicabilitySnapshotModel

setApplicabilitySnapshotSize

void setApplicabilitySnapshotSize(int size)
Sets the size of the ApplicabilitySnapshotModel. It helps determine how many migrators need to be executed.

Parameters:
size - int

getApplicabilitySnapshotSize

int getApplicabilitySnapshotSize()
Returns:
size_

getApplicabilitySnapshot

ApplicabilitySnapshotModel getApplicabilitySnapshot()
Returns:
ApplicabilitySnapshotModel consists of applicable migrators

setCancelStatus

void setCancelStatus(boolean cancel)
If the user cancels out of the UpgradeManager the canceled_ variable is set to true. This was needed in case the user, restarted the UpgradeManager from the ReportCanceled screen.

Parameters:
cancel - boolean

setAdminUserNameInCorrect

void setAdminUserNameInCorrect(boolean bad_admin_name)
The value is set by ProgressViewState when the administrator's user name and/or password do not match up.

Parameters:
bad_admin_name - boolean

getAdminUserNameInCorrect

boolean getAdminUserNameInCorrect()
Returns:
boolean

setErrorStatus

void setErrorStatus(boolean error_status)
The value is set to true if the UpgradeManager fails unexpectedly.


getErrorStatus

boolean getErrorStatus()
The value is set to true if the UpgradeManager fails unexpectedly. The default value of the errorStatus_ is false.

Returns:
boolean errorStatus_

getCancelStatus

boolean getCancelStatus()
Default value of canceled_ is false

Returns:
boolean canceled_