|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.ius.ApplicabilitySnapshotModel
A snapshot of the applicability of all the updates at a certain point. All the state is produced during construction.If the context changes, the state may no longer be valid, and it is wise to create a new ApplicabilityModel.
Nested Class Summary | |
private class |
ApplicabilitySnapshotModel.Applicability
|
private class |
ApplicabilitySnapshotModel.Selection
|
Field Summary | |
private static String |
CLASSNAME
|
private static boolean |
DEBUG
|
private DependencyGraphModel |
dependencyModel_
|
private IncrementalUpdateHistory |
incrementalUpdateHistory_
|
private boolean |
isFirstUpgrade_
|
private static DebugWriter |
LOG
|
private ReleaseId[] |
sourceVersions_
|
private ReleaseId[] |
targetVersions_
|
private HashMap |
updateApplicability_
|
private HashMap |
updateSelections_
|
Constructor Summary | |
ApplicabilitySnapshotModel()
|
|
ApplicabilitySnapshotModel(ReleaseId[] source_versions,
ReleaseId[] target_versions,
IncrementalUpdateHistory iu_history,
boolean is_first_upgrade)
|
Method Summary | |
private void |
computeApplicabilities()
|
private void |
computeSelections()
For each applicable iu, earliest to latest, select it if all of its requireds (which should be ordered before it) are selected or have already been applied AND none of its excludings (which should also be ordered before it) has been selected or already run. |
(package private) DependencyGraphModel |
dependencyModel()
|
private ApplicabilitySnapshotModel.Applicability |
getApplicabilityFor(UUID uuid)
|
IUApplication |
getIUApplicationFor(UUID uuid)
The update history for the update with the specified UUID. |
private List |
getIUSequence()
|
int |
getNumberOfApplicableUpdates()
|
Set |
getSelectedPredecessorsOf(UUID uuid)
|
private ApplicabilitySnapshotModel.Selection |
getSelectionFor(UUID uuid)
|
List |
getSequenceOfApplicableUpdates()
Ordered set of IncrementalUpdates that can be applied. |
List |
getSequenceOfSelectedUpdates()
Ordered set of IncrementalUpdates that are to actually be applied(i.e.which are selected). |
List |
getSequenceOfUpdatesAlreadyApplied()
Ordered sequence of IncrementalUpdates that have already been applied. |
private IncrementalUpdate |
getUpdateFor(UUID uuid)
|
private Iterator |
getUpdates()
|
private Iterator |
getUpdateUuids()
|
boolean |
hasAlreadyRun(UUID uuid)
|
boolean |
isApplicable(UUID uuid)
|
private static boolean |
isFirstUpgrade(InstallAndUpgradeHistory iuh)
|
boolean |
isRequired(UUID uuid)
|
boolean |
isSelected(UUID uuid)
|
boolean |
isSelectionUserChangeable(UUID uuid)
|
void |
setSelected(UUID uuid,
boolean is_selected)
Changed the selected state of the specified UUID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CLASSNAME
private static final boolean DEBUG
private static final DebugWriter LOG
private DependencyGraphModel dependencyModel_
private HashMap updateApplicability_
private HashMap updateSelections_
private ReleaseId[] sourceVersions_
private ReleaseId[] targetVersions_
private IncrementalUpdateHistory incrementalUpdateHistory_
private boolean isFirstUpgrade_
Constructor Detail |
public ApplicabilitySnapshotModel() throws ApplicabilityModelException
public ApplicabilitySnapshotModel(ReleaseId[] source_versions, ReleaseId[] target_versions, IncrementalUpdateHistory iu_history, boolean is_first_upgrade) throws ApplicabilityModelException
Method Detail |
private static boolean isFirstUpgrade(InstallAndUpgradeHistory iuh) throws ApplicabilityModelException
ApplicabilityModelException
private void computeApplicabilities() throws ApplicabilityModelException
ApplicabilityModelException
private void computeSelections() throws ApplicabilityModelException
ApplicabilityModelException
private ApplicabilitySnapshotModel.Applicability getApplicabilityFor(UUID uuid)
private ApplicabilitySnapshotModel.Selection getSelectionFor(UUID uuid)
DependencyGraphModel dependencyModel()
private List getIUSequence()
private Iterator getUpdateUuids()
private Iterator getUpdates()
private IncrementalUpdate getUpdateFor(UUID uuid)
public Set getSelectedPredecessorsOf(UUID uuid)
public boolean isSelected(UUID uuid)
public boolean isSelectionUserChangeable(UUID uuid)
public boolean isApplicable(UUID uuid)
public boolean isRequired(UUID uuid)
public boolean hasAlreadyRun(UUID uuid)
public List getSequenceOfApplicableUpdates()
public List getSequenceOfSelectedUpdates()
public List getSequenceOfUpdatesAlreadyApplied()
public int getNumberOfApplicableUpdates()
public IUApplication getIUApplicationFor(UUID uuid)
public void setSelected(UUID uuid, boolean is_selected) throws ApplicabilityModelException
is_selected
is false
and the update is not deselectable.Similarly, one will be
thrown if is_selected
is true and the update is not
selectable.
ApplicabilityModelException
- if trying to deselect an update that is not deselectable or select an update that is not selectable#isSelectable
,
#isDeselectable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |