com.ptc.windchill.upgrade.tool
Class VerifySolutionsInstalled

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.VerifySolutionsInstalled

public class VerifySolutionsInstalled
extends AbstractStateWithThreadedWork


Nested Class Summary
static class VerifySolutionsInstalled.ContainsNoSolutions
           
static class VerifySolutionsInstalled.ContainsTooManySolutions
          Condition used by the UpgradeToolStateMachineDefinition to determine which buttons should be enabled.
 
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  UpgradeContext context_
           
private static String LINE_SEPARATOR
           
private  boolean notEnough_
           
private  WrappingMultiLineTextMessage onlyOne_
           
private  WrappingMultiLineTextMessage retrieving_
           
private  boolean tooManyOrNot_
           
private  UpgradeContextListener upgListener_
           
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
VerifySolutionsInstalled(StateMachine sm, StateDefinition def)
          Creates a new VerifySolutionsInstalled object.
 
Method Summary
 boolean getInstalledNotEnoughSolutions()
           
 boolean getInstalledTooManySolutions()
          If this is true the UpgradeManager will not let the user proceed to the next step.
 JComponent getViewComponent()
          Creates and displays the view displayed to the user.
protected  AbstractStateWithThreadedWork.Outcome runThreadedWork()
          Checks the InstalledAssemblyRegistry.iar file in the <wt_hom>\codebase\assemblyRegistry directory to find out what solutions are installed.
 
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

viewComponent_

private JComponent viewComponent_

upgListener_

private UpgradeContextListener upgListener_

retrieving_

private WrappingMultiLineTextMessage retrieving_

context_

private UpgradeContext context_

tooManyOrNot_

private boolean tooManyOrNot_

notEnough_

private boolean notEnough_

onlyOne_

private WrappingMultiLineTextMessage onlyOne_

LINE_SEPARATOR

private static String LINE_SEPARATOR
Constructor Detail

VerifySolutionsInstalled

public VerifySolutionsInstalled(StateMachine sm,
                                StateDefinition def)
Creates a new VerifySolutionsInstalled object.

Parameters:
sm - StateMachine
def - StateMachineDefinition
Method Detail

getViewComponent

public JComponent getViewComponent()
Creates and displays the view displayed to the user.

Specified by:
getViewComponent in class AbstractState
Returns:
viewComponent_ JComponent

runThreadedWork

protected AbstractStateWithThreadedWork.Outcome runThreadedWork()
                                                         throws ReleaseIdException,
                                                                UpgradeContextException
Checks the InstalledAssemblyRegistry.iar file in the <wt_hom>\codebase\assemblyRegistry directory to find out what solutions are installed. If more than one interoperable solution is installed a message will be displayed that PTC does not support an upgrade with more than one interoperable solution and will not be able to proceed. If only one interoperable solution is installed they will be informed and they will be able to proceed with the upgrade.

Specified by:
runThreadedWork in class AbstractStateWithThreadedWork
Returns:
returns Outcome(true) when everything worked correctly or Outcome(false) if an error occurred
Throws:
ReleaseIdException
UpgradeContextException

getInstalledTooManySolutions

public boolean getInstalledTooManySolutions()
If this is true the UpgradeManager will not let the user proceed to the next step. If this is false the UpgradeManager will let the user proceed to the next step.

Returns:
boolean

getInstalledNotEnoughSolutions

public boolean getInstalledNotEnoughSolutions()