diff options
author | rbrooks | 2010-08-11 07:52:52 +0000 |
---|---|---|
committer | rbrooks | 2010-08-11 07:52:52 +0000 |
commit | 9886075d21028ae734d1c530fed4575a6522c067 (patch) | |
tree | 47ee8e39b08b1610594eb37afd77033cc0125dcb | |
parent | ec05e3b08e88ed2dfac3999f2128a3e78235dddc (diff) | |
download | org.eclipse.osee-9886075d21028ae734d1c530fed4575a6522c067.tar.gz org.eclipse.osee-9886075d21028ae734d1c530fed4575a6522c067.tar.xz org.eclipse.osee-9886075d21028ae734d1c530fed4575a6522c067.zip |
converted more string based type references to use type tokens
183 files changed, 1154 insertions, 1538 deletions
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java index 4d54b96b6de..842b827ed50 100644 --- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java +++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java @@ -48,6 +48,7 @@ import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.SystemUser; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.enums.IRelationEnumeration; import org.eclipse.osee.framework.core.exception.OseeArgumentException; @@ -238,9 +239,9 @@ public class PopulateDemoActions extends XNavigateItemAction { for (Artifact art : DemoDbUtil.getSoftwareRequirements(SoftwareRequirementStrs.Robot, reqTeam.getWorkingBranch())) { OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, new StringBuilder("Modifying artifact => ").append(art).toString()); - art.setSoleAttributeValue(DemoProgramAttributes.CSCI.name(), DemoCscis.Navigation.name()); - art.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "I"); - art.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), DemoSubsystems.Navigation.name()); + art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Navigation.name()); + art.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "I"); + art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Navigation.name()); Artifact navArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component, DemoSubsystems.Navigation.name(), reqTeam.getWorkingBranch()); @@ -251,9 +252,9 @@ public class PopulateDemoActions extends XNavigateItemAction { for (Artifact art : DemoDbUtil.getSoftwareRequirements(SoftwareRequirementStrs.Event, reqTeam.getWorkingBranch())) { OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, new StringBuilder("Modifying artifact => ").append(art).toString()); - art.setSoleAttributeValue(DemoProgramAttributes.CSCI.name(), DemoCscis.Interface.name()); - art.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "IV"); - art.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), DemoSubsystems.Communications.name()); + art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name()); + art.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "IV"); + art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name()); Artifact robotArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component, DemoSubsystems.Robot_API.name(), reqTeam.getWorkingBranch()); @@ -276,8 +277,8 @@ public class PopulateDemoActions extends XNavigateItemAction { OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Adding artifact => " + name); Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, parentArt.getBranch(), name); - newArt.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "IV"); - newArt.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), DemoSubsystems.Communications.name()); + newArt.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "IV"); + newArt.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name()); newArt.persist(); parentArt.addChild(newArt); parentArt.persist(); @@ -321,9 +322,9 @@ public class PopulateDemoActions extends XNavigateItemAction { reqTeam.getWorkingBranch()).iterator().next(); OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, new StringBuilder("Modifying branch artifact => ").append(branchArtifact).toString()); - branchArtifact.setSoleAttributeValue(DemoProgramAttributes.CSCI.name(), DemoCscis.Interface.name()); - branchArtifact.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "IV"); - branchArtifact.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), DemoSubsystems.Communications.name()); + branchArtifact.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name()); + branchArtifact.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "IV"); + branchArtifact.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name()); Artifact comArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component, DemoSubsystems.Robot_API.name(), reqTeam.getWorkingBranch()); @@ -335,9 +336,9 @@ public class PopulateDemoActions extends XNavigateItemAction { reqTeam.getWorkingBranch()).iterator().next(); OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, new StringBuilder("Modifying parent artifact => ").append(parentArtifact).toString()); - parentArtifact.setSoleAttributeValue(DemoProgramAttributes.CSCI.name(), DemoCscis.Navigation.name()); - parentArtifact.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "V"); - parentArtifact.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), + parentArtifact.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Navigation.name()); + parentArtifact.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "V"); + parentArtifact.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Cognitive_Decision_Aiding.name()); parentArtifact.persist(); @@ -367,9 +368,9 @@ public class PopulateDemoActions extends XNavigateItemAction { reqTeam.getWorkingBranch())) { OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, new StringBuilder("Modifying artifact => ").append(art).toString()); - art.setSoleAttributeValue(DemoProgramAttributes.CSCI.name(), DemoCscis.Interface.name()); - art.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "IV"); - art.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), DemoSubsystems.Communications.name()); + art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name()); + art.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "IV"); + art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name()); Artifact comArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component, DemoSubsystems.Robot_API.name(), reqTeam.getWorkingBranch()); @@ -392,8 +393,8 @@ public class PopulateDemoActions extends XNavigateItemAction { OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Adding artifact => " + name); Artifact newArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, parentArt.getBranch(), name); - newArt.setSoleAttributeValue(DemoProgramAttributes.Safety_Criticality.toString(), "IV"); - newArt.setSoleAttributeValue(DemoProgramAttributes.Subsystem.name(), DemoSubsystems.Communications.name()); + newArt.setSoleAttributeValue(CoreAttributeTypes.SafetyCriticality, "IV"); + newArt.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name()); parentArt.addChild(newArt); newArt.persist(); @@ -434,7 +435,7 @@ public class PopulateDemoActions extends XNavigateItemAction { if (aData.getCreateReviews().length > 0) { for (CreateReview createReview : aData.getCreateReviews()) { if (createReview == CreateReview.Decision) { - teamWf.setSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, true); + teamWf.setSoleAttributeValue(AtsAttributeTypes.ValidationRequired, true); } } } diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java index 393c15bdbbf..d58f78be263 100644 --- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java +++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDatabaseConfig.java @@ -94,7 +94,7 @@ public class DemoDatabaseConfig extends AtsDbConfig implements IDbInitialization public static void mapTeamVersionToBranch(TeamDefinitionArtifact teamDef, String versionName, String branchName, SkynetTransaction transaction) throws OseeCoreException { Branch branch = BranchManager.getBranch(branchName); VersionArtifact verArt = teamDef.getVersionArtifact(versionName, false); - verArt.setSoleAttributeValue(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, branch.getGuid()); + verArt.setSoleAttributeValue(AtsAttributeTypes.BaselineBranchGuid, branch.getGuid()); verArt.persist(transaction); } @@ -143,11 +143,11 @@ public class DemoDatabaseConfig extends AtsDbConfig implements IDbInitialization versionArtifact.setReleased(true); } if (DemoCISBuilds.CIS_Bld_2.equals(demoBranch) || DemoSawBuilds.SAW_Bld_2.equals(demoBranch)) { - versionArtifact.setSoleAttributeValue(AtsAttributeTypes.ATS_NEXT_VERSION, true); + versionArtifact.setSoleAttributeValue(AtsAttributeTypes.NextVersion, true); } if (DemoSawBuilds.SAW_Bld_2.equals(demoBranch)) { - versionArtifact.setSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_COMMIT_BRANCH, true); - versionArtifact.setSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_CREATE_BRANCH, true); + versionArtifact.setSoleAttributeValue(AtsAttributeTypes.AllowCommitBranch, true); + versionArtifact.setSoleAttributeValue(AtsAttributeTypes.AllowCreateBranch, true); } teamDef.addRelation(AtsRelationTypes.TeamDefinitionToVersion_Version, versionArtifact); versionArtifact.persist(); diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java index 368c42dbb35..1ef47bdafca 100644 --- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java +++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java @@ -136,10 +136,10 @@ public class AtsBranchConfigurationTest { verArtToTarget = vArt; } } - verArtToTarget.setSoleAttributeFromString(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, viaTeamDefBranch.getGuid()); + verArtToTarget.setSoleAttributeFromString(AtsAttributeTypes.BaselineBranchGuid, viaTeamDefBranch.getGuid()); // setup team def to allow create/commit of branch - verArtToTarget.setSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_COMMIT_BRANCH, true); - verArtToTarget.setSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_CREATE_BRANCH, true); + verArtToTarget.setSoleAttributeValue(AtsAttributeTypes.AllowCommitBranch, true); + verArtToTarget.setSoleAttributeValue(AtsAttributeTypes.AllowCreateBranch, true); verArtToTarget.persist(); TestUtil.sleep(2000); @@ -232,11 +232,11 @@ public class AtsBranchConfigurationTest { TeamDefinitionArtifact teamDef = (TeamDefinitionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.TeamDefinition, AtsTestBranches.BranchViaTeamDef.getName(), AtsUtil.getAtsBranch()); - teamDef.setSoleAttributeFromString(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, viaTeamDefBranch.getGuid()); + teamDef.setSoleAttributeFromString(AtsAttributeTypes.BaselineBranchGuid, viaTeamDefBranch.getGuid()); // setup team def to allow create/commit of branch - teamDef.setSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_COMMIT_BRANCH, true); - teamDef.setSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_CREATE_BRANCH, true); - teamDef.setSoleAttributeValue(AtsAttributeTypes.ATS_TEAM_USES_VERSIONS, false); + teamDef.setSoleAttributeValue(AtsAttributeTypes.AllowCommitBranch, true); + teamDef.setSoleAttributeValue(AtsAttributeTypes.AllowCreateBranch, true); + teamDef.setSoleAttributeValue(AtsAttributeTypes.TeamUsesVersions, false); teamDef.persist(); TestUtil.sleep(2000); diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java index 9f503a63ad7..ec1892a4a1e 100644 --- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java +++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java @@ -96,9 +96,9 @@ public class AtsNavigateItemsToWorldViewTest { arts.clear(); NavigateTestUtil.getAllArtifactChildren(getXViewer().getTree().getItems(), arts); // delete an artifact, look for expected !Errors in the XCol - deleteAttributesForXColErrorTest(arts, AtsAttributeTypes.ATS_TEAM_DEFINITION); - deleteAttributesForXColErrorTest(arts, AtsAttributeTypes.ATS_ACTIONABLE_ITEM); - deleteAttributesForXColErrorTest(arts, AtsAttributeTypes.ATS_CHANGE_TYPE); + deleteAttributesForXColErrorTest(arts, AtsAttributeTypes.TeamDefinition); + deleteAttributesForXColErrorTest(arts, AtsAttributeTypes.ActionableItem); + deleteAttributesForXColErrorTest(arts, AtsAttributeTypes.ChangeType); } @org.junit.Test @@ -623,7 +623,7 @@ public class AtsNavigateItemsToWorldViewTest { verifyArtifactsHasErrors(labelProv, arts, xCol, getXViewer().getCustomizeMgr().getColumnNumFromXViewerColumn(xCol), actualErrorCols); } - if (!AtsAttributeTypes.ATS_CURRENT_STATE.equals(attributeTypeToDelete) && !AtsAttributeTypes.ATS_PRIORITY_TYPE.equals(attributeTypeToDelete)) { + if (!AtsAttributeTypes.CurrentState.equals(attributeTypeToDelete) && !AtsAttributeTypes.PriorityType.equals(attributeTypeToDelete)) { verifyXCol1HasErrors(actualErrorCols); } else { verifyXCol2HasErrors(actualErrorCols); diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java index c04952af9c6..8920c9d65c3 100644 --- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java +++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java @@ -64,7 +64,7 @@ public class AtsQueryPerformanceTests { List<User> users = UserManager.getUsers(); User andy = null; for (User usr : users) { - if (usr.getSoleAttributeValueAsString("Name", "unknown").contains("Finkbeiner")) { + if (usr.getName().contains("Finkbeiner")) { andy = usr; break; } diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java index ae7dd3d7553..263cd1e51b1 100644 --- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java +++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java @@ -34,13 +34,13 @@ public class SMATestUtil { if (sma.isCancelledOrCompleted()) { Assert.assertEquals("ats.CurrentState wrong " + sma.getHumanReadableId(), sma.getStateMgr().getCurrentStateName() + ";;;", - sma.getSoleAttributeValue(AtsAttributeTypes.ATS_CURRENT_STATE)); + sma.getSoleAttributeValue(AtsAttributeTypes.CurrentState)); } Assert.assertEquals("Percent wrong for " + sma.getHumanReadableId(), sma.getWorldViewPercentCompleteTotal(), totalPercent); Assert.assertEquals("Hours Spent wrong for " + sma.getHumanReadableId(), sma.getWorldViewHoursSpentTotal(), hoursSpent); - for (String stateValue : sma.getAttributesToStringList(AtsAttributeTypes.ATS_CURRENT_STATE)) { + for (String stateValue : sma.getAttributesToStringList(AtsAttributeTypes.CurrentState)) { if (stateValue.startsWith(DefaultTeamState.Completed.name())) { Assert.assertEquals("ats.State wrong " + sma.getHumanReadableId(), stateValue, "Completed;;;"); } else if (stateValue.startsWith(DefaultTeamState.Cancelled.name())) { diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java index 87baa8671cb..8afffe43d49 100644 --- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java +++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java @@ -165,7 +165,7 @@ public class SMAPromptChangeStatusTest { // test that if task not in related-to state of workflows's current status, can't change status transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Prompt Change Status Test"); - taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, + taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, DefaultTeamState.Analyze.name()); transaction.execute(); SMAPromptChangeStatus promptChangeStatus = new SMAPromptChangeStatus(tasks); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java index 5dfa848004f..fcc992df854 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.ats; +import org.eclipse.osee.ats.artifact.AtsAttributeTypes; import org.eclipse.osee.ats.artifact.StateMachineArtifact; import org.eclipse.osee.ats.artifact.TeamWorkflowExtensions; import org.eclipse.osee.ats.util.AtsArtifactTypes; @@ -51,14 +52,14 @@ public class AtsArtifactImageProvider extends ArtifactImageProvider { @Override public String setupImage(Artifact artifact) throws OseeCoreException { if (artifact.isOfType(AtsArtifactTypes.Version)) { - if (artifact.getSoleAttributeValue("ats.Next Version", false)) { + if (artifact.getSoleAttributeValue(AtsAttributeTypes.NextVersion, false)) { return ArtifactImageManager.setupImage(artifact, AtsImage.NEXT, Location.BOT_RIGHT); } - if (artifact.getSoleAttributeValue("ats.Released", false)) { + if (artifact.getSoleAttributeValue(AtsAttributeTypes.Released, false)) { return ArtifactImageManager.setupImage(artifact, AtsImage.RELEASED, Location.TOP_RIGHT); } - if (artifact.getSoleAttributeValue("ats.Version Locked", false) && !artifact.getSoleAttributeValue( - "ats.Released", false)) { + if (artifact.getSoleAttributeValue(AtsAttributeTypes.VersionLocked, false) && !artifact.getSoleAttributeValue( + AtsAttributeTypes.Released, false)) { return ArtifactImageManager.setupImage(artifact, AtsImage.VERSION_LOCKED, Location.BOT_RIGHT); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java index a31bdd69028..243819d1d83 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ExportChangeReportsAction.java @@ -104,7 +104,7 @@ public class ExportChangeReportsAction extends Action { List<TeamWorkFlowArtifact> workflows = new ArrayList<TeamWorkFlowArtifact>(); if (workflows.isEmpty()) { List<Artifact> artifacts = - ArtifactQuery.getArtifactListFromAttributeValues(AtsAttributeTypes.ATS_LEGACY_PCR_ID, legacyIds, + ArtifactQuery.getArtifactListFromAttributeValues(AtsAttributeTypes.LegacyPcrId, legacyIds, CoreBranches.COMMON, legacyIds.size()); for (Artifact artifact : artifacts) { if (artifact.getArtifactType().getGuid().equals("AAMFDjZ1UVAQTXHk2GgA")) { @@ -194,7 +194,7 @@ public class ExportChangeReportsAction extends Action { doSubWork(operation, monitor, 0.50); } if (!changes.isEmpty() && changes.size() < 4000) { - String folderName = workflow.getSoleAttributeValueAsString(AtsAttributeTypes.ATS_LEGACY_PCR_ID, null); + String folderName = workflow.getSoleAttributeValueAsString(AtsAttributeTypes.LegacyPcrId, null); IOperation subOp = new WordChangeReportOperation(changes, true, folderName); doSubWork(subOp, monitor, 0.50); } else { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java index 3fdc4742f7b..f42ea74e3f6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java @@ -77,7 +77,7 @@ public class NewActionPage1 extends WizardPage { try {
String xWidgetXml =
- "<WorkPage><XWidget displayName=\"Title\" required=\"true\" xwidgetType=\"XText\" toolTip=\"" + AtsAttributeTypes.ATS_TITLE.getDescription() + "\"/></WorkPage>"; + "<WorkPage><XWidget displayName=\"Title\" required=\"true\" xwidgetType=\"XText\" toolTip=\"" + AtsAttributeTypes.Title.getDescription() + "\"/></WorkPage>"; Composite comp = new Composite(parent, SWT.NONE);
comp.setLayout(new GridLayout(1, false));
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -151,7 +151,7 @@ public class NewActionPage1 extends WizardPage { }
ActionableItemArtifact aia = (ActionableItemArtifact) sel.getFirstElement();
try {
- descriptionLabel.setText(aia.getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, ""));
+ descriptionLabel.setText(aia.getSoleAttributeValue(AtsAttributeTypes.Description, "")); } catch (OseeCoreException ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage2.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage2.java index e8da1727394..b4cc32348ad 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage2.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage2.java @@ -74,11 +74,11 @@ public class NewActionPage2 extends WizardPage { try {
StringBuffer sb = new StringBuffer("<WorkPage>");
- sb.append("<XWidget displayName=\"Description\" height=\"80\" required=\"true\" xwidgetType=\"XText\" fill=\"Vertically\" toolTip=\"" + AtsAttributeTypes.ATS_DESCRIPTION.getDescription() + "\"/>"); - sb.append("<XWidget displayName=\"Change Type\" storageName=\"ats.Change Type\" xwidgetType=\"XCombo(" + ATSXWidgetOptionResolver.OPTIONS_FROM_ATTRIBUTE_VALIDITY + ")\" required=\"true\" horizontalLabel=\"true\" toolTip=\"" + AtsAttributeTypes.ATS_CHANGE_TYPE.getDescription() + "\"/>"); + sb.append("<XWidget displayName=\"Description\" height=\"80\" required=\"true\" xwidgetType=\"XText\" fill=\"Vertically\" toolTip=\"" + AtsAttributeTypes.Description.getDescription() + "\"/>"); + sb.append("<XWidget displayName=\"Change Type\" storageName=\"ats.Change Type\" xwidgetType=\"XCombo(" + ATSXWidgetOptionResolver.OPTIONS_FROM_ATTRIBUTE_VALIDITY + ")\" required=\"true\" horizontalLabel=\"true\" toolTip=\"" + AtsAttributeTypes.ChangeType.getDescription() + "\"/>"); sb.append("<XWidget displayName=\"Priority\" storageName=\"ats.Priority\" xwidgetType=\"XCombo(" + ATSXWidgetOptionResolver.OPTIONS_FROM_ATTRIBUTE_VALIDITY + ")\" required=\"true\" horizontalLabel=\"true\"/>");
- sb.append("<XWidget displayName=\"Deadline\" xwidgetType=\"XDate\" horizontalLabel=\"true\" toolTip=\"" + AtsAttributeTypes.ATS_NEED_BY.getDescription() + "\"/>"); - sb.append("<XWidget displayName=\"Validation Required\" xwidgetType=\"XCheckBox\" horizontalLabel=\"true\" labelAfter=\"true\" toolTip=\"" + AtsAttributeTypes.ATS_VALIDATION_REQUIRED.getDescription() + "\"/>"); + sb.append("<XWidget displayName=\"Deadline\" xwidgetType=\"XDate\" horizontalLabel=\"true\" toolTip=\"" + AtsAttributeTypes.NeedBy.getDescription() + "\"/>"); + sb.append("<XWidget displayName=\"Validation Required\" xwidgetType=\"XCheckBox\" horizontalLabel=\"true\" labelAfter=\"true\" toolTip=\"" + AtsAttributeTypes.ValidationRequired.getDescription() + "\"/>"); sb.append("</WorkPage>");
Composite comp = new Composite(parent, SWT.NONE);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java index 49491719c4b..a8a074b6658 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java @@ -119,7 +119,7 @@ public class ATSLog { public List<LogItem> getLogItems() throws OseeCoreException {
// System.out.println("getLogItems " + artifact.getHumanReadableId());
List<LogItem> logItems = new ArrayList<LogItem>();
- String xml = getArtifact().getSoleAttributeValue(AtsAttributeTypes.ATS_LOG, "");
+ String xml = getArtifact().getSoleAttributeValue(AtsAttributeTypes.Log, ""); if (!xml.equals("")) {
Matcher m = LOG_ITEM_PATTERN.matcher(xml);
while (m.find()) {
@@ -165,7 +165,7 @@ public class ATSLog { element.setAttribute("msg", item.getMsg());
rootElement.appendChild(element);
}
- getArtifact().setSoleAttributeValue(AtsAttributeTypes.ATS_LOG, Jaxp.getDocumentXml(doc));
+ getArtifact().setSoleAttributeValue(AtsAttributeTypes.Log, Jaxp.getDocumentXml(doc)); } catch (Exception ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't create ats log document", ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java index 12bd4f1c667..5b463a0b401 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java @@ -108,7 +108,7 @@ public class ATSNote { public List<NoteItem> getNoteItems() {
try {
- String xml = getArtifact().getSoleAttributeValue(AtsAttributeTypes.ATS_STATE_NOTES, "");
+ String xml = getArtifact().getSoleAttributeValue(AtsAttributeTypes.StateNotes, ""); if (Strings.isValid(xml)) {
return getNoteItems(xml, getArtifact().getHumanReadableId());
}
@@ -132,7 +132,7 @@ public class ATSNote { element.setAttribute("msg", item.getMsg());
rootElement.appendChild(element);
}
- getArtifact().setSoleAttributeValue(AtsAttributeTypes.ATS_STATE_NOTES,
+ getArtifact().setSoleAttributeValue(AtsAttributeTypes.StateNotes, Jaxp.getDocumentXml(doc));
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't create ats note document", ex);
@@ -149,7 +149,7 @@ public class ATSNote { ArrayList<NoteItem> showNotes = new ArrayList<NoteItem>();
List<NoteItem> noteItems = getNoteItems();
try {
- if (!getArtifact().isAttributeTypeValid(AtsAttributeTypes.ATS_STATE_NOTES)) {
+ if (!getArtifact().isAttributeTypeValid(AtsAttributeTypes.StateNotes)) { return "";
}
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java index caf63c095df..cac9fe44505 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java @@ -111,12 +111,12 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { private void resetValidationOffChildren() throws OseeCoreException {
boolean validationRequired = false;
for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
- if (team.getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, false)) {
+ if (team.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, false)) { validationRequired = true;
}
}
- if (validationRequired != getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, false)) {
- setSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, validationRequired);
+ if (validationRequired != getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, false)) { + setSoleAttributeValue(AtsAttributeTypes.ValidationRequired, validationRequired); }
}
@@ -127,16 +127,16 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { String desc = "";
for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
if (desc.equals("")) {
- desc = team.getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
- } else if (!desc.equals(team.getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, ""))) {
+ desc = team.getSoleAttributeValue(AtsAttributeTypes.Description, ""); + } else if (!desc.equals(team.getSoleAttributeValue(AtsAttributeTypes.Description, ""))) { return;
}
}
- if (!desc.equals(getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, ""))) {
- setSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, desc);
+ if (!desc.equals(getSoleAttributeValue(AtsAttributeTypes.Description, ""))) { + setSoleAttributeValue(AtsAttributeTypes.Description, desc); }
if (desc.equals("")) {
- deleteSoleAttribute(AtsAttributeTypes.ATS_DESCRIPTION);
+ deleteSoleAttribute(AtsAttributeTypes.Description); }
}
@@ -188,26 +188,26 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { Set<String> userComs = new HashSet<String>();
for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
if (!team.isCancelled()) {
- userComs.addAll(team.getAttributesToStringList(AtsAttributeTypes.ATS_USER_COMMUNITY));
+ userComs.addAll(team.getAttributesToStringList(AtsAttributeTypes.UserCommunity)); }
}
- setAttributeValues(AtsAttributeTypes.ATS_USER_COMMUNITY, userComs);
+ setAttributeValues(AtsAttributeTypes.UserCommunity, userComs); }
public void setChangeType(ChangeType type) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, type.name());
+ setSoleAttributeValue(AtsAttributeTypes.ChangeType, type.name()); }
public ChangeType getChangeType() throws OseeCoreException {
- return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, ""));
+ return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ChangeType, "")); }
public PriorityType getPriority() throws OseeCoreException {
- return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, ""));
+ return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.PriorityType, "")); }
public void setPriority(PriorityType type) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, type.getShortName());
+ setSoleAttributeValue(AtsAttributeTypes.PriorityType, type.getShortName()); }
public Collection<TeamWorkFlowArtifact> getTeamWorkFlowArtifacts() throws OseeCoreException {
@@ -226,7 +226,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { @Override
public ChangeType getWorldViewChangeType() throws OseeCoreException {
- return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, ""));
+ return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ChangeType, "")); }
@Override
@@ -331,7 +331,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { @Override
public String getWorldViewPriority() throws OseeCoreException {
- return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, "")).getShortName();
+ return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.PriorityType, "")).getShortName(); }
@Override
@@ -347,7 +347,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { @Override
public String getWorldViewUserCommunity() throws OseeCoreException {
- return getAttributesToString(AtsAttributeTypes.ATS_USER_COMMUNITY);
+ return getAttributesToString(AtsAttributeTypes.UserCommunity); }
@Override
@@ -535,7 +535,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { @Override
public String getWorldViewGoalOrderVote() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_GOAL_ORDER_VOTE, "");
+ return getSoleAttributeValue(AtsAttributeTypes.GoalOrderVote, ""); }
@Override
@@ -800,7 +800,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { * Set Team Workflow attributes off given action artifact
*/
public static void setArtifactIdentifyData(ActionArtifact fromAction, TeamWorkFlowArtifact toTeam) throws OseeCoreException {
- String priorityStr = fromAction.getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, "");
+ String priorityStr = fromAction.getSoleAttributeValue(AtsAttributeTypes.PriorityType, ""); PriorityType priType = null;
if (Strings.isValid(priorityStr)) {
priType = PriorityType.getPriority(priorityStr);
@@ -808,11 +808,11 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { throw new OseeArgumentException("Invalid priority => " + priorityStr);
}
setArtifactIdentifyData(toTeam, fromAction.getName(),
- fromAction.getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, ""),
- ChangeType.getChangeType(fromAction.getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, "")), priType,
+ fromAction.getSoleAttributeValue(AtsAttributeTypes.Description, ""), + ChangeType.getChangeType(fromAction.getSoleAttributeValue(AtsAttributeTypes.ChangeType, "")), priType, // fromAction.getAttributesToStringList(AtsAttributeTypes.ATS_USER_COMMUNITY),
- fromAction.getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, false),
- fromAction.getSoleAttributeValue(AtsAttributeTypes.ATS_NEED_BY, (Date) null));
+ fromAction.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, false), + fromAction.getSoleAttributeValue(AtsAttributeTypes.NeedBy, (Date) null)); }
/**
@@ -821,18 +821,18 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { public static void setArtifactIdentifyData(Artifact art, String title, String desc, ChangeType changeType, PriorityType priority, Boolean validationRequired, Date needByDate) throws OseeCoreException {
art.setName(title);
if (!desc.equals("")) {
- art.setSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, desc);
+ art.setSoleAttributeValue(AtsAttributeTypes.Description, desc); }
- art.setSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, changeType.name());
+ art.setSoleAttributeValue(AtsAttributeTypes.ChangeType, changeType.name()); // art.setAttributeValues(ATSAttributes.USER_COMMUNITY_ATTRIBUTE.getStoreName(), userComms);
if (priority != null) {
- art.setSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, priority.getShortName());
+ art.setSoleAttributeValue(AtsAttributeTypes.PriorityType, priority.getShortName()); }
if (needByDate != null) {
- art.setSoleAttributeValue(AtsAttributeTypes.ATS_NEED_BY, needByDate);
+ art.setSoleAttributeValue(AtsAttributeTypes.NeedBy, needByDate); }
if (validationRequired) {
- art.setSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, true);
+ art.setSoleAttributeValue(AtsAttributeTypes.ValidationRequired, true); }
}
@@ -849,7 +849,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { @Override
public String getWorldViewDescription() {
try {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); } catch (Exception ex) {
return XViewerCells.getCellExceptionString(ex);
}
@@ -858,7 +858,7 @@ public class ActionArtifact extends ATSArtifact implements IWorldViewArtifact { @Override
public String getWorldViewValidationRequiredStr() {
try {
- return String.valueOf(getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, false));
+ return String.valueOf(getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, false)); } catch (Exception ex) {
return XViewerCells.getCellExceptionString(ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionableItemArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionableItemArtifact.java index 8bea21f8b56..1dcb1eca4e6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionableItemArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionableItemArtifact.java @@ -76,7 +76,7 @@ public class ActionableItemArtifact extends Artifact { }
public boolean isActionable() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_ACTIONABLE, false);
+ return getSoleAttributeValue(AtsAttributeTypes.Actionable, false); }
public static Set<ActionableItemArtifact> getActionableItems(Collection<String> actionableItemNames) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java index 727ab708ff2..fdcefd70913 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java @@ -17,117 +17,61 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; /**
* @author Ryan D. Brooks
*/
-public class AtsAttributeTypes extends NamedIdentity implements IAttributeType {
+public final class AtsAttributeTypes extends NamedIdentity implements IAttributeType { - public static final AtsAttributeTypes ATS_ACTIVE = new AtsAttributeTypes("AAMFEclQOVmzkIvzyWwA", "Active", - "Active ATS configuration object."); - public static final AtsAttributeTypes ATS_RESOLUTION = new AtsAttributeTypes("AAMFEdUMfV1KdbQNaKwA", "Resolution", - "Implementation details."); - public static final AtsAttributeTypes ATS_ROLE = new AtsAttributeTypes("AAMFEeCqMz0XCSBJ+IQA", "Role");
- public static final AtsAttributeTypes ATS_LOG = new AtsAttributeTypes("AAMFEdgB1DX3eJSZb0wA", "Log");
- public static final AtsAttributeTypes ATS_STATE = new AtsAttributeTypes("AAMFEdMa3wzVvp60xLQA", "State", - "States of workflow state machine."); - public static final AtsAttributeTypes ATS_POINTS = new AtsAttributeTypes("AY2EeqhzcDEGtXtREkAA", "Points", - "Abstract value that describes risk, complexity, and size of Actions."); - public static final AtsAttributeTypes ATS_NUMERIC_1 = new AtsAttributeTypes("AABY2xxQsDm811kCViwA", "Numeric1", - "Open field for user to be able to enter numbers for sorting."); - public static final AtsAttributeTypes ATS_NUMERIC_2 = new AtsAttributeTypes("AABiRtvZsAEkU4BS9qwA", "Numeric2", - ATS_NUMERIC_1.getDescription()); - public static final AtsAttributeTypes ATS_CATEGORY_1 = new AtsAttributeTypes("AAMFEdrYniOQYrYUKKQA", "Category", - "Open field for user to be able to enter text to use for categorizing/sorting."); - public static final AtsAttributeTypes ATS_CATEGORY_2 = new AtsAttributeTypes("AAMFEdthBkolbJKLXuAA", "Category2", - ATS_CATEGORY_1.getDescription()); - public static final AtsAttributeTypes ATS_CATEGORY_3 = new AtsAttributeTypes("AAMFEd06oxr8LMzZxdgA", "Category3", - ATS_CATEGORY_1.getDescription()); - public static final AtsAttributeTypes ATS_ACTIONABLE = new AtsAttributeTypes("AAMFEcvDtBiaJ3TMatAA", "Actionable", - "True if item can have Action written against or assigned to."); - public static final AtsAttributeTypes ATS_PROBLEM = new AtsAttributeTypes("AAMFEdQUxRyevvTu+bwA", "Problem", - "Problem found during analysis."); - public static final AtsAttributeTypes ATS_DESCRIPTION = new AtsAttributeTypes("AAMFEdWJ_ChxX6+YKbwA", "Description", - "Detailed explanation."); - public static final AtsAttributeTypes ATS_FULL_NAME = new AtsAttributeTypes("AAMFEdZI9XLT34cTonAA", "Full Name", - "Expanded and descriptive name."); - public static final AtsAttributeTypes ATS_LOCATION = new AtsAttributeTypes("AAMFEeAW4QBlesdfacwA", "Location", - "Enter location of materials to review."); - public static final AtsAttributeTypes ATS_CHANGE_TYPE = new AtsAttributeTypes("AAMFEc+MwGHnPCv7HlgA", "Change Type", - "Type of change."); - public static final AtsAttributeTypes ATS_PRIORITY_TYPE = new AtsAttributeTypes("AAMFEc8JzH1U6XGD59QA", "Priority", - "1 = High; 5 = Low"); - public static final AtsAttributeTypes ATS_NEED_BY = new AtsAttributeTypes("AAMFEcxAGzHAKfDNAIwA", "Need By", - "Hard schedule date that workflow must be completed."); - public static final AtsAttributeTypes ATS_SMA_NOTE = new AtsAttributeTypes("AAMFEdm7ywte8qayfbAA", "SMA Note", - "Notes applicable to ATS object"); - public static final AtsAttributeTypes ATS_STATE_NOTES = new AtsAttributeTypes("AAMFEdiWPm7M_xV1EswA", "State Notes");
- public static final AtsAttributeTypes ATS_RELEASED = new AtsAttributeTypes("AAMFEcnMoUZMLA2zB1AA", "Released", - "True if object is in a released state."); - public static final AtsAttributeTypes ATS_DECISION = new AtsAttributeTypes("AAMFEd7uDXcmqq_FrCQA", "Decision", - "Option selected during decision review."); - public static final AtsAttributeTypes ATS_DECISION_REVIEW_OPTIONS = - new AtsAttributeTypes( - "AAMFEd5hRy1+SRJRqfwA", - "Decision Review Options", - "Options available for selection in review. Each line is a separate option. Format: <option name>;<state to transition to>;<assignee>"); - public static final AtsAttributeTypes ATS_LEGACY_PCR_ID = new AtsAttributeTypes("AAMFEd3TakphMtQX1zgA",
- "Legacy PCR Id", "Field to register problem change report id from legacy items imported into ATS."); - public static final AtsAttributeTypes ATS_TEAM_DEFINITION = new AtsAttributeTypes("AAMFEdd5bFEe18bd0lQA",
- "Team Definition");
- public static final AtsAttributeTypes ATS_CURRENT_STATE = new AtsAttributeTypes("AAMFEdOWL3u6hmX2VbwA",
- "Current State", "Current state of workflow state machine."); - public static final AtsAttributeTypes ATS_ALLOW_CREATE_BRANCH = new AtsAttributeTypes("AAMFEbARuQEvi6rtY5gA",
- "Allow Create Branch");
- public static final AtsAttributeTypes ATS_ALLOW_COMMIT_BRANCH = new AtsAttributeTypes("AAMFEbCZCkwgj73BsQgA",
- "Allow Commit Branch");
- public static final AtsAttributeTypes ATS_USER_COMMUNITY = - new AtsAttributeTypes( - "AAMFEdAPtAq1IEwiCQAA", - "User Community", - "If working in one of these communities resulted in the creation of this Action, please select. Otherwise, select Other."); - public static final AtsAttributeTypes ATS_RELEASE_DATE = new AtsAttributeTypes("AAMFEc3+cGcMDOCdmdAA",
- "Release Date", "Date the changes were made available to the users."); - public static final AtsAttributeTypes ATS_REVIEW_DEFECT = new AtsAttributeTypes("AAMFEd+MSVAb8JQ6f5gA",
- "Review Defect");
- public static final AtsAttributeTypes ATS_ESTIMATED_HOURS = - new AtsAttributeTypes( - "AAMFEdCSqBh+cPyadiwA", - "Estimated Hours", - "Hours estimated to implement the changes associated with this Action.\nIncludes estimated hours for workflows, tasks and reviews."); - public static final AtsAttributeTypes ATS_WEEKLY_BENEFIT = new AtsAttributeTypes("AAMFEdEnEU9AecOHMOwA",
- "Weekly Benefit", "Estimated number of hours that will be saved over a single year if this change is completed."); - public static final AtsAttributeTypes ATS_PERCENT_REWORK = new AtsAttributeTypes("AAMFEdKfjl2TII9+tuwA",
- "Percent Rework");
- public static final AtsAttributeTypes ATS_BLOCKING_REVIEW = new AtsAttributeTypes("AAMFEctKkjMRrIy1C7gA",
- "Blocking Review");
- public static final AtsAttributeTypes ATS_REVIEW_BLOCKS = new AtsAttributeTypes("AAMFEc6G2A8jmRWJgagA",
- "Review Blocks", "Review Completion will block it's parent workflow in this manner."); - public static final AtsAttributeTypes ATS_ACTIONABLE_ITEM = new AtsAttributeTypes("AAMFEdbcR2zpGzFOLOQA",
- "Actionable Item", "Actionable Items that are impacted by this change."); - public static final AtsAttributeTypes ATS_HOURS_PER_WORK_DAY = new AtsAttributeTypes("AAMFEdGlqFsZp22RMdAA",
- "Hours Per Work Day");
- public static final AtsAttributeTypes ATS_VALIDATION_REQUIRED = new AtsAttributeTypes("AAMFEcjT0TwkD2R4w1QA",
- "Validation Required", "If selected, originator will be asked to validate the implementation."); - public static final AtsAttributeTypes ATS_PROPOSED_RESOLUTION = new AtsAttributeTypes("AAMFEdSSRDGgBQ5tctAA",
- "Proposed Resolution", "Recommended resolution."); - public static final AtsAttributeTypes ATS_ESTIMATED_RELEASE_DATE = new AtsAttributeTypes("AAMFEcy6VB7Ble5SP1QA",
- "Estimated Release Date", "Date the changes will be made available to the users."); - public static final AtsAttributeTypes ATS_ESTIMATED_COMPLETION_DATE = new AtsAttributeTypes("AAMFEc18k3Gh+GP7zqAA",
- "Estimated Completion Date", "Date the changes will be completed."); - public static final AtsAttributeTypes ATS_WORK_PACKAGE = new AtsAttributeTypes("AAMFEdpJqRp2wvA2qvAA",
- "Work Package", "Designated accounting work package for completing workflow."); - public static final AtsAttributeTypes ATS_GOAL_ORDER_VOTE = new AtsAttributeTypes("Aiecsz9pP1CRoQdaYRAA",
- "Goal Order Vote", "Vote for order item belongs to within goal."); - public static final AtsAttributeTypes ATS_TEAM_USES_VERSIONS = new AtsAttributeTypes("AAMFEcrHnzPxQ7w3ligA",
- "Team Uses Versions", "True if Team Workflow uses versioning/releasing option."); - public static final AtsAttributeTypes ATS_VERSION_LOCKED = new AtsAttributeTypes("AAzRtEJXbjzR5jySOZgA",
- "Version Locked", "True if version artifact is locked."); - public static final AtsAttributeTypes ATS_NEXT_VERSION = new AtsAttributeTypes("AAMFEcpH8Xb72hsF5AwA",
- "Next Version", "True if version artifact is \"Next\" version to be released."); - public static final AtsAttributeTypes ATS_BASELINE_BRANCH_GUID = new AtsAttributeTypes("AAMFEdIjJ2za2fblEVgA",
- "Baseline Branch Guid", "Basline branch associated with ATS object."); - public static final AtsAttributeTypes ATS_RELATED_TO_STATE = new AtsAttributeTypes("AAMFEdkwHULOmHbMbGgA",
- "Related To State", "State of parent workflow this object is related to."); -
- public static final AtsAttributeTypes ATS_TITLE = new AtsAttributeTypes(CoreAttributeTypes.Name.getGuid(), - CoreAttributeTypes.Name.getName(), "Enter clear and consise title that can be generally understood."); + // @formatter:off + public static final IAttributeType Actionable = new AtsAttributeTypes("AAMFEcvDtBiaJ3TMatAA", "Actionable", "True if item can have Action written against or assigned to."); + public static final IAttributeType ActionableItem = new AtsAttributeTypes("AAMFEdbcR2zpGzFOLOQA", "Actionable Item", "Actionable Items that are impacted by this change."); + public static final IAttributeType Active = new AtsAttributeTypes("AAMFEclQOVmzkIvzyWwA", "Active", "Active ATS configuration object."); + public static final IAttributeType AllowCommitBranch = new AtsAttributeTypes("AAMFEbCZCkwgj73BsQgA", "Allow Commit Branch"); + public static final IAttributeType AllowCreateBranch = new AtsAttributeTypes("AAMFEbARuQEvi6rtY5gA", "Allow Create Branch"); + public static final IAttributeType BaselineBranchGuid = new AtsAttributeTypes("AAMFEdIjJ2za2fblEVgA", "Baseline Branch Guid", "Basline branch associated with ATS object."); + public static final IAttributeType BlockingReview = new AtsAttributeTypes("AAMFEctKkjMRrIy1C7gA", "Blocking Review"); + public static final IAttributeType Category1 = new AtsAttributeTypes("AAMFEdrYniOQYrYUKKQA", "Category", "Open field for user to be able to enter text to use for categorizing/sorting."); + public static final IAttributeType Category2 = new AtsAttributeTypes("AAMFEdthBkolbJKLXuAA", "Category2", Category1.getDescription()); + public static final IAttributeType Category3 = new AtsAttributeTypes("AAMFEd06oxr8LMzZxdgA", "Category3", Category1.getDescription()); + public static final IAttributeType ChangeType = new AtsAttributeTypes("AAMFEc+MwGHnPCv7HlgA", "Change Type", "Type of change."); + public static final IAttributeType CurrentState = new AtsAttributeTypes("AAMFEdOWL3u6hmX2VbwA", "Current State", "Current state of workflow state machine."); + public static final IAttributeType Decision = new AtsAttributeTypes("AAMFEd7uDXcmqq_FrCQA", "Decision", "Option selected during decision review."); + public static final IAttributeType DecisionReviewOptions = new AtsAttributeTypes("AAMFEd5hRy1+SRJRqfwA", "Decision Review Options", "Options available for selection in review. Each line is a separate option. Format: <option name>;<state to transition to>;<assignee>"); + public static final IAttributeType Description = new AtsAttributeTypes("AAMFEdWJ_ChxX6+YKbwA", "Description", "Detailed explanation."); + public static final IAttributeType EstimatedCompletionDate = new AtsAttributeTypes("AAMFEc18k3Gh+GP7zqAA", "Estimated Completion Date", "Date the changes will be completed."); + public static final IAttributeType EstimatedHours = new AtsAttributeTypes("AAMFEdCSqBh+cPyadiwA", "Estimated Hours", "Hours estimated to implement the changes associated with this Action.\nIncludes estimated hours for workflows, tasks and reviews."); + public static final IAttributeType EstimatedReleaseDate = new AtsAttributeTypes("AAMFEcy6VB7Ble5SP1QA", "Estimated Release Date", "Date the changes will be made available to the users."); + public static final IAttributeType FullName = new AtsAttributeTypes("AAMFEdZI9XLT34cTonAA", "Full Name", "Expanded and descriptive name."); + public static final IAttributeType GoalOrderVote = new AtsAttributeTypes("Aiecsz9pP1CRoQdaYRAA", "Goal Order Vote", "Vote for order item belongs to within goal."); + public static final IAttributeType HoursPerWorkDay = new AtsAttributeTypes("AAMFEdGlqFsZp22RMdAA", "Hours Per Work Day"); + public static final IAttributeType LegacyPcrId = new AtsAttributeTypes("AAMFEd3TakphMtQX1zgA", "Legacy PCR Id", "Field to register problem change report id from legacy items imported into ATS."); + public static final IAttributeType Location = new AtsAttributeTypes("AAMFEeAW4QBlesdfacwA", "Location", "Enter location of materials to review."); + public static final IAttributeType Log = new AtsAttributeTypes("AAMFEdgB1DX3eJSZb0wA", "Log"); + public static final IAttributeType NeedBy = new AtsAttributeTypes("AAMFEcxAGzHAKfDNAIwA", "Need By", "Hard schedule date that workflow must be completed."); + public static final IAttributeType NextVersion = new AtsAttributeTypes("AAMFEcpH8Xb72hsF5AwA", "Next Version", "True if version artifact is \"Next\" version to be released."); + public static final IAttributeType Numeric1 = new AtsAttributeTypes("AABY2xxQsDm811kCViwA", "Numeric1", "Open field for user to be able to enter numbers for sorting."); + public static final IAttributeType Numeric2 = new AtsAttributeTypes("AABiRtvZsAEkU4BS9qwA", "Numeric2", Numeric1.getDescription()); + public static final IAttributeType PercentRework = new AtsAttributeTypes("AAMFEdKfjl2TII9+tuwA", "Percent Rework"); + public static final IAttributeType Points = new AtsAttributeTypes("AY2EeqhzcDEGtXtREkAA", "Points", "Abstract value that describes risk, complexity, and size of Actions."); + public static final IAttributeType PriorityType = new AtsAttributeTypes("AAMFEc8JzH1U6XGD59QA", "Priority", "1 = High; 5 = Low"); + public static final IAttributeType Problem = new AtsAttributeTypes("AAMFEdQUxRyevvTu+bwA", "Problem", "Problem found during analysis."); + public static final IAttributeType ProposedResolution = new AtsAttributeTypes("AAMFEdSSRDGgBQ5tctAA", "Proposed Resolution", "Recommended resolution."); + public static final IAttributeType RelatedToState = new AtsAttributeTypes("AAMFEdkwHULOmHbMbGgA", "Related To State", "State of parent workflow this object is related to."); + public static final IAttributeType ReleaseDate = new AtsAttributeTypes("AAMFEc3+cGcMDOCdmdAA", "Release Date", "Date the changes were made available to the users."); + public static final IAttributeType Released = new AtsAttributeTypes("AAMFEcnMoUZMLA2zB1AA", "Released", "True if object is in a released state."); + public static final IAttributeType Resolution = new AtsAttributeTypes("AAMFEdUMfV1KdbQNaKwA", "Resolution", "Implementation details."); + public static final IAttributeType ReviewBlocks = new AtsAttributeTypes("AAMFEc6G2A8jmRWJgagA", "Review Blocks", "Review Completion will block it's parent workflow in this manner."); + public static final IAttributeType ReviewDefect = new AtsAttributeTypes("AAMFEd+MSVAb8JQ6f5gA", "Review Defect"); + public static final IAttributeType Role = new AtsAttributeTypes("AAMFEeCqMz0XCSBJ+IQA", "Role"); + public static final IAttributeType SmaNote = new AtsAttributeTypes("AAMFEdm7ywte8qayfbAA", "SMA Note", "Notes applicable to ATS object"); + public static final IAttributeType State = new AtsAttributeTypes("AAMFEdMa3wzVvp60xLQA", "State", "States of workflow state machine."); + public static final IAttributeType StateNotes = new AtsAttributeTypes("AAMFEdiWPm7M_xV1EswA", "State Notes"); + public static final IAttributeType TeamDefinition = new AtsAttributeTypes("AAMFEdd5bFEe18bd0lQA", "Team Definition"); + public static final IAttributeType TeamUsesVersions = new AtsAttributeTypes("AAMFEcrHnzPxQ7w3ligA", "Team Uses Versions", "True if Team Workflow uses versioning/releasing option."); + public static final IAttributeType Title = new AtsAttributeTypes(CoreAttributeTypes.Name.getGuid(), CoreAttributeTypes.Name.getName(), "Enter clear and consise title that can be generally understood."); + public static final IAttributeType UserCommunity = new AtsAttributeTypes("AAMFEdAPtAq1IEwiCQAA", "User Community", "If working in one of these communities resulted in the creation of this Action, please select. Otherwise, select Other."); + public static final IAttributeType ValidationRequired = new AtsAttributeTypes("AAMFEcjT0TwkD2R4w1QA", "Validation Required", "If selected, originator will be asked to validate the implementation."); + public static final IAttributeType VersionLocked = new AtsAttributeTypes("AAzRtEJXbjzR5jySOZgA", "Version Locked", "True if version artifact is locked."); + public static final IAttributeType WeeklyBenefit = new AtsAttributeTypes("AAMFEdEnEU9AecOHMOwA", "Weekly Benefit", "Estimated number of hours that will be saved over a single year if this change is completed."); + public static final IAttributeType WorkPackage = new AtsAttributeTypes("AAMFEdpJqRp2wvA2qvAA", "Work Package", "Designated accounting work package for completing workflow."); + // @formatter:on private AtsAttributeTypes(String guid, String name) {
super(guid, "ats." + name);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java index 895480fc57a..ec1d78f4048 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java @@ -51,12 +51,12 @@ public class DecisionReviewArtifact extends ReviewSMArtifact implements IReviewA @Override
public String getWorldViewDecision() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DECISION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Decision, ""); }
@Override
public String getWorldViewDescription() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); }
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java index 1095a484814..d328e49979e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java @@ -92,7 +92,7 @@ public class DecisionReviewWorkflowManager { DecisionReviewArtifact.DecisionReviewState.Prepare.name())) { return new Result("Action not in Prepare state"); } - reviewArt.setSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_HOURS, estimateHours); + reviewArt.setSoleAttributeValue(AtsAttributeTypes.EstimatedHours, estimateHours); reviewArt.getStateMgr().updateMetrics(stateHoursSpent, statePercentComplete, true); return Result.TrueResult; } @@ -102,7 +102,7 @@ public class DecisionReviewWorkflowManager { DecisionReviewArtifact.DecisionReviewState.Decision.name())) { return new Result("Action not in Decision state"); } - reviewArt.setSoleAttributeValue(AtsAttributeTypes.ATS_DECISION, decision ? "Yes" : "No"); + reviewArt.setSoleAttributeValue(AtsAttributeTypes.Decision, decision ? "Yes" : "No"); reviewArt.getStateMgr().updateMetrics(stateHoursSpent, statePercentComplete, true); return Result.TrueResult; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java index 5aa3ad28efa..4c896e35a48 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java @@ -77,7 +77,7 @@ public class PeerToPeerReviewArtifact extends ReviewSMArtifact implements IRevie @Override
public String getWorldViewDescription() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); }
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java index 681b843cf4c..7e5dd4c2411 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java @@ -92,7 +92,7 @@ public class PeerToPeerReviewWorkflowManager { reviewArt.getUserRoleManager().addOrUpdateUserRole(role, false, transaction); } } - reviewArt.setSoleAttributeValue(AtsAttributeTypes.ATS_LOCATION, reviewMaterials); + reviewArt.setSoleAttributeValue(AtsAttributeTypes.Location, reviewMaterials); reviewArt.getStateMgr().updateMetrics(stateHoursSpent, statePercentComplete, true); return Result.TrueResult; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ReviewSMArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ReviewSMArtifact.java index e66f0e3e7e2..1f2673e219c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ReviewSMArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ReviewSMArtifact.java @@ -144,10 +144,10 @@ public abstract class ReviewSMArtifact extends TaskableStateMachineArtifact { }
public ReviewBlockType getReviewBlockType() throws OseeCoreException {
- String typeStr = getSoleAttributeValue(AtsAttributeTypes.ATS_REVIEW_BLOCKS, null);
+ String typeStr = getSoleAttributeValue(AtsAttributeTypes.ReviewBlocks, null); if (typeStr == null) {
// Check old attribute value
- if (getSoleAttributeValue(AtsAttributeTypes.ATS_BLOCKING_REVIEW, false) == true) {
+ if (getSoleAttributeValue(AtsAttributeTypes.BlockingReview, false) == true) { return ReviewBlockType.Transition;
}
return ReviewBlockType.None;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java index 62d6736a88d..945fc5371cc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/StateMachineArtifact.java @@ -119,7 +119,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public void onBirth() throws OseeCoreException {
super.onBirth();
- setSoleAttributeValue(AtsAttributeTypes.ATS_CURRENT_STATE, "");
+ setSoleAttributeValue(AtsAttributeTypes.CurrentState, ""); }
@Override
@@ -569,8 +569,8 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public String getWorldViewLegacyPCR() throws OseeCoreException {
- if (isAttributeTypeValid(AtsAttributeTypes.ATS_LEGACY_PCR_ID)) {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_LEGACY_PCR_ID, "");
+ if (isAttributeTypeValid(AtsAttributeTypes.LegacyPcrId)) { + return getSoleAttributeValue(AtsAttributeTypes.LegacyPcrId, ""); }
return "";
}
@@ -612,8 +612,8 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup }
public double getEstimatedHoursFromArtifact() throws OseeCoreException {
- if (isAttributeTypeValid(AtsAttributeTypes.ATS_ESTIMATED_HOURS)) {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_HOURS, 0.0);
+ if (isAttributeTypeValid(AtsAttributeTypes.EstimatedHours)) { + return getSoleAttributeValue(AtsAttributeTypes.EstimatedHours, 0.0); }
return 0;
}
@@ -673,14 +673,14 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public String getWorldViewResolution() throws OseeCoreException {
- return getAttributesToString(AtsAttributeTypes.ATS_RESOLUTION);
+ return getAttributesToString(AtsAttributeTypes.Resolution); }
public double getRemainHoursFromArtifact() throws OseeCoreException {
if (isCompleted() || isCancelled()) {
return 0;
}
- double est = getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_HOURS, 0.0);
+ double est = getSoleAttributeValue(AtsAttributeTypes.EstimatedHours, 0.0); if (est == 0) {
return getEstimatedHoursFromArtifact();
}
@@ -713,11 +713,11 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public Result isWorldViewRemainHoursValid() throws OseeCoreException {
- if (!isAttributeTypeValid(AtsAttributeTypes.ATS_ESTIMATED_HOURS)) {
+ if (!isAttributeTypeValid(AtsAttributeTypes.EstimatedHours)) { return Result.TrueResult;
}
try {
- Double value = getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_HOURS, null);
+ Double value = getSoleAttributeValue(AtsAttributeTypes.EstimatedHours, null); if (isCancelled()) {
return Result.TrueResult;
}
@@ -767,7 +767,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public Result isWorldViewAnnualCostAvoidanceValid() throws OseeCoreException {
- if (isAttributeTypeValid(AtsAttributeTypes.ATS_WEEKLY_BENEFIT)) {
+ if (isAttributeTypeValid(AtsAttributeTypes.WeeklyBenefit)) { return Result.TrueResult;
}
Result result = isWorldViewRemainHoursValid();
@@ -776,7 +776,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup }
String value = null;
try {
- value = getSoleAttributeValue(AtsAttributeTypes.ATS_WEEKLY_BENEFIT, "");
+ value = getSoleAttributeValue(AtsAttributeTypes.WeeklyBenefit, ""); if (value == null || value.equals("")) {
return new Result("Weekly Benefit Hours not set.");
}
@@ -796,47 +796,47 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public String getWorldViewNotes() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_SMA_NOTE, "");
+ return getSoleAttributeValue(AtsAttributeTypes.SmaNote, ""); }
@Override
public String getWorldViewWorkPackage() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_WORK_PACKAGE, "");
+ return getSoleAttributeValue(AtsAttributeTypes.WorkPackage, ""); }
@Override
public String getWorldViewPoint() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_POINTS, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Points, ""); }
@Override
public String getWorldViewNumeric1() throws OseeCoreException {
- return AtsUtil.doubleToI18nString(getSoleAttributeValue(AtsAttributeTypes.ATS_NUMERIC_1, 0.0), true);
+ return AtsUtil.doubleToI18nString(getSoleAttributeValue(AtsAttributeTypes.Numeric1, 0.0), true); }
@Override
public String getWorldViewNumeric2() throws OseeCoreException {
- return AtsUtil.doubleToI18nString(getSoleAttributeValue(AtsAttributeTypes.ATS_NUMERIC_2, 0.0), true);
+ return AtsUtil.doubleToI18nString(getSoleAttributeValue(AtsAttributeTypes.Numeric2, 0.0), true); }
@Override
public String getWorldViewGoalOrderVote() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_GOAL_ORDER_VOTE, "");
+ return getSoleAttributeValue(AtsAttributeTypes.GoalOrderVote, ""); }
@Override
public String getWorldViewCategory() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_CATEGORY_1, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Category1, ""); }
@Override
public String getWorldViewCategory2() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_CATEGORY_2, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Category2, ""); }
@Override
public String getWorldViewCategory3() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_CATEGORY_3, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Category3, ""); }
public int getWorldViewStatePercentComplete() throws OseeCoreException {
@@ -921,7 +921,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public Date getWorldViewEstimatedReleaseDate() throws OseeCoreException {
- Date date = getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, null);
+ Date date = getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null); Date parentDate = null;
if (getParentSMA() != null) {
parentDate = getParentSMA().getWorldViewEstimatedReleaseDate();
@@ -934,7 +934,7 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public Date getWorldViewEstimatedCompletionDate() throws OseeCoreException {
- Date date = getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE, null);
+ Date date = getSoleAttributeValue(AtsAttributeTypes.EstimatedCompletionDate, null); if (date != null) {
return date;
}
@@ -1046,8 +1046,8 @@ public abstract class StateMachineArtifact extends ATSArtifact implements IGroup @Override
public String getWorldViewValidationRequiredStr() throws OseeCoreException {
- if (isAttributeTypeValid(AtsAttributeTypes.ATS_VALIDATION_REQUIRED)) {
- return String.valueOf(getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, false));
+ if (isAttributeTypeValid(AtsAttributeTypes.ValidationRequired)) { + return String.valueOf(getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, false)); }
return "";
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java index f04c24c92ed..c07757e0c1e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java @@ -85,7 +85,7 @@ public class TaskArtifact extends StateMachineArtifact implements IATSStateMachi StateMachineArtifact parentSMA = getParentSMA();
boolean unCancellable =
parentSMA.getStateMgr().getCurrentStateName().equals(
- getSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, ""));
+ getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "")); if (!unCancellable) {
return false;
}
@@ -142,7 +142,7 @@ public class TaskArtifact extends StateMachineArtifact implements IATSStateMachi @Override
public String getDescription() {
try {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); } catch (Exception ex) {
return "Error: " + ex.getLocalizedMessage();
}
@@ -150,7 +150,7 @@ public class TaskArtifact extends StateMachineArtifact implements IATSStateMachi @Override
public String getWorldViewRelatedToState() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, "");
+ return getSoleAttributeValue(AtsAttributeTypes.RelatedToState, ""); }
@Override
@@ -264,7 +264,7 @@ public class TaskArtifact extends StateMachineArtifact implements IATSStateMachi @Override
public String getWorldViewDescription() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); }
@Override
@@ -277,7 +277,7 @@ public class TaskArtifact extends StateMachineArtifact implements IATSStateMachi if (getParentSMA().isTeamWorkflow()) {
return ((TeamWorkFlowArtifact) getParentSMA()).getWorldViewReleaseDate();
}
- return getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE);
+ return getSoleAttributeValue(AtsAttributeTypes.ReleaseDate); }
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskableStateMachineArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskableStateMachineArtifact.java index e8385c49523..73310d05b99 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskableStateMachineArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskableStateMachineArtifact.java @@ -148,7 +148,7 @@ public abstract class TaskableStateMachineArtifact extends StateMachineArtifact public Collection<TaskArtifact> getTaskArtifacts(String stateName) throws OseeCoreException {
List<TaskArtifact> arts = new ArrayList<TaskArtifact>();
for (TaskArtifact taskArt : getTaskArtifacts()) {
- if (taskArt.getSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, "").equals(stateName)) {
+ if (taskArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(stateName)) { arts.add(taskArt);
}
}
@@ -182,7 +182,7 @@ public abstract class TaskableStateMachineArtifact extends StateMachineArtifact taskArt.getLog().addLog(LogType.StateEntered, "InWork", "");
// Set parent state task is related to
- taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, getStateMgr().getCurrentStateName());
+ taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, getStateMgr().getCurrentStateName()); addRelation(AtsRelationTypes.SmaToTask_Task, taskArt);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamDefinitionArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamDefinitionArtifact.java index e4e5b75ac01..2f474a93f45 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamDefinitionArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamDefinitionArtifact.java @@ -29,6 +29,7 @@ import org.eclipse.osee.ats.util.widgets.commit.ICommitConfigArtifact; import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.exception.BranchDoesNotExist;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
@@ -47,7 +48,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
-import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkRuleDefinition;
@@ -67,7 +67,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt @Override
public Result isCreateBranchAllowed() throws OseeCoreException {
- if (getSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_CREATE_BRANCH, false) == false) {
+ if (getSoleAttributeValue(AtsAttributeTypes.AllowCreateBranch, false) == false) { return new Result(false, "Branch creation disabled for Team Definition [" + this + "]");
}
if (getParentBranch() == null) {
@@ -78,7 +78,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt @Override
public Result isCommitBranchAllowed() throws OseeCoreException {
- if (getSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_COMMIT_BRANCH, false) == false) {
+ if (getSoleAttributeValue(AtsAttributeTypes.AllowCommitBranch, false) == false) { return new Result(false, "Team Definition [" + this + "] not configured to allow branch commit.");
}
if (getParentBranch() == null) {
@@ -90,8 +90,8 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt public void initialize(String fullname, String description, Collection<User> leads, Collection<User> members, Collection<ActionableItemArtifact> actionableItems, TeamDefinitionOptions... teamDefinitionOptions) throws OseeCoreException {
List<Object> teamDefOptions = Collections.getAggregate((Object[]) teamDefinitionOptions);
- setSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, description);
- setSoleAttributeValue(AtsAttributeTypes.ATS_FULL_NAME, fullname);
+ setSoleAttributeValue(AtsAttributeTypes.Description, description); + setSoleAttributeValue(AtsAttributeTypes.FullName, fullname); for (User user : leads) {
addRelation(AtsRelationTypes.TeamLead_Lead, user);
// All leads are members
@@ -102,7 +102,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt }
if (teamDefOptions.contains(TeamDefinitionOptions.TeamUsesVersions)) {
- setSoleAttributeValue(AtsAttributeTypes.ATS_TEAM_USES_VERSIONS, true);
+ setSoleAttributeValue(AtsAttributeTypes.TeamUsesVersions, true); }
if (teamDefOptions.contains(TeamDefinitionOptions.RequireTargetedVersion)) {
addWorkRule(RuleWorkItemId.atsRequireTargetedVersion.name());
@@ -127,7 +127,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt @Override
public Branch getParentBranch() throws OseeCoreException {
try {
- String guid = getSoleAttributeValue(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, "");
+ String guid = getSoleAttributeValue(AtsAttributeTypes.BaselineBranchGuid, ""); if (GUID.isValid(guid)) {
return BranchManager.getBranchByGuid(guid);
}
@@ -184,7 +184,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt public VersionArtifact getNextReleaseVersion() throws OseeCoreException {
for (VersionArtifact verArt : getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version,
VersionArtifact.class)) {
- if (verArt.getSoleAttributeValue(AtsAttributeTypes.ATS_NEXT_VERSION, false)) {
+ if (verArt.getSoleAttributeValue(AtsAttributeTypes.NextVersion, false)) { return verArt;
}
}
@@ -326,7 +326,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt // Get work rules from team definition
for (Artifact art : getRelatedArtifacts(CoreRelationTypes.WorkItem__Child)) {
if (art.isOfType(CoreArtifactTypes.WorkRuleDefinition)) {
- String id = art.getSoleAttributeValue(WorkItemAttributes.WORK_ID, "");
+ String id = art.getSoleAttributeValue(CoreAttributeTypes.WorkId, ""); if (id != null && !id.equals("")) {
workRules.add((WorkRuleDefinition) WorkItemDefinitionFactory.getWorkItemDefinition(id));
}
@@ -342,7 +342,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt */
public double getHoursPerWorkDayFromItemAndChildren(TeamDefinitionArtifact teamDef) {
try {
- Double manDaysHrs = teamDef.getSoleAttributeValue(AtsAttributeTypes.ATS_HOURS_PER_WORK_DAY, 0.0);
+ Double manDaysHrs = teamDef.getSoleAttributeValue(AtsAttributeTypes.HoursPerWorkDay, 0.0); if (manDaysHrs != null && manDaysHrs != 0) {
return manDaysHrs;
}
@@ -453,11 +453,11 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt }
public boolean isTeamUsesVersions() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_TEAM_USES_VERSIONS, false);
+ return getSoleAttributeValue(AtsAttributeTypes.TeamUsesVersions, false); }
public boolean isActionable() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_ACTIONABLE, false);
+ return getSoleAttributeValue(AtsAttributeTypes.Actionable, false); }
public void addWorkRule(String ruleId) throws OseeCoreException {
@@ -488,7 +488,7 @@ public class TeamDefinitionArtifact extends Artifact implements ICommitConfigArt * If no branch is associated then null will be returned.
*/
public Branch getTeamBranch() throws OseeCoreException {
- String guid = getSoleAttributeValue(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, null);
+ String guid = getSoleAttributeValue(AtsAttributeTypes.BaselineBranchGuid, null); if (GUID.isValid(guid)) {
return BranchManager.getBranchByGuid(guid);
} else {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java index fb2326a4191..5c7b74ab1e6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java @@ -108,7 +108,7 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement @Override
public String getDescription() {
try {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); } catch (Exception ex) {
return "Error: " + ex.getLocalizedMessage();
}
@@ -116,12 +116,12 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement @Override
public boolean isValidationRequired() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, false);
+ return getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, false); }
@Override
public int getWorldViewPercentRework() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_PERCENT_REWORK, 0);
+ return getSoleAttributeValue(AtsAttributeTypes.PercentRework, 0); }
@Override
@@ -186,19 +186,19 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement }
public ChangeType getChangeType() throws OseeCoreException {
- return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, ""));
+ return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ChangeType, "")); }
public void setChangeType(ChangeType type) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, type.name());
+ setSoleAttributeValue(AtsAttributeTypes.ChangeType, type.name()); }
public PriorityType getPriority() throws OseeCoreException {
- return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, ""));
+ return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.PriorityType, "")); }
public void setPriority(PriorityType type) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, type.getShortName());
+ setSoleAttributeValue(AtsAttributeTypes.PriorityType, type.getShortName()); }
/**
@@ -209,11 +209,11 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement }
public void setTeamDefinition(TeamDefinitionArtifact tda) throws OseeCoreException {
- this.setSoleAttributeValue(AtsAttributeTypes.ATS_TEAM_DEFINITION, tda.getGuid());
+ this.setSoleAttributeValue(AtsAttributeTypes.TeamDefinition, tda.getGuid()); }
public TeamDefinitionArtifact getTeamDefinition() throws OseeCoreException, OseeCoreException {
- String guid = this.getSoleAttributeValue(AtsAttributeTypes.ATS_TEAM_DEFINITION, "");
+ String guid = this.getSoleAttributeValue(AtsAttributeTypes.TeamDefinition, ""); if (!Strings.isValid(guid)) {
throw new OseeArgumentException(
"TeamWorkflow [" + getHumanReadableId() + "] has no TeamDefinition associated.");
@@ -237,17 +237,17 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement @Override
public ChangeType getWorldViewChangeType() throws OseeCoreException {
- return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, ""));
+ return ChangeType.getChangeType(getSoleAttributeValue(AtsAttributeTypes.ChangeType, "")); }
@Override
public String getWorldViewPriority() throws OseeCoreException {
- return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, "")).getShortName();
+ return PriorityType.getPriority(getSoleAttributeValue(AtsAttributeTypes.PriorityType, "")).getShortName(); }
@Override
public String getWorldViewUserCommunity() throws OseeCoreException {
- return getAttributesToString(AtsAttributeTypes.ATS_USER_COMMUNITY);
+ return getAttributesToString(AtsAttributeTypes.UserCommunity); }
@Override
@@ -314,7 +314,7 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement return XViewerCells.getCellExceptionString(errStr);
}
VersionArtifact verArt = verArts.iterator().next();
- if (!isCompleted() && !isCancelled() && verArt.getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASED, false)) {
+ if (!isCompleted() && !isCancelled() && verArt.getSoleAttributeValue(AtsAttributeTypes.Released, false)) { String errStr =
"Workflow " + getHumanReadableId() + " targeted for released version, but not completed: " + verArt;
if (!targetedErrorLogged) {
@@ -436,7 +436,7 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement @Override
public String getWorldViewDescription() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ return getSoleAttributeValue(AtsAttributeTypes.Description, ""); }
/**
@@ -451,10 +451,10 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement if (vers.size() > 0) {
date = vers.iterator().next().getEstimatedReleaseDate();
if (date == null) {
- date = getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, null);
+ date = getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null); }
} else {
- date = getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, null);
+ date = getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null); }
return date;
}
@@ -471,10 +471,10 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement if (vers.size() > 0) {
date = vers.iterator().next().getReleaseDate();
if (date == null) {
- date = getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, null);
+ date = getSoleAttributeValue(AtsAttributeTypes.ReleaseDate, null); }
} else {
- date = getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, null);
+ date = getSoleAttributeValue(AtsAttributeTypes.ReleaseDate, null); }
return date;
}
@@ -495,15 +495,15 @@ public class TeamWorkFlowArtifact extends TaskableStateMachineArtifact implement @Override
public Date getWorldViewDeadlineDate() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_NEED_BY, null);
+ return getSoleAttributeValue(AtsAttributeTypes.NeedBy, null); }
@Override
public double getWorldViewWeeklyBenefit() throws OseeCoreException {
- if (isAttributeTypeValid(AtsAttributeTypes.ATS_WEEKLY_BENEFIT)) {
+ if (isAttributeTypeValid(AtsAttributeTypes.WeeklyBenefit)) { return 0;
}
- String value = getSoleAttributeValue(AtsAttributeTypes.ATS_WEEKLY_BENEFIT, "");
+ String value = getSoleAttributeValue(AtsAttributeTypes.WeeklyBenefit, ""); if (value == null || value.equals("")) {
return 0;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java index b86a05e0a2b..4d01c420d67 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java @@ -131,7 +131,7 @@ public class TeamWorkflowManager { if (!teamArt.getStateMgr().getCurrentStateName().equals("Analyze")) { return new Result("Action not in Analyze state"); } - teamArt.setSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_HOURS, hourEstimate); + teamArt.setSoleAttributeValue(AtsAttributeTypes.EstimatedHours, hourEstimate); teamArt.getStateMgr().updateMetrics(stateHoursSpent, statePercentComplete, true); return Result.TrueResult; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java index b0414619827..37927dd09f6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/VersionArtifact.java @@ -27,6 +27,7 @@ import org.eclipse.osee.framework.core.exception.OseeDataStoreException; import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.jdk.core.util.GUID;
+import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
@@ -47,7 +48,7 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { @Override
public Result isCreateBranchAllowed() throws OseeCoreException {
- if (getSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_CREATE_BRANCH, false) == false) {
+ if (getSoleAttributeValue(AtsAttributeTypes.AllowCreateBranch, false) == false) { return new Result(false, "Branch creation disabled for Version [" + this + "]");
}
if (getParentBranch() == null) {
@@ -58,7 +59,7 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { @Override
public Result isCommitBranchAllowed() throws OseeCoreException {
- if (getSoleAttributeValue(AtsAttributeTypes.ATS_ALLOW_COMMIT_BRANCH, false) == false) {
+ if (getSoleAttributeValue(AtsAttributeTypes.AllowCommitBranch, false) == false) { return new Result(false, "Version [" + this + "] not configured to allow branch commit.");
}
if (getParentBranch() == null) {
@@ -70,7 +71,7 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { @Override
public Branch getParentBranch() throws OseeCoreException {
try {
- String guid = getSoleAttributeValue(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, "");
+ String guid = getSoleAttributeValue(AtsAttributeTypes.BaselineBranchGuid, ""); if (GUID.isValid(guid)) {
return BranchManager.getBranchByGuid(guid);
}
@@ -85,11 +86,11 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { }
public Boolean isReleased() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASED, false);
+ return getSoleAttributeValue(AtsAttributeTypes.Released, false); }
public Boolean isNextVersion() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_NEXT_VERSION, false);
+ return getSoleAttributeValue(AtsAttributeTypes.NextVersion, false); }
public void getParallelVersions(Set<ICommitConfigArtifact> configArts) throws OseeCoreException {
@@ -100,7 +101,7 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { }
public Boolean isVersionLocked() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_VERSION_LOCKED, false);
+ return getSoleAttributeValue(AtsAttributeTypes.VersionLocked, false); }
@Override
@@ -109,31 +110,27 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { }
public void setReleased(boolean released) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_RELEASED, released);
+ setSoleAttributeValue(AtsAttributeTypes.Released, released); }
public void setNextVersion(boolean nextVersion) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_NEXT_VERSION, nextVersion);
+ setSoleAttributeValue(AtsAttributeTypes.NextVersion, nextVersion); }
public void setVersionLocked(boolean locked) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_VERSION_LOCKED, locked);
+ setSoleAttributeValue(AtsAttributeTypes.VersionLocked, locked); }
public String getFullName() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_FULL_NAME, "");
+ return getSoleAttributeValue(AtsAttributeTypes.FullName, ""); }
public void setFullName(String name) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_FULL_NAME, name);
- }
-
- public String getDescription() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, "");
+ setSoleAttributeValue(AtsAttributeTypes.FullName, name); }
public void setDescription(String desc) throws OseeCoreException {
- setSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, desc);
+ setSoleAttributeValue(AtsAttributeTypes.Description, desc); }
public Collection<TeamWorkFlowArtifact> getTargetedForTeamArtifacts() throws OseeCoreException {
@@ -153,11 +150,12 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { str += " - " + getFullName();
}
}
- if (!getDescription().equals("")) {
+ String description = getSoleAttributeValue(AtsAttributeTypes.Description, ""); + if (Strings.isValid(description)) { if (str.equals("")) {
- str = getDescription();
+ str = description; } else {
- str += " - " + getDescription();
+ str += " - " + description; }
}
return str;
@@ -172,11 +170,11 @@ public class VersionArtifact extends Artifact implements ICommitConfigArtifact { }
public Date getEstimatedReleaseDate() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, null);
+ return getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null); }
public Date getReleaseDate() throws OseeCoreException {
- return getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, null);
+ return getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null); }
public static Set<VersionArtifact> getVersions(Collection<String> teamDefNames) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java index 57fbc86d2ec..06246b75631 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java @@ -33,6 +33,7 @@ import org.eclipse.osee.ats.util.AtsUtil; import org.eclipse.osee.ats.workflow.editor.wizard.AtsWorkflowConfigCreationWizard.WorkflowData; import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -52,7 +53,6 @@ import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin; import org.eclipse.osee.framework.ui.skynet.render.PresentationType; import org.eclipse.osee.framework.ui.skynet.render.RendererManager; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition; -import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory; import org.eclipse.ui.progress.UIJob; @@ -128,7 +128,7 @@ public class AtsConfigManager extends AbstractOperation { (TeamDefinitionArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.TeamDefinition, AtsUtil.getAtsBranch(), teamDefName); if (versionNames == null || versionNames.size() > 0) { - teamDefinition.setSoleAttributeValue(AtsAttributeTypes.ATS_TEAM_USES_VERSIONS, true); + teamDefinition.setSoleAttributeValue(AtsAttributeTypes.TeamUsesVersions, true); } teamDefinition.addRelation(AtsRelationTypes.TeamLead_Lead, UserManager.getUser()); teamDefinition.addRelation(AtsRelationTypes.TeamMember_Member, UserManager.getUser()); @@ -144,7 +144,7 @@ public class AtsConfigManager extends AbstractOperation { ActionableItemArtifact topAia = (ActionableItemArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.ActionableItem, AtsUtil.getAtsBranch(), teamDefName); - topAia.setSoleAttributeValue(AtsAttributeTypes.ATS_ACTIONABLE, false); + topAia.setSoleAttributeValue(AtsAttributeTypes.Actionable, false); topAia.persist(transaction); AtsFolderUtil.getFolder(AtsFolder.ActionableItem).addChild(topAia); @@ -158,7 +158,7 @@ public class AtsConfigManager extends AbstractOperation { ActionableItemArtifact aia = (ActionableItemArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.ActionableItem, AtsUtil.getAtsBranch(), name); - aia.setSoleAttributeValue(AtsAttributeTypes.ATS_ACTIONABLE, true); + aia.setSoleAttributeValue(AtsAttributeTypes.Actionable, true); topAia.addChild(aia); aia.persist(transaction); aias.add(aia); @@ -225,7 +225,7 @@ public class AtsConfigManager extends AbstractOperation { } } if (state == DefaultTeamState.Completed || state == DefaultTeamState.Cancelled) { - newStateArt.setSoleAttributeFromString(WorkItemAttributes.WORK_PARENT_ID, + newStateArt.setSoleAttributeFromString(CoreAttributeTypes.WorkParentId, "osee.ats.teamWorkflow." + state.name()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java index 45a8817b9bc..b70a752e875 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java @@ -129,7 +129,7 @@ public class SMAPrint extends Action { rd.addRaw(AHTML.addRowMultiColumnTable(new String[] {art.getName(),
art.getStateMgr().getCurrentStateName().replaceAll("(Task|State)", ""), art.getWorldViewActivePoc(),
art.getPercentCompleteSMATotal() + "", art.getHoursSpentSMATotal() + "",
- art.getSoleAttributeValue(AtsAttributeTypes.ATS_RESOLUTION, ""), art.getHumanReadableId()}));
+ art.getSoleAttributeValue(AtsAttributeTypes.Resolution, ""), art.getHumanReadableId()})); }
rd.addRaw(AHTML.endBorderTable());
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPromptChangeStatus.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPromptChangeStatus.java index 057bc4b00d8..68916d450eb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPromptChangeStatus.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPromptChangeStatus.java @@ -116,7 +116,7 @@ public class SMAPromptChangeStatus { sma.getStateMgr().addAssignee(UserManager.getUser()); } if (options != null) { - sma.setSoleAttributeValue(AtsAttributeTypes.ATS_RESOLUTION, selectedOption); + sma.setSoleAttributeValue(AtsAttributeTypes.Resolution, selectedOption); } if (sma instanceof TaskArtifact) { ((TaskArtifact) sma).statusPercentChanged(hours, percent, transaction); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java index ad7a350fbe6..b46b17da1cc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java @@ -638,7 +638,7 @@ public class SMAWorkFlowTab extends FormPage implements IActionable { public static void createSMANotesHeader(Composite comp, XFormToolkit toolkit, StateMachineArtifact sma, int horizontalSpan) throws OseeCoreException {
// Display SMA Note
- String note = sma.getSoleAttributeValue(AtsAttributeTypes.ATS_SMA_NOTE, "");
+ String note = sma.getSoleAttributeValue(AtsAttributeTypes.SmaNote, ""); if (!note.equals("")) {
FormsUtil.createLabelOrHyperlink(comp, toolkit, horizontalSpan, "Note: " + note);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java index bf62e415d8e..3b4d2dee845 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java @@ -49,7 +49,7 @@ public class AtsDecisionReviewDecisionStateItem extends AtsStateItem { throw new OseeCoreException(
"AtsDecisionReviewDecisionStateItem.xWidgetCreating expected a StateMachineArtifact");
}
- if (xWidget.getLabel().equals(AtsAttributeTypes.ATS_DECISION.getUnqualifiedName())) { + if (xWidget.getLabel().equals(AtsAttributeTypes.Decision.getUnqualifiedName())) { XComboDam decisionComboDam = (XComboDam) xWidget;
List<String> options = new ArrayList<String>();
XDecisionOptions xDecOptions = new XDecisionOptions((StateMachineArtifact) art);
@@ -88,7 +88,7 @@ public class AtsDecisionReviewDecisionStateItem extends AtsStateItem { }
private DecisionOption getDecisionOption(SMAWorkFlowSection section) throws OseeCoreException {
- XWidget xWidget = section.getPage().getLayoutData(AtsAttributeTypes.ATS_DECISION.getName()).getXWidget(); + XWidget xWidget = section.getPage().getLayoutData(AtsAttributeTypes.Decision.getName()).getXWidget(); XComboDam decisionComboDam = (XComboDam) xWidget;
String decision = decisionComboDam.get();
if (decision.equals("")) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewPrepareStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewPrepareStateItem.java index 8d0c8574836..4d16b395858 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewPrepareStateItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewPrepareStateItem.java @@ -38,7 +38,7 @@ public class AtsPeerToPeerReviewPrepareStateItem extends AtsStateItem { super.xWidgetCreated(widget, toolkit, page, art, modListener, isEditable); try { if (art instanceof ReviewSMArtifact && ((ReviewSMArtifact) art).getParentSMA() == null) { - if (widget.getLabel().equals(AtsAttributeTypes.ATS_REVIEW_BLOCKS.getUnqualifiedName())) { + if (widget.getLabel().equals(AtsAttributeTypes.ReviewBlocks.getUnqualifiedName())) { XComboDam decisionComboDam = (XComboDam) widget; decisionComboDam.setEnabled(false); decisionComboDam.setRequiredEntry(false); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/EstimatedHoursXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/EstimatedHoursXWidget.java index 7c035268ddd..1d5c5c93ee8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/EstimatedHoursXWidget.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/EstimatedHoursXWidget.java @@ -26,12 +26,12 @@ import org.eclipse.swt.widgets.Composite; public class EstimatedHoursXWidget extends XFloatDam {
public EstimatedHoursXWidget(StateMachineArtifact sma, Composite composite, int horizontalSpan, XModifiedListener xModListener) {
- super(AtsAttributeTypes.ATS_ESTIMATED_HOURS.getUnqualifiedName()); + super(AtsAttributeTypes.EstimatedHours.getUnqualifiedName()); try {
if (xModListener != null) {
addXModifiedListener(xModListener);
}
- setAttributeType(sma, AtsAttributeTypes.ATS_ESTIMATED_HOURS);
+ setAttributeType(sma, AtsAttributeTypes.EstimatedHours); setFillHorizontally(true);
createWidgets(composite, horizontalSpan);
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java index c624299d8bf..e7cdf4d1e4f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java @@ -241,7 +241,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { // Check that duplicate Legacy PCR IDs team arts do not exist with different parent actions
if (artifact instanceof TeamWorkFlowArtifact) {
TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) artifact;
- String legacyPcrId = artifact.getSoleAttributeValueAsString(AtsAttributeTypes.ATS_LEGACY_PCR_ID, null);
+ String legacyPcrId = artifact.getSoleAttributeValueAsString(AtsAttributeTypes.LegacyPcrId, null); if (legacyPcrId != null) {
if (legacyPcrIdToParentHrid.containsKey(legacyPcrId)) {
if (!legacyPcrIdToParentHrid.get(legacyPcrId).equals(
@@ -268,7 +268,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { VersionArtifact verArt = (VersionArtifact) artifact;
try {
String parentBranchGuid =
- verArt.getSoleAttributeValueAsString(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, null);
+ verArt.getSoleAttributeValueAsString(AtsAttributeTypes.BaselineBranchGuid, null); if (parentBranchGuid != null) {
validateBranchGuid(verArt, parentBranchGuid);
}
@@ -287,7 +287,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { TeamDefinitionArtifact teamDef = (TeamDefinitionArtifact) art;
try {
String parentBranchGuid =
- teamDef.getSoleAttributeValueAsString(AtsAttributeTypes.ATS_BASELINE_BRANCH_GUID, null);
+ teamDef.getSoleAttributeValueAsString(AtsAttributeTypes.BaselineBranchGuid, null); if (parentBranchGuid != null) {
validateBranchGuid(teamDef, parentBranchGuid);
}
@@ -453,11 +453,11 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { String.format(
"Error: Artifact: " + XResultData.getHyperlink(artifact) + " Type [%s] AttrType [%s] Max [%d] Actual [%d] Values [%s] ",
artifact.getArtifactTypeName(), attrType.getName(), attrType.getMaxOccurrences(), count,
- artifact.getAttributesToString(attrType.getName()));
+ artifact.getAttributesToString(attrType)); Map<String, Attribute<?>> valuesAttrMap = new HashMap<String, Attribute<?>>();
int latestGamma = 0;
String fixInfo = " - FIX AVAILABLE";
- for (Attribute<?> attr : artifact.getAttributes(attrType.getName())) {
+ for (Attribute<?> attr : artifact.getAttributes(attrType)) { if (attr.getGammaId() > latestGamma) {
latestGamma = attr.getGammaId();
}
@@ -469,7 +469,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { if (latestGamma != 0) {
result += fixInfo;
if (fixAttributeValues) {
- for (Attribute<?> attr : artifact.getAttributes(attrType.getName())) {
+ for (Attribute<?> attr : artifact.getAttributes(attrType)) { if (attr.getGammaId() != latestGamma) {
attr.delete();
}
@@ -637,12 +637,12 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { if (artifact instanceof ReviewSMArtifact) {
ReviewSMArtifact reviewArtifact = (ReviewSMArtifact) artifact;
try {
- if (reviewArtifact.getAttributes(AtsAttributeTypes.ATS_REVIEW_DEFECT).size() > 0 && reviewArtifact.getDefectManager().getDefectItems().isEmpty()) {
+ if (reviewArtifact.getAttributes(AtsAttributeTypes.ReviewDefect).size() > 0 && reviewArtifact.getDefectManager().getDefectItems().isEmpty()) { testNameToResultsMap.put(
"testReviewsHaveValidDefectAndRoleXml",
"Error: Review " + XResultData.getHyperlink(reviewArtifact) + " has defect attribute, but no defects (xml parsing error).");
}
- if (reviewArtifact.getAttributes(AtsAttributeTypes.ATS_ROLE).size() > 0 && reviewArtifact.getUserRoleManager().getUserRoles().isEmpty()) {
+ if (reviewArtifact.getAttributes(AtsAttributeTypes.Role).size() > 0 && reviewArtifact.getUserRoleManager().getUserRoles().isEmpty()) { testNameToResultsMap.put(
"testReviewsHaveValidDefectAndRoleXml",
"Error: Review " + XResultData.getHyperlink(reviewArtifact) + " has role attribute, but no roles (xml parsing error).");
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateChangeReports.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateChangeReports.java index 1daa5080a79..65eae114a5a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateChangeReports.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateChangeReports.java @@ -153,7 +153,7 @@ public class ValidateChangeReports extends XNavigateItemAction { OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
sbFull.append(AHTML.addRowMultiColumnTable(teamArt.getHumanReadableId(),
- teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_LEGACY_PCR_ID, ""), resultStr));
+ teamArt.getSoleAttributeValue(AtsAttributeTypes.LegacyPcrId, ""), resultStr)); }
} catch (Exception ex) {
sbFull.append(AHTML.addRowSpanMultiColumnTable("Exception: " + ex.getLocalizedMessage(),
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java index 487378b7200..42737d8b2b5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java @@ -12,8 +12,6 @@ package org.eclipse.osee.ats.internal; import java.io.ByteArrayOutputStream; import java.io.IOException; -import org.eclipse.osee.ats.access.AtsAccessUtil; -import org.eclipse.osee.ats.util.AtsUtil; import org.eclipse.osee.framework.core.dsl.integration.OseeDslProvider; import org.eclipse.osee.framework.core.dsl.integration.util.ModelUtil; import org.eclipse.osee.framework.core.dsl.oseeDsl.OseeDsl; @@ -22,6 +20,7 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeExceptions; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; +import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; /** @@ -32,8 +31,8 @@ public class AtsAccessOseeDslProvider implements OseeDslProvider { private OseeDsl oseeDsl; private Artifact getStorageArtifact() throws OseeCoreException { - return ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.ACCESS_CONTROL_MODEL, - AtsAccessUtil.ATS_ACCESS_MODEL_NAME, AtsUtil.getAtsBranch()); + return ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.AccessControlModel, "ATS CM Access Control", + BranchManager.getCommonBranch()); } @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java index 3092182c545..9227ca24303 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java @@ -118,46 +118,46 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction { // Make changes and persist
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Remote Event Test");
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_DESCRIPTION, "description 2");
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_CHANGE_TYPE, ChangeType.Problem.name());
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_PRIORITY_TYPE, PriorityType.Priority_2.getShortName());
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, "yes");
+ teamArt.setSoleAttributeFromString(AtsAttributeTypes.Description, "description 2"); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.ChangeType, ChangeType.Problem.name()); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.PriorityType, PriorityType.Priority_2.getShortName()); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "yes"); teamArt.addRelation(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, getVersion256());
teamArt.persist(transaction);
transaction.execute();
// Make changes and persist
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_DESCRIPTION, "description 3");
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_PROPOSED_RESOLUTION, "this is resolution");
+ teamArt.setSoleAttributeFromString(AtsAttributeTypes.Description, "description 3"); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.ProposedResolution, "this is resolution"); teamArt.persist();
// Make changes and persist
teamArt.deleteRelation(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, getVersion256());
teamArt.addRelation(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, getVersion257());
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, "no");
+ teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "no"); teamArt.persist();
// Make changes and persist
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Remote Event Test");
- teamArt.deleteAttributes(AtsAttributeTypes.ATS_VALIDATION_REQUIRED);
- teamArt.deleteAttributes(AtsAttributeTypes.ATS_RESOLUTION);
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_DESCRIPTION, "description 4");
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_CHANGE_TYPE, ChangeType.Support.name());
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_PRIORITY_TYPE, PriorityType.Priority_3.getShortName());
+ teamArt.deleteAttributes(AtsAttributeTypes.ValidationRequired); + teamArt.deleteAttributes(AtsAttributeTypes.Resolution); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.Description, "description 4"); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.ChangeType, ChangeType.Support.name()); + teamArt.setSoleAttributeFromString(AtsAttributeTypes.PriorityType, PriorityType.Priority_3.getShortName()); teamArt.setRelations(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version,
Collections.singleton(getVersion258()));
teamArt.persist(transaction);
transaction.execute();
// Make changes and persist
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, "yes");
+ teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "yes"); teamArt.persist();
// Make changes and transition
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Remote Event Test");
teamArt.setRelations(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version,
Collections.singleton(getVersion257()));
- teamArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, "no");
+ teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "no"); teamArt.persist(transaction);
transaction.execute();
@@ -206,11 +206,11 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction { // Validate values
TeamWorkFlowArtifact teamArt = actionArt.getTeamWorkFlowArtifacts().iterator().next();
- testEquals("Description", "description", teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, null));
+ testEquals("Description", "description", teamArt.getSoleAttributeValue(AtsAttributeTypes.Description, null)); testEquals("Change Type", ChangeType.Improvement.name(),
- teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, null));
+ teamArt.getSoleAttributeValue(AtsAttributeTypes.ChangeType, null)); testEquals("Priority", PriorityType.Priority_1.getShortName(),
- teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, null));
+ teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType, null)); }
private void validateActionAtEnd(ActionArtifact actionArt) throws OseeCoreException {
@@ -224,13 +224,13 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction { // Validate values
TeamWorkFlowArtifact teamArt = actionArt.getTeamWorkFlowArtifacts().iterator().next();
- testEquals("Description", "description 4", teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, null));
+ testEquals("Description", "description 4", teamArt.getSoleAttributeValue(AtsAttributeTypes.Description, null)); testEquals("Change Type", ChangeType.Support.name(),
- teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_CHANGE_TYPE, null));
+ teamArt.getSoleAttributeValue(AtsAttributeTypes.ChangeType, null)); testEquals("Priority", PriorityType.Priority_3.getShortName(),
- teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_PRIORITY_TYPE, null));
+ teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType, null)); testEquals("Validation Required", "false",
- String.valueOf(teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, null)));
+ String.valueOf(teamArt.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, null))); testEquals("Targeted Version",
(teamArt.getTargetedForVersion() != null ? teamArt.getTargetedForVersion().toString() : "not set"), "2.5.7");
testEquals("State", DefaultTeamState.Analyze.name(), teamArt.getStateMgr().getCurrentStateName());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ReleaseVersionItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ReleaseVersionItem.java index 971be06b039..dc0eab620e6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ReleaseVersionItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ReleaseVersionItem.java @@ -89,8 +89,8 @@ public class ReleaseVersionItem extends XNavigateItemAction { return; } - verArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RELEASED, true); - verArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, new Date()); + verArt.setSoleAttributeValue(AtsAttributeTypes.Released, true); + verArt.setSoleAttributeValue(AtsAttributeTypes.ReleaseDate, new Date()); verArt.setNextVersion(false); verArt.persist(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java index 159c70269b5..7fcfaa9d566 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java @@ -102,7 +102,7 @@ public class TaskMetrics extends AbstractBlam { int percentComplete = state.getPercentComplete(); if (percentComplete == 100) { - String resolution = task.getSoleAttributeValue(AtsAttributeTypes.ATS_RESOLUTION, ""); + String resolution = task.getSoleAttributeValue(AtsAttributeTypes.Resolution, ""); if (resolution.equals("Complete")) { metrics.put(user, 100); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/CreateActionArtifactChangeReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/CreateActionArtifactChangeReportJob.java index 3397ffa9645..9261e90ae26 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/CreateActionArtifactChangeReportJob.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/CreateActionArtifactChangeReportJob.java @@ -105,7 +105,7 @@ public class CreateActionArtifactChangeReportJob extends Job { rd.addRaw(AHTML.addHeaderRowMultiColumnTable(new String[] {"HRID", "Bulld", "UI", attributeType.getName(), "RPCR", "Change"})); for (TeamWorkFlowArtifact teamArt : teamArts) { - String rcprId = teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_LEGACY_PCR_ID, ""); + String rcprId = teamArt.getSoleAttributeValue(AtsAttributeTypes.LegacyPcrId, ""); String result = String.format("Processing %s/%s RPCR %s for \"%s\"", x, teamArts.size(), rcprId, teamArt.getTeamDefinition().getName()); @@ -124,7 +124,7 @@ public class CreateActionArtifactChangeReportJob extends Job { } private static void processTeam(TeamWorkFlowArtifact teamArt, String buildId, IAttributeType attributeType, ICommitConfigArtifact commitConfigArt, XResultData rd) throws OseeCoreException { - String rpcrNum = teamArt.getSoleAttributeValue(AtsAttributeTypes.ATS_LEGACY_PCR_ID, ""); + String rpcrNum = teamArt.getSoleAttributeValue(AtsAttributeTypes.LegacyPcrId, ""); ChangeData changeData = teamArt.getBranchMgr().getChangeData(commitConfigArt); for (Artifact modArt : changeData.getArtifacts(KindType.Artifact, ModificationType.NEW, ModificationType.MODIFIED)) { List<String> attrStrs = modArt.getAttributesToStringList(attributeType); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java index c486c004d8a..ac3975c96ac 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java @@ -168,7 +168,7 @@ public class ExtendedStatusReportJob extends Job { if (sma instanceof TaskArtifact) { TaskArtifact taskArt = (TaskArtifact) sma; desc = - taskArt.getDescription() + " " + taskArt.getSoleAttributeValue(AtsAttributeTypes.ATS_RESOLUTION, ""); + taskArt.getDescription() + " " + taskArt.getSoleAttributeValue(AtsAttributeTypes.Resolution, ""); } if (desc.matches("^ *$")) { values.add("."); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java index 1d7cbd531f7..9c86aea109a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java @@ -166,7 +166,7 @@ public class TaskXViewer extends WorldXViewer { public void run() { try { boolean success = - PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifact(), AtsAttributeTypes.ATS_TITLE, false, + PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifact(), AtsAttributeTypes.Title, false, false); if (success) { editor.onDirtied(); @@ -222,7 +222,7 @@ public class TaskXViewer extends WorldXViewer { public void run() { try { boolean success = - ArtifactPromptChange.promptChangeAttribute(AtsAttributeTypes.ATS_ESTIMATED_HOURS, + ArtifactPromptChange.promptChangeAttribute(AtsAttributeTypes.EstimatedHours, getSelectedTaskArtifacts(), false); if (success) { editor.onDirtied(); @@ -240,7 +240,7 @@ public class TaskXViewer extends WorldXViewer { try { boolean success = PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifacts(), - AtsAttributeTypes.ATS_RELATED_TO_STATE, false, true); + AtsAttributeTypes.RelatedToState, false, true); if (success) { editor.onDirtied(); update(getSelectedTaskArtifacts().toArray(), null); @@ -256,7 +256,7 @@ public class TaskXViewer extends WorldXViewer { public void run() { try { boolean success = - PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifacts(), AtsAttributeTypes.ATS_SMA_NOTE, + PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifacts(), AtsAttributeTypes.SmaNote, false, true); if (success) { editor.onDirtied(); @@ -357,7 +357,7 @@ public class TaskXViewer extends WorldXViewer { update(getSelectedTaskArtifacts().toArray(), null); return true; } - } else if (PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifacts(), AtsAttributeTypes.ATS_RESOLUTION, + } else if (PromptChangeUtil.promptChangeAttribute(getSelectedTaskArtifacts(), AtsAttributeTypes.Resolution, false, false)) { editor.onDirtied(); update(getSelectedTaskArtifacts().toArray(), null); @@ -379,12 +379,12 @@ public class TaskXViewer extends WorldXViewer { if (isSelectedTaskArtifactsAreInWork() && xCol.equals(WorldXViewerFactory.Estimated_Hours_Col)) { modified = - PromptChangeUtil.promptChangeAttribute(taskArt, AtsAttributeTypes.ATS_ESTIMATED_HOURS, false, false); + PromptChangeUtil.promptChangeAttribute(taskArt, AtsAttributeTypes.EstimatedHours, false, false); } else if (isSelectedTaskArtifactsAreInWork() && xCol.equals(WorldXViewerFactory.Title_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(taskArt, AtsAttributeTypes.ATS_TITLE, false, false); + modified = PromptChangeUtil.promptChangeAttribute(taskArt, AtsAttributeTypes.Title, false, false); } else if (isSelectedTaskArtifactsAreInWork() && xCol.equals(WorldXViewerFactory.Related_To_State_Col)) { modified = - PromptChangeUtil.promptChangeAttribute(taskArt, AtsAttributeTypes.ATS_RELATED_TO_STATE, false, false); + PromptChangeUtil.promptChangeAttribute(taskArt, AtsAttributeTypes.RelatedToState, false, false); } else if (isSelectedTaskArtifactsAreInWork() && xCol.equals(WorldXViewerFactory.Assignees_Col)) { modified = PromptChangeUtil.promptChangeAssignees(taskArt, false); } else if (isUsingTaskResolutionOptions() && (xCol.equals(WorldXViewerFactory.Hours_Spent_State_Col) || xCol.equals(WorldXViewerFactory.Hours_Spent_Total_Col) || xCol.equals(WorldXViewerFactory.Percent_Complete_State_Col) || xCol.equals(WorldXViewerFactory.Percent_Complete_Total_Col))) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactTypes.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactTypes.java index 4bf0b6f1032..9ab82c8434b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactTypes.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactTypes.java @@ -14,21 +14,19 @@ import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.NamedIdentity; public class AtsArtifactTypes extends NamedIdentity implements IArtifactType { - public static final AtsArtifactTypes Action = new AtsArtifactTypes("AAMFDhY_rns71KvX14QA", "Action"); - public static final AtsArtifactTypes ActionableItem = - new AtsArtifactTypes("AAMFDhW2LmhtRFsVyzwA", "Actionable Item"); - public static final AtsArtifactTypes DecisionReview = - new AtsArtifactTypes("AAMFDhfrdR7BGTL7H_wA", "Decision Review"); - public static final AtsArtifactTypes PeerToPeerReview = new AtsArtifactTypes("AAMFDhh_300dpgmNtRAA", - "PeerToPeer Review"); - public static final AtsArtifactTypes Task = new AtsArtifactTypes("AAMFDhbTAAB6h+06fuAA", "Task"); - public static final AtsArtifactTypes StateMachineArtifact = new AtsArtifactTypes("ABMfXC+LFBn31ZZbvjAA", - "Abstract State Machine Artifact"); - public static final AtsArtifactTypes TeamDefinition = - new AtsArtifactTypes("AAMFDhUrlytusKbaQGAA", "Team Definition"); - public static final AtsArtifactTypes TeamWorkflow = new AtsArtifactTypes("AAMFDhSiF2OD+wiUqugA", "Team Workflow"); - public static final AtsArtifactTypes Version = new AtsArtifactTypes("AAMFDhder0oETnv14xQA", "Version"); - public static final AtsArtifactTypes Goal = new AtsArtifactTypes("ABMgU119UjI_Q23Yu+gA", "Goal"); + + // @formatter:off + public static final IArtifactType Action = new AtsArtifactTypes("AAMFDhY_rns71KvX14QA", "Action"); + public static final IArtifactType ActionableItem = new AtsArtifactTypes("AAMFDhW2LmhtRFsVyzwA", "Actionable Item"); + public static final IArtifactType DecisionReview = new AtsArtifactTypes("AAMFDhfrdR7BGTL7H_wA", "Decision Review"); + public static final IArtifactType PeerToPeerReview = new AtsArtifactTypes("AAMFDhh_300dpgmNtRAA", "PeerToPeer Review"); + public static final IArtifactType Task = new AtsArtifactTypes("AAMFDhbTAAB6h+06fuAA", "Task"); + public static final IArtifactType StateMachineArtifact = new AtsArtifactTypes("ABMfXC+LFBn31ZZbvjAA", "Abstract State Machine Artifact"); + public static final IArtifactType TeamDefinition = new AtsArtifactTypes("AAMFDhUrlytusKbaQGAA", "Team Definition"); + public static final IArtifactType TeamWorkflow = new AtsArtifactTypes("AAMFDhSiF2OD+wiUqugA", "Team Workflow"); + public static final IArtifactType Version = new AtsArtifactTypes("AAMFDhder0oETnv14xQA", "Version"); + public static final IArtifactType Goal = new AtsArtifactTypes("ABMgU119UjI_Q23Yu+gA", "Goal"); + // @formatter:on private AtsArtifactTypes(String guid, String name) { super(guid, name); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java index ae930859541..f0deb2eebc7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java @@ -433,7 +433,7 @@ public final class AtsUtil { results.add((A) art); } else { // assume active unless otherwise specified - boolean attributeActive = ((A) art).getSoleAttributeValue(AtsAttributeTypes.ATS_ACTIVE, false); + boolean attributeActive = ((A) art).getSoleAttributeValue(AtsAttributeTypes.Active, false); if (active == Active.Active && attributeActive) { results.add((A) art); } else if (active == Active.InActive && !attributeActive) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ChangePointDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ChangePointDialog.java index c38a49ef2f4..389e5217b2f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ChangePointDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ChangePointDialog.java @@ -49,7 +49,7 @@ public class ChangePointDialog extends ListDialog { setContentProvider(new ArrayContentProvider()); setLabelProvider(new PointLabelProvider()); try { - setInput(AttributeTypeManager.getEnumerationValues(AtsAttributeTypes.ATS_POINTS)); + setInput(AttributeTypeManager.getEnumerationValues(AtsAttributeTypes.Points)); } catch (OseeCoreException ex) { OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java index 6571b77e6eb..3fd38036518 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java @@ -129,7 +129,7 @@ public class DoesNotWorkItemAts extends XNavigateItemAction { ElapsedTime time = new ElapsedTime("My World via Attribute Search"); List<Artifact> assignedList = - ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_CURRENT_STATE, "%727536%", + ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.CurrentState, "%727536%", AtsUtil.getAtsBranch()); System.out.println("Returned " + assignedList.size() + " objects"); time.end(); @@ -438,9 +438,9 @@ public class DoesNotWorkItemAts extends XNavigateItemAction { "W1TS8", "JM3RD", "7Q0W3", "P9DKR", "BR2RN", "Z6B0Z", "6KT6U", "HPQJX", "QN2K3", "W0VTD", "LDJMH", "6PWYH", "T8B4K", "YTNLC", "9557A", "SQQ6T", "D82X9", "2P5GC", "YK58N", "LWVT1", "KCGSQ", "5X2WL", "C8HWW"); for (Artifact art : ArtifactQuery.getArtifactListFromIds(hrids, AtsUtil.getAtsBranch())) { - String str = art.getSoleAttributeValue(AtsAttributeTypes.ATS_LOG, null); + String str = art.getSoleAttributeValue(AtsAttributeTypes.Log, null); str = str.replaceAll("rj236c", "1779483"); - art.setSoleAttributeFromString(AtsAttributeTypes.ATS_LOG, str); + art.setSoleAttributeFromString(AtsAttributeTypes.Log, str); art.persist(transaction); } } @@ -448,11 +448,11 @@ public class DoesNotWorkItemAts extends XNavigateItemAction { @SuppressWarnings("unused") private void fixTestTaskResolutions() throws OseeCoreException { System.out.println("Started fixTestTaskResolutions..."); - for (Artifact artifact : ArtifactQuery.getArtifactListFromAttributeType(AtsAttributeTypes.ATS_RESOLUTION, + for (Artifact artifact : ArtifactQuery.getArtifactListFromAttributeType(AtsAttributeTypes.Resolution, AtsUtil.getAtsBranch())) { if (artifact instanceof TaskArtifact) { TaskArtifact taskArt = (TaskArtifact) artifact; - String resolution = ((TaskArtifact) artifact).getSoleAttributeValue(AtsAttributeTypes.ATS_RESOLUTION, null); + String resolution = ((TaskArtifact) artifact).getSoleAttributeValue(AtsAttributeTypes.Resolution, null); if (resolution == null) { System.err.println("Unexpected null resolution." + taskArt.getHumanReadableId()); // taskArt.deleteSoleAttribute(ATSAttributes.RESOLUTION_ATTRIBUTE.getStoreName()); @@ -473,7 +473,7 @@ public class DoesNotWorkItemAts extends XNavigateItemAction { newResolution = "In_DTE_Test"; } if (newResolution != null) { - taskArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_RESOLUTION, newResolution); + taskArt.setSoleAttributeFromString(AtsAttributeTypes.Resolution, newResolution); taskArt.persist(); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java index d751dabc688..ac05f4a7494 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java @@ -199,22 +199,22 @@ public class ExcelAtsTaskArtifactExtractor { } else if (headerRow[i].equalsIgnoreCase("Resolution")) { String str = row[i]; if (str != null && !str.equals("")) { - taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RESOLUTION, str); + taskArt.setSoleAttributeValue(AtsAttributeTypes.Resolution, str); } } else if (headerRow[i].equalsIgnoreCase("Description")) { String str = row[i]; if (str != null && !str.equals("")) { - taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, str); + taskArt.setSoleAttributeValue(AtsAttributeTypes.Description, str); } } else if (headerRow[i].equalsIgnoreCase("Related to State")) { String str = row[i]; if (str != null && !str.equals("")) { - taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, str); + taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, str); } } else if (headerRow[i].equalsIgnoreCase("Notes")) { String str = row[i]; if (str != null && !str.equals("")) { - taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_SMA_NOTE, str); + taskArt.setSoleAttributeValue(AtsAttributeTypes.SmaNote, str); } } else if (headerRow[i].equalsIgnoreCase("Title")) { String str = row[i]; @@ -260,7 +260,7 @@ public class ExcelAtsTaskArtifactExtractor { throw new OseeArgumentException(String.format("Invalid Estimated Hours \"%s\" for row %d", str, rowNum)); } - taskArt.setSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_HOURS, hours); + taskArt.setSoleAttributeValue(AtsAttributeTypes.EstimatedHours, hours); } } else { OseeLog.log(AtsPlugin.class, Level.SEVERE, "Unhandled column => " + headerRow[i]); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java index a7e55053e32..dce832eaf03 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java @@ -310,9 +310,9 @@ public final class PromptChangeUtil { for (TeamWorkFlowArtifact team : teams) { if (dialog.isClearSelected() || !team.getWorldViewPoint().equals(dialog.getSelection())) { if (dialog.isClearSelected()) { - team.deleteAttributes(AtsAttributeTypes.ATS_POINTS); + team.deleteAttributes(AtsAttributeTypes.Points); } else { - team.setSoleAttributeFromString(AtsAttributeTypes.ATS_POINTS, dialog.getSelection()); + team.setSoleAttributeFromString(AtsAttributeTypes.Points, dialog.getSelection()); } team.saveSMA(transaction); } @@ -426,7 +426,7 @@ public final class PromptChangeUtil { diag.setSelectedDate(verArt.getReleaseDate()); } if (diag.open() == 0) { - verArt.setSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, diag.getSelectedDate()); + verArt.setSoleAttributeValue(AtsAttributeTypes.ReleaseDate, diag.getSelectedDate()); verArt.persist(); return true; } @@ -438,7 +438,7 @@ public final class PromptChangeUtil { diag.setSelectedDate(sma.getWorldViewReleaseDate()); } if (diag.open() == 0) { - sma.setSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, diag.getSelectedDate()); + sma.setSoleAttributeValue(AtsAttributeTypes.ReleaseDate, diag.getSelectedDate()); sma.persist(); return true; } @@ -464,7 +464,7 @@ public final class PromptChangeUtil { diag.setSelectedDate(verArt.getEstimatedReleaseDate()); } if (diag.open() == 0) { - verArt.setSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, diag.getSelectedDate()); + verArt.setSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, diag.getSelectedDate()); verArt.persist(); return true; } @@ -478,7 +478,7 @@ public final class PromptChangeUtil { diag.setSelectedDate(sma.getWorldViewEstimatedReleaseDate()); } if (diag.open() == 0) { - sma.setSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, diag.getSelectedDate()); + sma.setSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, diag.getSelectedDate()); sma.persist(); return true; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java index 0a863cfc8ef..d3cef956194 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java @@ -393,7 +393,7 @@ public class StateManager { */ public static Set<Artifact> getAssigned(String userId, Class<?> clazz) throws OseeCoreException { Set<Artifact> assigned = new HashSet<Artifact>(); - for (Artifact artifact : ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_CURRENT_STATE, + for (Artifact artifact : ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.CurrentState, "%<" + userId + ">%", AtsUtil.getAtsBranch())) { if (clazz == null || clazz.isInstance(artifact)) { assigned.add(artifact); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionReportJob.java index bcc099dec01..cfc5dd1568a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionReportJob.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionReportJob.java @@ -125,15 +125,15 @@ public class VersionReportJob extends Job { public static String getReleasedString(VersionArtifact verArt) throws OseeCoreException { String released = ""; - if (verArt.isReleased() && verArt.getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, null) != null) { + if (verArt.isReleased() && verArt.getSoleAttributeValue(AtsAttributeTypes.ReleaseDate, null) != null) { released = - " - " + "Released: " + getDateString(verArt.getSoleAttributeValue(AtsAttributeTypes.ATS_RELEASE_DATE, + " - " + "Released: " + getDateString(verArt.getSoleAttributeValue(AtsAttributeTypes.ReleaseDate, (Date) null)); } - if (verArt.isNextVersion() && verArt.getSoleAttributeValue(AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, null) != null) { + if (verArt.isNextVersion() && verArt.getSoleAttributeValue(AtsAttributeTypes.EstimatedReleaseDate, null) != null) { released = " - " + "Next Release - Estimated Release Date: " + getDateString(verArt.getSoleAttributeValue( - AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, (Date) null)); + AtsAttributeTypes.EstimatedReleaseDate, (Date) null)); } return released; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java index 1676f10052e..1e720c4a01f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java @@ -16,10 +16,10 @@ import java.util.Collection; import java.util.List; import org.eclipse.osee.ats.artifact.AtsAttributeTypes; import org.eclipse.osee.framework.core.data.IAttributeType; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DefaultAttributeXWidgetProvider; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData; -import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes; /** * Provides XFlatDam as default widget for specified attribute types @@ -30,11 +30,11 @@ public class AtsAttributeXWidgetProvider extends DefaultAttributeXWidgetProvider private static final Collection<IAttributeType> XFLAT_ATTRIBUTE_TYPES = new ArrayList<IAttributeType>(); static { - XFLAT_ATTRIBUTE_TYPES.add(WorkItemAttributes.WORK_TRANSITION); - XFLAT_ATTRIBUTE_TYPES.add(WorkItemAttributes.WORK_DATA); - XFLAT_ATTRIBUTE_TYPES.add(AtsAttributeTypes.ATS_STATE); - XFLAT_ATTRIBUTE_TYPES.add(AtsAttributeTypes.ATS_ACTIONABLE_ITEM); - XFLAT_ATTRIBUTE_TYPES.add(AtsAttributeTypes.ATS_TEAM_DEFINITION); + XFLAT_ATTRIBUTE_TYPES.add(CoreAttributeTypes.WorkTransition); + XFLAT_ATTRIBUTE_TYPES.add(CoreAttributeTypes.WorkData); + XFLAT_ATTRIBUTE_TYPES.add(AtsAttributeTypes.State); + XFLAT_ATTRIBUTE_TYPES.add(AtsAttributeTypes.ActionableItem); + XFLAT_ATTRIBUTE_TYPES.add(AtsAttributeTypes.TeamDefinition); } @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java index 78753642fdd..c65c76bf685 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java @@ -76,7 +76,7 @@ public class ReviewManager { AtsWorkDefinitions.isValidateReviewBlocking(teamArt.getWorkPageDefinition()) ? ReviewBlockType.Transition : ReviewBlockType.None, true); decRev.setName(VALIDATE_REVIEW_TITLE); - decRev.setSoleAttributeValue(AtsAttributeTypes.ATS_DECISION_REVIEW_OPTIONS, + decRev.setSoleAttributeValue(AtsAttributeTypes.DecisionReviewOptions, "No;Followup;" + getValidateReviewFollowupUsersStr(teamArt) + "\n" + "Yes;Completed;"); decRev.transition(DecisionReviewArtifact.DecisionReviewState.Decision.name(), teamArt.getOriginator(), @@ -115,18 +115,18 @@ public class ReviewManager { public static PeerToPeerReviewArtifact createNewPeerToPeerReview(TeamWorkFlowArtifact teamArt, String reviewTitle, String againstState, User origUser, Date origDate, SkynetTransaction transaction) throws OseeCoreException { PeerToPeerReviewArtifact peerToPeerRev = - (PeerToPeerReviewArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.PeerToPeerReview.getName(), + (PeerToPeerReviewArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.PeerToPeerReview, AtsUtil.getAtsBranch(), reviewTitle == null ? "Peer to Peer Review" : reviewTitle); if (teamArt != null) { teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review, peerToPeerRev); if (againstState != null) { - peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, againstState); + peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, againstState); } } peerToPeerRev.getLog().addLog(LogType.Originated, "", "", origDate, origUser); - peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ATS_REVIEW_BLOCKS, ReviewBlockType.None.name()); + peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name()); // Initialize state machine peerToPeerRev.getStateMgr().initializeStateMachine(DecisionReviewArtifact.DecisionReviewState.Prepare.name()); @@ -211,7 +211,7 @@ public class ReviewManager { public static Collection<ReviewSMArtifact> getReviews(TeamWorkFlowArtifact teamArt, String stateName) throws OseeCoreException { Set<ReviewSMArtifact> arts = new HashSet<ReviewSMArtifact>(); for (ReviewSMArtifact revArt : getReviews(teamArt)) { - if (revArt.getSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, "").equals(stateName)) { + if (revArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(stateName)) { arts.add(revArt); } } @@ -289,24 +289,24 @@ public class ReviewManager { public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, ReviewBlockType reviewBlockType, String title, String relatedToState, String description, String options, Collection<User> assignees) throws OseeCoreException { DecisionReviewArtifact decRev = - (DecisionReviewArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.DecisionReview.getName(), + (DecisionReviewArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.DecisionReview, AtsUtil.getAtsBranch(), title); if (teamArt != null) { teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review, decRev); } if (relatedToState != null && !relatedToState.equals("")) { - decRev.setSoleAttributeValue(AtsAttributeTypes.ATS_RELATED_TO_STATE, relatedToState); + decRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, relatedToState); } decRev.getLog().addLog(LogType.Originated, "", ""); if (description != null && !description.equals("")) { - decRev.setSoleAttributeValue(AtsAttributeTypes.ATS_DESCRIPTION, description); + decRev.setSoleAttributeValue(AtsAttributeTypes.Description, description); } if (options != null && !options.equals("")) { - decRev.setSoleAttributeValue(AtsAttributeTypes.ATS_DECISION_REVIEW_OPTIONS, options); + decRev.setSoleAttributeValue(AtsAttributeTypes.DecisionReviewOptions, options); } if (reviewBlockType != null) { - decRev.setSoleAttributeFromString(AtsAttributeTypes.ATS_REVIEW_BLOCKS, reviewBlockType.name()); + decRev.setSoleAttributeFromString(AtsAttributeTypes.ReviewBlocks, reviewBlockType.name()); } // Initialize state machine diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemsDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemsDam.java index 46036010a8d..ff995866cf7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemsDam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemsDam.java @@ -32,8 +32,8 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XTextDam; public class XActionableItemsDam extends XTextDam { public XActionableItemsDam(Artifact artifact) throws OseeCoreException { - super(AtsAttributeTypes.ATS_ACTIONABLE_ITEM.getUnqualifiedName(), true); - setAttributeType(artifact, AtsAttributeTypes.ATS_ACTIONABLE_ITEM); + super(AtsAttributeTypes.ActionableItem.getUnqualifiedName(), true); + setAttributeType(artifact, AtsAttributeTypes.ActionableItem); } @SuppressWarnings("unused") diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java index 5cde615f40e..74dda97d725 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java @@ -27,7 +27,7 @@ import org.eclipse.osee.framework.skynet.core.User; public class XCurrentStateDam extends XStateAssigneesDam { public XCurrentStateDam(StateMachineArtifact sma) throws OseeCoreException { - super(sma, AtsAttributeTypes.ATS_CURRENT_STATE); + super(sma, AtsAttributeTypes.CurrentState); } @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XDecisionOptions.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XDecisionOptions.java index 8ef89e49d9a..85ca03f92fb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XDecisionOptions.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XDecisionOptions.java @@ -33,7 +33,7 @@ public class XDecisionOptions { public XDecisionOptions(StateMachineArtifact sma) { this.smaRef = new WeakReference<StateMachineArtifact>(sma); - this.attributeType = AtsAttributeTypes.ATS_DECISION_REVIEW_OPTIONS; + this.attributeType = AtsAttributeTypes.DecisionReviewOptions; } public IAttributeType getAttributeType() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java index 21db99cefcc..33532810740 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException; public class XStateDam extends XStateAssigneesDam { public XStateDam(StateMachineArtifact sma) throws OseeCoreException { - super(sma, AtsAttributeTypes.ATS_STATE); + super(sma, AtsAttributeTypes.State); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectManager.java index bd5c6514f1e..d6d7c563853 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectManager.java @@ -40,7 +40,7 @@ public class DefectManager { private final WeakReference<Artifact> artifactRef; private boolean enabled = true; private static String DEFECT_ITEM_TAG = "Item"; - private static final IAttributeType REVIEW_STORAGE_TYPE = AtsAttributeTypes.ATS_REVIEW_DEFECT; + private static final IAttributeType REVIEW_STORAGE_TYPE = AtsAttributeTypes.ReviewDefect; private final Matcher defectMatcher = java.util.regex.Pattern.compile( "<" + DEFECT_ITEM_TAG + ">(.*?)</" + DEFECT_ITEM_TAG + ">", Pattern.DOTALL | Pattern.MULTILINE).matcher(""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskResolutionOptionRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskResolutionOptionRule.java index 0e83d53f51b..4c3c36ccfe9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskResolutionOptionRule.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TaskResolutionOptionRule.java @@ -12,11 +12,11 @@ package org.eclipse.osee.ats.util.widgets.dialog; import java.util.ArrayList; import java.util.List; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.GUID; import org.eclipse.osee.framework.jdk.core.util.xml.Jaxp; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; -import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition; import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkRuleDefinition; @@ -41,7 +41,7 @@ public class TaskResolutionOptionRule extends WorkRuleDefinition { public TaskResolutionOptionRule(Artifact artifact) throws OseeCoreException { super(artifact); - fromXml(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_PARENT_ID, "")); + fromXml(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkParentId, "")); } public static List<TaskResOptionDefinition> getTaskResolutionOptions(WorkPageDefinition workPageDefinition) throws OseeCoreException { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleManager.java index 161a164a75e..f003accea65 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleManager.java @@ -43,7 +43,7 @@ public class UserRoleManager { private final WeakReference<ReviewSMArtifact> artifactRef; private boolean enabled = true; private static String ROLE_ITEM_TAG = "Role"; - private static final IAttributeType ATS_ROLE_STORAGE_TYPE = AtsAttributeTypes.ATS_ROLE; + private static final IAttributeType ATS_ROLE_STORAGE_TYPE = AtsAttributeTypes.Role; private final Matcher roleMatcher = java.util.regex.Pattern.compile( "<" + ROLE_ITEM_TAG + ">(.*?)</" + ROLE_ITEM_TAG + ">", Pattern.DOTALL | Pattern.MULTILINE).matcher(""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java index ce5f306c6d1..3d5071ada17 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java @@ -17,12 +17,12 @@ import org.eclipse.osee.ats.util.AtsUtil; import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
import org.eclipse.osee.ats.workflow.page.AtsCompletedWorkPageDefinition;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
-import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition.WriteType;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
@@ -37,9 +37,9 @@ import org.eclipse.ui.views.properties.TextPropertyDescriptor; */
public class WorkPageShape extends RectangleShape {
private static final String[] attributeProperties = new String[] { //
- WorkItemAttributes.WORK_PAGE_NAME.getName(), //
- WorkItemAttributes.WORK_ID.getName(), //
- WorkItemAttributes.WORK_PARENT_ID.getName(),//
+ CoreAttributeTypes.WorkPageName.getName(), // + CoreAttributeTypes.WorkId.getName(), // + CoreAttributeTypes.WorkParentId.getName(),// };
private final WorkPageDefinition workPageDefinition;
@@ -69,8 +69,8 @@ public class WorkPageShape extends RectangleShape { super.setWorkflowDiagram(workflowDiagram);
if (getId().equals("NEW")) {
setPropertyValue(
- WorkItemAttributes.WORK_ID.getName(),
- workflowDiagram.getWorkFlowDefinition().getId() + "." + getPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName()));
+ CoreAttributeTypes.WorkId.getName(), + workflowDiagram.getWorkFlowDefinition().getId() + "." + getPropertyValue(CoreAttributeTypes.WorkPageName.getName())); }
}
@@ -88,9 +88,9 @@ public class WorkPageShape extends RectangleShape { protected void initializePropertyValues() throws OseeCoreException {
if (propertyValues == null) {
super.initializePropertyValues();
- super.setPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName(), workPageDefinition.getPageName());
- super.setPropertyValue(WorkItemAttributes.WORK_ID.getName(), workPageDefinition.getId());
- super.setPropertyValue(WorkItemAttributes.WORK_PARENT_ID.getName(),
+ super.setPropertyValue(CoreAttributeTypes.WorkPageName.getName(), workPageDefinition.getPageName()); + super.setPropertyValue(CoreAttributeTypes.WorkId.getName(), workPageDefinition.getId()); + super.setPropertyValue(CoreAttributeTypes.WorkParentId.getName(), workPageDefinition.getParentId() == null ? "" : workPageDefinition.getParentId());
}
}
@@ -130,15 +130,15 @@ public class WorkPageShape extends RectangleShape { @Override
public Result validForSave() {
try {
- String pageName = (String) getPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName());
+ String pageName = (String) getPropertyValue(CoreAttributeTypes.WorkPageName.getName()); if (pageName == null || pageName.equals("")) {
- return new Result(WorkItemAttributes.WORK_PAGE_NAME.getName() + " can not be null");
+ return new Result(CoreAttributeTypes.WorkPageName.getName() + " can not be null"); }
- String pageId = (String) getPropertyValue(WorkItemAttributes.WORK_ID.getName());
+ String pageId = (String) getPropertyValue(CoreAttributeTypes.WorkId.getName()); if (pageId == null || pageId.equals("")) {
- return new Result(WorkItemAttributes.WORK_ID.getName() + " can not be null");
+ return new Result(CoreAttributeTypes.WorkId.getName() + " can not be null"); }
- String parentPageId = (String) getPropertyValue(WorkItemAttributes.WORK_PARENT_ID.getName());
+ String parentPageId = (String) getPropertyValue(CoreAttributeTypes.WorkParentId.getName()); if (parentPageId != null && !parentPageId.equals("")) {
if (WorkItemDefinitionFactory.getWorkItemDefinition(parentPageId) == null) {
return new Result("Parent Id " + parentPageId + " Work Page Definition must exist and does not.");
@@ -174,7 +174,7 @@ public class WorkPageShape extends RectangleShape { @Override
public String getName() {
- return (String) getPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName());
+ return (String) getPropertyValue(CoreAttributeTypes.WorkPageName.getName()); }
@Override
@@ -188,7 +188,7 @@ public class WorkPageShape extends RectangleShape { }
public String getId() {
- return (String) getPropertyValue(WorkItemAttributes.WORK_ID.getName());
+ return (String) getPropertyValue(CoreAttributeTypes.WorkId.getName()); }
@Override
@@ -208,17 +208,17 @@ public class WorkPageShape extends RectangleShape { public void setPropertyValue(Object propertyId, Object value) {
try {
initializePropertyValues();
- if (WorkItemAttributes.WORK_PAGE_NAME.getName().equals(propertyId)) {
- super.setPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName(), value);
- firePropertyChange(WorkItemAttributes.WORK_PAGE_NAME.getName(), null, value);
- setPropertyValue(WorkItemAttributes.WORK_ID.getName(),
+ if (CoreAttributeTypes.WorkPageName.getName().equals(propertyId)) { + super.setPropertyValue(CoreAttributeTypes.WorkPageName.getName(), value); + firePropertyChange(CoreAttributeTypes.WorkPageName.getName(), null, value); + setPropertyValue(CoreAttributeTypes.WorkId.getName(), getWorkflowDiagram().getWorkFlowDefinition().getId() + "." + value);
- } else if (WorkItemAttributes.WORK_ID.getName().equals(propertyId)) {
- super.setPropertyValue(WorkItemAttributes.WORK_ID.getName(), value);
- firePropertyChange(WorkItemAttributes.WORK_ID.getName(), null, value);
- } else if (WorkItemAttributes.WORK_PARENT_ID.getName().equals(propertyId)) {
- super.setPropertyValue(WorkItemAttributes.WORK_PARENT_ID.getName(), value);
- firePropertyChange(WorkItemAttributes.WORK_PARENT_ID.getName(), null, value);
+ } else if (CoreAttributeTypes.WorkId.getName().equals(propertyId)) { + super.setPropertyValue(CoreAttributeTypes.WorkId.getName(), value); + firePropertyChange(CoreAttributeTypes.WorkId.getName(), null, value); + } else if (CoreAttributeTypes.WorkParentId.getName().equals(propertyId)) { + super.setPropertyValue(CoreAttributeTypes.WorkParentId.getName(), value); + firePropertyChange(CoreAttributeTypes.WorkParentId.getName(), null, value); } else if (START_PAGE.equals(propertyId)) {
super.setPropertyValue(START_PAGE, value);
firePropertyChange(START_PAGE, null, value);
@@ -232,9 +232,9 @@ public class WorkPageShape extends RectangleShape { @Override
public Result doSave(SkynetTransaction transaction) throws OseeCoreException {
- String name = (String) getPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName());
- String workId = (String) getPropertyValue(WorkItemAttributes.WORK_ID.getName());
- String parentWorkId = (String) getPropertyValue(WorkItemAttributes.WORK_PARENT_ID.getName());
+ String name = (String) getPropertyValue(CoreAttributeTypes.WorkPageName.getName()); + String workId = (String) getPropertyValue(CoreAttributeTypes.WorkId.getName()); + String parentWorkId = (String) getPropertyValue(CoreAttributeTypes.WorkParentId.getName()); workPageDefinition.setPageName(name);
workPageDefinition.setId(workId);
@@ -243,12 +243,12 @@ public class WorkPageShape extends RectangleShape { if (artifact == null) {
artifact = workPageDefinition.toArtifact(WriteType.New);
} else {
- artifact.setSoleAttributeValue(WorkItemAttributes.WORK_PAGE_NAME, name);
- artifact.setSoleAttributeValue(WorkItemAttributes.WORK_ID, workId);
+ artifact.setSoleAttributeValue(CoreAttributeTypes.WorkPageName, name); + artifact.setSoleAttributeValue(CoreAttributeTypes.WorkId, workId); if (parentWorkId == null || parentWorkId.equals("")) {
- artifact.deleteSoleAttribute(WorkItemAttributes.WORK_PARENT_ID);
+ artifact.deleteSoleAttribute(CoreAttributeTypes.WorkParentId); } else {
- artifact.setSoleAttributeValue(WorkItemAttributes.WORK_PARENT_ID, parentWorkId);
+ artifact.setSoleAttributeValue(CoreAttributeTypes.WorkParentId, parentWorkId); }
}
artifact.setName(workId);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkflowDiagram.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkflowDiagram.java index 9e1f37605cf..c3c4af8e5b1 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkflowDiagram.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkflowDiagram.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Set;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -24,7 +25,6 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction; import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition.TransitionType;
-import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition.WriteType;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
@@ -197,8 +197,7 @@ public class WorkflowDiagram extends ModelElement { List<String> stateNames = new ArrayList<String>();
for (Shape shape : getChildren()) {
if (WorkPageShape.class.isAssignableFrom(shape.getClass())) {
- String name =
- (String) ((WorkPageShape) shape).getPropertyValue(WorkItemAttributes.WORK_PAGE_NAME.getName());
+ String name = (String) ((WorkPageShape) shape).getPropertyValue(CoreAttributeTypes.WorkPageName); if (stateNames.contains(name)) {
return new Result(
"Workflow can not have more than one state of same name. Multiples found of name " + name);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/parts/WorkPageEditPart.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/parts/WorkPageEditPart.java index cc3581e6f90..e805b688f27 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/parts/WorkPageEditPart.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/parts/WorkPageEditPart.java @@ -24,9 +24,9 @@ import org.eclipse.osee.ats.internal.AtsPlugin; import org.eclipse.osee.ats.workflow.editor.actions.EditAction; import org.eclipse.osee.ats.workflow.editor.model.ReturnTransitionConnection; import org.eclipse.osee.ats.workflow.editor.model.WorkPageShape; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemAttributes; /** * @author Donald G. Dunne @@ -88,7 +88,7 @@ public class WorkPageEditPart extends ShapeEditPart { getFigure().setBackgroundColor(ColorConstants.green); } } - if (WorkItemAttributes.WORK_PAGE_NAME.getName().equals(prop)) { + if (CoreAttributeTypes.WorkPageName.getName().equals(prop)) { refreshVisuals(); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java index 377f5bf19c0..bc16d74c401 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java @@ -126,8 +126,8 @@ public class AtsWorkflowConfigCreationWizard extends Wizard implements INewWizar WorkPageDefinition implementPage = new WorkPageDefinition("Implement", namespace + ".Implement", null);
implementPage.addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
- implementPage.addWorkItem(AtsAttributeTypes.ATS_WORK_PACKAGE); - implementPage.addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + implementPage.addWorkItem(AtsAttributeTypes.WorkPackage); + implementPage.addWorkItem(AtsAttributeTypes.Resolution); WorkPageDefinition completedPage =
new WorkPageDefinition("Completed", namespace + ".Completed", AtsCompletedWorkPageDefinition.ID);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java index 79266343892..d0f32d45e86 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java @@ -94,16 +94,16 @@ public class AtsAddPeerToPeerReviewRule extends WorkRuleDefinition { UserManager.getUser(), new Date(), transaction); String desc = getValueOrDefault(teamArt, atsAddPeerToPeerReviewRule, PeerToPeerParameter.description); if (desc != null && !desc.equals("")) { - peerArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_DESCRIPTION, desc); + peerArt.setSoleAttributeFromString(AtsAttributeTypes.Description, desc); } ReviewBlockType reviewBlockType = AtsAddDecisionReviewRule.getReviewBlockTypeOrDefault(teamArt, atsAddPeerToPeerReviewRule); if (reviewBlockType != null) { - peerArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_REVIEW_BLOCKS, reviewBlockType.name()); + peerArt.setSoleAttributeFromString(AtsAttributeTypes.ReviewBlocks, reviewBlockType.name()); } String location = getValueOrDefault(teamArt, atsAddPeerToPeerReviewRule, PeerToPeerParameter.location); if (location != null && location.equals("")) { - peerArt.setSoleAttributeFromString(AtsAttributeTypes.ATS_LOCATION, location); + peerArt.setSoleAttributeFromString(AtsAttributeTypes.Location, location); } Collection<User> assignees = AtsAddDecisionReviewRule.getAssigneesOrDefault(teamArt, atsAddPeerToPeerReviewRule); if (assignees.size() > 0) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsWorkDefinitions.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsWorkDefinitions.java index fd0fcc52e56..2e616bf5cd4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsWorkDefinitions.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsWorkDefinitions.java @@ -65,9 +65,9 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.XWidgetFactory; */ public final class AtsWorkDefinitions implements IWorkDefinitionProvider { - public static final String ATS_DESCRIPTION_NOT_REQUIRED_ID = AtsAttributeTypes.ATS_DESCRIPTION + ".notRequired"; + public static final String ATS_DESCRIPTION_NOT_REQUIRED_ID = AtsAttributeTypes.Description + ".notRequired"; public static final String ATS_ESTIMATED_HOURS_NOT_REQUIRED_ID = - AtsAttributeTypes.ATS_ESTIMATED_HOURS + ".notRequired"; + AtsAttributeTypes.EstimatedHours + ".notRequired"; public static enum RuleWorkItemId { atsRequireStateHourSpentPrompt("Work Page Option: Will popup a dialog to prompt user for time spent in this state."), @@ -122,19 +122,19 @@ public final class AtsWorkDefinitions implements IWorkDefinitionProvider { workItems.add(new AtsStatePercentCompleteWeightPeerToPeerReviewRule()); // Create XWidget work items - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_LOCATION, "XTextDam", XOption.REQUIRED, + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Location, "XTextDam", XOption.REQUIRED, FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_LEGACY_PCR_ID, "XTextDam")); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_GOAL_ORDER_VOTE, "XTextDam")); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_CATEGORY_1, "XTextDam")); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_RELATED_TO_STATE, "XTextDam")); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_SMA_NOTE, "XTextDam", FILL_VERTICALLY)); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.LegacyPcrId, "XTextDam")); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.GoalOrderVote, "XTextDam")); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Category1, "XTextDam")); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.RelatedToState, "XTextDam")); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.SmaNote, "XTextDam", FILL_VERTICALLY)); workItems.add(new AtsAttributeXWidgetWorkItem("Title", "ats.Title", CoreAttributeTypes.Name, "XTextDam", REQUIRED)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_RESOLUTION, "XTextDam", FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_DECISION_REVIEW_OPTIONS, "XTextDam", + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Resolution, "XTextDam", FILL_VERTICALLY)); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.DecisionReviewOptions, "XTextDam", FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_PROBLEM, "XTextDam", FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_WORK_PACKAGE, "XTextDam", HORIZONTAL_LABEL)); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Problem, "XTextDam", FILL_VERTICALLY)); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.WorkPackage, "XTextDam", HORIZONTAL_LABEL)); workItems.add(new AtsAttributeXWidgetWorkItem(ATSAttributes.WORKING_BRANCH_WIDGET, "XWorkingBranch", NONE)); workItems.add(new AtsAttributeXWidgetWorkItem(ATSAttributes.VALIDATE_REQ_CHANGES_WIDGET, "XValidateReqChangesButton", NONE)); @@ -149,40 +149,40 @@ public final class AtsWorkDefinitions implements IWorkDefinitionProvider { AtsDecisionDecisionWorkPageDefinition.DECISION_QUESTION_LABEL, CoreAttributeTypes.Name, "XLabelDam")); workItems.add(new AtsAttributeXWidgetWorkItem("Decision", - AtsDecisionDecisionWorkPageDefinition.DECISION_ANSWER_LABEL, AtsAttributeTypes.ATS_DECISION, "XLabelDam")); + AtsDecisionDecisionWorkPageDefinition.DECISION_ANSWER_LABEL, AtsAttributeTypes.Decision, "XLabelDam")); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_PROPOSED_RESOLUTION, "XTextDam", + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ProposedResolution, "XTextDam", FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_DESCRIPTION, "XTextDam", XOption.REQUIRED, + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Description, "XTextDam", XOption.REQUIRED, FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_DESCRIPTION.getUnqualifiedName(), - ATS_DESCRIPTION_NOT_REQUIRED_ID, AtsAttributeTypes.ATS_DESCRIPTION, "XTextDam", XOption.NOT_REQUIRED, + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Description.getUnqualifiedName(), + ATS_DESCRIPTION_NOT_REQUIRED_ID, AtsAttributeTypes.Description, "XTextDam", XOption.NOT_REQUIRED, FILL_VERTICALLY)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_REVIEW_BLOCKS, + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ReviewBlocks, "XComboDam(OPTIONS_FROM_ATTRIBUTE_VALIDITY)", XOption.REQUIRED, XOption.HORIZONTAL_LABEL)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_DECISION, "XComboDam(1,2,3)", REQUIRED, + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.Decision, "XComboDam(1,2,3)", REQUIRED, HORIZONTAL_LABEL)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_ESTIMATED_HOURS, "XFloatDam", REQUIRED)); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.EstimatedHours, "XFloatDam", REQUIRED)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_ESTIMATED_HOURS.getUnqualifiedName(), - ATS_ESTIMATED_HOURS_NOT_REQUIRED_ID, AtsAttributeTypes.ATS_ESTIMATED_HOURS, "XFloatDam", XOption.NOT_REQUIRED)); + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.EstimatedHours.getUnqualifiedName(), + ATS_ESTIMATED_HOURS_NOT_REQUIRED_ID, AtsAttributeTypes.EstimatedHours, "XFloatDam", XOption.NOT_REQUIRED)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE, "XDateDam", + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.EstimatedCompletionDate, "XDateDam", XOption.HORIZONTAL_LABEL)); - workItems.add(new AtsAttributeSoleComboXWidgetWorkItem(AtsAttributeTypes.ATS_CHANGE_TYPE, + workItems.add(new AtsAttributeSoleComboXWidgetWorkItem(AtsAttributeTypes.ChangeType, "OPTIONS_FROM_ATTRIBUTE_VALIDITY", XOption.REQUIRED, XOption.BEGIN_COMPOSITE_6)); - workItems.add(new AtsAttributeSoleComboXWidgetWorkItem(AtsAttributeTypes.ATS_PRIORITY_TYPE, + workItems.add(new AtsAttributeSoleComboXWidgetWorkItem(AtsAttributeTypes.PriorityType, "OPTIONS_FROM_ATTRIBUTE_VALIDITY", XOption.REQUIRED)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_NEED_BY, "XDateDam", + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.NeedBy, "XDateDam", XOption.HORIZONTAL_LABEL, XOption.END_COMPOSITE)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_VALIDATION_REQUIRED, "XCheckBoxDam", + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ValidationRequired, "XCheckBoxDam", XOption.HORIZONTAL_LABEL, XOption.LABEL_BEFORE)); - workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.ATS_USER_COMMUNITY, + workItems.add(new AtsAttributeXWidgetWorkItem(AtsAttributeTypes.UserCommunity, "XListDam(OPTIONS_FROM_ATTRIBUTE_VALIDITY)", XOption.HORIZONTAL_LABEL)); workItems.add(new AtsAttributeXWidgetWorkItem(ATSAttributes.COMMIT_MANAGER_WIDGET, "XCommitManager")); - workItems.add(new AtsAttributeReviewDefectXWidgetWorkItem(AtsAttributeTypes.ATS_REVIEW_DEFECT)); - workItems.add(new AtsAttributeReviewRolesXWidgetWorkItem(AtsAttributeTypes.ATS_ROLE)); + workItems.add(new AtsAttributeReviewDefectXWidgetWorkItem(AtsAttributeTypes.ReviewDefect)); + workItems.add(new AtsAttributeReviewRolesXWidgetWorkItem(AtsAttributeTypes.Role)); return workItems; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java index 70237b45b04..2edec3358e5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java @@ -30,13 +30,13 @@ public class AtsAnalyzeWorkPageDefinition extends WorkPageDefinition { public AtsAnalyzeWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name()); - addWorkItem(AtsAttributeTypes.ATS_WORK_PACKAGE); - addWorkItem(AtsAttributeTypes.ATS_PROBLEM); - addWorkItem(AtsAttributeTypes.ATS_PROPOSED_RESOLUTION); - addWorkItem(AtsAttributeTypes.ATS_CHANGE_TYPE); - addWorkItem(AtsAttributeTypes.ATS_PRIORITY_TYPE); - addWorkItem(AtsAttributeTypes.ATS_NEED_BY); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_HOURS); + addWorkItem(AtsAttributeTypes.WorkPackage); + addWorkItem(AtsAttributeTypes.Problem); + addWorkItem(AtsAttributeTypes.ProposedResolution); + addWorkItem(AtsAttributeTypes.ChangeType); + addWorkItem(AtsAttributeTypes.PriorityType); + addWorkItem(AtsAttributeTypes.NeedBy); + addWorkItem(AtsAttributeTypes.EstimatedHours); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java index d894d1fd08a..5d90bbe2c18 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java @@ -28,7 +28,7 @@ public class AtsAuthorizeWorkPageDefinition extends WorkPageDefinition { public AtsAuthorizeWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); - addWorkItem(AtsAttributeTypes.ATS_WORK_PACKAGE); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE); + addWorkItem(AtsAttributeTypes.WorkPackage); + addWorkItem(AtsAttributeTypes.EstimatedCompletionDate); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java index 2e4841f042f..d55b218cbf7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java @@ -32,7 +32,7 @@ public class AtsDecisionCompletedWorkPageDefinition extends WorkPageDefinition { addWorkItem(RuleWorkItemId.atsAddDecisionValidateBlockingReview.name()); addWorkItem(AtsDecisionDecisionWorkPageDefinition.DECISION_QUESTION_LABEL); addWorkItem(AtsDecisionDecisionWorkPageDefinition.DECISION_ANSWER_LABEL); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + addWorkItem(AtsAttributeTypes.Resolution); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java index 2a9553d6881..3bbd342c290 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java @@ -33,9 +33,9 @@ public class AtsDecisionDecisionWorkPageDefinition extends WorkPageDefinition { public AtsDecisionDecisionWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); addWorkItem(AtsDecisionDecisionWorkPageDefinition.DECISION_QUESTION_LABEL); - addWorkItem(AtsAttributeTypes.ATS_DECISION); + addWorkItem(AtsAttributeTypes.Decision); addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + addWorkItem(AtsAttributeTypes.Resolution); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java index f682fa5e861..cdb07fa2a0e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java @@ -29,6 +29,6 @@ public class AtsDecisionFollowupWorkPageDefinition extends WorkPageDefinition { public AtsDecisionFollowupWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + addWorkItem(AtsAttributeTypes.Resolution); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java index 20ffcc61dea..8bc9008c0aa 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java @@ -31,12 +31,12 @@ public class AtsDecisionPrepareWorkPageDefinition extends WorkPageDefinition { public AtsDecisionPrepareWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); addWorkItem("ats.Title"); - addWorkItem(AtsAttributeTypes.ATS_DECISION_REVIEW_OPTIONS); + addWorkItem(AtsAttributeTypes.DecisionReviewOptions); addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID); - addWorkItem(AtsAttributeTypes.ATS_RELATED_TO_STATE); - addWorkItem(AtsAttributeTypes.ATS_REVIEW_BLOCKS); - addWorkItem(AtsAttributeTypes.ATS_NEED_BY); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_HOURS); + addWorkItem(AtsAttributeTypes.RelatedToState); + addWorkItem(AtsAttributeTypes.ReviewBlocks); + addWorkItem(AtsAttributeTypes.NeedBy); + addWorkItem(AtsAttributeTypes.EstimatedHours); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java index c00cc987f3b..aa42ce5b4f5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java @@ -31,14 +31,14 @@ public class AtsEndorseWorkPageDefinition extends WorkPageDefinition { super(name, pageId, parentId); addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name()); addWorkItem("ats.Title"); - addWorkItem(AtsAttributeTypes.ATS_DESCRIPTION); - addWorkItem(AtsAttributeTypes.ATS_PROPOSED_RESOLUTION); - addWorkItem(AtsAttributeTypes.ATS_CHANGE_TYPE); - addWorkItem(AtsAttributeTypes.ATS_PRIORITY_TYPE); - addWorkItem(AtsAttributeTypes.ATS_NEED_BY); - addWorkItem(AtsAttributeTypes.ATS_VALIDATION_REQUIRED); - addWorkItem(AtsAttributeTypes.ATS_WORK_PACKAGE); - addWorkItem(AtsAttributeTypes.ATS_USER_COMMUNITY); + addWorkItem(AtsAttributeTypes.Description); + addWorkItem(AtsAttributeTypes.ProposedResolution); + addWorkItem(AtsAttributeTypes.ChangeType); + addWorkItem(AtsAttributeTypes.PriorityType); + addWorkItem(AtsAttributeTypes.NeedBy); + addWorkItem(AtsAttributeTypes.ValidationRequired); + addWorkItem(AtsAttributeTypes.WorkPackage); + addWorkItem(AtsAttributeTypes.UserCommunity); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java index 14e921943d2..b29615d0ed6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java @@ -32,7 +32,7 @@ public class AtsGoalInWorkPageDefinition extends WorkPageDefinition { addWorkItem("ats.Title"); addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID); addWorkItem(AtsWorkDefinitions.ATS_ESTIMATED_HOURS_NOT_REQUIRED_ID); - addWorkItem(AtsAttributeTypes.ATS_GOAL_ORDER_VOTE); + addWorkItem(AtsAttributeTypes.GoalOrderVote); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java index 011e6d0788e..983db39b22b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java @@ -30,8 +30,8 @@ public class AtsImplementWorkPageDefinition extends WorkPageDefinition { public AtsImplementWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name()); - addWorkItem(AtsAttributeTypes.ATS_WORK_PACKAGE); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + addWorkItem(AtsAttributeTypes.WorkPackage); + addWorkItem(AtsAttributeTypes.EstimatedCompletionDate); + addWorkItem(AtsAttributeTypes.Resolution); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java index 4b1f753816f..6b4e892cd43 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java @@ -31,14 +31,14 @@ public class AtsPeerPrepareWorkPageDefinition extends WorkPageDefinition { public AtsPeerPrepareWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); addWorkItem("ats.Title"); - addWorkItem(AtsAttributeTypes.ATS_RELATED_TO_STATE); - addWorkItem(AtsAttributeTypes.ATS_LEGACY_PCR_ID); - addWorkItem(AtsAttributeTypes.ATS_ROLE); - addWorkItem(AtsAttributeTypes.ATS_LOCATION); + addWorkItem(AtsAttributeTypes.RelatedToState); + addWorkItem(AtsAttributeTypes.LegacyPcrId); + addWorkItem(AtsAttributeTypes.Role); + addWorkItem(AtsAttributeTypes.Location); addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID); - addWorkItem(AtsAttributeTypes.ATS_RELATED_TO_STATE); - addWorkItem(AtsAttributeTypes.ATS_REVIEW_BLOCKS); - addWorkItem(AtsAttributeTypes.ATS_NEED_BY); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_HOURS); + addWorkItem(AtsAttributeTypes.RelatedToState); + addWorkItem(AtsAttributeTypes.ReviewBlocks); + addWorkItem(AtsAttributeTypes.NeedBy); + addWorkItem(AtsAttributeTypes.EstimatedHours); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java index c0d1ae76852..717d2f5af28 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java @@ -30,9 +30,9 @@ public class AtsPeerReviewWorkPageDefinition extends WorkPageDefinition { public AtsPeerReviewWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); - addWorkItem(AtsAttributeTypes.ATS_ROLE); - addWorkItem(AtsAttributeTypes.ATS_REVIEW_DEFECT); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + addWorkItem(AtsAttributeTypes.Role); + addWorkItem(AtsAttributeTypes.ReviewDefect); + addWorkItem(AtsAttributeTypes.Resolution); addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java index ae04bc3a691..865f1dd8e6d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java @@ -30,6 +30,6 @@ public class AtsSimpleInWorkWorkPageDefinition extends WorkPageDefinition { public AtsSimpleInWorkWorkPageDefinition(String name, String pageId, String parentId) { super(name, pageId, parentId); addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name()); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); + addWorkItem(AtsAttributeTypes.Resolution); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java index 514ad703853..f942f1ddf6d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java @@ -33,12 +33,12 @@ public class AtsTaskInWorkPageDefinition extends WorkPageDefinition { addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name()); addWorkItem("ats.Title"); addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID); - addWorkItem(AtsAttributeTypes.ATS_RESOLUTION); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_HOURS); - addWorkItem(AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE); - addWorkItem(AtsAttributeTypes.ATS_RELATED_TO_STATE); - addWorkItem(AtsAttributeTypes.ATS_SMA_NOTE); - addWorkItem(AtsAttributeTypes.ATS_CATEGORY_1); + addWorkItem(AtsAttributeTypes.Resolution); + addWorkItem(AtsAttributeTypes.EstimatedHours); + addWorkItem(AtsAttributeTypes.EstimatedCompletionDate); + addWorkItem(AtsAttributeTypes.RelatedToState); + addWorkItem(AtsAttributeTypes.SmaNote); + addWorkItem(AtsAttributeTypes.Category1); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/vue/LoadAIsAndTeamsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/vue/LoadAIsAndTeamsAction.java index 7a7cb9f036a..b7d1981c507 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/vue/LoadAIsAndTeamsAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/vue/LoadAIsAndTeamsAction.java @@ -255,7 +255,7 @@ public class LoadAIsAndTeamsAction { for (String staticId : staticIds) { StaticIdManager.setSingletonAttributeValue(teamDefArt, staticId); } - teamDefArt.setSoleAttributeValue(AtsAttributeTypes.ATS_ACTIONABLE, actionable); + teamDefArt.setSoleAttributeValue(AtsAttributeTypes.Actionable, actionable); } if (!workflowId.equals("")) { try { @@ -326,7 +326,7 @@ public class LoadAIsAndTeamsAction { for (DiagramNode childPage : page.getToPages()) { addActionableItem(aia, childPage, transaction); } - aia.setSoleAttributeValue(AtsAttributeTypes.ATS_ACTIONABLE, actionable); + aia.setSoleAttributeValue(AtsAttributeTypes.Actionable, actionable); aia.persist(transaction); return aia; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java index cb05dcfa0d5..9bb0efa336a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java @@ -231,7 +231,7 @@ public class AtsMetricsComposite extends ScrolledComposite { "Targeted Version - Estimated Release Date", 0, iAtsMetricsProvider.getMetricsVersionArtifact() == null ? "Not Set" : iAtsMetricsProvider.getMetricsVersionArtifact().getSoleAttributeValueAsString( - AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, "Not Set"))); + AtsAttributeTypes.EstimatedReleaseDate, "Not Set"))); lines.add(new XBarGraphLine("Metrics Estimated Release Date", 0, getEstimatedReleaseDate() == null ? "Not Set" : getEstimatedReleaseDate().toString())); lines.add(new XBarGraphLine("Work-Days Till Release", 0, diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java index 88197bb16a2..9524eabfb18 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java @@ -269,7 +269,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IArt @Override public void run() { try { - if (PromptChangeUtil.promptChangeAttribute(getSelectedSMAArtifacts(), AtsAttributeTypes.ATS_SMA_NOTE, + if (PromptChangeUtil.promptChangeAttribute(getSelectedSMAArtifacts(), AtsAttributeTypes.SmaNote, true, true)) { update(getSelectedSMAArtifacts().toArray(), null); } @@ -283,7 +283,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IArt @Override public void run() { try { - if (PromptChangeUtil.promptChangeAttribute(getSelectedSMAArtifacts(), AtsAttributeTypes.ATS_RESOLUTION, + if (PromptChangeUtil.promptChangeAttribute(getSelectedSMAArtifacts(), AtsAttributeTypes.Resolution, true, true)) { update(getSelectedSMAArtifacts().toArray(), null); } @@ -310,7 +310,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IArt @Override public void run() { try { - if (ArtifactPromptChange.promptChangeAttribute(AtsAttributeTypes.ATS_ESTIMATED_HOURS, + if (ArtifactPromptChange.promptChangeAttribute(AtsAttributeTypes.EstimatedHours, getSelectedSMAArtifacts(), true)) { update(getSelectedSMAArtifacts().toArray(), null); } @@ -954,7 +954,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IArt return false; } else if (xCol.equals(WorldXViewerFactory.Goal_Order_Vote_Col)) { modified = - PromptChangeUtil.promptChangeAttribute(useArt, AtsAttributeTypes.ATS_GOAL_ORDER_VOTE, persist, true); + PromptChangeUtil.promptChangeAttribute(useArt, AtsAttributeTypes.GoalOrderVote, persist, true); } else if (xCol.equals(WorldXViewerFactory.Goals_Col)) { modified = PromptChangeUtil.promptChangeGoals(useArt, persist); } @@ -977,24 +977,24 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IArt PromptChangeUtil.promptChangeVersion(sma, AtsUtil.isAtsAdmin() ? VersionReleaseType.Both : VersionReleaseType.UnReleased, true); } else if (xCol.equals(WorldXViewerFactory.Notes_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_SMA_NOTE, persist, true); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.SmaNote, persist, true); } else if (xCol.equals(WorldXViewerFactory.Percent_Rework_Col)) { modified = - PromptChangeUtil.promptChangePercentAttribute(sma, AtsAttributeTypes.ATS_PERCENT_REWORK, persist); + PromptChangeUtil.promptChangePercentAttribute(sma, AtsAttributeTypes.PercentRework, persist); } else if (xCol.equals(WorldXViewerFactory.Estimated_Hours_Col)) { modified = - PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_ESTIMATED_HOURS, persist, false); + PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.EstimatedHours, persist, false); } else if (xCol.equals(WorldXViewerFactory.Weekly_Benefit_Hrs_Col)) { modified = - PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_WEEKLY_BENEFIT, persist, false); + PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.WeeklyBenefit, persist, false); } else if (xCol.equals(WorldXViewerFactory.Estimated_Release_Date_Col)) { modified = PromptChangeUtil.promptChangeEstimatedReleaseDate(sma); } else if (xCol.equals(WorldXViewerFactory.Groups_Col)) { modified = PromptChangeUtil.promptChangeGroups(sma, persist); } else if (xCol.equals(WorldXViewerFactory.Estimated_Completion_Date_Col)) { - modified = PromptChangeUtil.promptChangeDate(sma, AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE, persist); + modified = PromptChangeUtil.promptChangeDate(sma, AtsAttributeTypes.EstimatedCompletionDate, persist); } else if (xCol.equals(WorldXViewerFactory.Deadline_Col)) { - modified = PromptChangeUtil.promptChangeDate(sma, AtsAttributeTypes.ATS_NEED_BY, persist); + modified = PromptChangeUtil.promptChangeDate(sma, AtsAttributeTypes.NeedBy, persist); } else if (xCol.equals(WorldXViewerFactory.Assignees_Col)) { modified = PromptChangeUtil.promptChangeAssignees(sma, persist); } else if (xCol.equals(WorldXViewerFactory.Remaining_Hours_Col)) { @@ -1009,21 +1009,21 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IArt } else if (xCol.equals(WorldXViewerFactory.Release_Date_Col)) { modified = PromptChangeUtil.promptChangeReleaseDate(sma); } else if (xCol.equals(WorldXViewerFactory.Work_Package_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_WORK_PACKAGE, persist, false); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.WorkPackage, persist, false); } else if (xCol.equals(WorldXViewerFactory.Points_Col)) { modified = PromptChangeUtil.promptChangePoints(sma, persist); } else if (xCol.equals(WorldXViewerFactory.Numeric1_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_NUMERIC_1, persist, false); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.Numeric1, persist, false); } else if (xCol.equals(WorldXViewerFactory.Numeric2_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_NUMERIC_2, persist, false); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.Numeric2, persist, false); } else if (xCol.equals(WorldXViewerFactory.Category_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_CATEGORY_1, persist, true); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.Category1, persist, true); } else if (xCol.equals(WorldXViewerFactory.Resolution_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_RESOLUTION, persist, true); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.Resolution, persist, true); } else if (xCol.equals(WorldXViewerFactory.Category2_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_CATEGORY_2, persist, true); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.Category2, persist, true); } else if (xCol.equals(WorldXViewerFactory.Category3_Col)) { - modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.ATS_CATEGORY_3, persist, true); + modified = PromptChangeUtil.promptChangeAttribute(sma, AtsAttributeTypes.Category3, persist, true); } else if (xCol.equals(WorldXViewerFactory.Change_Type_Col)) { modified = PromptChangeUtil.promptChangeType(sma, persist); } else if (xCol.equals(WorldXViewerFactory.Priority_Col)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java index 490f80d49ae..5a8077d6b3c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java @@ -44,18 +44,18 @@ public class WorldXViewerFactory extends SkynetXViewerFactory { SortDataType.String, false, null); public static final XViewerColumn State_Col = new XViewerColumn("ats.column.state", "State", 75, SWT.LEFT, true, SortDataType.String, false, null); - public static final XViewerColumn Priority_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_PRIORITY_TYPE, + public static final XViewerColumn Priority_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.PriorityType, 20, SWT.CENTER, true, SortDataType.String, false); - public static final XViewerColumn Change_Type_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_CHANGE_TYPE, + public static final XViewerColumn Change_Type_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ChangeType, 22, SWT.CENTER, true, SortDataType.String, false); public static final XViewerColumn Assignees_Col = new XViewerAtsAttributeColumn(ATSAttributes.ASSIGNEE_ATTRIBUTE, 100, SWT.LEFT, true, SortDataType.String, false); public static final XViewerColumn Title_Col = new XViewerArtifactNameColumn("Title"); public static final XViewerColumn Actionable_Items_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".actionableItems", AtsAttributeTypes.ATS_ACTIONABLE_ITEM, 80, SWT.LEFT, true, + COLUMN_NAMESPACE + ".actionableItems", AtsAttributeTypes.ActionableItem, 80, SWT.LEFT, true, SortDataType.String, false); public static final XViewerColumn User_Community_Col = new XViewerAtsAttributeColumn( - AtsAttributeTypes.ATS_USER_COMMUNITY, 60, SWT.LEFT, true, SortDataType.String, false); + AtsAttributeTypes.UserCommunity, 60, SWT.LEFT, true, SortDataType.String, false); public static final XViewerColumn Parent_ID_Col = new XViewerColumn(COLUMN_NAMESPACE + ".parenthrid", "Parent HRID", 75, SWT.LEFT, false, SortDataType.String, false, "Human Readable ID of Parent Action or Team Workflow"); public static final XViewerColumn Parent_State_Col = new XViewerColumn(COLUMN_NAMESPACE + ".parentstate", @@ -66,10 +66,10 @@ public class WorldXViewerFactory extends SkynetXViewerFactory { "Date this workflow transitioned to the Completed state."); public static final XViewerColumn Team_Col = new XViewerColumn(COLUMN_NAMESPACE + ".team", "Team", 50, SWT.LEFT, true, SortDataType.String, false, "Team that has been assigned to work this Action."); - public static final XViewerColumn Notes_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_SMA_NOTE, 80, + public static final XViewerColumn Notes_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.SmaNote, 80, SWT.LEFT, true, SortDataType.String, true); public static final XViewerColumn Deadline_Col = new XViewerAtsAttributeColumn(COLUMN_NAMESPACE + ".deadline", - AtsAttributeTypes.ATS_NEED_BY, 75, SWT.LEFT, true, SortDataType.Date, true); + AtsAttributeTypes.NeedBy, 75, SWT.LEFT, true, SortDataType.Date, true); // Aren't shown by default public static final XViewerColumn Annual_Cost_Avoidance_Col = @@ -82,53 +82,53 @@ public class WorldXViewerFactory extends SkynetXViewerFactory { SortDataType.Float, false, "Hours that would be saved for the first year if this change were completed.\n\n" + "(Weekly Benefit Hours * 52 weeks) - Remaining Hours\n\n" + "If number is high, benefit is great given hours remaining."); - public static final XViewerColumn Description_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_DESCRIPTION, + public static final XViewerColumn Description_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Description, 150, SWT.LEFT, false, SortDataType.String, true); public static XViewerColumn Legacy_PCR_Col = new XViewerAtsAttributeColumn(COLUMN_NAMESPACE + ".legacyPcr", - AtsAttributeTypes.ATS_LEGACY_PCR_ID, 40, SWT.LEFT, false, SortDataType.String, false); - public static final XViewerColumn Decision_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_DECISION, 150, + AtsAttributeTypes.LegacyPcrId, 40, SWT.LEFT, false, SortDataType.String, false); + public static final XViewerColumn Decision_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Decision, 150, SWT.LEFT, false, SortDataType.String, false); - public static final XViewerColumn Resolution_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_RESOLUTION, + public static final XViewerColumn Resolution_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Resolution, 150, SWT.LEFT, false, SortDataType.String, true); public static XViewerColumn Estimated_Hours_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".estimatedHours", AtsAttributeTypes.ATS_ESTIMATED_HOURS, 40, SWT.CENTER, false, + COLUMN_NAMESPACE + ".estimatedHours", AtsAttributeTypes.EstimatedHours, 40, SWT.CENTER, false, SortDataType.Float, true); public static XViewerColumn Estimated_Release_Date_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".estimatedReleaseDate", AtsAttributeTypes.ATS_ESTIMATED_RELEASE_DATE, 80, SWT.LEFT, false, + COLUMN_NAMESPACE + ".estimatedReleaseDate", AtsAttributeTypes.EstimatedReleaseDate, 80, SWT.LEFT, false, SortDataType.Date, true); public static XViewerColumn Estimated_Completion_Date_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".estimatedCompletionDate", AtsAttributeTypes.ATS_ESTIMATED_COMPLETION_DATE, 80, SWT.LEFT, + COLUMN_NAMESPACE + ".estimatedCompletionDate", AtsAttributeTypes.EstimatedCompletionDate, 80, SWT.LEFT, false, SortDataType.Date, true); public static final XViewerColumn Release_Date_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".releaseDate", AtsAttributeTypes.ATS_RELEASE_DATE, 80, SWT.LEFT, false, SortDataType.Date, + COLUMN_NAMESPACE + ".releaseDate", AtsAttributeTypes.ReleaseDate, 80, SWT.LEFT, false, SortDataType.Date, false); public static final XViewerColumn Work_Package_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".workPackage", AtsAttributeTypes.ATS_WORK_PACKAGE, 80, SWT.LEFT, false, SortDataType.String, + COLUMN_NAMESPACE + ".workPackage", AtsAttributeTypes.WorkPackage, 80, SWT.LEFT, false, SortDataType.String, true); - public static final XViewerColumn Points_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_POINTS, 40, + public static final XViewerColumn Points_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Points, 40, SWT.LEFT, false, SortDataType.Integer, true); - public static final XViewerColumn Numeric1_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_NUMERIC_1, 40, + public static final XViewerColumn Numeric1_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Numeric1, 40, SWT.LEFT, false, SortDataType.Float, true); - public static final XViewerColumn Numeric2_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_NUMERIC_2, 40, + public static final XViewerColumn Numeric2_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Numeric2, 40, SWT.LEFT, false, SortDataType.Float, true); public static final XViewerColumn Goal_Order = new XViewerColumn(COLUMN_NAMESPACE + ".goalOrder", "Goal Order", 40, SWT.LEFT, false, SortDataType.Integer, true, "Order of item within displayed goal. Editing this field changes order."); public static final XViewerColumn Goal_Order_Vote_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".goalOrderVote", AtsAttributeTypes.ATS_GOAL_ORDER_VOTE, 80, SWT.LEFT, false, + COLUMN_NAMESPACE + ".goalOrderVote", AtsAttributeTypes.GoalOrderVote, 80, SWT.LEFT, false, SortDataType.String, true); - public static final XViewerColumn Category_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_CATEGORY_1, 80, + public static final XViewerColumn Category_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Category1, 80, SWT.LEFT, false, SortDataType.String, true); - public static final XViewerColumn Category2_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_CATEGORY_2, + public static final XViewerColumn Category2_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Category2, 80, SWT.LEFT, false, SortDataType.String, true); - public static final XViewerColumn Category3_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.ATS_CATEGORY_3, + public static final XViewerColumn Category3_Col = new XViewerAtsAttributeColumn(AtsAttributeTypes.Category3, 80, SWT.LEFT, false, SortDataType.String, true); public static XViewerAtsAttributeColumn Related_To_State_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".relatedToState", AtsAttributeTypes.ATS_RELATED_TO_STATE, 80, SWT.LEFT, false, + COLUMN_NAMESPACE + ".relatedToState", AtsAttributeTypes.RelatedToState, 80, SWT.LEFT, false, SortDataType.String, true); public static final XViewerColumn Weekly_Benefit_Hrs_Col = new XViewerAtsAttributeColumn( - COLUMN_NAMESPACE + ".weeklyBenefitHrs", AtsAttributeTypes.ATS_WEEKLY_BENEFIT, 40, SWT.CENTER, false, + COLUMN_NAMESPACE + ".weeklyBenefitHrs", AtsAttributeTypes.WeeklyBenefit, 40, SWT.CENTER, false, SortDataType.Float, true); public static final XViewerColumn Remaining_Hours_Col = new XViewerColumn(COLUMN_NAMESPACE + ".remainingHours", "Remaining Hours", 40, SWT.CENTER, false, SortDataType.Float, false, diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java index ff6bd900269..9a28ed9db29 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java @@ -136,13 +136,13 @@ public class ActionableItemWorldSearchItem extends WorldUISearchItem { } List<AbstractArtifactSearchCriteria> criteria = new ArrayList<AbstractArtifactSearchCriteria>(); - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_ACTIONABLE_ITEM, actionItemGuids)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.ActionableItem, actionItemGuids)); // exclude completed or canceled if (!selectedShowFinished) { List<String> cancelOrComplete = new ArrayList<String>(2); cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;"); cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;"); - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_CURRENT_STATE, cancelOrComplete, Operator.NOT_EQUAL)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL)); } Collection<Artifact> artifacts = ArtifactQuery.getArtifactListFromCriteria(AtsUtil.getAtsBranch(), 1000, criteria); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java index b332a7ff61a..7ec6e6b58fc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java @@ -121,14 +121,14 @@ public class GoalSearchItem extends WorldUISearchItem { } List<AbstractArtifactSearchCriteria> criteria = new ArrayList<AbstractArtifactSearchCriteria>(); if (!teamDefinitionGuids.isEmpty()) { - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_TEAM_DEFINITION, teamDefinitionGuids)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition, teamDefinitionGuids)); } if (!showFinished) { List<String> cancelOrComplete = new ArrayList<String>(2); cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;"); cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;"); - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_CURRENT_STATE, cancelOrComplete, Operator.NOT_EQUAL)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL)); } List<Artifact> artifacts = diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java index bb3bb3a7881..8db2e01a18f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java @@ -55,9 +55,9 @@ public class LegacyPCRActionsWorldSearchItem extends WorldUISearchItem { List<AbstractArtifactSearchCriteria> criteria = new ArrayList<AbstractArtifactSearchCriteria>(4); if (pcrIds != null && pcrIds.size() > 0) { - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_LEGACY_PCR_ID, pcrIds)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.LegacyPcrId, pcrIds)); } else { - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_LEGACY_PCR_ID)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.LegacyPcrId)); } if (teamDefs != null && teamDefs.size() > 0) { @@ -65,7 +65,7 @@ public class LegacyPCRActionsWorldSearchItem extends WorldUISearchItem { for (TeamDefinitionArtifact teamDef : teamDefs) { teamDefGuids.add(teamDef.getGuid()); } - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_TEAM_DEFINITION, teamDefGuids)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition, teamDefGuids)); } if (returnActions) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java index 45b34cca8b5..e4a0d1eb2f0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java @@ -61,7 +61,7 @@ public class MyGoalWorkflowItem extends UserSearchItem { if (goalSearchState == GoalSearchState.InWork) { artifacts.addAll(RelationManager.getRelatedArtifacts(assigned, 1, AtsRelationTypes.SmaToTask_Sma)); } else { - artifacts.addAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_STATE, + artifacts.addAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.State, "%<" + user.getUserId() + ">%", AtsUtil.getAtsBranch())); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java index 2cc901a1a94..beca16ba159 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java @@ -61,7 +61,7 @@ public class MyReviewWorkflowItem extends UserSearchItem { if (reviewState == ReviewState.InWork) { artifacts.addAll(RelationManager.getRelatedArtifacts(assigned, 1, AtsRelationTypes.SmaToTask_Sma)); } else { - artifacts.addAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_STATE, + artifacts.addAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.State, "%<" + user.getUserId() + ">%", AtsUtil.getAtsBranch())); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java index 03af45e480f..50e621b42f5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java @@ -59,7 +59,7 @@ public class ShowOpenWorkflowsByArtifactType extends WorldUISearchItem { List<String> cancelOrComplete = new ArrayList<String>(2); cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;"); cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;"); - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_CURRENT_STATE, cancelOrComplete, Operator.NOT_EQUAL)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL)); artifacts = ArtifactQuery.getArtifactListFromTypeAnd(artifactType, AtsUtil.getAtsBranch(), 500, criteria); } else { artifacts = ArtifactQuery.getArtifactListFromType(artifactType, AtsUtil.getAtsBranch()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/StateWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/StateWorldSearchItem.java index 336456025a7..1574b4c7391 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/StateWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/StateWorldSearchItem.java @@ -69,7 +69,7 @@ public class StateWorldSearchItem extends WorldUISearchItem { @Override public Collection<Artifact> performSearch(SearchType searchType) throws OseeCoreException { Collection<Artifact> arts = - ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_CURRENT_STATE, getSearchStateClass() + ";%", + ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.CurrentState, getSearchStateClass() + ";%", AtsUtil.getAtsBranch()); if (isCancelled()) { return EMPTY_SET; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java index 9493a2cd3c0..80d64cffef4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java @@ -151,19 +151,19 @@ public class TeamWorldSearchItem extends WorldUISearchItem { } List<AbstractArtifactSearchCriteria> criteria = new ArrayList<AbstractArtifactSearchCriteria>(); if (teamDefinitionGuids.isEmpty()) { - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_TEAM_DEFINITION)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition)); } else { - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_TEAM_DEFINITION, teamDefinitionGuids)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition, teamDefinitionGuids)); } if (!showFinished) { List<String> cancelOrComplete = new ArrayList<String>(2); cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;"); cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;"); - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_CURRENT_STATE, cancelOrComplete, Operator.NOT_EQUAL)); + criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL)); } if (changeType != null) { - criteria.add(new AttributeCriteria(AtsAttributeTypes.ATS_CHANGE_TYPE, changeType.name())); + criteria.add(new AttributeCriteria(AtsAttributeTypes.ChangeType, changeType.name())); } List<Artifact> artifacts = ArtifactQuery.getArtifactListFromCriteria(AtsUtil.getAtsBranch(), 1000, criteria); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserCommunitySearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserCommunitySearchItem.java index a6c737d82ac..3e031bbb96d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserCommunitySearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserCommunitySearchItem.java @@ -73,7 +73,7 @@ public class UserCommunitySearchItem extends WorldUISearchItem { } return ArtifactQuery.getArtifactListFromTypeAndAttribute(AtsArtifactTypes.TeamWorkflow, - AtsAttributeTypes.ATS_USER_COMMUNITY, getSearchUserComm(), AtsUtil.getAtsBranch()); + AtsAttributeTypes.UserCommunity, getSearchUserComm(), AtsUtil.getAtsBranch()); } @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java index 94b9c617db8..245a6832f9c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java @@ -53,11 +53,11 @@ public class UserRelatedToAtsObjectSearch extends UserSearchItem { List<Artifact> arts = new ArrayList<Artifact>(); if (activeObjectsOnly) { arts.addAll(ArtifactQuery.getArtifactListFromAttributeKeywords(AtsUtil.getAtsBranch(), user.getUserId(), - false, EXCLUDE_DELETED, false, AtsAttributeTypes.ATS_CURRENT_STATE)); + false, EXCLUDE_DELETED, false, AtsAttributeTypes.CurrentState)); } else { arts.addAll(ArtifactQuery.getArtifactListFromAttributeKeywords(AtsUtil.getAtsBranch(), user.getUserId(), - false, EXCLUDE_DELETED, false, AtsAttributeTypes.ATS_CURRENT_STATE, AtsAttributeTypes.ATS_STATE, - AtsAttributeTypes.ATS_LOG)); + false, EXCLUDE_DELETED, false, AtsAttributeTypes.CurrentState, AtsAttributeTypes.State, + AtsAttributeTypes.Log)); } arts.addAll(user.getRelatedArtifacts(AtsRelationTypes.TeamLead_Team)); arts.addAll(user.getRelatedArtifacts(AtsRelationTypes.TeamMember_Team)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java index 86933753de3..c62d1c50717 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java @@ -73,7 +73,7 @@ public class UserWorldSearchItem { // If include cancelled or completed, need to perform extra search // Note: Don't need to do this for Originator, Subscribed or Favorites, cause it does completed canceled in it's own searches if (options.contains(UserSearchOption.IncludeCancelled) || options.contains(UserSearchOption.IncludeCompleted)) { - searchArts.addAll(SMAUtil.getSMAs(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_STATE, + searchArts.addAll(SMAUtil.getSMAs(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.State, "%<" + user.getUserId() + ">%", AtsUtil.getAtsBranch()))); } } @@ -120,7 +120,7 @@ public class UserWorldSearchItem { private Collection<StateMachineArtifact> getOriginatorArtifacts() throws OseeCoreException { Collection<StateMachineArtifact> originators = new ArrayList<StateMachineArtifact>(); Collection<StateMachineArtifact> artifacts = - Collections.castAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.ATS_LOG, + Collections.castAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.Log, "%type=\"Originated\" userId=\"" + user.getUserId() + "\"%", AtsUtil.getAtsBranch())); // omit historical originators; list current originators for (StateMachineArtifact art : artifacts) { diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/MatchTypeTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/MatchTypeTest.java index 12ec8137400..3b20d8dffeb 100644 --- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/MatchTypeTest.java +++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/MatchTypeTest.java @@ -31,7 +31,7 @@ public class MatchTypeTest { public static ICoverageUnitFileContentsProvider fileContentsProvider = new SimpleCoverageUnitFileContentsProvider(); - public CoveragePackage getCoveragePackage() { + public CoveragePackage getCoveragePackage() throws OseeCoreException { CoveragePackage coveragePackage = new CoveragePackage("Package", CoverageOptionManagerDefault.instance()); CoverageUnit packageCu = new CoverageUnit(coveragePackage, "Top", "C:/UserData/", fileContentsProvider); packageCu.setNamespace("org.this"); @@ -42,7 +42,7 @@ public class MatchTypeTest { return coveragePackage; } - public CoverageImport getCoverageImport() { + public CoverageImport getCoverageImport() throws OseeCoreException { CoverageImport coverageImport = new CoverageImport("Import"); CoverageUnit importCu = new CoverageUnit(coverageImport, "Top", "C:/UserData/", fileContentsProvider); importCu.setNamespace("org.this"); diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemTest.java index 014099854a5..72ceb231372 100644 --- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemTest.java +++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemTest.java @@ -30,7 +30,7 @@ public class CoverageItemTest { public static SimpleTestUnitProvider simpleTestUnitProvider = new SimpleTestUnitProvider(); @BeforeClass - public static void testSetup() { + public static void testSetup() throws OseeCoreException { parent = new CoverageUnit(null, "Top", "C:/UserData/", null); ci1 = new CoverageItem(parent, CoverageOptionManager.Deactivated_Code, "1"); ci1.setName("this is text"); @@ -62,7 +62,8 @@ public class CoverageItemTest { @Test public void testCoverageItemCoverageUnitString() throws OseeCoreException { String xml = ci1.toXml(); - CoverageItem ci = new CoverageItem(parent, xml, CoverageOptionManagerDefault.instance(), simpleTestUnitProvider); + CoverageItem ci = + CoverageItem.createCoverageItem(parent, xml, CoverageOptionManagerDefault.instance(), simpleTestUnitProvider); Assert.assertEquals(ci1.getParent(), ci.getParent()); Assert.assertEquals(ci1.getCoverageMethod(), ci.getCoverageMethod()); Assert.assertEquals(ci1.getOrderNumber(), ci.getOrderNumber()); @@ -154,7 +155,8 @@ public class CoverageItemTest { @Test public void testEqualsObject() throws OseeCoreException { CoverageItem ci = - new CoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), simpleTestUnitProvider); + CoverageItem.createCoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), + simpleTestUnitProvider); Assert.assertEquals(ci, ci1); } @@ -166,7 +168,8 @@ public class CoverageItemTest { @Test public void testGetGuid() throws OseeCoreException { CoverageItem ci = - new CoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), simpleTestUnitProvider); + CoverageItem.createCoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), + simpleTestUnitProvider); Assert.assertEquals(ci1.getGuid(), ci.getGuid()); } @@ -179,17 +182,6 @@ public class CoverageItemTest { } /** - * Test method for {@link org.eclipse.osee.coverage.model.CoverageItem#setGuid(java.lang.String)}. - */ - @Test - public void testSetGuid() throws OseeCoreException { - CoverageItem ci = - new CoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), simpleTestUnitProvider); - ci.setGuid("asdf"); - Assert.assertEquals("asdf", ci.getGuid()); - } - - /** * Test method for {@link org.eclipse.osee.coverage.model.CoverageItem#getRationale()}. */ @Test @@ -204,7 +196,7 @@ public class CoverageItemTest { * @throws OseeCoreException */ @Test - public void testSetGetText() { + public void testSetGetText() throws OseeCoreException { ci1.setName("this is text2"); Assert.assertEquals("this is text2", ci1.getFileContents()); ci1.setName("this is text"); @@ -233,7 +225,8 @@ public class CoverageItemTest { @Test public void testToXml() throws OseeCoreException { CoverageItem ci = - new CoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), simpleTestUnitProvider); + CoverageItem.createCoverageItem(parent, ci1.toXml(), CoverageOptionManagerDefault.instance(), + simpleTestUnitProvider); Assert.assertEquals(ci1.getGuid(), ci.getGuid()); Assert.assertEquals(ci1.getOrderNumber(), ci.getOrderNumber()); Assert.assertEquals(ci1.getCoverageMethod(), ci.getCoverageMethod()); diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitTest.java index 03b0fc1b161..65affa3c2d4 100644 --- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitTest.java +++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageUnitTest.java @@ -32,7 +32,7 @@ public class CoverageUnitTest { new SimpleCoverageUnitFileContentsProvider(); @Before - public void testSetup() { + public void testSetup() throws OseeCoreException { cu = new CoverageUnit(null, "Top CU", "C:/UserData/", fileContentsProvider); cu.setOrderNumber("33"); ci1 = new CoverageItem(cu, CoverageOptionManager.Test_Unit, "1"); @@ -135,9 +135,11 @@ public class CoverageUnitTest { /** * Test method for {@link org.eclipse.osee.coverage.model.CoverageUnit#setName(java.lang.String)}. + * + * @throws OseeCoreException */ @Test - public void testSetName() { + public void testSetName() throws OseeCoreException { String current = cu.getName(); cu.setName("New Name"); Assert.assertEquals("New Name", cu.getName()); @@ -243,18 +245,6 @@ public class CoverageUnitTest { } /** - * Test method for {@link org.eclipse.osee.coverage.model.CoverageUnit#setGuid(java.lang.String)}. - */ - @Test - public void testSetGuid() { - String current = cu.getGuid(); - cu.setGuid("New GUID"); - Assert.assertEquals("New GUID", cu.getGuid()); - cu.setGuid(current); - Assert.assertEquals(current, cu.getGuid()); - } - - /** * Test method for {@link org.eclipse.osee.coverage.model.CoverageUnit#getNamespace()}. */ @Test diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/SimpleTestUnitProviderTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/SimpleTestUnitProviderTest.java index 709fe5dd627..8e615ed429c 100644 --- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/SimpleTestUnitProviderTest.java +++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/SimpleTestUnitProviderTest.java @@ -52,8 +52,8 @@ public class SimpleTestUnitProviderTest { Assert.assertEquals(4, provider.getTestUnits(coverageItem1).size()); // Should equal cause CoverageItems are "equal" (guids are same) - CoverageItem coverageItem1b = new CoverageItem(null, CoverageOptionManager.Not_Covered, "1"); - coverageItem1b.setGuid(coverageItem1.getGuid()); + CoverageItem coverageItem1b = + new CoverageItem(coverageItem1.getGuid(), null, CoverageOptionManager.Not_Covered, "1"); Assert.assertEquals(4, provider.getTestUnits(coverageItem1b).size()); Assert.assertEquals(0, provider.getTestUnits(coverageItem2).size()); @@ -69,7 +69,7 @@ public class SimpleTestUnitProviderTest { @Test public void testToFromXml() throws OseeCoreException { CoverageItem newCoverageItem = - new CoverageItem(null, coverageItem1.toXml(), CoverageOptionManagerDefault.instance(), + CoverageItem.createCoverageItem(null, coverageItem1.toXml(), CoverageOptionManagerDefault.instance(), new SimpleTestUnitProvider()); Assert.assertEquals(coverageItem1.getName(), newCoverageItem.getName()); Assert.assertEquals(coverageItem1.getGuid(), newCoverageItem.getGuid()); diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItem.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItem.java index 9b55fb57dc7..8f22bebb62f 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItem.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItem.java @@ -27,14 +27,14 @@ public class MergeItem extends MergeItemBase { private final ICoverage importItem; public MergeItem(MergeType mergeType, ICoverage packageItem, ICoverage importItem, boolean isCheckable) { - super(importItem == null ? "" : importItem.getGuid(), importItem == null ? String.format("Package [%s]", + super(importItem == null ? null : importItem.getGuid(), importItem == null ? String.format("Package [%s]", packageItem.getName()) : importItem.getName(), mergeType, isCheckable); this.packageItem = packageItem; this.importItem = importItem; } public MergeItem(MergeType mergeType, String name) { - super("", name, mergeType, false); + super(null, name, mergeType, false); this.packageItem = null; this.importItem = null; } diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItemGroup.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItemGroup.java index adfebac2c5b..caf7426e52b 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItemGroup.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeItemGroup.java @@ -30,7 +30,7 @@ public class MergeItemGroup extends MergeItemBase { public MergeItemGroup(MergeType mergeType, ICoverage parentCoverage, Collection<IMergeItem> mergeItems, boolean isCheckable) { super( - "", + null, mergeType.toString() + " - " + CoverageUtil.getFullPath(parentCoverage) + "[" + parentCoverage.getName() + "]", mergeType, isCheckable); this.parentCoverage = parentCoverage; diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageImport.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageImport.java index 95f7fa70ae4..bf0a5a2d4e8 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageImport.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageImport.java @@ -39,7 +39,7 @@ public class CoverageImport extends CoveragePackageBase { } public CoverageImport(String name, Date runDate) { - super(name, CoverageOptionManagerDefault.instance()); + super(null, name, CoverageOptionManagerDefault.instance()); this.runDate = runDate; } diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java index 84ffaa4d0cd..a094c777069 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageItem.java @@ -15,12 +15,12 @@ import java.util.Collection; import java.util.List; import org.eclipse.osee.coverage.util.CoverageImage; import org.eclipse.osee.coverage.util.CoverageUtil; +import org.eclipse.osee.framework.core.data.NamedIdentity; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeExceptions; import org.eclipse.osee.framework.jdk.core.type.PropertyStore; import org.eclipse.osee.framework.jdk.core.util.Collections; -import org.eclipse.osee.framework.jdk.core.util.GUID; import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.ui.plugin.util.Result; import org.eclipse.osee.framework.ui.swt.KeyedImage; @@ -28,19 +28,21 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage; /** * @author Donald G. Dunne */ -public class CoverageItem implements ICoverage { +public class CoverageItem extends NamedIdentity implements ICoverage { CoverageOption coverageMethod = CoverageOptionManager.Not_Covered; String rationale; String orderNumber; - String name; private final CoverageUnit coverageUnit; - String guid = GUID.create(); private static String PROPERTY_STORE_ID = "coverage.item"; private ITestUnitProvider testUnitProvider; public CoverageItem(CoverageUnit coverageUnit, CoverageOption coverageMethod, String orderNumber) { - super(); + this(null, coverageUnit, coverageMethod, orderNumber); + } + + public CoverageItem(String guid, CoverageUnit coverageUnit, CoverageOption coverageMethod, String orderNumber) { + super(guid, ""); this.coverageUnit = coverageUnit; this.coverageMethod = coverageMethod; this.orderNumber = orderNumber; @@ -49,19 +51,33 @@ public class CoverageItem implements ICoverage { } } - public CoverageItem(CoverageUnit parentCoverageUnit, String xml, CoverageOptionManager coverageOptionManager, ITestUnitProvider testUnitProvider) throws OseeCoreException { - this(parentCoverageUnit, CoverageOptionManager.Not_Covered, "0"); - this.testUnitProvider = testUnitProvider; - fromXml(xml, coverageOptionManager); + public static CoverageItem createCoverageItem(CoverageUnit parentCoverageUnit, String xml, CoverageOptionManager coverageOptionManager, ITestUnitProvider testUnitProvider) throws OseeCoreException { + PropertyStore store = new PropertyStore(); + try { + store.load(xml); + } catch (Exception ex) { + OseeExceptions.wrapAndThrow(ex); + } + if (!store.getId().equals(PROPERTY_STORE_ID)) { + throw new OseeArgumentException(String.format("Invalid store id [%s] for CoverageItem", store.getId())); + } + + CoverageItem item = + new CoverageItem(store.get("guid"), parentCoverageUnit, CoverageOptionManager.Not_Covered, "0"); + + item.setFromPropertyStore(store, coverageOptionManager); + + return item; } /** * Copies the coverage unit. Does not copy test units. + * + * @throws OseeCoreException */ - public CoverageItem copy(CoverageUnit parent) { - CoverageItem coverageitem = new CoverageItem(parent, coverageMethod, orderNumber); - coverageitem.setGuid(guid); - coverageitem.setName(name); + public CoverageItem copy(CoverageUnit parent) throws OseeCoreException { + CoverageItem coverageitem = new CoverageItem(getGuid(), parent, coverageMethod, orderNumber); + coverageitem.setName(getName()); coverageitem.setOrderNumber(orderNumber); coverageitem.setRationale(rationale); coverageitem.setTestUnitProvider(testUnitProvider); @@ -113,12 +129,7 @@ public class CoverageItem implements ICoverage { } public String getNameFull() { - return String.format("%s:%s [%s]", getCoverageUnit().getOrderNumber(), orderNumber, name); - } - - @Override - public String getName() { - return name; + return String.format("%s:%s [%s]", getCoverageUnit().getOrderNumber(), orderNumber, getName()); } @Override @@ -135,19 +146,10 @@ public class CoverageItem implements ICoverage { } @Override - public String getGuid() { - return guid; - } - - @Override public ICoverage getParent() { return coverageUnit; } - public void setGuid(String guid) { - this.guid = guid; - } - public String getTestUnitNames(Collection<CoverageTestUnit> testUnits) { List<String> guids = new ArrayList<String>(); for (CoverageTestUnit testUnit : testUnits) { @@ -166,11 +168,7 @@ public class CoverageItem implements ICoverage { @Override public String getFileContents() { - return name; - } - - public void setName(String name) { - this.name = name; + return getName(); } @Override @@ -242,22 +240,11 @@ public class CoverageItem implements ICoverage { this.testUnitProvider = testUnitProvider; } - public void fromXml(String xml, CoverageOptionManager coverageOptionManager) throws OseeCoreException { - PropertyStore store = new PropertyStore(); - // PropertyStoreRegEx store = new PropertyStoreRegEx(); - try { - store.load(xml); - } catch (Exception ex) { - OseeExceptions.wrapAndThrow(ex); - } - if (!store.getId().equals(PROPERTY_STORE_ID)) { - throw new OseeArgumentException(String.format("Invalid store id [%s] for CoverageItem", store.getId())); - } + private void setFromPropertyStore(PropertyStore store, CoverageOptionManager coverageOptionManager) throws OseeCoreException { setCoverageMethod(coverageOptionManager.get(store.get("methodType"))); if (Strings.isValid(store.get("order"))) { setOrderNumber(store.get("order")); } - setGuid(store.get("guid")); if (Strings.isValid(store.get("name"))) { setName(store.get("name")); } @@ -279,7 +266,7 @@ public class CoverageItem implements ICoverage { public String toXml(ITestUnitProvider testUnitProvider) throws OseeCoreException { PropertyStore store = new PropertyStore(PROPERTY_STORE_ID); - store.put("guid", guid); + store.put("guid", getGuid()); if (Strings.isValid(getRationale())) { store.put("rationale", rationale); } @@ -292,8 +279,8 @@ public class CoverageItem implements ICoverage { store.put("testUnits", testUnitProvider.toXml(this)); } } - if (Strings.isValid(name)) { - store.put("name", name); + if (Strings.isValid(getName())) { + store.put("name", getName()); } String toReturn = null; try { @@ -304,38 +291,7 @@ public class CoverageItem implements ICoverage { return toReturn; } - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (guid == null ? 0 : guid.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - CoverageItem other = (CoverageItem) obj; - if (guid == null) { - if (other.guid != null) { - return false; - } - } else if (!guid.equals(other.guid)) { - return false; - } - return true; - } - public ITestUnitProvider getTestUnitProvider() { return testUnitProvider; } - -} +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java index 3d16ac5ef12..310c38dd95e 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackage.java @@ -21,12 +21,16 @@ public class CoveragePackage extends CoveragePackageBase { Date creationDate; + public CoveragePackage(String guid, String name, CoverageOptionManager coverageOptionManager) { + this(guid, name, new Date(), coverageOptionManager); + } + public CoveragePackage(String name, CoverageOptionManager coverageOptionManager) { - this(name, new Date(), coverageOptionManager); + this(null, name, coverageOptionManager); } - public CoveragePackage(String name, Date runDate, CoverageOptionManager coverageOptionManager) { - super(name, coverageOptionManager); + public CoveragePackage(String guid, String name, Date runDate, CoverageOptionManager coverageOptionManager) { + super(guid, name, coverageOptionManager); this.creationDate = runDate; } diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java index 861f91a12c1..3dd148479e7 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoveragePackageBase.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import org.eclipse.osee.coverage.util.CoverageUtil; +import org.eclipse.osee.framework.core.data.NamedIdentity; import org.eclipse.osee.framework.core.exception.OseeCoreException; -import org.eclipse.osee.framework.jdk.core.util.GUID; import org.eclipse.osee.framework.skynet.core.artifact.KeyValueArtifact; import org.eclipse.osee.framework.ui.plugin.util.Result; import org.eclipse.osee.framework.ui.skynet.results.XResultData; @@ -28,17 +28,15 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage; /** * @author Donald G. Dunne */ -public abstract class CoveragePackageBase implements ICoverage, ICoverageUnitProvider { +public abstract class CoveragePackageBase extends NamedIdentity implements ICoverage, ICoverageUnitProvider { List<CoverageUnit> coverageUnits = new ArrayList<CoverageUnit>(); final XResultData logResultData = new XResultData(false); - String guid = GUID.create(); - String name; boolean editable = true; protected final CoverageOptionManager coverageOptionManager; protected ICoverageUnitFileContentsProvider coverageUnitFileContentsProvider; - public CoveragePackageBase(String name, CoverageOptionManager coverageOptionManager) { - this.name = name; + public CoveragePackageBase(String guid, String name, CoverageOptionManager coverageOptionManager) { + super(guid, name); this.coverageOptionManager = coverageOptionManager; } @@ -173,28 +171,14 @@ public abstract class CoveragePackageBase implements ICoverage, ICoverageUnitPro return null; } - @Override - public String getGuid() { - return guid; - } - public void setCoverageUnits(List<CoverageUnit> coverageUnits) { this.coverageUnits = coverageUnits; } - @Override - public String getName() { - return name; - } - public XResultData getLog() { return logResultData; } - public void setName(String name) { - this.name = name; - } - public boolean isImportAllowed() { return isEditable().isTrue(); } @@ -204,10 +188,6 @@ public abstract class CoveragePackageBase implements ICoverage, ICoverageUnitPro return isEditable().isTrue(); } - public void setGuid(String guid) { - this.guid = guid; - } - @Override public Collection<? extends ICoverage> getChildren() { return getChildren(false); @@ -280,36 +260,6 @@ public abstract class CoveragePackageBase implements ICoverage, ICoverageUnitPro public abstract void loadKeyValues(KeyValueArtifact keyValueArtifact) throws OseeCoreException; @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (getGuid() == null ? 0 : getGuid().hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - CoveragePackageBase other = (CoveragePackageBase) obj; - if (getGuid() == null) { - if (other.getGuid() != null) { - return false; - } - } else if (!getGuid().equals(other.getGuid())) { - return false; - } - return true; - } - - @Override public boolean isFolder() { return false; } @@ -334,5 +284,4 @@ public abstract class CoveragePackageBase implements ICoverage, ICoverageUnitPro public CoverageUnit createCoverageUnit(ICoverage parent, String name, String location) { return new CoverageUnit(parent, name, location, coverageUnitFileContentsProvider); } - -} +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageTestUnit.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageTestUnit.java index f7a2c6faf7c..742dee91e61 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageTestUnit.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageTestUnit.java @@ -12,7 +12,7 @@ package org.eclipse.osee.coverage.model; import java.util.Collection; import org.eclipse.osee.coverage.util.CoverageImage; -import org.eclipse.osee.framework.jdk.core.util.GUID; +import org.eclipse.osee.framework.core.data.NamedIdentity; import org.eclipse.osee.framework.ui.plugin.util.Result; import org.eclipse.osee.framework.ui.swt.KeyedImage; @@ -21,28 +21,9 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage; * * @author Donald G. Dunne */ -public class CoverageTestUnit implements ICoverage { - - String name; - String guid = GUID.create(); - +public class CoverageTestUnit extends NamedIdentity implements ICoverage { public CoverageTestUnit(String name) { - super(); - this.name = name; - } - - @Override - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String getGuid() { - return guid; + super(null, name); } @Override @@ -78,10 +59,6 @@ public class CoverageTestUnit implements ICoverage { return null; } - public void setGuid(String guid) { - this.guid = guid; - } - @Override public boolean isAssignable() { return false; @@ -136,5 +113,4 @@ public class CoverageTestUnit implements ICoverage { public String getOrderNumber() { return ""; } - -} +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java index 4d197e868f8..706fb9d8274 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/CoverageUnit.java @@ -17,10 +17,10 @@ import java.util.List; import java.util.Set; import org.eclipse.osee.coverage.util.CoverageImage; import org.eclipse.osee.coverage.util.CoverageUtil; +import org.eclipse.osee.framework.core.data.NamedIdentity; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeStateException; import org.eclipse.osee.framework.jdk.core.util.Collections; -import org.eclipse.osee.framework.jdk.core.util.GUID; import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.ui.plugin.util.Result; import org.eclipse.osee.framework.ui.swt.KeyedImage; @@ -30,14 +30,12 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage; * * @author Donald G. Dunne */ -public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverageItemProvider { +public class CoverageUnit extends NamedIdentity implements ICoverage, ICoverageUnitProvider, ICoverageItemProvider { - String name; String namespace; boolean folder; String notes; String assignees; - String guid = GUID.create(); final List<CoverageItem> coverageItems = new ArrayList<CoverageItem>(); String location; String orderNumber = ""; @@ -46,9 +44,12 @@ public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverage ICoverageUnitFileContentsProvider fileContentsProvider; public CoverageUnit(ICoverage parent, String name, String location, ICoverageUnitFileContentsProvider coverageUnitFileContentsProvider) { - super(); + this(null, parent, name, location, coverageUnitFileContentsProvider); + } + + public CoverageUnit(String guid, ICoverage parent, String name, String location, ICoverageUnitFileContentsProvider coverageUnitFileContentsProvider) { + super(guid, name); this.parent = parent; - this.name = name; this.location = location; this.fileContentsProvider = coverageUnitFileContentsProvider; if (parent != null && parent instanceof ICoverageUnitProvider) { @@ -120,15 +121,6 @@ public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverage } @Override - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override public String getLocation() { return location; } @@ -152,11 +144,6 @@ public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverage this.fileContentsProvider.setFileContents(this, fileContents); } - @Override - public String getGuid() { - return guid; - } - public CoverageUnit getParentCoverageUnit() { if (parent instanceof CoverageUnit) { return (CoverageUnit) parent; @@ -201,44 +188,10 @@ public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverage } @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (guid == null ? 0 : guid.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - CoverageUnit other = (CoverageUnit) obj; - if (guid == null) { - if (other.guid != null) { - return false; - } - } else if (!guid.equals(other.guid)) { - return false; - } - return true; - } - - @Override public ICoverage getParent() { return parent; } - public void setGuid(String guid) { - this.guid = guid; - } - @Override public String getNamespace() { if (namespace == null) { @@ -332,8 +285,7 @@ public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverage } public CoverageUnit copy(boolean includeItems) throws OseeCoreException { - CoverageUnit coverageUnit = new CoverageUnit(parent, name, location, fileContentsProvider); - coverageUnit.setGuid(guid); + CoverageUnit coverageUnit = new CoverageUnit(getGuid(), parent, getName(), location, fileContentsProvider); coverageUnit.setNamespace(namespace); coverageUnit.setNotes(notes); coverageUnit.setOrderNumber(orderNumber); @@ -343,8 +295,8 @@ public class CoverageUnit implements ICoverage, ICoverageUnitProvider, ICoverage if (includeItems) { for (CoverageItem coverageItem : coverageItems) { CoverageItem newCoverageItem = - new CoverageItem(coverageUnit, coverageItem.toXml(), CoverageOptionManagerDefault.instance(), - coverageItem.getTestUnitProvider()); + CoverageItem.createCoverageItem(coverageUnit, coverageItem.toXml(), + CoverageOptionManagerDefault.instance(), coverageItem.getTestUnitProvider()); newCoverageItem.setTestUnitProvider(coverageItem.getTestUnitProvider()); coverageUnit.addCoverageItem(newCoverageItem); } diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/MessageCoverageItem.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/MessageCoverageItem.java index 5dc7152525a..00c97bffcfa 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/MessageCoverageItem.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/model/MessageCoverageItem.java @@ -12,6 +12,7 @@ package org.eclipse.osee.coverage.model; import java.util.Collection; import java.util.Collections; +import org.eclipse.osee.framework.core.data.NamedIdentity; import org.eclipse.osee.framework.ui.plugin.util.Result; import org.eclipse.osee.framework.ui.skynet.FrameworkImage; import org.eclipse.osee.framework.ui.swt.KeyedImage; @@ -19,17 +20,10 @@ import org.eclipse.osee.framework.ui.swt.KeyedImage; /** * @author Donald G. Dunne */ -public class MessageCoverageItem implements ICoverage { - - private final String message; +public class MessageCoverageItem extends NamedIdentity implements ICoverage { public MessageCoverageItem(String message) { - this.message = message; - } - - @Override - public String getName() { - return message; + super(null, message); } @Override @@ -63,11 +57,6 @@ public class MessageCoverageItem implements ICoverage { } @Override - public String getGuid() { - return null; - } - - @Override public String getLocation() { return null; } @@ -116,5 +105,4 @@ public class MessageCoverageItem implements ICoverage { public String getOrderNumber() { return ""; } - -} +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/DoesNotWorkItemCoverage.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/DoesNotWorkItemCoverage.java index d99fd86d568..3111f97bbf5 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/DoesNotWorkItemCoverage.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/DoesNotWorkItemCoverage.java @@ -106,7 +106,8 @@ public class DoesNotWorkItemCoverage extends XNavigateItemAction { totalCoverageItems++; String xml = (String) attr.getValue(); CoverageItem coverageItem = - new CoverageItem(null, xml, CoverageOptionManagerDefault.instance(), new SimpleTestUnitProvider()); + CoverageItem.createCoverageItem(null, xml, CoverageOptionManagerDefault.instance(), + new SimpleTestUnitProvider()); allTestUnitNames.addAll(coverageItem.getTestUnits()); if (coverageItem.getTestUnits().size() > 0) { fixCount++; @@ -152,7 +153,8 @@ public class DoesNotWorkItemCoverage extends XNavigateItemAction { String attrStr = (String) attr.getValue(); store.load(attrStr); CoverageItem item = - new CoverageItem(null, attrStr, packageStore.getCoverageOptionManager(), new SimpleTestUnitProvider()); + CoverageItem.createCoverageItem(null, attrStr, packageStore.getCoverageOptionManager(), + new SimpleTestUnitProvider()); String name = store.get("name"); if (!Strings.isValid(name)) { System.err.println(String.format("Invalid name [%s] for item [%s]", name, item)); @@ -194,7 +196,8 @@ public class DoesNotWorkItemCoverage extends XNavigateItemAction { String str = (String) attr.getValue(); store.load(str); CoverageItem item = - new CoverageItem(null, str, CoverageOptionManagerDefault.instance(), new SimpleTestUnitProvider()); + CoverageItem.createCoverageItem(null, str, CoverageOptionManagerDefault.instance(), + new SimpleTestUnitProvider()); String executeNum = store.get("executeNum"); if (!Strings.isValid(executeNum)) { diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageArtifactTypes.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageArtifactTypes.java index 21829a8f90d..df3de999e94 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageArtifactTypes.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageArtifactTypes.java @@ -16,13 +16,13 @@ import org.eclipse.osee.framework.core.data.NamedIdentity; /** * @author Don Dunne */ -public class CoverageArtifactTypes extends NamedIdentity implements IArtifactType { - public static final CoverageArtifactTypes CoveragePackage = new CoverageArtifactTypes("AARFcyA9zyD3uEK8akgA", - "Coverage Package"); - public static final CoverageArtifactTypes CoverageUnit = new CoverageArtifactTypes("ALZS3MQdCCIUvEYlZeAA", - "Coverage Unit"); - public static final CoverageArtifactTypes CoverageFolder = new CoverageArtifactTypes("ALZR_AbpJTTf6QQn2iAA", - "Coverage Folder"); +public final class CoverageArtifactTypes extends NamedIdentity implements IArtifactType { + + // @formatter:off + public static final IArtifactType CoveragePackage = new CoverageArtifactTypes("AARFcyA9zyD3uEK8akgA", "Coverage Package"); + public static final IArtifactType CoverageUnit = new CoverageArtifactTypes("ALZS3MQdCCIUvEYlZeAA", "Coverage Unit"); + public static final IArtifactType CoverageFolder = new CoverageArtifactTypes("ALZR_AbpJTTf6QQn2iAA", "Coverage Folder"); + // @formatter:on private CoverageArtifactTypes(String guid, String name) { super(guid, name); diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageAttributeTypes.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageAttributeTypes.java index 0dca657f878..68968b1fed4 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageAttributeTypes.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageAttributeTypes.java @@ -18,15 +18,15 @@ import org.eclipse.osee.framework.core.data.NamedIdentity; */ public class CoverageAttributeTypes extends NamedIdentity implements IAttributeType { // @formatter:off - public static final CoverageAttributeTypes Assignees = new CoverageAttributeTypes("AARCA+XjSyKjnh3sweQA", "coverage.Assignees"); - public static final CoverageAttributeTypes Item = new CoverageAttributeTypes("AARr8BmsQHKLOHNzOcQA", "coverage.Coverage Item"); - public static final CoverageAttributeTypes Options = new CoverageAttributeTypes("AAF+8+sqyELZ2mdVV_AA", "coverage.Coverage Options"); - public static final CoverageAttributeTypes FileContents = new CoverageAttributeTypes("AARDJK8YAT3SDnghjQgA", "coverage.File Contents"); - public static final CoverageAttributeTypes Location = new CoverageAttributeTypes("AARA2XwhNRddgQrd0iwA", "coverage.Location"); - public static final CoverageAttributeTypes Namespace = new CoverageAttributeTypes("AAQ_v6uUrh0j39+4D5gA", "coverage.Namespace"); - public static final CoverageAttributeTypes Notes = new CoverageAttributeTypes("AARERmIjazD1udUwfLgA", "coverage.Notes"); - public static final CoverageAttributeTypes Order = new CoverageAttributeTypes("AD72opMBR1pFxB0hVpQA", "coverage.Order"); - // @formatter:on + public static final IAttributeType Assignees = new CoverageAttributeTypes("AARCA+XjSyKjnh3sweQA", "coverage.Assignees"); + public static final IAttributeType Item = new CoverageAttributeTypes("AARr8BmsQHKLOHNzOcQA", "coverage.Coverage Item"); + public static final IAttributeType Options = new CoverageAttributeTypes("AAF+8+sqyELZ2mdVV_AA", "coverage.Coverage Options"); + public static final IAttributeType FileContents = new CoverageAttributeTypes("AARDJK8YAT3SDnghjQgA", "coverage.File Contents"); + public static final IAttributeType Location = new CoverageAttributeTypes("AARA2XwhNRddgQrd0iwA", "coverage.Location"); + public static final IAttributeType Namespace = new CoverageAttributeTypes("AAQ_v6uUrh0j39+4D5gA", "coverage.Namespace"); + public static final IAttributeType Notes = new CoverageAttributeTypes("AARERmIjazD1udUwfLgA", "coverage.Notes"); + public static final IAttributeType Order = new CoverageAttributeTypes("AD72opMBR1pFxB0hVpQA", "coverage.Order"); + // @formatter:on private CoverageAttributeTypes(String guid, String name) { super(guid, name); diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/ICoverageStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/ICoverageStore.java index e3ba725efe1..9fee1a55284 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/ICoverageStore.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/ICoverageStore.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.osee.coverage.store; -import org.eclipse.osee.coverage.model.CoverageOptionManager; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.ui.plugin.util.Result; @@ -18,11 +17,7 @@ import org.eclipse.osee.framework.ui.plugin.util.Result; * @author Donald G. Dunne */ public interface ICoverageStore { - - public abstract void load(CoverageOptionManager coverageOptionManager) throws OseeCoreException; - public abstract Result save() throws OseeCoreException; public void delete(boolean purge) throws OseeCoreException; - -} +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java index 702b56b3a44..60b7cadf56b 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoveragePackageStore.java @@ -53,7 +53,7 @@ public class OseeCoveragePackageStore extends OseeCoverageStore implements ISave super(null, CoverageArtifactTypes.CoveragePackage, artifact.getBranch()); this.artifact = artifact; coverageOptionManager = new CoverageOptionManagerStore(this).getCoverageOptionManager(); - this.coveragePackage = new CoveragePackage(artifact.getName(), coverageOptionManager); + this.coveragePackage = new CoveragePackage(artifact.getGuid(), artifact.getName(), coverageOptionManager); load(coverageOptionManager); } @@ -75,13 +75,9 @@ public class OseeCoveragePackageStore extends OseeCoverageStore implements ISave return packageStore.getCoveragePackage(); } - @Override - public void load(CoverageOptionManager coverageOptionManager) throws OseeCoreException { + private void load(CoverageOptionManager coverageOptionManager) throws OseeCoreException { coveragePackage.clearCoverageUnits(); - getArtifact(false); if (artifact != null) { - coveragePackage.setGuid(artifact.getGuid()); - coveragePackage.setName(artifact.getName()); coveragePackage.setEditable(artifact.getSoleAttributeValue(CoreAttributeTypes.Active, true)); for (Artifact childArt : artifact.getChildren()) { if (childArt.isOfType(CoverageArtifactTypes.CoverageUnit, CoverageArtifactTypes.CoverageFolder)) { diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageStore.java index 19e79992f71..36c7eb7b557 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageStore.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageStore.java @@ -12,7 +12,6 @@ package org.eclipse.osee.coverage.store; import java.util.logging.Level; import org.eclipse.osee.coverage.internal.Activator; -import org.eclipse.osee.coverage.model.CoverageOptionManager; import org.eclipse.osee.coverage.model.ICoverage; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -59,9 +58,6 @@ public abstract class OseeCoverageStore extends CoverageStore { public abstract void delete(SkynetTransaction transaction, boolean purge) throws OseeCoreException; @Override - public abstract void load(CoverageOptionManager coverageOptionManager) throws OseeCoreException; - - @Override public Result save() { try { SkynetTransaction transaction = new SkynetTransaction(branch, "Coverage Save"); diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java index 8d317f747e6..e191c7660fe 100644 --- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java +++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/OseeCoverageUnitStore.java @@ -40,7 +40,8 @@ public class OseeCoverageUnitStore extends OseeCoverageStore { super(null, artifact.getArtifactType(), artifact.getBranch()); this.artifact = artifact; this.coverageUnit = - new CoverageUnit(parent, artifact.getName(), "", OseeCoverageUnitFileContentsProvider.getInstance(branch)); + new CoverageUnit(artifact.getGuid(), parent, artifact.getName(), "", + OseeCoverageUnitFileContentsProvider.getInstance(branch)); load(coverageOptionManager); } @@ -73,17 +74,14 @@ public class OseeCoverageUnitStore extends OseeCoverageStore { } } - @Override public void load(CoverageOptionManager coverageOptionManager) throws OseeCoreException { coverageUnit.clearCoverageUnits(); coverageUnit.clearCoverageItems(); - Artifact artifact = getArtifact(false); if (artifact != null) { - coverageUnit.setName(artifact.getName()); - coverageUnit.setGuid(artifact.getGuid()); for (String value : artifact.getAttributesToStringList(CoverageAttributeTypes.Item)) { CoverageItem item = - new CoverageItem(coverageUnit, value, coverageOptionManager, DbTestUnitProvider.instance()); + CoverageItem.createCoverageItem(coverageUnit, value, coverageOptionManager, + DbTestUnitProvider.instance()); coverageUnit.addCoverageItem(item); } // Don't load file contents until needed diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java index ec567701717..51fdf51b86b 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java @@ -92,7 +92,7 @@ public class RequirementsTestReport extends AbstractBlam { } private String getReqCellOutput(Artifact req) throws OseeCoreException { - String paragraphNumber = req.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber.getName(), ""); + String paragraphNumber = req.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, ""); String reqName = req.getName(); String returnValue = paragraphNumber + SPACE + reqName; return returnValue; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java index ab353cc0eec..33d681db73b 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java @@ -28,6 +28,7 @@ import org.eclipse.osee.define.traceability.data.TestUnitData; import org.eclipse.osee.define.traceability.data.TraceMark; import org.eclipse.osee.define.traceability.data.TraceUnit; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.enums.IRelationEnumeration; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -136,7 +137,8 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { Artifact traceUnitArtifact = getArtifactFromCache(monitor, traceUnitType, traceUnit.getName()); if (traceUnitArtifact == null) { traceUnitArtifact = - ArtifactTypeManager.addArtifact(traceUnit.getTraceUnitType(), transaction.getBranch(), traceUnit.getName()); + ArtifactTypeManager.addArtifact(ArtifactTypeManager.getType(traceUnit.getTraceUnitType()), + transaction.getBranch(), traceUnit.getName()); artifactWasCreated = true; } @@ -235,7 +237,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private static void createGuidLink(Artifact testCase, Artifact testRun) throws OseeCoreException { if (testCase != null) { - testRun.setSoleAttributeValue("Test Script GUID", testCase.getGuid()); + testRun.setSoleAttributeValue(CoreAttributeTypes.TestScriptGuid, testCase.getGuid()); } } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java index b332d958936..5b8d4b884ea 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java @@ -73,7 +73,7 @@ public final class OseeDslRenderer extends FileSystemRenderer { @Override public int getApplicabilityRating(PresentationType presentationType, Artifact artifact) { if (presentationType != GENERALIZED_EDIT && !artifact.isHistorical()) { - if (artifact.isOfType(CoreArtifactTypes.ACCESS_CONTROL_MODEL)) { + if (artifact.isOfType(CoreArtifactTypes.AccessControlModel)) { return SUBTYPE_TYPE_MATCH; } } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java index 37563e84826..dfeebab9589 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java @@ -16,14 +16,10 @@ import org.eclipse.osee.framework.core.data.IArtifactType; * @author Donald G. Dunne */ public class DefaultBasicGuidArtifact implements IBasicGuidArtifact { - private static final long serialVersionUID = -4997763989583925345L; - private String branchGuid; + private final String branchGuid; private String artTypeGuid; - private String artGuid; - - public DefaultBasicGuidArtifact() { - } + private final String artGuid; public DefaultBasicGuidArtifact(String branchGuid, String artTypeGuid, String guid) { this.branchGuid = branchGuid; @@ -89,18 +85,10 @@ public class DefaultBasicGuidArtifact implements IBasicGuidArtifact { return artGuid; } - public void setBranchGuid(String branchGuid) { - this.branchGuid = branchGuid; - } - public void setArtTypeGuid(String artTypeGuid) { this.artTypeGuid = artTypeGuid; } - public void setGuid(String guid) { - this.artGuid = guid; - } - public boolean is(IArtifactType... artifactTypes) { for (IArtifactType artifactType : artifactTypes) { if (artifactType.getGuid().equals(getArtTypeGuid())) { @@ -109,5 +97,4 @@ public class DefaultBasicGuidArtifact implements IBasicGuidArtifact { } return false; } - }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java index 68bfde7931d..fdaf7048260 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java @@ -10,15 +10,13 @@ *******************************************************************************/ package org.eclipse.osee.framework.core.model.event; -import org.eclipse.osee.framework.core.data.Identity; - /** * @author Donald G. Dunne */ -public interface IBasicGuidArtifact extends Identity { - - String getArtTypeGuid(); +public interface IBasicGuidArtifact { + public abstract String getGuid(); - String getBranchGuid(); + public abstract String getArtTypeGuid(); -} + public abstract String getBranchGuid(); +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/Identity.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/Identity.java index faad64f3c1b..97e83bf360a 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/Identity.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/Identity.java @@ -16,4 +16,6 @@ package org.eclipse.osee.framework.core.data; */ public interface Identity { public abstract String getGuid(); + + public abstract boolean matches(Identity... identities); } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/NamedIdentity.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/NamedIdentity.java index 87d66e129bd..e569f2867da 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/NamedIdentity.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/NamedIdentity.java @@ -11,20 +11,31 @@ package org.eclipse.osee.framework.core.data; +import org.eclipse.osee.framework.core.exception.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.util.GUID; + /** * @author Ryan D. Brooks */ public class NamedIdentity implements Identity, FullyNamed, HasDescription { private final String guid; - private final String name; + private String name; private final String description; + public NamedIdentity(String name) { + this(null, name); + } + public NamedIdentity(String guid, String name) { this(guid, name, ""); } public NamedIdentity(String guid, String name, String description) { - this.guid = guid; + if (guid == null) { + this.guid = GUID.create(); + } else { + this.guid = guid; + } this.name = name; this.description = description; } @@ -66,4 +77,18 @@ public class NamedIdentity implements Identity, FullyNamed, HasDescription { public String getDescription() { return description; } + + @Override + public boolean matches(Identity... identities) { + for (Identity identity : identities) { + if (equals(identity)) { + return true; + } + } + return false; + } + + public void setName(String name) throws OseeCoreException { + this.name = name; + } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java index db8c813dbe0..3df5ac716fa 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java @@ -16,91 +16,59 @@ import org.eclipse.osee.framework.core.data.NamedIdentity; /** * @author Ryan D. Brooks */ -public class CoreArtifactTypes extends NamedIdentity implements IArtifactType { - public static final CoreArtifactTypes AbstractAccessControlled = new CoreArtifactTypes("AAFVUREVAxmEmLW2KkAA", - "Abstract Access Controlled"); - public static final CoreArtifactTypes AbstractSoftwareRequirement = new CoreArtifactTypes("ABNAYPwV6H4EkjQ3+QQA", - "Abstract Software Requirement"); - public static final CoreArtifactTypes AbstractTestResult = new CoreArtifactTypes("ATkaanWmHH3PkhGNVjwA", - "Abstract Test Result"); - public static final CoreArtifactTypes AbstractTestUnit = new CoreArtifactTypes("AISIbSI6wzEUfPdCQaAA", - "Abstract Test Unit"); - public static final CoreArtifactTypes ACCESS_CONTROL_MODEL = new CoreArtifactTypes("CJr1bPfZQkbiuTA4FewA", - "Access Control Model"); - public static final CoreArtifactTypes Artifact = new CoreArtifactTypes("AAMFDh6S7gRLupAMwywA", "Artifact"); - public static final CoreArtifactTypes CodeUnit = new CoreArtifactTypes("AAMFDkEh216dzK1mTZgA", "Code Unit"); - public static final CoreArtifactTypes Component = new CoreArtifactTypes("AAMFDkG6omAsD6dXPYgA", "Component"); - public static final CoreArtifactTypes Folder = new CoreArtifactTypes("AAMFDg_wmiYHHY5swJwA", "Folder"); - public static final CoreArtifactTypes GeneralData = new CoreArtifactTypes("AAMFDhQXfyb2m+jCwlwA", "General Data"); - public static final CoreArtifactTypes GeneralDocument = new CoreArtifactTypes("AAMFDhCjkTvP+VBpBCQA", - "General Document"); - public static final CoreArtifactTypes GlobalPreferences = new CoreArtifactTypes("AAMFDho2kBqyoOZEw+gA", - "Global Preferences"); - public static final CoreArtifactTypes Heading = new CoreArtifactTypes("AAMFDhEzni8FpFb5yHwA", "Heading"); - public static final CoreArtifactTypes HardwareRequirement = new CoreArtifactTypes("AAMFDh8dhUflUdK9FdgA", - "Hardware Requirement"); - public static final CoreArtifactTypes IndirectSoftwareRequirement = new CoreArtifactTypes("AAMFDiC7HRQMqr5S0QwA", - "Indirect Software Requirement"); - public static final CoreArtifactTypes RendererTemplate = new CoreArtifactTypes("AAMFDhvZnHKgSeFKMXgA", - "Renderer Template"); - public static final CoreArtifactTypes Requirement = new CoreArtifactTypes("ABM_vxEEowY+8i2_q9gA", "Requirement"); - public static final CoreArtifactTypes RootArtifact = new CoreArtifactTypes("AAMFDhHDqlbzKcIxcsAA", "Root Artifact"); - public static final CoreArtifactTypes SoftwareRequirement = new CoreArtifactTypes("AAMFDiAwhRFXwIyapJAA", - "Software Requirement"); - public static final CoreArtifactTypes SystemRequirement = new CoreArtifactTypes("AAMFDiSTcDGdUd9+tHAA", - "System Requirement"); - public static final CoreArtifactTypes SoftwareRequirementDrawing = new CoreArtifactTypes("ABNClhgUfwj6A3EAArQA", - "Software Requirement Drawing"); - public static final CoreArtifactTypes SoftwareRequirementFunction = new CoreArtifactTypes("ABNBwZMdFgEDTVQ7pTAA", - "Software Requirement Function"); - public static final CoreArtifactTypes SoftwareRequirementProcedure = new CoreArtifactTypes("ABNBLPY4LnIKtcON0mgA", - "Software Requirement Procedure"); - public static final CoreArtifactTypes DirectSoftwareRequirement = new CoreArtifactTypes("BtMwyalHkHkrRo7D0aAA", - "Direct Software Requirement"); - public static final CoreArtifactTypes SubsystemRequirement = new CoreArtifactTypes("AAMFDiN9KiAkhuLqOhQA", - "Subsystem Requirement"); - public static final CoreArtifactTypes SubsystemDesign = new CoreArtifactTypes("AAMFDiHVwBo+Yx73BoQA", - "Subsystem Design"); - public static final CoreArtifactTypes SystemFunction = new CoreArtifactTypes("AAMFDjisx2s6BUTDo3wA", - "System Function"); - public static final CoreArtifactTypes TestCase = new CoreArtifactTypes("AAMFDikEi0TGK27TKPgA", "Test Case"); - public static final CoreArtifactTypes TestInformationSheet = new CoreArtifactTypes("AAMFDjnM3wQxCjwatKAA", - "Test Information Sheet"); - public static final CoreArtifactTypes TestPlanElement = new CoreArtifactTypes("ATi_kUpvPBiW2upYC_wA", - "Test Plan Element"); - public static final CoreArtifactTypes TestProcedure = - new CoreArtifactTypes("AAMFDjsjiGhoWpqM4PQA", "Test Procedure"); - public static final CoreArtifactTypes TestProcedureNative = new CoreArtifactTypes("AAMFDiWs_HdDJTbPPQgA", - "Test Procedure Native"); - public static final CoreArtifactTypes TestProcedureWML = new CoreArtifactTypes("AAMFDiUeCG3KWx5XqeQA", - "Test Procedure WML"); - public static final CoreArtifactTypes TestProcedureXL = new CoreArtifactTypes("AAn_QG1xVGGhvAzxVMQA", - "Test Procedure XL"); - public static final CoreArtifactTypes TestResultNative = new CoreArtifactTypes("ATkaanWmHH3PkhGNVjwA", - "Test Result Native"); - public static final CoreArtifactTypes TestResultWML = new CoreArtifactTypes("ATk6NKFFmD_zg1b_eaQA", - "Test Result WML"); - public static final CoreArtifactTypes TestRun = new CoreArtifactTypes("AAMFDjqDHWo+orlSpaQA", "Test Run"); - public static final CoreArtifactTypes TestRunDisposition = new CoreArtifactTypes("AAMFDjeNxhi0KmXZcKQA", - "Test Run Disposition"); - public static final CoreArtifactTypes TestSupport = new CoreArtifactTypes("AAMFDj+FW0f_Ut72ocQA", "Test Support"); - public static final CoreArtifactTypes TestUnit = new CoreArtifactTypes("ABM2d6uxUw66aSdo0LwA", "Test Unit"); - public static final CoreArtifactTypes UniversalGroup = new CoreArtifactTypes("AAMFDhLY2TnADPA_EQQA", - "Universal Group"); - public static final CoreArtifactTypes User = new CoreArtifactTypes("AAMFDhmr+Dqqe5pn3kAA", "User"); - public static final CoreArtifactTypes UserGroup = new CoreArtifactTypes("AAMFDhrEbXqZKPfWkwAA", "User Group"); - public static final CoreArtifactTypes WorkItemDefinition = new CoreArtifactTypes("ABNM6pIn_x_3e6a3aIgA", - "Work Item Definition"); - public static final CoreArtifactTypes WorkFlowDefinition = new CoreArtifactTypes("AAMFDh16eQ1GIHPWlYQA", - "Work Flow Definition"); - public static final CoreArtifactTypes WorkPageDefinition = new CoreArtifactTypes("AAMFDhzuyizN4qu7tXgA", - "Work Page Definition"); - public static final CoreArtifactTypes WorkRuleDefinition = new CoreArtifactTypes("AAMFDhxjHC2RUV2RkcQA", - "Work Rule Definition"); - public static final CoreArtifactTypes WorkWidgetDefinition = new CoreArtifactTypes("AAMFDh4IVzqPgVTpLrwA", - "Work Widget Definition"); - public static final CoreArtifactTypes XViewerGlobalCustomization = new CoreArtifactTypes("AAMFDhtN7T4of30iYhAA", - "XViewer Global Customization"); +public final class CoreArtifactTypes extends NamedIdentity implements IArtifactType { + + // @formatter:off + public static final IArtifactType AccessControlModel = new CoreArtifactTypes("CJr1bPfZQkbiuTA4FewA", "Access Control Model"); + public static final IArtifactType AbstractAccessControlled = new CoreArtifactTypes("AAFVUREVAxmEmLW2KkAA", "Abstract Access Controlled"); + public static final IArtifactType AbstractSoftwareRequirement = new CoreArtifactTypes("ABNAYPwV6H4EkjQ3+QQA", "Abstract Software Requirement"); + public static final IArtifactType AbstractTestResult = new CoreArtifactTypes("ATkaanWmHH3PkhGNVjwA", "Abstract Test Result"); + public static final IArtifactType AbstractTestUnit = new CoreArtifactTypes("AISIbSI6wzEUfPdCQaAA", "Abstract Test Unit"); + public static final IArtifactType Artifact = new CoreArtifactTypes("AAMFDh6S7gRLupAMwywA", "Artifact"); + public static final IArtifactType CodeUnit = new CoreArtifactTypes("AAMFDkEh216dzK1mTZgA", "Code Unit"); + public static final IArtifactType Component = new CoreArtifactTypes("AAMFDkG6omAsD6dXPYgA", "Component"); + public static final IArtifactType DirectSoftwareRequirement = new CoreArtifactTypes("BtMwyalHkHkrRo7D0aAA", "Direct Software Requirement"); + public static final IArtifactType Folder = new CoreArtifactTypes("AAMFDg_wmiYHHY5swJwA", "Folder"); + public static final IArtifactType GeneralData = new CoreArtifactTypes("AAMFDhQXfyb2m+jCwlwA", "General Data"); + public static final IArtifactType GeneralDocument = new CoreArtifactTypes("AAMFDhCjkTvP+VBpBCQA", "General Document"); + public static final IArtifactType GlobalPreferences = new CoreArtifactTypes("AAMFDho2kBqyoOZEw+gA", "Global Preferences"); + public static final IArtifactType HardwareRequirement = new CoreArtifactTypes("AAMFDh8dhUflUdK9FdgA", "Hardware Requirement"); + public static final IArtifactType Heading = new CoreArtifactTypes("AAMFDhEzni8FpFb5yHwA", "Heading"); + public static final IArtifactType IndirectSoftwareRequirement = new CoreArtifactTypes("AAMFDiC7HRQMqr5S0QwA", "Indirect Software Requirement"); + public static final IArtifactType RendererTemplate = new CoreArtifactTypes("AAMFDhvZnHKgSeFKMXgA", "Renderer Template"); + public static final IArtifactType Requirement = new CoreArtifactTypes("ABM_vxEEowY+8i2_q9gA", "Requirement"); + public static final IArtifactType RootArtifact = new CoreArtifactTypes("AAMFDhHDqlbzKcIxcsAA", "Root Artifact"); + public static final IArtifactType SoftwareRequirement = new CoreArtifactTypes("AAMFDiAwhRFXwIyapJAA", "Software Requirement"); + public static final IArtifactType SoftwareRequirementDrawing = new CoreArtifactTypes("ABNClhgUfwj6A3EAArQA", "Software Requirement Drawing"); + public static final IArtifactType SoftwareRequirementFunction = new CoreArtifactTypes("ABNBwZMdFgEDTVQ7pTAA", "Software Requirement Function"); + public static final IArtifactType SoftwareRequirementProcedure = new CoreArtifactTypes("ABNBLPY4LnIKtcON0mgA", "Software Requirement Procedure"); + public static final IArtifactType SubsystemDesign = new CoreArtifactTypes("AAMFDiHVwBo+Yx73BoQA", "Subsystem Design"); + public static final IArtifactType SubsystemRequirement = new CoreArtifactTypes("AAMFDiN9KiAkhuLqOhQA", "Subsystem Requirement"); + public static final IArtifactType SystemFunction = new CoreArtifactTypes("AAMFDjisx2s6BUTDo3wA", "System Function"); + public static final IArtifactType SystemRequirement = new CoreArtifactTypes("AAMFDiSTcDGdUd9+tHAA", "System Requirement"); + public static final IArtifactType TestCase = new CoreArtifactTypes("AAMFDikEi0TGK27TKPgA", "Test Case"); + public static final IArtifactType TestInformationSheet = new CoreArtifactTypes("AAMFDjnM3wQxCjwatKAA", "Test Information Sheet"); + public static final IArtifactType TestPlanElement = new CoreArtifactTypes("ATi_kUpvPBiW2upYC_wA", "Test Plan Element"); + public static final IArtifactType TestProcedure = new CoreArtifactTypes("AAMFDjsjiGhoWpqM4PQA", "Test Procedure"); + public static final IArtifactType TestProcedureNative = new CoreArtifactTypes("AAMFDiWs_HdDJTbPPQgA", "Test Procedure Native"); + public static final IArtifactType TestProcedureWML = new CoreArtifactTypes("AAMFDiUeCG3KWx5XqeQA", "Test Procedure WML"); + public static final IArtifactType TestProcedureXL = new CoreArtifactTypes("AAn_QG1xVGGhvAzxVMQA", "Test Procedure XL"); + public static final IArtifactType TestResultNative = new CoreArtifactTypes("ATkaanWmHH3PkhGNVjwA", "Test Result Native"); + public static final IArtifactType TestResultWML = new CoreArtifactTypes("ATk6NKFFmD_zg1b_eaQA", "Test Result WML"); + public static final IArtifactType TestRun = new CoreArtifactTypes("AAMFDjqDHWo+orlSpaQA", "Test Run"); + public static final IArtifactType TestRunDisposition = new CoreArtifactTypes("AAMFDjeNxhi0KmXZcKQA", "Test Run Disposition"); + public static final IArtifactType TestSupport = new CoreArtifactTypes("AAMFDj+FW0f_Ut72ocQA", "Test Support"); + public static final IArtifactType TestUnit = new CoreArtifactTypes("ABM2d6uxUw66aSdo0LwA", "Test Unit"); + public static final IArtifactType UniversalGroup = new CoreArtifactTypes("AAMFDhLY2TnADPA_EQQA", "Universal Group"); + public static final IArtifactType User = new CoreArtifactTypes("AAMFDhmr+Dqqe5pn3kAA", "User"); + public static final IArtifactType UserGroup = new CoreArtifactTypes("AAMFDhrEbXqZKPfWkwAA", "User Group"); + public static final IArtifactType WorkFlowDefinition = new CoreArtifactTypes("AAMFDh16eQ1GIHPWlYQA", "Work Flow Definition"); + public static final IArtifactType WorkItemDefinition = new CoreArtifactTypes("ABNM6pIn_x_3e6a3aIgA", "Work Item Definition"); + public static final IArtifactType WorkPageDefinition = new CoreArtifactTypes("AAMFDhzuyizN4qu7tXgA", "Work Page Definition"); + public static final IArtifactType WorkRuleDefinition = new CoreArtifactTypes("AAMFDhxjHC2RUV2RkcQA", "Work Rule Definition"); + public static final IArtifactType WorkWidgetDefinition = new CoreArtifactTypes("AAMFDh4IVzqPgVTpLrwA", "Work Widget Definition"); + public static final IArtifactType XViewerGlobalCustomization = new CoreArtifactTypes("AAMFDhtN7T4of30iYhAA", "XViewer Global Customization"); + // @formatter:on private CoreArtifactTypes(String guid, String name) { super(guid, name); diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java index 1739b3005c0..a0ff7dd3101 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java @@ -16,87 +16,88 @@ import org.eclipse.osee.framework.core.data.NamedIdentity; /** * @author Roberto E. Escobar */ -public class CoreAttributeTypes extends NamedIdentity implements IAttributeType { +public final class CoreAttributeTypes extends NamedIdentity implements IAttributeType { // @formatter:off - public static final CoreAttributeTypes AFHA = new CoreAttributeTypes("AAMFEQGsxihCZXcrWtQA", "AFHA"); - public static final CoreAttributeTypes AccessContextId = new CoreAttributeTypes("AAFAgR3B7AN_g0NPCLAA", "Access Context Id"); - public static final CoreAttributeTypes Active = new CoreAttributeTypes("AAMFEbImQyR38BY8A5QA", "Active"); - public static final CoreAttributeTypes Annotation = new CoreAttributeTypes("AAMFEcWy0xc4e3tcemQA", "Annotation"); - public static final CoreAttributeTypes Category = new CoreAttributeTypes("AAMFEVfcEjwtly9djdgA", "Category"); - public static final CoreAttributeTypes City = new CoreAttributeTypes("AAMFEbkRZE1lIUmm_0AA", "City"); - public static final CoreAttributeTypes CommonNalRequirement = new CoreAttributeTypes("AAMFEQpKOwh5p+AgC8wA", "Common NAL Requirement"); - public static final CoreAttributeTypes Company = new CoreAttributeTypes("AAMFEbgTIG1iJuHoe6wA", "Company"); - public static final CoreAttributeTypes CompanyTitle = new CoreAttributeTypes("AAMFEbiRtwq7hoavdXwA", "Company Title"); - public static final CoreAttributeTypes Component = new CoreAttributeTypes("AAMFEVjkKR2EMfwWk4AA", "Component"); - public static final CoreAttributeTypes ContentUrl = new CoreAttributeTypes("AAMFEcIP+U+ML_gzH7AA", "Content URL"); - public static final CoreAttributeTypes Country = new CoreAttributeTypes("AAMFEbsk1xGUlmXk8zgA", "Country"); - public static final CoreAttributeTypes CrewInterfaceRequirement = new CoreAttributeTypes("AAMFEQrZMEwBcq2pQTgA", "Crew Interface Requirement"); - public static final CoreAttributeTypes Csci = new CoreAttributeTypes("AAMFEXPEnnkY_07EbRgA", "CSCI"); - public static final CoreAttributeTypes DefaultMailServer = new CoreAttributeTypes("ABMuIC3FejpGilonfAgA", "osee.config.Default Mail Server"); - public static final CoreAttributeTypes Description = new CoreAttributeTypes("AAMFEcK+kyOhG8GYvPgA", "Description"); - public static final CoreAttributeTypes DevelopmentAssuranceLevel = new CoreAttributeTypes("AAMFEVdW8Bdjtx4GvfwA", "Development Assurance Level"); - public static final CoreAttributeTypes Developmental = new CoreAttributeTypes("AAMFEP8lp3EupVzVp5QA", "Developmental"); - public static final CoreAttributeTypes Dictionary = new CoreAttributeTypes("AAMFEbcV9BXFKOqkVIwA", "Dictionary"); - public static final CoreAttributeTypes Effectivity = new CoreAttributeTypes("B1fqGH5hxBMylPX9VEQA", "Effectivity"); - public static final CoreAttributeTypes Email = new CoreAttributeTypes("AAMFEbaZjEVoecDFCCQA", "Email"); - public static final CoreAttributeTypes Extension = new CoreAttributeTypes("AAMFEcUbJEERZTnwJzAA", "Extension"); - public static final CoreAttributeTypes FTAResults = new CoreAttributeTypes("AAMFEQPomlhpBRRUceQA", "FTA Results"); - public static final CoreAttributeTypes FavoriteBranch = new CoreAttributeTypes("AAMFEbMnzS7P92knZKAA", "Favorite Branch"); - public static final CoreAttributeTypes FaxPhone = new CoreAttributeTypes("AAMFEbYdJAmEGg0TFhAA", "Fax Phone"); - public static final CoreAttributeTypes GeneralStringData = new CoreAttributeTypes("AAMFEca+MB5ssx+Ax5wA", "General String Data"); - public static final CoreAttributeTypes GfeCfe = new CoreAttributeTypes("AAMFEQR0SW+7bERFvXQA", "GFE / CFE"); - public static final CoreAttributeTypes Hazard = new CoreAttributeTypes("AAMFEQEe6XK8hGjJNxgA", "Hazard"); - public static final CoreAttributeTypes HazardSeverity = new CoreAttributeTypes("AAMFEQLLyEqgnjt85bwA", "Hazard Severity"); - public static final CoreAttributeTypes LegacyId = new CoreAttributeTypes("AAMFEQ5rrGxHTSvY73gA", "Legacy Id"); - public static final CoreAttributeTypes MobilePhone = new CoreAttributeTypes("AAMFEbWi7AIC1z82PxQA", "Mobile Phone"); - public static final CoreAttributeTypes Name = new CoreAttributeTypes("AAMFEcF1AzV7PKuHmxwA", "Name"); - public static final CoreAttributeTypes NativeContent = new CoreAttributeTypes("AAMFEcdBJGBK9nr9TTQA", "Native Content"); - public static final CoreAttributeTypes Notes = new CoreAttributeTypes("AAMFEbulnFZFQCiyvpAA", "Notes"); - public static final CoreAttributeTypes PageType = new CoreAttributeTypes("AAMFEcNiRF2N5xhkYyAA", "Page Type"); - public static final CoreAttributeTypes ParagraphNumber = new CoreAttributeTypes("AAMFEQ3boD3sp6VfArAA", "Imported Paragraph Number"); - public static final CoreAttributeTypes Partition = new CoreAttributeTypes("AAMFERHj9w6pmoLBCaQA", "Partition"); - public static final CoreAttributeTypes Phone = new CoreAttributeTypes("AAMFEbUkVSwKu4LSpWAA", "Phone"); - public static final CoreAttributeTypes PublishInline = new CoreAttributeTypes("ADpktgUh1xxE38Ht66QA", "PublishInline"); - public static final CoreAttributeTypes QualificationMethod = new CoreAttributeTypes("AAMFERMRKHkM9k_Rg2QA", "Qualification Method"); - public static final CoreAttributeTypes RelationOrder = new CoreAttributeTypes("ABM5kHa9cFsTbI_ooyQA", "Relation Order"); - public static final CoreAttributeTypes ReqType = new CoreAttributeTypes("AEQ9uyqjH3NpD0eThgAA", "Req Type"); - public static final CoreAttributeTypes SFHA = new CoreAttributeTypes("AAMFEQI800ecbF8oCPwA", "SFHA"); - public static final CoreAttributeTypes SafetyCriticality = new CoreAttributeTypes("AAMFERg99R51HIz45HAA", "Safety Criticality"); - public static final CoreAttributeTypes SafetyObjective = new CoreAttributeTypes("AAMFEQNYjjVjRoKuDsAA", "Safety Objective"); - public static final CoreAttributeTypes State = new CoreAttributeTypes("AAMFEbolfGTBLHnDCRQA", "State"); - public static final CoreAttributeTypes StaticId = new CoreAttributeTypes("AAMFEcY5DUbWyuIpZVwA", "Static Id"); - public static final CoreAttributeTypes Street = new CoreAttributeTypes("AAMFEbmjn19BhPhE2cwA", "Street"); - public static final CoreAttributeTypes Subsystem = new CoreAttributeTypes("AAMFERJ1GweNukuSd8QA", "Subsystem"); - public static final CoreAttributeTypes SystemSecurityRequirement = new CoreAttributeTypes("AAMFERC8OyWTMm8tMOQA", "System Security Requirement"); - public static final CoreAttributeTypes TechnicalPerformanceParameter = new CoreAttributeTypes("AAMFEVhhNTVx42mlvlQA", "Technical Performance Parameter"); - public static final CoreAttributeTypes TemplateMatchCriteria = new CoreAttributeTypes("AAMFEbeRRENHX5KTmxwA", "Template Match Criteria"); - public static final CoreAttributeTypes TestFrequency = new CoreAttributeTypes("AS7E+gDvsymdt28Aw3gA", "Test Frequency"); - public static final CoreAttributeTypes TestProcedureStatus = new CoreAttributeTypes("AKkUuN2K1ilSHnvIMPQA", "Test Procedure Status"); - public static final CoreAttributeTypes TisTestCategory = new CoreAttributeTypes("AAMFEVbEtV4QJQvA5eQA", "TIS Test Category"); - public static final CoreAttributeTypes TisTestNumber = new CoreAttributeTypes("AAMFERjRSDDgyyBh+OAA", "TIS Test Number"); - public static final CoreAttributeTypes TisTestType = new CoreAttributeTypes("AAMFEVXVuFcy8wCED5AA", "TIS Test Type"); - public static final CoreAttributeTypes TrainingEffectivity = new CoreAttributeTypes("AAMFERFJAm0_WZ0WQaQA", "Training Effectivity"); - public static final CoreAttributeTypes UserId = new CoreAttributeTypes("AAMFEbKl8RCQr17bDAQA", "User Id"); - public static final CoreAttributeTypes UserSettings = new CoreAttributeTypes("AAMFEbOnewRpnYFgnHQA", "User Settings"); - public static final CoreAttributeTypes VerificationEvent = new CoreAttributeTypes("AAMFEXlt02WfQ0jcQtAA", "Verification Event"); - public static final CoreAttributeTypes VerificationLevel = new CoreAttributeTypes("AAMFEXRTkyKVIFqcMwQA", "Verification Level"); - public static final CoreAttributeTypes Website = new CoreAttributeTypes("AAMFEbwiBAmrHwSeMHgA", "Website"); - public static final CoreAttributeTypes WholeWordContent = new CoreAttributeTypes("AAMFEchZmAzZo2tHjVAA", "Whole Word Content"); - public static final CoreAttributeTypes WordOleData = new CoreAttributeTypes("AAMFEcP2rmoCzqmzJxQA", "Word Ole Data"); - public static final CoreAttributeTypes WordTemplateContent = new CoreAttributeTypes("AAMFEcfcGS2V3SqQN2wA", "Word Template Content"); - public static final CoreAttributeTypes WorkData = new CoreAttributeTypes("AAMFEbyhslOoQf3+hyAA", "osee.wi.Work Data"); - public static final CoreAttributeTypes WorkDescription = new CoreAttributeTypes("AAMFEb57TkhPHyzOLDwA", "osee.wi.Work Description"); - public static final CoreAttributeTypes WorkId = new CoreAttributeTypes("AAMFEb0hXw933Zrje2QA", "osee.wi.Work Id"); - public static final CoreAttributeTypes WorkPageName = new CoreAttributeTypes("AAMFEb+vCyCjKbzzHoQA", "osee.wi.Work Page Name"); - public static final CoreAttributeTypes WorkParentId = new CoreAttributeTypes("AAMFEb8R5y9WcjD5hcwA", "osee.wi.Work Parent Id"); - public static final CoreAttributeTypes WorkStartPage = new CoreAttributeTypes("AAMFEcDfggQLaAdLlpQA", "osee.wi.Start Page"); - public static final CoreAttributeTypes WorkTransition = new CoreAttributeTypes("AAMFEcBLGB5U+55hJrQA", "osee.wi.Transition"); - public static final CoreAttributeTypes WorkType = new CoreAttributeTypes("AAMFEb2f9nh42sjMHfAA", "osee.wi.Work Type"); - public static final CoreAttributeTypes WorkflowDefinition = new CoreAttributeTypes("AAMFEcSPdVbU8mGugOQA", "Workflow Definition"); - public static final CoreAttributeTypes XViewerCustomization = new CoreAttributeTypes("AAMFEbQk+hTB9fE3uNAA", "XViewer Customization"); - public static final CoreAttributeTypes XViewerDefaults = new CoreAttributeTypes("AAMFEbSjkAKRqLzkWpAA", "XViewer Defaults"); - public static final CoreAttributeTypes Zip = new CoreAttributeTypes("AAMFEbqmQUTrgrQ7rKgA", "Zip"); + public static final IAttributeType Afha = new CoreAttributeTypes("AAMFEQGsxihCZXcrWtQA", "AFHA"); + public static final IAttributeType AccessContextId = new CoreAttributeTypes("AAFAgR3B7AN_g0NPCLAA", "Access Context Id"); + public static final IAttributeType Active = new CoreAttributeTypes("AAMFEbImQyR38BY8A5QA", "Active"); + public static final IAttributeType Annotation = new CoreAttributeTypes("AAMFEcWy0xc4e3tcemQA", "Annotation"); + public static final IAttributeType Category = new CoreAttributeTypes("AAMFEVfcEjwtly9djdgA", "Category"); + public static final IAttributeType City = new CoreAttributeTypes("AAMFEbkRZE1lIUmm_0AA", "City"); + public static final IAttributeType CommonNalRequirement = new CoreAttributeTypes("AAMFEQpKOwh5p+AgC8wA", "Common NAL Requirement"); + public static final IAttributeType Company = new CoreAttributeTypes("AAMFEbgTIG1iJuHoe6wA", "Company"); + public static final IAttributeType CompanyTitle = new CoreAttributeTypes("AAMFEbiRtwq7hoavdXwA", "Company Title"); + public static final IAttributeType Component = new CoreAttributeTypes("AAMFEVjkKR2EMfwWk4AA", "Component"); + public static final IAttributeType ContentUrl = new CoreAttributeTypes("AAMFEcIP+U+ML_gzH7AA", "Content URL"); + public static final IAttributeType Country = new CoreAttributeTypes("AAMFEbsk1xGUlmXk8zgA", "Country"); + public static final IAttributeType CrewInterfaceRequirement = new CoreAttributeTypes("AAMFEQrZMEwBcq2pQTgA", "Crew Interface Requirement"); + public static final IAttributeType Csci = new CoreAttributeTypes("AAMFEXPEnnkY_07EbRgA", "CSCI"); + public static final IAttributeType DefaultMailServer = new CoreAttributeTypes("ABMuIC3FejpGilonfAgA", "osee.config.Default Mail Server"); + public static final IAttributeType Description = new CoreAttributeTypes("AAMFEcK+kyOhG8GYvPgA", "Description"); + public static final IAttributeType DevelopmentAssuranceLevel = new CoreAttributeTypes("AAMFEVdW8Bdjtx4GvfwA", "Development Assurance Level"); + public static final IAttributeType Developmental = new CoreAttributeTypes("AAMFEP8lp3EupVzVp5QA", "Developmental"); + public static final IAttributeType Dictionary = new CoreAttributeTypes("AAMFEbcV9BXFKOqkVIwA", "Dictionary"); + public static final IAttributeType Effectivity = new CoreAttributeTypes("B1fqGH5hxBMylPX9VEQA", "Effectivity"); + public static final IAttributeType Email = new CoreAttributeTypes("AAMFEbaZjEVoecDFCCQA", "Email"); + public static final IAttributeType Extension = new CoreAttributeTypes("AAMFEcUbJEERZTnwJzAA", "Extension"); + public static final IAttributeType FtaResults = new CoreAttributeTypes("AAMFEQPomlhpBRRUceQA", "FTA Results"); + public static final IAttributeType FavoriteBranch = new CoreAttributeTypes("AAMFEbMnzS7P92knZKAA", "Favorite Branch"); + public static final IAttributeType FaxPhone = new CoreAttributeTypes("AAMFEbYdJAmEGg0TFhAA", "Fax Phone"); + public static final IAttributeType GeneralStringData = new CoreAttributeTypes("AAMFEca+MB5ssx+Ax5wA", "General String Data"); + public static final IAttributeType GfeCfe = new CoreAttributeTypes("AAMFEQR0SW+7bERFvXQA", "GFE / CFE"); + public static final IAttributeType Hazard = new CoreAttributeTypes("AAMFEQEe6XK8hGjJNxgA", "Hazard"); + public static final IAttributeType HazardSeverity = new CoreAttributeTypes("AAMFEQLLyEqgnjt85bwA", "Hazard Severity"); + public static final IAttributeType LegacyId = new CoreAttributeTypes("AAMFEQ5rrGxHTSvY73gA", "Legacy Id"); + public static final IAttributeType MobilePhone = new CoreAttributeTypes("AAMFEbWi7AIC1z82PxQA", "Mobile Phone"); + public static final IAttributeType Name = new CoreAttributeTypes("AAMFEcF1AzV7PKuHmxwA", "Name"); + public static final IAttributeType NativeContent = new CoreAttributeTypes("AAMFEcdBJGBK9nr9TTQA", "Native Content"); + public static final IAttributeType Notes = new CoreAttributeTypes("AAMFEbulnFZFQCiyvpAA", "Notes"); + public static final IAttributeType PageType = new CoreAttributeTypes("AAMFEcNiRF2N5xhkYyAA", "Page Type"); + public static final IAttributeType ParagraphNumber = new CoreAttributeTypes("AAMFEQ3boD3sp6VfArAA", "Imported Paragraph Number"); + public static final IAttributeType Partition = new CoreAttributeTypes("AAMFERHj9w6pmoLBCaQA", "Partition"); + public static final IAttributeType Phone = new CoreAttributeTypes("AAMFEbUkVSwKu4LSpWAA", "Phone"); + public static final IAttributeType PublishInline = new CoreAttributeTypes("ADpktgUh1xxE38Ht66QA", "PublishInline"); + public static final IAttributeType QualificationMethod = new CoreAttributeTypes("AAMFERMRKHkM9k_Rg2QA", "Qualification Method"); + public static final IAttributeType RelationOrder = new CoreAttributeTypes("ABM5kHa9cFsTbI_ooyQA", "Relation Order"); + public static final IAttributeType ReqType = new CoreAttributeTypes("AEQ9uyqjH3NpD0eThgAA", "Req Type"); + public static final IAttributeType Sfha = new CoreAttributeTypes("AAMFEQI800ecbF8oCPwA", "SFHA"); + public static final IAttributeType SafetyCriticality = new CoreAttributeTypes("AAMFERg99R51HIz45HAA", "Safety Criticality"); + public static final IAttributeType SafetyObjective = new CoreAttributeTypes("AAMFEQNYjjVjRoKuDsAA", "Safety Objective"); + public static final IAttributeType State = new CoreAttributeTypes("AAMFEbolfGTBLHnDCRQA", "State"); + public static final IAttributeType StaticId = new CoreAttributeTypes("AAMFEcY5DUbWyuIpZVwA", "Static Id"); + public static final IAttributeType Street = new CoreAttributeTypes("AAMFEbmjn19BhPhE2cwA", "Street"); + public static final IAttributeType Subsystem = new CoreAttributeTypes("AAMFERJ1GweNukuSd8QA", "Subsystem"); + public static final IAttributeType SystemSecurityRequirement = new CoreAttributeTypes("AAMFERC8OyWTMm8tMOQA", "System Security Requirement"); + public static final IAttributeType TechnicalPerformanceParameter = new CoreAttributeTypes("AAMFEVhhNTVx42mlvlQA", "Technical Performance Parameter"); + public static final IAttributeType TemplateMatchCriteria = new CoreAttributeTypes("AAMFEbeRRENHX5KTmxwA", "Template Match Criteria"); + public static final IAttributeType TestFrequency = new CoreAttributeTypes("AS7E+gDvsymdt28Aw3gA", "Test Frequency"); + public static final IAttributeType TestProcedureStatus = new CoreAttributeTypes("AKkUuN2K1ilSHnvIMPQA", "Test Procedure Status"); + public static final IAttributeType TestScriptGuid = new CoreAttributeTypes("AAMFEW5fEhinpcjeZ0wA", "Test Script GUID"); + public static final IAttributeType TisTestCategory = new CoreAttributeTypes("AAMFEVbEtV4QJQvA5eQA", "TIS Test Category"); + public static final IAttributeType TisTestNumber = new CoreAttributeTypes("AAMFERjRSDDgyyBh+OAA", "TIS Test Number"); + public static final IAttributeType TisTestType = new CoreAttributeTypes("AAMFEVXVuFcy8wCED5AA", "TIS Test Type"); + public static final IAttributeType TrainingEffectivity = new CoreAttributeTypes("AAMFERFJAm0_WZ0WQaQA", "Training Effectivity"); + public static final IAttributeType UserId = new CoreAttributeTypes("AAMFEbKl8RCQr17bDAQA", "User Id"); + public static final IAttributeType UserSettings = new CoreAttributeTypes("AAMFEbOnewRpnYFgnHQA", "User Settings"); + public static final IAttributeType VerificationEvent = new CoreAttributeTypes("AAMFEXlt02WfQ0jcQtAA", "Verification Event"); + public static final IAttributeType VerificationLevel = new CoreAttributeTypes("AAMFEXRTkyKVIFqcMwQA", "Verification Level"); + public static final IAttributeType Website = new CoreAttributeTypes("AAMFEbwiBAmrHwSeMHgA", "Website"); + public static final IAttributeType WholeWordContent = new CoreAttributeTypes("AAMFEchZmAzZo2tHjVAA", "Whole Word Content"); + public static final IAttributeType WordOleData = new CoreAttributeTypes("AAMFEcP2rmoCzqmzJxQA", "Word Ole Data"); + public static final IAttributeType WordTemplateContent = new CoreAttributeTypes("AAMFEcfcGS2V3SqQN2wA", "Word Template Content"); + public static final IAttributeType WorkData = new CoreAttributeTypes("AAMFEbyhslOoQf3+hyAA", "osee.wi.Work Data"); + public static final IAttributeType WorkDescription = new CoreAttributeTypes("AAMFEb57TkhPHyzOLDwA", "osee.wi.Work Description"); + public static final IAttributeType WorkId = new CoreAttributeTypes("AAMFEb0hXw933Zrje2QA", "osee.wi.Work Id"); + public static final IAttributeType WorkPageName = new CoreAttributeTypes("AAMFEb+vCyCjKbzzHoQA", "osee.wi.Work Page Name"); + public static final IAttributeType WorkParentId = new CoreAttributeTypes("AAMFEb8R5y9WcjD5hcwA", "osee.wi.Work Parent Id"); + public static final IAttributeType WorkStartPage = new CoreAttributeTypes("AAMFEcDfggQLaAdLlpQA", "osee.wi.Start Page"); + public static final IAttributeType WorkTransition = new CoreAttributeTypes("AAMFEcBLGB5U+55hJrQA", "osee.wi.Transition"); + public static final IAttributeType WorkType = new CoreAttributeTypes("AAMFEb2f9nh42sjMHfAA", "osee.wi.Work Type"); + public static final IAttributeType WorkflowDefinition = new CoreAttributeTypes("AAMFEcSPdVbU8mGugOQA", "Workflow Definition"); + public static final IAttributeType XViewerCustomization = new CoreAttributeTypes("AAMFEbQk+hTB9fE3uNAA", "XViewer Customization"); + public static final IAttributeType XViewerDefaults = new CoreAttributeTypes("AAMFEbSjkAKRqLzkWpAA", "XViewer Defaults"); + public static final IAttributeType Zip = new CoreAttributeTypes("AAMFEbqmQUTrgrQ7rKgA", "Zip"); // @formatter:on private CoreAttributeTypes(String guid, String name) { diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/HttpArtifactFileInfo.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/HttpArtifactFileInfo.java index fffc5a25ab3..147b7a35801 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/HttpArtifactFileInfo.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/data/HttpArtifactFileInfo.java @@ -11,12 +11,11 @@ package org.eclipse.osee.framework.manager.servlet.data; import javax.servlet.http.HttpServletRequest; -import org.eclipse.osee.framework.core.data.Identity; /** * @author Roberto E. Escobar */ -public class HttpArtifactFileInfo implements Identity { +public class HttpArtifactFileInfo { private static final int INVALID_BRANCH_ID = -1; private static final String GUID_KEY = "guid"; private static final String BRANCH_NAME_KEY = "branch"; @@ -36,7 +35,6 @@ public class HttpArtifactFileInfo implements Identity { this(request.getParameter(GUID_KEY), request.getParameter(BRANCH_NAME_KEY), request.getParameter(BRANCH_ID_KEY)); } - @Override public String getGuid() { return guid; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_getLastModified.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_getLastModified.java index 4c18cad7925..9849e3521eb 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_getLastModified.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_getLastModified.java @@ -16,6 +16,7 @@ import java.util.Collection; import java.util.Date; import junit.framework.Assert; import org.eclipse.osee.framework.core.data.SystemUser; +import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.skynet.core.UserManager; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -45,7 +46,7 @@ public class Artifact_getLastModified { @org.junit.Test public void testGetLastModified() throws Exception { Artifact artifact = - ArtifactTypeManager.addArtifact("General Document", BranchManager.getCommonBranch(), + ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, BranchManager.getCommonBranch(), getClass().getSimpleName()); Assert.assertNotNull(artifact.getLastModified()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_setAttributeValues.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_setAttributeValues.java index 9a743229433..73e954935cb 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_setAttributeValues.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/Artifact_setAttributeValues.java @@ -17,6 +17,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import junit.framework.Assert; +import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.util.Collections; @@ -51,7 +52,8 @@ public class Artifact_setAttributeValues { public void testSetAttributeValues() throws Exception { Branch branch = BranchManager.getBranchByGuid(DemoSawBuilds.SAW_Bld_1.getGuid()); Assert.assertNotNull(branch); - Artifact artifact = ArtifactTypeManager.addArtifact("General Document", branch, getClass().getSimpleName()); + Artifact artifact = + ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch, getClass().getSimpleName()); artifact.setAttributeValues(CoreAttributeTypes.StaticId, firstSet); artifact.persist(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/BranchStateTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/BranchStateTest.java index 4d592437e56..c6cbef2d291 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/BranchStateTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/BranchStateTest.java @@ -80,7 +80,8 @@ public class BranchStateTest { assertTrue(workingBranch.isEditable()); Artifact change = - ArtifactTypeManager.addArtifact("Software Requirement", workingBranch, "Test Object on Working Branch"); + ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch, + "Test Object on Working Branch"); change.persist(); assertEquals(BranchState.MODIFIED, workingBranch.getBranchState()); @@ -128,7 +129,8 @@ public class BranchStateTest { assertEquals(BranchState.CREATED, workingBranch.getBranchState()); assertTrue(workingBranch.isEditable()); - change = ArtifactTypeManager.addArtifact("Software Requirement", workingBranch, "A commit change"); + change = + ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch, "A commit change"); change.persist(); assertEquals(BranchState.MODIFIED, workingBranch.getBranchState()); @@ -194,8 +196,10 @@ public class BranchStateTest { Branch workingBranch = null; Artifact change = null; try { - baseArtifact = ArtifactTypeManager.addArtifact("Software Requirement", DemoSawBuilds.SAW_Bld_1, "Test Object"); - baseArtifact.setSoleAttributeFromString("Annotation", "This is the base annotation"); + baseArtifact = + ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, DemoSawBuilds.SAW_Bld_1, + "Test Object"); + baseArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation, "This is the base annotation"); baseArtifact.persist(); User user = UserManager.getUser(SystemUser.OseeSystem); @@ -203,11 +207,12 @@ public class BranchStateTest { // Add a new artifact on the working branch change = - ArtifactTypeManager.addArtifact("Software Requirement", workingBranch, "Test Object on Working Branch"); + ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch, + "Test Object on Working Branch"); change.persist(); // Make a change on the parent - baseArtifact.setSoleAttributeFromString("Annotation", "This is the updated annotation"); + baseArtifact.setSoleAttributeFromString(CoreAttributeTypes.Annotation, "This is the updated annotation"); baseArtifact.persist(); // Update the branch diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/NativeArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/NativeArtifactTest.java index 09b6d109b09..cbc380f4c09 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/NativeArtifactTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/NativeArtifactTest.java @@ -54,15 +54,15 @@ public class NativeArtifactTest { @org.junit.Test public void testGetFileExtension() throws Exception { Artifact nativeArtifact = getNativeArtifact(); - assertTrue(nativeArtifact.getSoleAttributeValue(CoreAttributeTypes.Extension.getName(), "").equals("csv")); + assertTrue(nativeArtifact.getSoleAttributeValue(CoreAttributeTypes.Extension, "").equals("csv")); } @org.junit.Test public void testSetAndGetValueAsString() throws Exception { Artifact nativeArtifact = getNativeArtifact(); - nativeArtifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent.getName(), "hello world"); + nativeArtifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent, "hello world"); nativeArtifact.persist(); - String content = nativeArtifact.getSoleAttributeValueAsString(CoreAttributeTypes.NativeContent.getName(), ""); + String content = nativeArtifact.getSoleAttributeValueAsString(CoreAttributeTypes.NativeContent, ""); assertEquals("hello world", content); } @@ -75,7 +75,7 @@ public class NativeArtifactTest { nativeArtifact.persist(); InputStream inputStream = null; try { - inputStream = nativeArtifact.getSoleAttributeValue(CoreAttributeTypes.NativeContent.getName(), null); + inputStream = nativeArtifact.getSoleAttributeValue(CoreAttributeTypes.NativeContent, null); String content = Lib.inputStreamToString(inputStream); assertEquals("hello world", content); } finally { diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/OseeEnumerationValidationTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/OseeEnumerationValidationTest.java index 5169f7fd0cf..5b9c1389970 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/OseeEnumerationValidationTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/OseeEnumerationValidationTest.java @@ -16,12 +16,12 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.model.Branch; -import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; -import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager; import org.eclipse.osee.framework.skynet.core.internal.Activator; import org.eclipse.osee.framework.skynet.core.validation.IOseeValidator; import org.eclipse.osee.framework.skynet.core.validation.OseeValidator; @@ -34,22 +34,19 @@ import org.junit.Before; public class OseeEnumerationValidationTest { private Artifact mockArtifact; - private AttributeType enumeratedAttributeType; @Before public void setUp() throws Exception { Branch branch = BranchManager.getCommonBranch(); // Create an artifact having an enumerated attribute - enumeratedAttributeType = AttributeTypeManager.getType("GFE / CFE"); - mockArtifact = ArtifactTypeManager.addArtifact("Component", branch); + mockArtifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Component, branch); } @After public void tearDown() throws Exception { mockArtifact.deleteAndPersist(); mockArtifact = null; - enumeratedAttributeType = null; } public List<TestData> getEnumerationCases() { @@ -76,7 +73,7 @@ public class OseeEnumerationValidationTest { public void testEnumerationData() { for (TestData data : getEnumerationCases()) { IStatus actual = - OseeValidator.getInstance().validate(IOseeValidator.SHORT, mockArtifact, enumeratedAttributeType, + OseeValidator.getInstance().validate(IOseeValidator.SHORT, mockArtifact, CoreAttributeTypes.GfeCfe, data.getValue()); checkStatus(data.getMessage(), data.getExpected(), actual); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/RelationOrderingTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/RelationOrderingTest.java index cdf8defe824..e26865e476c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/RelationOrderingTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/RelationOrderingTest.java @@ -69,13 +69,13 @@ public class RelationOrderingTest { parent = createArtifact(CoreArtifactTypes.Folder, branch); child1 = createArtifact(CoreArtifactTypes.Folder, branch); - child1.setSoleAttributeFromString("Name", "a_child"); + child1.setName("a_child"); child2 = createArtifact(CoreArtifactTypes.Folder, branch); - child2.setSoleAttributeFromString("Name", "b_child"); + child2.setName("b_child"); child3 = createArtifact(CoreArtifactTypes.Folder, branch); - child3.setSoleAttributeFromString("Name", "c_child"); + child3.setName("c_child"); parent.addRelation(CoreRelationTypes.Default_Hierarchical__Child, child1); parent.addRelation(CoreRelationTypes.Default_Hierarchical__Child, child2); @@ -108,9 +108,9 @@ public class RelationOrderingTest { checkDesc(); Artifact child4 = createArtifact(CoreArtifactTypes.User, branch); - child1.setSoleAttributeFromString("Name", "a_child"); + child1.setName("a_child"); Artifact child5 = createArtifact(CoreArtifactTypes.User, branch); - child2.setSoleAttributeFromString("Name", "b_child"); + child2.setName("b_child"); Artifact child6 = createArtifact(CoreArtifactTypes.User, branch); parent.addRelation(CoreRelationTypes.Users_User, child4); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java index 604dea0e064..cd1dc4b5b6a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java @@ -24,7 +24,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; * @author Roberto E. Escobar */ public class OseeGroup { - private static final String GROUP_ARTIFACT_TYPE = "User Group"; private static final String USERS_GROUP_FOLDER_NAME = "User Groups"; private final String groupName; @@ -83,14 +82,14 @@ public class OseeGroup { private Artifact getOrCreateGroupArtifact(String groupName) throws OseeCoreException { Branch branch = BranchManager.getCommonBranch(); - String cacheKey = GROUP_ARTIFACT_TYPE + "." + groupName; + String cacheKey = CoreArtifactTypes.UserGroup + "." + groupName; Artifact groupArtifact = ArtifactCache.getByTextId(cacheKey, branch); if (groupArtifact == null) { groupArtifact = ArtifactQuery.checkArtifactFromTypeAndName(CoreArtifactTypes.UserGroup, groupName, branch); if (groupArtifact == null) { Artifact userGroupsFolder = getOrCreateUserGroupsFolder(branch); - groupArtifact = ArtifactTypeManager.addArtifact(GROUP_ARTIFACT_TYPE, branch, groupName); + groupArtifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.UserGroup, branch, groupName); userGroupsFolder.addChild(groupArtifact); } ArtifactCache.cacheByTextId(cacheKey, groupArtifact); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java index 052096ded19..1b2ebbc4201 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java @@ -162,7 +162,7 @@ public class User extends Artifact { } catch (Exception ex) { OseeExceptions.wrapAndThrow(ex); } - setSoleAttributeFromString("User Settings", stringWriter.toString()); + setSoleAttributeFromString(CoreAttributeTypes.UserSettings, stringWriter.toString()); persist(); } } @@ -171,7 +171,7 @@ public class User extends Artifact { if (userSettings == null) { PropertyStore store = new PropertyStore(getGuid()); try { - String settings = getSoleAttributeValue("User Settings", null); + String settings = getSoleAttributeValue(CoreAttributeTypes.UserSettings, null); if (settings != null) { store.load(new StringReader(settings)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java index fbd27b905da..7ac13da6f97 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java @@ -235,7 +235,7 @@ public final class UserManager { user.setActive(userEnum.isActive()); } else { user = - (User) ArtifactTypeManager.addArtifact(CoreArtifactTypes.User.getName(), BranchManager.getCommonBranch(), + (User) ArtifactTypeManager.addArtifact(CoreArtifactTypes.User, BranchManager.getCommonBranch(), userEnum.getName()); user.setActive(userEnum.isActive()); user.setUserID(userEnum.getUserID()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java index 279a626aa1c..5f2cde5d92a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java @@ -34,6 +34,7 @@ import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; +import org.eclipse.osee.framework.core.data.NamedIdentity; import org.eclipse.osee.framework.core.data.SystemUser; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -68,7 +69,6 @@ import org.eclipse.osee.framework.database.core.OseeConnection; import org.eclipse.osee.framework.jdk.core.type.HashCollection; import org.eclipse.osee.framework.jdk.core.type.Pair; import org.eclipse.osee.framework.jdk.core.util.Collections; -import org.eclipse.osee.framework.jdk.core.util.GUID; import org.eclipse.osee.framework.jdk.core.util.HumanReadableId; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -94,7 +94,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager; import org.eclipse.osee.framework.skynet.core.types.IArtifact; import org.osgi.framework.Bundle; -public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IBasicGuidArtifact { +public class Artifact extends NamedIdentity implements IArtifact, IAdaptable, Comparable<Artifact>, IBasicGuidArtifact { public static final String UNNAMED = "Unnamed"; public static final String BEFORE_GUID_STRING = "/BeforeGUID/PrePend"; public static final String AFTER_GUID_STRING = "/AfterGUID"; @@ -105,7 +105,6 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB private final Set<DefaultBasicGuidRelationReorder> relationOrderRecords = new HashSet<DefaultBasicGuidRelationReorder>(); private final Branch branch; - private final String guid; private String humanReadableId; private ArtifactType artifactType; private final ArtifactFactory parentFactory; @@ -120,13 +119,9 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB private EditState objectEditState; public Artifact(ArtifactFactory parentFactory, String guid, String humanReadableId, Branch branch, ArtifactType artifactType) throws OseeDataStoreException { + super(guid, ""); objectEditState = EditState.NO_CHANGE; modType = ModificationType.NEW; - if (guid == null) { - this.guid = GUID.create(); - } else { - this.guid = guid; - } if (humanReadableId == null) { populateHumanReadableID(); @@ -295,11 +290,6 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB return branch; } - @Override - public String getGuid() { - return guid; - } - public String getArtifactTypeName() { return artifactType.getName(); } @@ -470,11 +460,6 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB return attribute; } - @Deprecated - public boolean isAttributeTypeValid(String attributeName) throws OseeCoreException { - return isAttributeTypeValid(AttributeTypeManager.getType(attributeName)); - } - public boolean isAttributeTypeValid(IAttributeType attributeType) throws OseeCoreException { return getArtifactType().isValidAttributeType(attributeType, branch); } @@ -537,12 +522,6 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB return attributes; } - @Deprecated - public <T> List<Attribute<T>> getAttributes(String attributeTypeName) throws OseeCoreException { - return Collections.castAll(getAttributesByModificationType(AttributeTypeManager.getType(attributeTypeName), - ModificationType.getCurrentModTypes())); - } - /** * The use of this method is discouraged since it directly returns Attributes. */ @@ -632,11 +611,6 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB return attribute.getValue(); } - @Deprecated - public <T> T getSoleAttributeValue(String attributeTypeName) throws OseeCoreException { - return getSoleAttributeValue(AttributeTypeManager.getType(attributeTypeName)); - } - /** * Return sole attribute value for given attribute type name. Will throw exceptions if "Sole" nature of attribute is * invalid.<br> @@ -693,16 +667,6 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB return toReturn; } - @Deprecated - public String getSoleAttributeValueAsString(String attributeTypeName, String defaultReturnValue) throws OseeCoreException, MultipleAttributesExist { - return getSoleAttributeValueAsString(AttributeTypeManager.getType(attributeTypeName), defaultReturnValue); - } - - @Deprecated - public <T> T getSoleAttributeValue(String attributeTypeName, T defaultReturnValue) throws OseeCoreException { - return getSoleAttributeValue(AttributeTypeManager.getType(attributeTypeName), defaultReturnValue); - } - /** * Return sole attribute value for given attribute type name Handles AttributeDoesNotExist case by returning * defaultReturnValue.<br> @@ -747,18 +711,13 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB } public void deleteAttribute(IAttributeType attributeType, Object value) throws OseeCoreException { - for (Attribute<Object> attribute : getAttributes(attributeType.getName())) { + for (Attribute<Object> attribute : getAttributes(attributeType)) { if (attribute.getValue().equals(value)) { attribute.delete(); } } } - @Deprecated - public <T> void setSoleAttributeValue(String attributeTypeName, T value) throws OseeCoreException { - getOrCreateSoleAttribute(AttributeTypeManager.getType(attributeTypeName)).setValue(value); - } - /** * Used on attribute types with no more than one instance. If the attribute exists, it's value is changed, otherwise * a new attribute is added and its value set. @@ -771,20 +730,10 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB getOrCreateSoleAttribute(attributeType).setFromString(value); } - @Deprecated - public <T> void setSoleAttributeFromString(String attributeTypeName, String value) throws OseeCoreException { - getOrCreateSoleAttribute(AttributeTypeManager.getType(attributeTypeName)).setFromString(value); - } - public void setSoleAttributeFromStream(IAttributeType attributeType, InputStream stream) throws OseeCoreException { getOrCreateSoleAttribute(attributeType).setValueFromInputStream(stream); } - @Deprecated - public String getAttributesToString(String attributeTypeName) throws OseeCoreException { - return getAttributesToString(AttributeTypeManager.getType(attributeTypeName)); - } - /** * @return comma delimited representation of all the attributes of the type attributeName */ @@ -867,8 +816,7 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB * adds a new attribute of the type named attributeTypeName and assigns it the given value */ public void addAttributeFromString(IAttributeType attributeType, String value) throws OseeCoreException { - initializeAttribute(AttributeTypeManager.getType(attributeType), ModificationType.NEW, true, false).setFromString( - value); + initializeAttribute(attributeType, ModificationType.NEW, true, false).setFromString(value); } /** @@ -918,6 +866,7 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB return name; } + @Override public void setName(String name) throws OseeCoreException { setSoleAttributeValue(CoreAttributeTypes.Name, name); } @@ -1385,7 +1334,7 @@ public class Artifact implements IArtifact, IAdaptable, Comparable<Artifact>, IB private Artifact reflectHelper(IOseeBranch branch) throws OseeCoreException { Artifact reflectedArtifact = - ArtifactTypeManager.getFactory(artifactType).reflectExisitingArtifact(artId, guid, humanReadableId, + ArtifactTypeManager.getFactory(artifactType).reflectExisitingArtifact(artId, getGuid(), humanReadableId, artifactType, gammaId, branch, ModificationType.INTRODUCED); for (Attribute<?> sourceAttribute : attributes.getValues()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java index b874a4e3d1d..9c38691d032 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java @@ -133,12 +133,12 @@ public class ArtifactTypeManager { return artifactType; } - public static ArtifactType getType(IArtifactType typeToken) throws OseeCoreException { - return getTypeByGuid(typeToken.getGuid()); + public static ArtifactType getType(IArtifactType artifactType) throws OseeCoreException { + return getTypeByGuid(artifactType.getGuid()); } - public static int getTypeId(IArtifactType typeToken) throws OseeCoreException { - return getType(typeToken).getId(); + public static int getTypeId(IArtifactType artifactType) throws OseeCoreException { + return getType(artifactType).getId(); } /** @@ -171,32 +171,14 @@ public class ArtifactTypeManager { /** * Get a new instance of type artifactTypeName - * - * @param artifactTypeName - * @param branch - * @throws OseeCoreException */ - public static Artifact addArtifact(String artifactTypeName, IOseeBranch branch) throws OseeCoreException { - return makeNewArtifact(getType(artifactTypeName), branch); - } - public static Artifact addArtifact(IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { return makeNewArtifact(getType(artifactType), branch); } /** * Get a new instance of type artifactTypeName and set it's name. - * - * @param artifactTypeName - * @param branch - * @param name */ - public static Artifact addArtifact(String artifactTypeName, IOseeBranch branch, String name) throws OseeCoreException { - Artifact artifact = addArtifact(artifactTypeName, branch); - artifact.setName(name); - return artifact; - } - public static Artifact addArtifact(IArtifactType artifactType, IOseeBranch branch, String name) throws OseeCoreException { Artifact artifact = makeNewArtifact(getType(artifactType), branch); artifact.setName(name); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java index cf8ca31b206..ff88c337023 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java @@ -141,7 +141,7 @@ public class ChangeArtifactType { for (AttributeType attributeType : artifact.getAttributeTypes()) { if (!artifactType.isValidAttributeType(attributeType, artifact.getBranch())) { - attributesToPurge.addAll(artifact.getAttributes(attributeType.getName())); + attributesToPurge.addAll(artifact.getAttributes(attributeType)); } } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumerationValidation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumerationValidation.java index 1ef5c59b59e..a48b9c92318 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumerationValidation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumerationValidation.java @@ -14,7 +14,6 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.exception.OseeCoreException; -import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.validation.IOseeValidator; @@ -34,9 +33,9 @@ public class OseeEnumerationValidation implements IOseeValidator { } @Override - public IStatus validate(Artifact artifact, AttributeType attributeType, Object proposedObject) throws OseeCoreException { + public IStatus validate(Artifact artifact, IAttributeType attributeType, Object proposedObject) throws OseeCoreException { String text = (String) proposedObject; - attributeType.getOseeEnumType().valueOf(text); + AttributeTypeManager.getType(attributeType).getOseeEnumType().valueOf(text); return Status.OK_STATUS; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/BinaryContentUtils.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/BinaryContentUtils.java index 71fc7427fc8..1606f09367c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/BinaryContentUtils.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/BinaryContentUtils.java @@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.attribute.utils; import java.io.UnsupportedEncodingException; import java.net.URLConnection; import java.net.URLEncoder; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeStateException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -61,7 +62,7 @@ public class BinaryContentUtils { private static String getExtension(Attribute<?> attribute) throws OseeCoreException { String fileTypeExtension = attribute.getAttributeType().getFileTypeExtension(); if (attribute.isOfType("Native Content")) { - fileTypeExtension = attribute.getArtifact().getSoleAttributeValue("Extension", ""); + fileTypeExtension = attribute.getArtifact().getSoleAttributeValue(CoreAttributeTypes.Extension, ""); } return fileTypeExtension; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java index 9a756f009c7..6aa0e442ef2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java @@ -89,7 +89,7 @@ public class AttributeConflict extends Conflict { if (attribute != null) { return attribute; } - Collection<Attribute<Object>> localAttributes = getArtifact().getAttributes(getAttributeType().getName()); + Collection<Attribute<Object>> localAttributes = getArtifact().getAttributes(getAttributeType()); for (Attribute<Object> localAttribute : localAttributes) { if (localAttribute.getId() == attrId) { attribute = localAttribute; @@ -124,7 +124,7 @@ public class AttributeConflict extends Conflict { if (destAttribute != null) { return destAttribute; } - Collection<Attribute<Object>> localAttributes = getDestArtifact().getAttributes(getAttributeType().getName()); + Collection<Attribute<Object>> localAttributes = getDestArtifact().getAttributes(getAttributeType()); for (Attribute<Object> localAttribute : localAttributes) { if (localAttribute.getId() == attrId) { destAttribute = localAttribute; @@ -139,7 +139,7 @@ public class AttributeConflict extends Conflict { private Attribute<?> getAttribute(Artifact artifact) throws OseeCoreException { Attribute<?> attribute = null; - Collection<Attribute<Object>> localAttributes = artifact.getAttributes(getAttributeType().getName()); + Collection<Attribute<Object>> localAttributes = artifact.getAttributes(getAttributeType()); for (Attribute<Object> localAttribute : localAttributes) { if (localAttribute.getId() == attrId) { attribute = localAttribute; @@ -281,7 +281,7 @@ public class AttributeConflict extends Conflict { if (DEBUG) { System.out.println(String.format("AttributeConflict: Set the Merge Value for attr_id %d", getAttrId())); } - getArtifact().setSoleAttributeFromString(getAttributeType().getName(), value); + getArtifact().setSoleAttributeFromString(getAttributeType(), value); getArtifact().persist(); markStatusToReflectEdit(); return true; @@ -298,7 +298,7 @@ public class AttributeConflict extends Conflict { if (DEBUG) { System.out.println(String.format("AttributeConflict: Set the Merge Value for attr_id %d", getAttrId())); } - getArtifact().setSoleAttributeValue(getAttributeType().getName(), value); + getArtifact().setSoleAttributeValue(getAttributeType(), value); getArtifact().persist(); markStatusToReflectEdit(); return true; @@ -317,7 +317,7 @@ public class AttributeConflict extends Conflict { System.out.println(String.format("AttributeConflict: Set the Merge Value to the Source Value for attr_id %d", getAttrId())); } - getArtifact().setSoleAttributeValue(getAttributeType().getName(), getSourceObject()); + getArtifact().setSoleAttributeValue(getAttributeType(), getSourceObject()); getArtifact().persist(); markStatusToReflectEdit(); return true; @@ -336,7 +336,7 @@ public class AttributeConflict extends Conflict { System.out.println(String.format("AttributeConflict: Set the Merge Value to the Dest Value for attr_id %d", getAttrId())); } - getArtifact().setSoleAttributeValue(getAttributeType().getName(), getDestObject()); + getArtifact().setSoleAttributeValue(getAttributeType(), getDestObject()); getArtifact().persist(); markStatusToReflectEdit(); return true; @@ -359,7 +359,7 @@ public class AttributeConflict extends Conflict { getAttribute().resetToDefaultValue(); getArtifact().persist(); } else { - getArtifact().setSoleAttributeFromString(getAttributeType().getName(), NO_VALUE); + getArtifact().setSoleAttributeFromString(getAttributeType(), NO_VALUE); getArtifact().persist(); } computeEqualsValues(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event2/FrameworkEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event2/FrameworkEventUtil.java index 8f426489ab7..34c1ec56487 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event2/FrameworkEventUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event2/FrameworkEventUtil.java @@ -314,11 +314,8 @@ public class FrameworkEventUtil { } public static DefaultBasicGuidArtifact getBasicGuidArtifact(RemoteBasicGuidArtifact1 remGuidArt) { - DefaultBasicGuidArtifact guidArt = new DefaultBasicGuidArtifact(); - guidArt.setGuid(remGuidArt.getArtGuid()); - guidArt.setBranchGuid(remGuidArt.getBranchGuid()); - guidArt.setArtTypeGuid(remGuidArt.getArtTypeGuid()); - return guidArt; + return new DefaultBasicGuidArtifact(remGuidArt.getBranchGuid(), remGuidArt.getArtTypeGuid(), + remGuidArt.getArtGuid()); } public static RemoteBasicGuidArtifact1 getRemoteBasicGuidArtifact(String modTypeGuid, DefaultBasicGuidArtifact guidArt, Collection<AttributeChange> attributeChanges) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java index 7519b0db35c..9fbfe8e9d14 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java @@ -37,13 +37,13 @@ public class CsvArtifact { } public void setCsvData(String csvData) throws OseeCoreException { - artifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent.getName(), csvData); + artifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent, csvData); } public String getCsvData() throws OseeCoreException { String csvData = null; if (artifact != null) { - csvData = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.NativeContent.getName(), null); + csvData = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.NativeContent, null); } return csvData; } @@ -69,10 +69,10 @@ public class CsvArtifact { * @throws OseeCoreException */ public static CsvArtifact generateCsvArtifact(String staticId, String artifactName, String csvData, IOseeBranch branch) throws OseeCoreException { - Artifact artifact = ArtifactTypeManager.addArtifact("General Document", branch); + Artifact artifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch); artifact.setName(artifactName); - artifact.setSoleAttributeValue("Extension", "csv"); - artifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent.getName(), csvData); + artifact.setSoleAttributeValue(CoreAttributeTypes.Extension, "csv"); + artifact.setSoleAttributeFromString(CoreAttributeTypes.NativeContent, csvData); StaticIdManager.setSingletonAttributeValue(artifact, staticId); return new CsvArtifact(artifact); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeValidator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeValidator.java index 355a7f80ec4..0007b174f10 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeValidator.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeValidator.java @@ -13,7 +13,6 @@ package org.eclipse.osee.framework.skynet.core.validation; import org.eclipse.core.runtime.IStatus; import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.exception.OseeCoreException; -import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; public interface IOseeValidator { @@ -26,5 +25,5 @@ public interface IOseeValidator { public boolean isApplicable(Artifact artifact, IAttributeType attributeType) throws OseeCoreException; - public IStatus validate(Artifact artifact, AttributeType attributeType, Object proposedObject) throws OseeCoreException; + public IStatus validate(Artifact artifact, IAttributeType attributeType, Object proposedObject) throws OseeCoreException; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java index 28bb67505d6..8ba2dcbc5ca 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java @@ -53,10 +53,9 @@ public class OseeValidator { return status; } - public IStatus validate(int requiredQualityOfService, Artifact artifact, IAttributeType attributeTypeName, Object proposedValue) { + public IStatus validate(int requiredQualityOfService, Artifact artifact, IAttributeType attributeType, Object proposedValue) { IStatus status = Status.OK_STATUS; try { - AttributeType attributeType = AttributeTypeManager.getType(attributeTypeName); status = validate(requiredQualityOfService, artifact, attributeType, proposedValue); } catch (Exception ex) { status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, ex.getLocalizedMessage(), ex); @@ -89,8 +88,7 @@ public class OseeValidator { public IStatus validate(int requiredQualityOfService, Artifact artifact) { try { for (AttributeType attributeType : artifact.getAttributeTypes()) { - String attributeTypeName = attributeType.getName(); - for (Attribute<?> attribute : artifact.getAttributes(attributeTypeName)) { + for (Attribute<?> attribute : artifact.getAttributes(attributeType)) { IStatus status = validate(requiredQualityOfService, artifact, attributeType, attribute.getValue()); if (!status.isOK()) { return status; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java index 14418c0ffd5..8032180dbb2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java @@ -29,7 +29,6 @@ import java.util.regex.Pattern; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.model.Branch; -import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.database.core.ConnectionHandler; import org.eclipse.osee.framework.database.core.IOseeStatement; import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet; @@ -108,11 +107,10 @@ public class WordUtil { throw new IllegalArgumentException("branch can not be null"); } - AttributeType attributeDescriptor = AttributeTypeManager.getType(CoreAttributeTypes.WordTemplateContent); - IOseeStatement chStmt = ConnectionHandler.getStatement(); try { - chStmt.runPreparedQuery(SELECT_WORD_VALUES, artId, attributeDescriptor.getId(), branch.getId()); + chStmt.runPreparedQuery(SELECT_WORD_VALUES, artId, + AttributeTypeManager.getTypeId(CoreAttributeTypes.WordTemplateContent), branch.getId()); List<Pair<String, Integer>> values = new LinkedList<Pair<String, Integer>>(); while (chStmt.next()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/PreviewAndMultiPreviewTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/PreviewAndMultiPreviewTest.java index ba89b22f063..570e43c5a6c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/PreviewAndMultiPreviewTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/cases/PreviewAndMultiPreviewTest.java @@ -79,7 +79,8 @@ public class PreviewAndMultiPreviewTest { try { monitorLog = TestUtil.severeLoggingStart(); Artifact childArt = - ArtifactTypeManager.addArtifact("General Document", branch, getClass().getSimpleName() + "1"); + ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, branch, + getClass().getSimpleName() + "1"); childArt.persist(); newArt.addChild(childArt); WordTemplateRenderer renderer = new WordTemplateRenderer(); @@ -102,7 +103,8 @@ public class PreviewAndMultiPreviewTest { try { monitorLog = TestUtil.severeLoggingStart(); Artifact childArt = - ArtifactTypeManager.addArtifact("General Document", branch, getClass().getSimpleName() + "1"); + ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch, + getClass().getSimpleName() + "1"); childArt.persist(); newArt.addChild(childArt); RendererManager.openInJob(artifacts, PresentationType.PREVIEW); @@ -174,7 +176,8 @@ public class PreviewAndMultiPreviewTest { try { monitorLog = TestUtil.severeLoggingStart(); Artifact childArt = - ArtifactTypeManager.addArtifact("General Document", branch, getClass().getSimpleName() + "1"); + ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch, + getClass().getSimpleName() + "1"); childArt.persist(); newArt.addChild(childArt); WordTemplateRenderer renderer = new WordTemplateRenderer(); @@ -204,7 +207,8 @@ public class PreviewAndMultiPreviewTest { try { monitorLog = TestUtil.severeLoggingStart(); Artifact childArt = - ArtifactTypeManager.addArtifact("General Document", branch, getClass().getSimpleName() + "1"); + ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch, + getClass().getSimpleName() + "1"); childArt.persist(); newArt.addChild(childArt); RendererManager.openInJob(artifacts, PresentationType.PREVIEW); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java index bf882b6d3a0..f8435e8309e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java @@ -209,7 +209,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { List<String> info = new ArrayList<String>();
for (IAttributeType attributeType : artifact.getAttributeTypes()) {
if (selectedItems.contains(attributeType.getGuid())) {
- String value = artifact.getAttributesToString(attributeType.getName());
+ String value = artifact.getAttributesToString(attributeType); if (Strings.isValid(value)) {
info.add(value);
} else {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/BaseImage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/BaseImage.java index ed75d8b4f3c..cf55b923e63 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/BaseImage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/BaseImage.java @@ -69,7 +69,7 @@ public class BaseImage implements KeyedImage { return ArtifactImageManager.getOverrideImageEnum(); } try { - String extension = artifact.getSoleAttributeValue(CoreAttributeTypes.Extension.getName(), ""); + String extension = artifact.getSoleAttributeValue(CoreAttributeTypes.Extension, ""); if (Strings.isValid(extension)) { return new ProgramImage(extension); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenWithContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenWithContributionItem.java index d1a7b6fb6db..a219632cd99 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenWithContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenWithContributionItem.java @@ -99,7 +99,7 @@ public class OpenWithContributionItem extends CompoundContributionItem { if (render instanceof WordRenderer) { imageDescriptor = WordRenderer.getImageDescriptor(); } else if (render instanceof NativeRenderer) { - String fileExtension = firstArtifact.getSoleAttributeValue(CoreAttributeTypes.Extension.getName()); + String fileExtension = firstArtifact.getSoleAttributeValue(CoreAttributeTypes.Extension); if (Strings.isValid(fileExtension)) { imageDescriptor = ImageManager.getProgramImageDescriptor(fileExtension); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java index 375e6499104..3b7840d311d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java @@ -29,8 +29,7 @@ public class AttributeTypeUtil { public static AttributeType[] getEmptyTypes(Artifact artifact) throws OseeCoreException {
List<AttributeType> items = new ArrayList<AttributeType>();
for (AttributeType type : artifact.getAttributeTypes()) {
- String typeName = type.getName();
- if (!CoreAttributeTypes.Name.equals(typeName) && artifact.getAttributes(typeName).isEmpty()) { + if (!CoreAttributeTypes.Name.equals(type) && artifact.getAttributes(type).isEmpty()) { items.add(type);
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/CreateNewUser.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/CreateNewUser.java index a0635476720..56e3e5d18cc 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/CreateNewUser.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/CreateNewUser.java @@ -15,9 +15,12 @@ import java.util.Collection; import java.util.List; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.exception.UserNotInDatabase; +import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.User; @@ -38,9 +41,10 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XList.XListItem; * @author Ryan D. Brooks */ public class CreateNewUser extends AbstractBlam { - - private final static List<String> attrNames = Arrays.asList("Company", "Company Title", "Street", "City", "State", - "Zip", "Phone", "Mobile Phone", "Fax Phone", "Website", "Notes"); + private final static List<IAttributeType> attributeTypes = Arrays.asList(CoreAttributeTypes.Company, + CoreAttributeTypes.CompanyTitle, CoreAttributeTypes.Street, CoreAttributeTypes.City, CoreAttributeTypes.State, + CoreAttributeTypes.Zip, CoreAttributeTypes.Phone, CoreAttributeTypes.MobilePhone, CoreAttributeTypes.FaxPhone, + CoreAttributeTypes.Country, CoreAttributeTypes.Website, CoreAttributeTypes.Notes); private Set<Artifact> groupArts; @Override @@ -52,8 +56,7 @@ public class CreateNewUser extends AbstractBlam { public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { monitor.beginTask("Create New User", IProgressMonitor.UNKNOWN); - User user = - (User) ArtifactTypeManager.addArtifact(CoreArtifactTypes.User.getName(), BranchManager.getCommonBranch()); + User user = (User) ArtifactTypeManager.addArtifact(CoreArtifactTypes.User, BranchManager.getCommonBranch()); String name = variableMap.getString("Name (Last, First)"); if (name.equals("")) { @@ -79,10 +82,10 @@ public class CreateNewUser extends AbstractBlam { } catch (UserNotInDatabase ex) { // good that is why we are creating it } - user.setSoleAttributeValue("User Id", userId); + user.setSoleAttributeValue(CoreAttributeTypes.UserId, userId); boolean active = variableMap.getBoolean("Active"); - user.setSoleAttributeValue("Active", active); + user.setSoleAttributeValue(CoreAttributeTypes.Active, active); String email = variableMap.getString("Email"); if (email.equals("")) { @@ -90,13 +93,13 @@ public class CreateNewUser extends AbstractBlam { monitor.done(); return; } - user.setSoleAttributeValue("Email", email); + user.setSoleAttributeValue(CoreAttributeTypes.Email, email); // Process string attribute names - for (String attrName : attrNames) { - String value = variableMap.getString(attrName); - if (!value.equals("")) { - user.setSoleAttributeValue(attrName, value); + for (IAttributeType attributeType : attributeTypes) { + String value = variableMap.getString(attributeType.getName()); + if (Strings.isValid(value)) { + user.setSoleAttributeValue(attributeType, value); } } // Add user to selected User Group and Universal Group @@ -130,8 +133,8 @@ public class CreateNewUser extends AbstractBlam { "<XWidget xwidgetType=\"XCheckBox\" displayName=\"Active\" required=\"true\" defaultValue=\"true\"/>"; // Add all rest of attributes to fill - for (String attrName : attrNames) { - widgetXml += "<XWidget xwidgetType=\"XText\" displayName=\"" + attrName + "\"/>"; + for (IAttributeType attributeType : attributeTypes) { + widgetXml += "<XWidget xwidgetType=\"XText\" displayName=\"" + attributeType + "\"/>"; } // Add groups to belong to try { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteUnneededUnspecifiedAttributes.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteUnneededUnspecifiedAttributes.java index 4e30de843ae..c8cc46fd56d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteUnneededUnspecifiedAttributes.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteUnneededUnspecifiedAttributes.java @@ -43,7 +43,7 @@ public class DeleteUnneededUnspecifiedAttributes extends AbstractBlam { SkynetTransaction transaction = new SkynetTransaction(branch, "BLAM: Delete unneeded unspecified attributes"); for (Artifact artifact : artifacts) { - Collection<Attribute<String>> attributes = artifact.getAttributes(attributeType.getName()); + Collection<Attribute<String>> attributes = artifact.getAttributes(attributeType); for (Attribute<String> attribute1 : attributes) { if (!attribute1.getValue().equals(EnumeratedAttribute.UNSPECIFIED_VALUE)) { for (Attribute<String> attribute : attributes) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java index 702b2782310..9af7a13ef9b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java @@ -85,7 +85,7 @@ public class ExportArtifacts extends AbstractBlam { row[3] = artifact.getName(); for (AttributeType attributeType : artifact.getAttributeTypes()) { if (!attributeType.equals(nameAttributeType)) { - String value = artifact.getAttributesToString(attributeType.getName()); + String value = artifact.getAttributesToString(attributeType); if (!value.equals("")) { row[NUM_FIXED_COLUMNS + Arrays.binarySearch(attributeColumns, attributeType)] = value; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/FixTemplateContentArtifacts.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/FixTemplateContentArtifacts.java index 0c96143deff..0e8330c4162 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/FixTemplateContentArtifacts.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/FixTemplateContentArtifacts.java @@ -182,8 +182,7 @@ public class FixTemplateContentArtifacts extends AbstractBlam { IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
- chStmt.runPreparedQuery(GET_ATTRS,
- AttributeTypeManager.getType(CoreAttributeTypes.WordTemplateContent).getId()); + chStmt.runPreparedQuery(GET_ATTRS, AttributeTypeManager.getTypeId(CoreAttributeTypes.WordTemplateContent)); while (chStmt.next()) {
attrData.add(new AttrData(chStmt.getString("gamma_Id"), chStmt.getString("human_readable_id"),
chStmt.getString("uri")));
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ResourceManipulation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ResourceManipulation.java index e6de880f867..24f6328bfcd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ResourceManipulation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ResourceManipulation.java @@ -281,8 +281,7 @@ public class ResourceManipulation extends AbstractBlam { IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
- chStmt.runPreparedQuery(GET_ATTRS_TEST,
- AttributeTypeManager.getType(CoreAttributeTypes.WordTemplateContent).getId()); + chStmt.runPreparedQuery(GET_ATTRS_TEST, AttributeTypeManager.getTypeId(CoreAttributeTypes.WordTemplateContent)); while (chStmt.next()) {
attrData.add(new AttrData(chStmt.getString("gamma_Id"), chStmt.getString("human_readable_id"),
chStmt.getString("uri")));
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SetRequirementCategory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SetRequirementCategory.java index a4278d1785b..9c85087361a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SetRequirementCategory.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SetRequirementCategory.java @@ -76,7 +76,7 @@ public class SetRequirementCategory extends AbstractBlam { try {
String canonicalRequirementName = requirementName.trim();
Artifact requirement = getRequirement(requirementName, canonicalRequirementName);
- requirement.setSoleAttributeValue("Category", reqPriorities.get(canonicalRequirementName));
+ requirement.setSoleAttributeValue(CoreAttributeTypes.Category, reqPriorities.get(canonicalRequirementName)); requirement.persist(transaction);
} catch (OseeCoreException ex) {
OseeLog.log(SkynetGuiPlugin.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AbstractWordAttributeHealthOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AbstractWordAttributeHealthOperation.java index f9f93a61eb8..89a286600ba 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AbstractWordAttributeHealthOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AbstractWordAttributeHealthOperation.java @@ -31,9 +31,7 @@ import org.eclipse.osee.framework.core.client.server.HttpUrlBuilderClient; import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.data.OseeServerContext; import org.eclipse.osee.framework.core.exception.OseeCoreException; -import org.eclipse.osee.framework.core.exception.OseeDataStoreException; import org.eclipse.osee.framework.core.exception.OseeExceptions; -import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.util.HttpProcessor; @@ -116,12 +114,11 @@ public abstract class AbstractWordAttributeHealthOperation extends DatabaseHealt @Override protected void doWork(IProgressMonitor monitor) throws Exception { - IAttributeType[] attributeTypeNames = new IAttributeType[] {WordTemplateContent, WholeWordContent}; + IAttributeType[] attributeTypes = new IAttributeType[] {WordTemplateContent, WholeWordContent}; monitor.setTaskName("Load Attribute Data"); List<AttrData> attrDatas = new ArrayList<AttrData>(); - for (IAttributeType attributeTypeName : attributeTypeNames) { - AttributeType attributeType = AttributeTypeManager.getType(attributeTypeName); + for (IAttributeType attributeType : attributeTypes) { attrDatas.addAll(loadAttributeData(monitor, attributeType)); } monitor.worked(calculateWork(0.20)); @@ -154,11 +151,11 @@ public abstract class AbstractWordAttributeHealthOperation extends DatabaseHealt } } - private List<AttrData> loadAttributeData(IProgressMonitor monitor, AttributeType attributeType) throws OseeDataStoreException { + private List<AttrData> loadAttributeData(IProgressMonitor monitor, IAttributeType attributeType) throws OseeCoreException { List<AttrData> attrData = new ArrayList<AttrData>(); IOseeStatement chStmt = ConnectionHandler.getStatement(); try { - chStmt.runPreparedQuery(GET_ATTRS, attributeType.getId()); + chStmt.runPreparedQuery(GET_ATTRS, AttributeTypeManager.getTypeId(attributeType)); while (chStmt.next()) { checkForCancelledStatus(monitor); String uri = chStmt.getString("uri"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java index 0a7c91f0cbf..40ab35ded0d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java @@ -26,6 +26,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.xml.parsers.ParserConfigurationException; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -145,7 +146,7 @@ public class UpdateArtifactOperation extends AbstractOperation { String.format("Skipping update - artifact [%s] is read-only", artifact.toString())); } - private void updateNativeArtifact(Artifact artifact, CoreAttributeTypes attributeType) throws OseeCoreException, FileNotFoundException { + private void updateNativeArtifact(Artifact artifact, IAttributeType attributeType) throws OseeCoreException, FileNotFoundException { if (!artifact.isReadOnly()) { InputStream stream = null; try { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java index 713227708fc..e1f68dcbf01 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java @@ -17,6 +17,7 @@ import java.util.Map; import java.util.logging.Level; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeExceptions; import org.eclipse.osee.framework.core.exception.OseeWrappedException; @@ -337,8 +338,8 @@ public class WordMLProducer extends Producer { */ public void setPageLayout(Artifact artifact) throws OseeCoreException { String pageTypeValue = null; - if (artifact.isAttributeTypeValid("Page Type")) { - pageTypeValue = artifact.getSoleAttributeValue("Page Type", "Portrait"); + if (artifact.isAttributeTypeValid(CoreAttributeTypes.PageType)) { + pageTypeValue = artifact.getSoleAttributeValue(CoreAttributeTypes.PageType, "Portrait"); } boolean landscape = pageTypeValue != null && pageTypeValue.equals("Landscape"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java index b5260f37bc4..b5899e84c23 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java @@ -412,9 +412,8 @@ public class WordTemplateProcessor { } } } else { - - if (artifact.isAttributeTypeValid(attributeName)) { - AttributeType attributeType = AttributeTypeManager.getType(attributeName); + AttributeType attributeType = AttributeTypeManager.getType(attributeName); + if (artifact.isAttributeTypeValid(attributeType)) { processAttribute(variableMap, artifact, wordMl, attributeElement, attributeType, false, presentationType, multipleArtifacts); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java index 1f21ab2c4f9..9fd8c650714 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java @@ -37,7 +37,7 @@ public final class BasicTemplateAttributeHandler implements ITemplateAttributeHa @Override public void process(WordMLProducer wordMl, Artifact artifact, TemplateAttribute templateAttribute) throws OseeCoreException { AttributeType attributeType = AttributeTypeManager.getType(templateAttribute.getName()); - Collection<Attribute<Object>> attributes = artifact.getAttributes(attributeType.getName()); + Collection<Attribute<Object>> attributes = artifact.getAttributes(attributeType); if (!attributes.isEmpty()) { Attribute<Object> attribute = attributes.iterator().next(); attributeType = attribute.getAttributeType(); @@ -64,7 +64,7 @@ public final class BasicTemplateAttributeHandler implements ITemplateAttributeHa if (attributeType.equals(CoreAttributeTypes.WordTemplateContent)) { wordMl.addWordMl((String) attribute.getValue()); } else { - valueList = Collections.toString(", ", artifact.getAttributes(templateAttribute.getName())); + valueList = Collections.toString(", ", artifact.getAttributes(attributeType)); if (templateAttribute.hasFormatting()) { if (templateAttribute.getFormat().contains(">x<")) { wordMl.addWordMl(templateAttribute.getFormat().replace(">x<", ">" + valueList + "<")); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/SRSSpecialPublishingAttributeHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/SRSSpecialPublishingAttributeHandler.java index 9f55729cc72..b0d00a55ee1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/SRSSpecialPublishingAttributeHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/SRSSpecialPublishingAttributeHandler.java @@ -31,7 +31,7 @@ public class SRSSpecialPublishingAttributeHandler implements ITemplateAttributeH public boolean canHandle(Artifact artifact, TemplateAttribute attribute) throws OseeCoreException { // This is for SRS Publishing. Do not publish unspecified attributes if (attribute.getName().equals(CoreAttributeTypes.Partition.getName()) || attribute.getName().equals( - "Safety Criticality")) { + CoreAttributeTypes.SafetyCriticality.getName())) { for (Attribute<?> partition : artifact.getAttributes(CoreAttributeTypes.Partition)) { if (partition.getValue().equals("Unspecified")) { return true; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordAttributeTypeAttributeHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordAttributeTypeAttributeHandler.java index bbebf27f65e..2dcd35e48b1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordAttributeTypeAttributeHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordAttributeTypeAttributeHandler.java @@ -17,6 +17,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.xml.Xml; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.Attribute; +import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager; import org.eclipse.osee.framework.ui.skynet.render.word.WordMLProducer; /** @@ -26,7 +27,8 @@ public final class WordAttributeTypeAttributeHandler implements ITemplateAttribu @Override public void process(WordMLProducer wordMl, Artifact artifact, TemplateAttribute templateAttribute) throws OseeCoreException { - Collection<Attribute<Object>> attributes = artifact.getAttributes(templateAttribute.getName()); + Collection<Attribute<Object>> attributes = + artifact.getAttributes(AttributeTypeManager.getType(templateAttribute.getName())); if (!attributes.isEmpty()) { Attribute<Object> attribute = attributes.iterator().next(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java index 5d6bf5848ce..f6fb69ab214 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java @@ -20,6 +20,7 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; +import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager; import org.eclipse.osee.framework.skynet.core.word.WordUtil; import org.eclipse.osee.framework.ui.skynet.render.word.WordMLProducer; @@ -190,7 +191,8 @@ public class WordTemplateManager { performedOutLining = true; String headingText = - artifact.getSoleAttributeValue(artifactProcessingTask.getHeadingAttributeName(), ""); + artifact.getSoleAttributeValue( + AttributeTypeManager.getType(artifactProcessingTask.getHeadingAttributeName()), ""); wordMl.startOutlineSubSection("Times New Roman", headingText, null); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java index 81fa97de958..575f26459e9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java @@ -29,6 +29,7 @@ import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; +import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.type.AttributeType; @@ -158,8 +159,8 @@ public class AttributeFindReplaceDialog extends Dialog { protected void okPressed() { final Pattern pattern = Pattern.compile(txtFindRegEx.getText()); final String replaceText = txtReplaceStr.getText(); - final String attributeName = - ((AttributeType) ((IStructuredSelection) cmbAttributeDescriptors.getSelection()).getFirstElement()).getName(); + final IAttributeType attributeType = + ((IAttributeType) ((IStructuredSelection) cmbAttributeDescriptors.getSelection()).getFirstElement()); Job job = new Job("Find/Replace") { @@ -168,12 +169,12 @@ public class AttributeFindReplaceDialog extends Dialog { IStatus toReturn = Status.CANCEL_STATUS; Branch branch = artifacts.get(0).getBranch(); try { - monitor.beginTask("Find/Replace " + attributeName + " Attribute Value", artifacts.size()); + monitor.beginTask("Find/Replace " + attributeType + " Attribute Value", artifacts.size()); SkynetTransaction transaction = new SkynetTransaction(branch, "Attribute find replace dialog"); for (Artifact artifact : artifacts) { monitor.subTask("Modifying " + artifact.getName()); - for (Attribute<?> attribute : artifact.getAttributes(attributeName)) { + for (Attribute<?> attribute : artifact.getAttributes(attributeType)) { Matcher matcher = pattern.matcher(attribute.toString()); attribute.setFromString(matcher.replaceAll(replaceText)); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java index 0da63cd6a56..c4bb9c23ef8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java @@ -18,6 +18,7 @@ import java.util.HashMap; import java.util.List; import java.util.logging.Level; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -45,7 +46,7 @@ public class ArtifactTemplateProvider implements ITemplateProvider { templates = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.RendererTemplate, BranchManager.getCommonBranch()); for (Artifact art : templates) { - Collection<Attribute<String>> attrs = art.getAttributes("Template Match Criteria"); + Collection<Attribute<String>> attrs = art.getAttributes(CoreAttributeTypes.TemplateMatchCriteria); for (Attribute<String> attr : attrs) { String matchCriteria = attr.getValue(); Artifact cachedArt = templateMap.get(matchCriteria); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java index bb819d20ac5..ab443b5ba94 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java @@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets; import java.util.HashSet; import java.util.Set; import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Collections; import org.eclipse.osee.framework.logging.OseeLevel; @@ -29,8 +30,6 @@ import org.eclipse.osee.framework.ui.swt.Displays; * @author Donald G. Dunne */ public class SkynetSpellModifyDictionary implements XTextSpellModifyDictionary, IOseeDictionary { - - private static String ATTRIBUTE_NAME = "Dictionary"; private static Set<String> dictionary; private final boolean debug = false; @@ -59,11 +58,11 @@ public class SkynetSpellModifyDictionary implements XTextSpellModifyDictionary, "Add \"" + word + "\" to " + type + " Dictionary")) { try { Set<String> words = new HashSet<String>(); - for (String str : art.getSoleAttributeValue(ATTRIBUTE_NAME, "").split(";")) { + for (String str : art.getSoleAttributeValue(CoreAttributeTypes.Dictionary, "").split(";")) { words.add(str); } words.add(word); - art.setSoleAttributeValue(ATTRIBUTE_NAME, Collections.toString(";", words)); + art.setSoleAttributeValue(CoreAttributeTypes.Dictionary, Collections.toString(";", words)); art.persist(); loadDictionary(true); return true; @@ -95,7 +94,7 @@ public class SkynetSpellModifyDictionary implements XTextSpellModifyDictionary, dictionary = new HashSet<String>(); User user = UserManager.getUser(); if (user != null) { - String value = user.getSoleAttributeValue(ATTRIBUTE_NAME, ""); + String value = user.getSoleAttributeValue(CoreAttributeTypes.Dictionary, ""); if (value != null) { String[] entries = value.split(";"); for (String str : entries) { @@ -107,7 +106,7 @@ public class SkynetSpellModifyDictionary implements XTextSpellModifyDictionary, } } for (String str : OseeSystemArtifacts.getGlobalPreferenceArtifact().getSoleAttributeValue( - ATTRIBUTE_NAME, "").split(";")) { + CoreAttributeTypes.Dictionary, "").split(";")) { if (debug) { System.out.println("Adding Global => \"" + str + "\""); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java index a73e8dc05ad..d9887dd788f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java @@ -21,6 +21,7 @@ import java.util.Set; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeStateException; @@ -61,16 +62,16 @@ public class WorkFlowDefinition extends WorkItemWithChildrenDefinition { } public WorkFlowDefinition(Artifact artifact) throws OseeCoreException { - this(artifact.getName(), artifact.getSoleAttributeValue(WorkItemAttributes.WORK_ID, ""), - artifact.getSoleAttributeValue(WorkItemAttributes.WORK_PARENT_ID, (String) null)); - setType(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_TYPE, (String) null)); + this(artifact.getName(), artifact.getSoleAttributeValue(CoreAttributeTypes.WorkId, ""), + artifact.getSoleAttributeValue(CoreAttributeTypes.WorkParentId, (String) null)); + setType(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkType, (String) null)); loadWorkDataKeyValueMap(artifact); // Add local transitions from this artifact addTransitionsFromArtifact(artifact, pageIdToPageIdsViaTransitionType, getId()); // Read in this workflow's start page - startPageId = artifact.getSoleAttributeValue(WorkItemAttributes.WORK_START_PAGE, (String) null); + startPageId = artifact.getSoleAttributeValue(CoreAttributeTypes.WorkStartPage, (String) null); this.artifact = artifact; } @@ -85,7 +86,7 @@ public class WorkFlowDefinition extends WorkItemWithChildrenDefinition { } // Only store start page if it's part of this definition if (startPageId != null) { - art.setSoleAttributeFromString(WorkItemAttributes.WORK_START_PAGE, startPageId); + art.setSoleAttributeFromString(CoreAttributeTypes.WorkStartPage, startPageId); } // Store transition items declared as part of this definition List<String> transitionItems = new ArrayList<String>(); @@ -98,7 +99,7 @@ public class WorkFlowDefinition extends WorkItemWithChildrenDefinition { } } if (transitionItems.size() > 0) { - art.setAttributeValues(WorkItemAttributes.WORK_TRANSITION, transitionItems); + art.setAttributeValues(CoreAttributeTypes.WorkTransition, transitionItems); } return art; } @@ -205,7 +206,7 @@ public class WorkFlowDefinition extends WorkItemWithChildrenDefinition { // Get work rules from team definition for (Artifact art : WorkItemDefinitionFactory.getWorkItemDefinitionArtifact(getId()).getRelatedArtifacts( CoreRelationTypes.WorkItem__Child)) { - String id = art.getSoleAttributeValue(WorkItemAttributes.WORK_ID, ""); + String id = art.getSoleAttributeValue(CoreAttributeTypes.WorkId, ""); if (id != null && !id.equals("")) { workRules.add((WorkRuleDefinition) WorkItemDefinitionFactory.getWorkItemDefinition(id)); } @@ -244,7 +245,7 @@ public class WorkFlowDefinition extends WorkItemWithChildrenDefinition { return; } // Read in this workflow's transition information - for (String transition : artifact.getAttributesToStringList(WorkItemAttributes.WORK_TRANSITION)) { + for (String transition : artifact.getAttributesToStringList(CoreAttributeTypes.WorkTransition)) { String[] strs = transition.split(";"); if (strs.length != 3) { OseeLog.log( diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemAttributes.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemAttributes.java deleted file mode 100644 index 563b5fc2057..00000000000 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemAttributes.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.framework.ui.skynet.widgets.workflow; - -import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.NamedIdentity; - -/** - * @author Donald G. Dunne - */ -public class WorkItemAttributes extends NamedIdentity implements IAttributeType { - - public static final WorkItemAttributes WORK_DATA = new WorkItemAttributes("AAMFEbyhslOoQf3+hyAA", "Work Data"); - public static final WorkItemAttributes WORK_ID = new WorkItemAttributes("AAMFEb0hXw933Zrje2QA", "Work Id"); - public static final WorkItemAttributes WORK_TYPE = new WorkItemAttributes("AAMFEb2f9nh42sjMHfAA", "Work Type"); - public static final WorkItemAttributes WORK_DESCRIPTION = new WorkItemAttributes("AAMFEb57TkhPHyzOLDwA", - "Work Description"); - public static final WorkItemAttributes WORK_PARENT_ID = new WorkItemAttributes("AAMFEb8R5y9WcjD5hcwA", - "Work Parent Id"); - public static final WorkItemAttributes WORK_PAGE_NAME = new WorkItemAttributes("AAMFEb+vCyCjKbzzHoQA", - "Work Page Name"); - public static final WorkItemAttributes WORK_TRANSITION = - new WorkItemAttributes("AAMFEcBLGB5U+55hJrQA", "Transition"); - public static final WorkItemAttributes WORK_START_PAGE = - new WorkItemAttributes("AAMFEcDfggQLaAdLlpQA", "Start Page"); - - private WorkItemAttributes(String guid, String name) { - super(guid, "osee.wi." + name); - } - -} diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinition.java index baa2ebbd1de..0f9a133c6c3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinition.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinition.java @@ -18,6 +18,7 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.osee.framework.core.data.IArtifactType; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeStateException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -168,7 +169,7 @@ public abstract class WorkItemDefinition { Artifact artifact = WorkItemDefinitionFactory.getWorkItemDefinitionArtifact(getId()); if (writeType == WriteType.New) { // Double-check that doesn't already exist in db. If so, exception cause duplicates - if (ArtifactQuery.getArtifactListFromAttribute(WorkItemAttributes.WORK_ID, getId(), + if (ArtifactQuery.getArtifactListFromAttribute(CoreAttributeTypes.WorkId, getId(), BranchManager.getCommonBranch()).size() > 0) { throw new IllegalStateException( "WorkItemDefinition artifact creation failed. \"" + getId() + "\" already exists."); @@ -184,21 +185,21 @@ public abstract class WorkItemDefinition { // } artifact.setName(getName()); if (getParentId() != null && !getParentId().equals("")) { - artifact.setSoleAttributeValue(WorkItemAttributes.WORK_PARENT_ID, getParentId()); + artifact.setSoleAttributeValue(CoreAttributeTypes.WorkParentId, getParentId()); } if (getDescription() != null) { - artifact.setSoleAttributeValue(WorkItemAttributes.WORK_DESCRIPTION, getDescription()); + artifact.setSoleAttributeValue(CoreAttributeTypes.WorkDescription, getDescription()); } - artifact.setSoleAttributeValue(WorkItemAttributes.WORK_ID, getId()); + artifact.setSoleAttributeValue(CoreAttributeTypes.WorkId, getId()); if (getType() != null) { - artifact.setSoleAttributeValue(WorkItemAttributes.WORK_TYPE, getType()); + artifact.setSoleAttributeValue(CoreAttributeTypes.WorkType, getType()); } if (workDataKeyValueMap.size() > 0) { Set<String> keyValues = new HashSet<String>(); for (Entry<String, String> entry : workDataKeyValueMap.entrySet()) { keyValues.add(entry.getKey() + "=" + entry.getValue()); } - artifact.setAttributeValues(WorkItemAttributes.WORK_DATA, keyValues); + artifact.setAttributeValues(CoreAttributeTypes.WorkData, keyValues); } WorkItemDefinitionFactory.cacheWorkItemDefinitionArtifact(writeType, this, artifact); return artifact; @@ -211,7 +212,7 @@ public abstract class WorkItemDefinition { } public void loadWorkDataKeyValueMap(Artifact artifact) throws OseeCoreException { - for (String value : artifact.getAttributesToStringList(WorkItemAttributes.WORK_DATA)) { + for (String value : artifact.getAttributesToStringList(CoreAttributeTypes.WorkData)) { Matcher m = keyValuePattern.matcher(value); if (m.find()) { addWorkDataKeyValue(m.group(1), m.group(2)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinitionFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinitionFactory.java index 464d8dfa01a..0934712aed9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinitionFactory.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemDefinitionFactory.java @@ -19,6 +19,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.logging.Level; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -110,14 +111,14 @@ public class WorkItemDefinitionFactory { public static void relateWorkItemDefinitions(String parentWorkflowId, String childWorkflowId) throws OseeCoreException { List<Artifact> parentArts = - ArtifactQuery.getArtifactListFromAttribute(WorkItemAttributes.WORK_ID, parentWorkflowId, + ArtifactQuery.getArtifactListFromAttribute(CoreAttributeTypes.WorkId, parentWorkflowId, BranchManager.getCommonBranch()); if (parentArts == null || parentArts.isEmpty()) { throw new IllegalArgumentException("Can't access parentWorkflowId " + parentWorkflowId); } Artifact parentArt = parentArts.iterator().next(); List<Artifact> childArts = - ArtifactQuery.getArtifactListFromAttribute(WorkItemAttributes.WORK_ID, childWorkflowId, + ArtifactQuery.getArtifactListFromAttribute(CoreAttributeTypes.WorkId, childWorkflowId, BranchManager.getCommonBranch()); if (childArts == null || childArts.isEmpty()) { throw new IllegalArgumentException("Can't access childWorkflowId " + childWorkflowId); @@ -182,7 +183,7 @@ public class WorkItemDefinitionFactory { WorkItemDefinition wid = itemIdToDefinition.get(id); if (wid == null) { // Attempt to get from DB - loadDefinitions(ArtifactQuery.getArtifactListFromAttribute(WorkItemAttributes.WORK_ID, id, + loadDefinitions(ArtifactQuery.getArtifactListFromAttribute(CoreAttributeTypes.WorkId, id, BranchManager.getCommonBranch())); } return itemIdToDefinition.get(id); @@ -196,7 +197,7 @@ public class WorkItemDefinitionFactory { Artifact art = itemIdToWidArtifact.get(id); if (art == null) { // Attempt to get from DB - loadDefinitions(ArtifactQuery.getArtifactListFromAttribute(WorkItemAttributes.WORK_ID, id, + loadDefinitions(ArtifactQuery.getArtifactListFromAttribute(CoreAttributeTypes.WorkId, id, BranchManager.getCommonBranch())); } return itemIdToWidArtifact.get(id); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemWithChildrenDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemWithChildrenDefinition.java index eca69da81a9..474dc1a035e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemWithChildrenDefinition.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkItemWithChildrenDefinition.java @@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets.workflow; import java.util.ArrayList; import java.util.List; import org.eclipse.osee.framework.core.data.IAttributeType; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -31,7 +32,7 @@ public abstract class WorkItemWithChildrenDefinition extends WorkItemDefinition public WorkItemWithChildrenDefinition(Artifact artifact, String itemName, String pageName, String pageId, String parentId) throws OseeCoreException { this(itemName, pageId, parentId); for (Artifact art : artifact.getRelatedArtifacts(CoreRelationTypes.WorkItem__Child)) { - String widId = art.getSoleAttributeValue(WorkItemAttributes.WORK_ID, (String) null); + String widId = art.getSoleAttributeValue(CoreAttributeTypes.WorkId, (String) null); workItemIds.add(widId); } } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java index 75414561b6e..35b74ef893e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java @@ -14,6 +14,7 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -35,13 +36,13 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition { public WorkPageDefinition(Artifact artifact) throws OseeCoreException { super(artifact, artifact.getName(), // - artifact.getSoleAttributeValue(WorkItemAttributes.WORK_PAGE_NAME, (String) null),// - artifact.getSoleAttributeValue(WorkItemAttributes.WORK_ID, (String) null), // - artifact.getSoleAttributeValue(WorkItemAttributes.WORK_PARENT_ID, (String) null)// + artifact.getSoleAttributeValue(CoreAttributeTypes.WorkPageName, (String) null),// + artifact.getSoleAttributeValue(CoreAttributeTypes.WorkId, (String) null), // + artifact.getSoleAttributeValue(CoreAttributeTypes.WorkParentId, (String) null)// ); - setType(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_TYPE, (String) null)); + setType(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkType, (String) null)); loadWorkDataKeyValueMap(artifact); - setPageName(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_PAGE_NAME, (String) null)); + setPageName(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkPageName, (String) null)); } @@ -66,7 +67,7 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition { Artifact art = super.toArtifact(writeType); // Only store start page if it's part of this definition if (pageName != null) { - art.setSoleAttributeFromString(WorkItemAttributes.WORK_PAGE_NAME, pageName); + art.setSoleAttributeFromString(CoreAttributeTypes.WorkPageName, pageName); } return art; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkRuleDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkRuleDefinition.java index af2bb0c96a0..750624bc771 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkRuleDefinition.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkRuleDefinition.java @@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets.workflow; import java.util.Map; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -43,9 +44,9 @@ public class WorkRuleDefinition extends WorkItemDefinition { } public WorkRuleDefinition(Artifact artifact) throws OseeCoreException { - this(artifact.getName(), artifact.getSoleAttributeValue(WorkItemAttributes.WORK_ID, ""), null, null); - setDescription(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_DESCRIPTION, "")); - setType(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_TYPE, (String) null)); + this(artifact.getName(), artifact.getSoleAttributeValue(CoreAttributeTypes.WorkId, ""), null, null); + setDescription(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkDescription, "")); + setType(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkType, (String) null)); loadWorkDataKeyValueMap(artifact); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkWidgetDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkWidgetDefinition.java index bfdc087380b..6c9beebd612 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkWidgetDefinition.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkWidgetDefinition.java @@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets.workflow; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; +import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.util.Conditions; import org.eclipse.osee.framework.logging.OseeLog; @@ -42,8 +43,8 @@ public class WorkWidgetDefinition extends WorkItemDefinition { } public WorkWidgetDefinition(Artifact artifact) throws OseeCoreException { - this(artifact.getName(), artifact.getSoleAttributeValue(WorkItemAttributes.WORK_ID, artifact.getName())); - setType(artifact.getSoleAttributeValue(WorkItemAttributes.WORK_TYPE, (String) null)); + this(artifact.getName(), artifact.getSoleAttributeValue(CoreAttributeTypes.WorkId, artifact.getName())); + setType(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkType, (String) null)); loadWorkDataKeyValueMap(artifact); DynamicXWidgetLayoutData data = getFromXml(getWorkDataValue(tagName)); @@ -53,7 +54,7 @@ public class WorkWidgetDefinition extends WorkItemDefinition { @Override public Artifact toArtifact(WriteType writeType) throws OseeCoreException { Artifact art = super.toArtifact(writeType); - art.setSoleAttributeFromString(WorkItemAttributes.WORK_DATA, tagName + "=" + XWidgetParser.toXml(get())); + art.setSoleAttributeFromString(CoreAttributeTypes.WorkData, tagName + "=" + XWidgetParser.toXml(get())); return art; } diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteAttributeTypes.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteAttributeTypes.java index 15466d9a565..bf0054dccf4 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteAttributeTypes.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteAttributeTypes.java @@ -14,49 +14,37 @@ import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.data.NamedIdentity; public class OteAttributeTypes extends NamedIdentity implements IAttributeType { - public static final OteAttributeTypes BUILD_ID = new OteAttributeTypes("AAMFEXG6_W9diA9nUXAA", "Build Id"); - public static final OteAttributeTypes CHECKSUM = new OteAttributeTypes("AAMFEXJbaHt5uKG9kogA", "Checksum"); - public static final OteAttributeTypes ELAPSED_DATE = new OteAttributeTypes("AAMFEWuD6yH04y89M3wA", "Elapsed Date"); - public static final OteAttributeTypes END_DATE = new OteAttributeTypes("AAMFEWryxym0P9FFckgA", "End Date"); - public static final OteAttributeTypes EXTENSION = new OteAttributeTypes("AAMFEcUbJEERZTnwJzAA", "Extension"); - public static final OteAttributeTypes FAILED = new OteAttributeTypes("AAMFEWynSU+XeRG7nRAA", "Failed"); - public static final OteAttributeTypes IS_BATCH_MODE_ALLOWED = new OteAttributeTypes("AAMFEW+CcA6F5GEjsSgA", - "Is Batch Mode Allowed"); - public static final OteAttributeTypes LAST_AUTHOR = new OteAttributeTypes("AAMFEWE83iPq3+2DGrQA", "Last Author"); - public static final OteAttributeTypes LAST_DATE_UPLOADED = new OteAttributeTypes("AAMFEXCm5ju5gvq142QA", - "Last Date Uploaded"); - public static final OteAttributeTypes LAST_MODIFIED_DATE = new OteAttributeTypes("AAMFEWHw7V1uWv4IKcQA", - "Last Modified Date"); - public static final OteAttributeTypes MODIFIED_FLAG = new OteAttributeTypes("AAMFEWCruiS26nCN68wA", "Modified Flag"); - public static final OteAttributeTypes OSEE_SERVER_JAR_VERSION = new OteAttributeTypes("AAMFEWV1OQtXL67OfOQA", - "OSEE Server Jar Version"); - public static final OteAttributeTypes OSEE_SERVER_TITLE = new OteAttributeTypes("AAMFEWTnXGYRfdzY3gAA", - "OSEE Server Title"); - public static final OteAttributeTypes OSEE_VERSION = new OteAttributeTypes("AAMFEWQ_TTkstJvjnGQA", "OSEE Version"); - public static final OteAttributeTypes OS_ARCHITECTURE = new OteAttributeTypes("AAMFEWKJtG+Jc8OkRYgA", - "OS Architecture"); - public static final OteAttributeTypes OS_NAME = new OteAttributeTypes("AAMFEWMdBmP9aCgsysgA", "OS Name"); - public static final OteAttributeTypes OS_VERSION = new OteAttributeTypes("AAMFEWOvQWV6JJvh9NQA", "OS Version"); - public static final OteAttributeTypes OUTFILE_URL = new OteAttributeTypes("AAMFEVlyBndUvySg+gwA", "Outfile URL"); - public static final OteAttributeTypes PASSED = new OteAttributeTypes("AAMFEWwT92IzQp6Dh3gA", "Passed"); - public static final OteAttributeTypes PROCESSOR_ID = new OteAttributeTypes("AAMFEWYOAGkplo4RjTQA", "Processor ID"); - public static final OteAttributeTypes QUALIFICATION_LEVEL = new OteAttributeTypes("AAMFEXEvTztOWwoGyRAA", - "Qualification Level"); - public static final OteAttributeTypes RAN_IN_BATCH_MODE = new OteAttributeTypes("AAMFEW7uBlg0KLp8mhQA", - "Ran In Batch Mode"); - public static final OteAttributeTypes REVISION = new OteAttributeTypes("AAMFEWAal2I3j7EJligA", "Revision"); - public static final OteAttributeTypes SCRIPT_ABORTED = new OteAttributeTypes("AAMFEW3M12AqHsCve4AA", - "Script Aborted"); - public static final OteAttributeTypes START_DATE = new OteAttributeTypes("AAMFEWpeXjfr2W5ZT5QA", "Start Date"); - public static final OteAttributeTypes TEST_SCRIPT_GUID = new OteAttributeTypes("AAMFEW5fEhinpcjeZ0wA", - "Test Script GUID"); - public static final OteAttributeTypes TEST_SCRIPT_URL = new OteAttributeTypes("AAMFEVn0+mhxtCuACgAA", - "Test Script URL"); - public static final OteAttributeTypes TOTAL_TEST_POINTS = new OteAttributeTypes("AAMFEW05hBfECFGfZkgA", - "Total Test Points"); - public static final OteAttributeTypes TEST_DISPOSITION = - new OteAttributeTypes("AAMFEXfoPWRZHNiOR3gA", "Disposition"); + // @formatter:off + public static final IAttributeType BUILD_ID = new OteAttributeTypes("AAMFEXG6_W9diA9nUXAA", "Build Id"); + public static final IAttributeType CHECKSUM = new OteAttributeTypes("AAMFEXJbaHt5uKG9kogA", "Checksum"); + public static final IAttributeType ELAPSED_DATE = new OteAttributeTypes("AAMFEWuD6yH04y89M3wA", "Elapsed Date"); + public static final IAttributeType END_DATE = new OteAttributeTypes("AAMFEWryxym0P9FFckgA", "End Date"); + public static final IAttributeType EXTENSION = new OteAttributeTypes("AAMFEcUbJEERZTnwJzAA", "Extension"); + public static final IAttributeType FAILED = new OteAttributeTypes("AAMFEWynSU+XeRG7nRAA", "Failed"); + public static final IAttributeType IS_BATCH_MODE_ALLOWED = new OteAttributeTypes("AAMFEW+CcA6F5GEjsSgA", "Is Batch Mode Allowed"); + public static final IAttributeType LAST_AUTHOR = new OteAttributeTypes("AAMFEWE83iPq3+2DGrQA", "Last Author"); + public static final IAttributeType LAST_DATE_UPLOADED = new OteAttributeTypes("AAMFEXCm5ju5gvq142QA", "Last Date Uploaded"); + public static final IAttributeType LAST_MODIFIED_DATE = new OteAttributeTypes("AAMFEWHw7V1uWv4IKcQA", "Last Modified Date"); + public static final IAttributeType MODIFIED_FLAG = new OteAttributeTypes("AAMFEWCruiS26nCN68wA", "Modified Flag"); + public static final IAttributeType OSEE_SERVER_JAR_VERSION = new OteAttributeTypes("AAMFEWV1OQtXL67OfOQA", "OSEE Server Jar Version"); + public static final IAttributeType OSEE_SERVER_TITLE = new OteAttributeTypes("AAMFEWTnXGYRfdzY3gAA", "OSEE Server Title"); + public static final IAttributeType OSEE_VERSION = new OteAttributeTypes("AAMFEWQ_TTkstJvjnGQA", "OSEE Version"); + public static final IAttributeType OS_ARCHITECTURE = new OteAttributeTypes("AAMFEWKJtG+Jc8OkRYgA", "OS Architecture"); + public static final IAttributeType OS_NAME = new OteAttributeTypes("AAMFEWMdBmP9aCgsysgA", "OS Name"); + public static final IAttributeType OS_VERSION = new OteAttributeTypes("AAMFEWOvQWV6JJvh9NQA", "OS Version"); + public static final IAttributeType OUTFILE_URL = new OteAttributeTypes("AAMFEVlyBndUvySg+gwA", "Outfile URL"); + public static final IAttributeType PASSED = new OteAttributeTypes("AAMFEWwT92IzQp6Dh3gA", "Passed"); + public static final IAttributeType PROCESSOR_ID = new OteAttributeTypes("AAMFEWYOAGkplo4RjTQA", "Processor ID"); + public static final IAttributeType QUALIFICATION_LEVEL = new OteAttributeTypes("AAMFEXEvTztOWwoGyRAA", "Qualification Level"); + public static final IAttributeType RAN_IN_BATCH_MODE = new OteAttributeTypes("AAMFEW7uBlg0KLp8mhQA", "Ran In Batch Mode"); + public static final IAttributeType REVISION = new OteAttributeTypes("AAMFEWAal2I3j7EJligA", "Revision"); + public static final IAttributeType SCRIPT_ABORTED = new OteAttributeTypes("AAMFEW3M12AqHsCve4AA", "Script Aborted"); + public static final IAttributeType START_DATE = new OteAttributeTypes("AAMFEWpeXjfr2W5ZT5QA", "Start Date"); + public static final IAttributeType TEST_SCRIPT_URL = new OteAttributeTypes("AAMFEVn0+mhxtCuACgAA", "Test Script URL"); + public static final IAttributeType TOTAL_TEST_POINTS = new OteAttributeTypes("AAMFEW05hBfECFGfZkgA", "Total Test Points"); + public static final IAttributeType TestDisposition = new OteAttributeTypes("AAMFEXfoPWRZHNiOR3gA", "Disposition"); + // @formatter:on private OteAttributeTypes(String guid, String name) { super(guid, name); diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java index f98ff6e1ac8..b078b045637 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java @@ -16,8 +16,8 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.logging.Level; +import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; import org.eclipse.osee.framework.core.exception.MultipleArtifactsExist; import org.eclipse.osee.framework.core.exception.OseeArgumentException; @@ -34,9 +34,9 @@ import org.eclipse.osee.ote.define.OteDefinePlugin; * @author Roberto E. Escobar */ public class OteArtifactFetcher<T extends Artifact> { - private final CoreArtifactTypes oteArtifactType; + private final IArtifactType oteArtifactType; - protected OteArtifactFetcher(CoreArtifactTypes oteArtifactType) { + protected OteArtifactFetcher(IArtifactType oteArtifactType) { this.oteArtifactType = oteArtifactType; } @@ -49,7 +49,7 @@ public class OteArtifactFetcher<T extends Artifact> { @SuppressWarnings("unchecked") public T getNewArtifact(Branch branch) throws OseeCoreException { checkForNull(branch); - return (T) ArtifactTypeManager.addArtifact(oteArtifactType.getName(), branch); + return (T) ArtifactTypeManager.addArtifact(oteArtifactType, branch); } /** diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java index acf25b13622..04252d6949c 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java @@ -10,9 +10,19 @@ *******************************************************************************/ package org.eclipse.osee.ote.define.artifacts; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.END_DATE; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.FAILED; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.IS_BATCH_MODE_ALLOWED; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.LAST_MODIFIED_DATE; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.PASSED; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.RAN_IN_BATCH_MODE; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.SCRIPT_ABORTED; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.START_DATE; +import static org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes.TOTAL_TEST_POINTS; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; +import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.ote.define.TestRunField; @@ -26,52 +36,50 @@ public class OteToAttributeMap { private static final SimpleDateFormat lastModifiedFormat = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss a"); private static OteToAttributeMap instance = null; - private static Map<TestRunField, String> outfileFieldToAttributeMap; + private static Map<TestRunField, IAttributeType> outfileFieldToAttributeMap; private OteToAttributeMap() { - outfileFieldToAttributeMap = new HashMap<TestRunField, String>(); - - outfileFieldToAttributeMap.put(TestRunField.USER_ID, CoreAttributeTypes.UserId.getName()); - - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_REVISION, OteAttributeTypes.REVISION.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_MODIFIED_FLAG, OteAttributeTypes.MODIFIED_FLAG.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_LAST_AUTHOR, OteAttributeTypes.LAST_AUTHOR.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_LAST_MODIFIED, OteAttributeTypes.LAST_MODIFIED_DATE.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_URL, OteAttributeTypes.TEST_SCRIPT_URL.getName()); - - outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OS_ARCH, OteAttributeTypes.OS_ARCHITECTURE.getName()); - outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OS_NAME, OteAttributeTypes.OS_NAME.getName()); - outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OS_VERSION, OteAttributeTypes.OS_VERSION.getName()); - outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OSEE_VERSION, OteAttributeTypes.OSEE_VERSION.getName()); - outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OSEE_SERVER_TITLE, - OteAttributeTypes.OSEE_SERVER_TITLE.getName()); + outfileFieldToAttributeMap = new HashMap<TestRunField, IAttributeType>(); + + outfileFieldToAttributeMap.put(TestRunField.USER_ID, CoreAttributeTypes.UserId); + + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_REVISION, OteAttributeTypes.REVISION); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_MODIFIED_FLAG, OteAttributeTypes.MODIFIED_FLAG); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_LAST_AUTHOR, OteAttributeTypes.LAST_AUTHOR); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_LAST_MODIFIED, OteAttributeTypes.LAST_MODIFIED_DATE); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_URL, OteAttributeTypes.TEST_SCRIPT_URL); + + outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OS_ARCH, OteAttributeTypes.OS_ARCHITECTURE); + outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OS_NAME, OteAttributeTypes.OS_NAME); + outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OS_VERSION, OteAttributeTypes.OS_VERSION); + outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OSEE_VERSION, OteAttributeTypes.OSEE_VERSION); + outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OSEE_SERVER_TITLE, OteAttributeTypes.OSEE_SERVER_TITLE); outfileFieldToAttributeMap.put(TestRunField.SYSTEM_OSEE_SERVER_JAR_VERSIONS, - OteAttributeTypes.OSEE_SERVER_JAR_VERSION.getName()); + OteAttributeTypes.OSEE_SERVER_JAR_VERSION); - outfileFieldToAttributeMap.put(TestRunField.PROCESSOR_ID, OteAttributeTypes.PROCESSOR_ID.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_START_DATE, OteAttributeTypes.START_DATE.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_END_DATE, OteAttributeTypes.END_DATE.getName()); - outfileFieldToAttributeMap.put(TestRunField.SCRIPT_ELAPSED_TIME, OteAttributeTypes.ELAPSED_DATE.getName()); + outfileFieldToAttributeMap.put(TestRunField.PROCESSOR_ID, OteAttributeTypes.PROCESSOR_ID); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_START_DATE, OteAttributeTypes.START_DATE); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_END_DATE, OteAttributeTypes.END_DATE); + outfileFieldToAttributeMap.put(TestRunField.SCRIPT_ELAPSED_TIME, OteAttributeTypes.ELAPSED_DATE); - outfileFieldToAttributeMap.put(TestRunField.TEST_POINTS_PASSED, OteAttributeTypes.PASSED.getName()); - outfileFieldToAttributeMap.put(TestRunField.TEST_POINTS_FAILED, OteAttributeTypes.FAILED.getName()); - outfileFieldToAttributeMap.put(TestRunField.TOTAL_TEST_POINTS, OteAttributeTypes.TOTAL_TEST_POINTS.getName()); - outfileFieldToAttributeMap.put(TestRunField.TEST_ABORT_STATUS, OteAttributeTypes.SCRIPT_ABORTED.getName()); + outfileFieldToAttributeMap.put(TestRunField.TEST_POINTS_PASSED, OteAttributeTypes.PASSED); + outfileFieldToAttributeMap.put(TestRunField.TEST_POINTS_FAILED, OteAttributeTypes.FAILED); + outfileFieldToAttributeMap.put(TestRunField.TOTAL_TEST_POINTS, OteAttributeTypes.TOTAL_TEST_POINTS); + outfileFieldToAttributeMap.put(TestRunField.TEST_ABORT_STATUS, OteAttributeTypes.SCRIPT_ABORTED); - outfileFieldToAttributeMap.put(TestRunField.QUALIFICATION_LEVEL, OteAttributeTypes.QUALIFICATION_LEVEL.getName()); + outfileFieldToAttributeMap.put(TestRunField.QUALIFICATION_LEVEL, OteAttributeTypes.QUALIFICATION_LEVEL); - outfileFieldToAttributeMap.put(TestRunField.BUILD_ID, OteAttributeTypes.BUILD_ID.getName()); + outfileFieldToAttributeMap.put(TestRunField.BUILD_ID, OteAttributeTypes.BUILD_ID); - outfileFieldToAttributeMap.put(TestRunField.IS_BATCH_MODE_ALLOWED, - OteAttributeTypes.IS_BATCH_MODE_ALLOWED.getName()); - outfileFieldToAttributeMap.put(TestRunField.RAN_IN_BATCH_MODE, OteAttributeTypes.RAN_IN_BATCH_MODE.getName()); + outfileFieldToAttributeMap.put(TestRunField.IS_BATCH_MODE_ALLOWED, OteAttributeTypes.IS_BATCH_MODE_ALLOWED); + outfileFieldToAttributeMap.put(TestRunField.RAN_IN_BATCH_MODE, OteAttributeTypes.RAN_IN_BATCH_MODE); // outfileFieldToAttributeMap.put(TestRunField.SCRIPT_EXECUTION_TIME, // OTE_SKYNET_ATTRIBUTES.EgetName()); // outfileFieldToAttributeMap.put(TestRunField.SCRIPT_EXECUTION_RESULTS, - // OTE_SKYNET_ATTRIBUTES.getName()); + // OTE_SKYNET_ATTRIBUTES); // outfileFieldToAttributeMap.put(TestRunField.SCRIPT_EXECUTION_ERRORS, - // OTE_SKYNET_ATTRIBUTES.getName()); + // OTE_SKYNET_ATTRIBUTES); } public static OteToAttributeMap getInstance() { @@ -81,7 +89,7 @@ public class OteToAttributeMap { return instance; } - public String getAttributeName(String rawName) { + public IAttributeType getAttributeType(String rawName) { TestRunField field = getFieldId(rawName); return outfileFieldToAttributeMap.get(field); } @@ -96,16 +104,16 @@ public class OteToAttributeMap { return field; } - public Object asTypedObject(String attribute, String value) throws Exception { + public Object asTypedObject(IAttributeType attributeType, String value) throws Exception { Object toReturn = null; - if (isDate(attribute) != false) { - toReturn = getFormat(attribute).parse(value); - } else if (isInteger(attribute) != false) { + if (isDate(attributeType)) { + toReturn = getFormat(attributeType).parse(value); + } else if (isInteger(attributeType) != false) { if (Strings.isValid(value) != true) { value = "0"; } toReturn = new Integer(value); - } else if (isBoolean(attribute) != false) { + } else if (isBoolean(attributeType) != false) { if (Strings.isValid(value) != true) { value = "false"; } @@ -116,24 +124,22 @@ public class OteToAttributeMap { return toReturn; } - private SimpleDateFormat getFormat(String attribute) { - SimpleDateFormat toReturn = scriptStartEndDataFormat; - if (attribute.equals(OteAttributeTypes.LAST_MODIFIED_DATE.getName())) { - toReturn = lastModifiedFormat; + private SimpleDateFormat getFormat(IAttributeType attributeType) { + if (attributeType.equals(LAST_MODIFIED_DATE)) { + return lastModifiedFormat; } - return toReturn; + return scriptStartEndDataFormat; } - private boolean isDate(String attribute) { - return attribute.equals(OteAttributeTypes.LAST_MODIFIED_DATE.getName()) || attribute.equals(OteAttributeTypes.START_DATE.getName()) || attribute.equals(OteAttributeTypes.END_DATE.getName()); + private boolean isDate(IAttributeType attributeType) { + return attributeType.matches(LAST_MODIFIED_DATE, START_DATE, END_DATE); } - private boolean isInteger(String attribute) { - return attribute.equals(OteAttributeTypes.TOTAL_TEST_POINTS.getName()) || attribute.equals(OteAttributeTypes.PASSED.getName()) || attribute.equals(OteAttributeTypes.FAILED.getName()); + private boolean isInteger(IAttributeType attributeType) { + return attributeType.matches(TOTAL_TEST_POINTS, PASSED, FAILED); } - private boolean isBoolean(String attribute) { - return attribute.equals(OteAttributeTypes.SCRIPT_ABORTED.getName()) || attribute.equals(OteAttributeTypes.RAN_IN_BATCH_MODE.getName()) || attribute.equals(OteAttributeTypes.IS_BATCH_MODE_ALLOWED.getName()); + private boolean isBoolean(IAttributeType attributeType) { + return attributeType.matches(SCRIPT_ABORTED, RAN_IN_BATCH_MODE, IS_BATCH_MODE_ALLOWED); } - -} +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/TestRunOperator.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/TestRunOperator.java index 6cc1d991625..fe47235ac3e 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/TestRunOperator.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/TestRunOperator.java @@ -15,6 +15,7 @@ import java.io.InputStream; import java.net.URI; import java.util.Date; import java.util.List; +import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist; @@ -87,35 +88,35 @@ public class TestRunOperator { } public String getScriptRevision() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.REVISION.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.REVISION, ""); } public String getScriptUrl() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.TEST_SCRIPT_URL.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.TEST_SCRIPT_URL, ""); } public void setLastDateUploaded(Date value) throws OseeCoreException { - artifact.setSoleAttributeValue(OteAttributeTypes.LAST_DATE_UPLOADED.getName(), value); + artifact.setSoleAttributeValue(OteAttributeTypes.LAST_DATE_UPLOADED, value); } public Date getLastDateUploaded() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.LAST_DATE_UPLOADED.getName(), null); + return artifact.getSoleAttributeValue(OteAttributeTypes.LAST_DATE_UPLOADED, null); } public void setChecksum(String value) throws OseeCoreException { - artifact.setSoleAttributeValue(OteAttributeTypes.CHECKSUM.getName(), value); + artifact.setSoleAttributeValue(OteAttributeTypes.CHECKSUM, value); } public String getChecksum() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.CHECKSUM.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.CHECKSUM, ""); } public String getOutfileExtension() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.EXTENSION.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.EXTENSION, ""); } public void setOutfileExtension(String outfile) throws OseeCoreException { - artifact.setSoleAttributeValue(OteAttributeTypes.EXTENSION.getName(), outfile); + artifact.setSoleAttributeValue(OteAttributeTypes.EXTENSION, outfile); } public boolean isFromLocalWorkspace() throws OseeCoreException, AttributeDoesNotExist { @@ -130,7 +131,7 @@ public class TestRunOperator { } public String getOutfileUrl() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.OUTFILE_URL.getName()); + return artifact.getSoleAttributeValue(OteAttributeTypes.OUTFILE_URL); } public String getOutfileContents() throws OseeCoreException { @@ -144,7 +145,7 @@ public class TestRunOperator { } public Attribute<InputStream> getOutfileAttribute() throws AttributeDoesNotExist, OseeCoreException { - List<Attribute<InputStream>> attributes = artifact.getAttributes(OteAttributeTypes.OUTFILE_URL.getName()); + List<Attribute<InputStream>> attributes = artifact.getAttributes(OteAttributeTypes.OUTFILE_URL); return attributes != null && attributes.size() > 0 ? attributes.get(0) : null; } @@ -187,7 +188,7 @@ public class TestRunOperator { getTestScriptFetcher().searchForUniqueArtifactMatching(CoreAttributeTypes.Name, artifact.getName(), artifact.getBranch()); if (testScript != null) { - artifact.setSoleAttributeValue(OteAttributeTypes.TEST_SCRIPT_GUID.getName(), testScript.getGuid()); + artifact.setSoleAttributeValue(CoreAttributeTypes.TestScriptGuid, testScript.getGuid()); } } @@ -210,15 +211,15 @@ public class TestRunOperator { } public int getTestPointsPassed() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.PASSED.getName()); + return artifact.getSoleAttributeValue(OteAttributeTypes.PASSED); } public int getTestPointsFailed() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.FAILED.getName()); + return artifact.getSoleAttributeValue(OteAttributeTypes.FAILED); } public int getTotalTestPoints() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.TOTAL_TEST_POINTS.getName()); + return artifact.getSoleAttributeValue(OteAttributeTypes.TOTAL_TEST_POINTS); } public Date getEndDate() throws OseeCoreException { @@ -233,8 +234,8 @@ public class TestRunOperator { return processDateAttribute(OteAttributeTypes.START_DATE); } - private Date processDateAttribute(OteAttributeTypes attributeType) throws OseeCoreException { - Date date = artifact.getSoleAttributeValue(attributeType.getName(), null); + private Date processDateAttribute(IAttributeType attributeType) throws OseeCoreException { + Date date = artifact.getSoleAttributeValue(attributeType, null); if (date == null) { date = new Date(0); } @@ -244,7 +245,7 @@ public class TestRunOperator { public boolean wasAborted() { boolean toReturn = true; try { - toReturn = artifact.getSoleAttributeValue(OteAttributeTypes.SCRIPT_ABORTED.getName(), false); + toReturn = artifact.getSoleAttributeValue(OteAttributeTypes.SCRIPT_ABORTED, false); } catch (Exception ex) { } return toReturn; @@ -269,46 +270,46 @@ public class TestRunOperator { public boolean isBatchModeAllowed() { boolean toReturn = false; try { - toReturn = artifact.getSoleAttributeValue(OteAttributeTypes.IS_BATCH_MODE_ALLOWED.getName(), false); + toReturn = artifact.getSoleAttributeValue(OteAttributeTypes.IS_BATCH_MODE_ALLOWED, false); } catch (Exception ex) { } return toReturn; } public String getOseeVersion() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.OSEE_VERSION.getName(), "").trim(); + return artifact.getSoleAttributeValue(OteAttributeTypes.OSEE_VERSION, "").trim(); } public String getOseeServerTitle() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.OSEE_SERVER_TITLE.getName(), "").trim(); + return artifact.getSoleAttributeValue(OteAttributeTypes.OSEE_SERVER_TITLE, "").trim(); } public String getOseeServerVersion() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.OSEE_SERVER_JAR_VERSION.getName(), "").trim(); + return artifact.getSoleAttributeValue(OteAttributeTypes.OSEE_SERVER_JAR_VERSION, "").trim(); } public String getProcessorId() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.PROCESSOR_ID.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.PROCESSOR_ID, ""); } public String getRunDuration() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.ELAPSED_DATE.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.ELAPSED_DATE, ""); } public String getQualificationLevel() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.QUALIFICATION_LEVEL.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.QUALIFICATION_LEVEL, ""); } public String getBuildId() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.BUILD_ID.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.BUILD_ID, ""); } public String getRanOnOperatingSystem() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.OS_NAME.getName(), ""); + return artifact.getSoleAttributeValue(OteAttributeTypes.OS_NAME, ""); } public String getLastAuthor() throws OseeCoreException { - return artifact.getSoleAttributeValue(OteAttributeTypes.LAST_AUTHOR.getName(), null); + return artifact.getSoleAttributeValue(OteAttributeTypes.LAST_AUTHOR, null); } public String getScriptSimpleName() { diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java index 37c34111e08..a7f3ac3b371 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java @@ -13,6 +13,7 @@ package org.eclipse.osee.ote.define.utilities; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; +import org.eclipse.osee.framework.core.data.IAttributeType; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.util.Conditions; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -43,12 +44,12 @@ public class OutfileDataCollector implements IDataListener { public void populate(Artifact artifact) throws OseeCoreException { Conditions.checkNotNull(artifact, "artifact"); for (String fieldName : collectedData.keySet()) { - String attribute = oteToAttributeMap.getAttributeName(fieldName); - if (Strings.isValid(attribute) && artifact.isAttributeTypeValid(attribute)) { + IAttributeType attributeType = oteToAttributeMap.getAttributeType(fieldName); + if (attributeType != null && artifact.isAttributeTypeValid(attributeType)) { try { String value = collectedData.get(fieldName); - Object object = oteToAttributeMap.asTypedObject(attribute, value); - artifact.setSoleAttributeValue(attribute, object); + Object object = oteToAttributeMap.asTypedObject(attributeType, value); + artifact.setSoleAttributeValue(attributeType, object); } catch (Exception ex) { OseeLog.log(OteDefinePlugin.class, Level.SEVERE, ex); } diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java index 8f687703bd7..781925ccb4c 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java @@ -259,8 +259,8 @@ public class TestRunXViewer extends XViewer { ArrayList<Artifact> dispositionArtifacts = new ArrayList<Artifact>(); for (Artifact artifact : selectedArtifacts) { if (artifact.isOfType(CoreArtifactTypes.TestRun)) { - String name = artifact.getSoleAttributeValueAsString("Name", ""); - if (name != "") { + String name = artifact.getName(); + if (!name.equals(Artifact.UNNAMED)) { Artifact dispoArtifact = null; try { dispoArtifact = @@ -279,7 +279,7 @@ public class TestRunXViewer extends XViewer { } try { returnValue = - ArtifactPromptChange.promptChangeAttribute(OteAttributeTypes.TEST_DISPOSITION, dispositionArtifacts, true, + ArtifactPromptChange.promptChangeAttribute(OteAttributeTypes.TestDisposition, dispositionArtifacts, true, false); refresh(); } catch (Exception ex) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java index 1de4a5740f9..7d7c390b033 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java @@ -39,6 +39,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; import org.eclipse.osee.framework.ui.swt.ImageManager; import org.eclipse.osee.framework.ui.swt.OverlayImage; import org.eclipse.osee.framework.ui.swt.OverlayImage.Location; +import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes; import org.eclipse.osee.ote.define.artifacts.TestRunOperator; import org.eclipse.osee.ote.ui.define.OteDefineImage; import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin; @@ -134,7 +135,7 @@ public class ArtifactItem extends DataItem implements IXViewerItem, IArtifactEve ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.TestRunDisposition, name, artifact.getBranch()); if (dispoArtifact != null) { - return dispoArtifact.getSoleAttributeValueAsString("Disposition", ""); + return dispoArtifact.getSoleAttributeValueAsString(OteAttributeTypes.TestDisposition, ""); } } catch (ArtifactDoesNotExist ex) { //ignore if not defined @@ -142,12 +143,12 @@ public class ArtifactItem extends DataItem implements IXViewerItem, IArtifactEve } return ""; } else { - if (artifact.isAttributeTypeValid(colName)) { - AttributeType attributeType = AttributeTypeManager.getType(colName); + AttributeType attributeType = AttributeTypeManager.getType(colName); + if (artifact.isAttributeTypeValid(attributeType)) { if (AttributeTypeManager.isBaseTypeCompatible(DateAttribute.class, attributeType)) { Date date = null; try { - date = artifact.getSoleAttributeValue(colName); + date = artifact.getSoleAttributeValue(attributeType); } catch (Exception ex) { // Do Nothing; } @@ -157,7 +158,7 @@ public class ArtifactItem extends DataItem implements IXViewerItem, IArtifactEve toReturn = "NOT SET"; } } else { - toReturn = artifact.getAttributesToString(colName); + toReturn = artifact.getAttributesToString(attributeType); if (colName.equals("Name")) { toReturn = getArtifactName(toReturn); } @@ -166,14 +167,14 @@ public class ArtifactItem extends DataItem implements IXViewerItem, IArtifactEve } } } - } catch (Exception ex) { + } catch (OseeCoreException ex) { OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex); toReturn = ex.getLocalizedMessage(); } return toReturn; } - private String getArtifactName(String rawName) throws Exception { + private String getArtifactName(String rawName) throws OseeCoreException { String name = rawName; if (isFullDescriptionModeEnabled() != true) { String[] qualifiers = rawName.split("\\."); diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/DemoArtifactTypes.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/DemoArtifactTypes.java index e955c4a5025..159c0468dce 100644 --- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/DemoArtifactTypes.java +++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/DemoArtifactTypes.java @@ -17,12 +17,12 @@ import org.eclipse.osee.framework.core.data.NamedIdentity; * @author Ryan D. Brooks */ public class DemoArtifactTypes extends NamedIdentity implements IArtifactType { - public static final DemoArtifactTypes DemoCodeTeamWorkflow = new DemoArtifactTypes("ABRNqDKnpGEKAyUm49gA", - "Demo Code Team Workflow"); - public static final DemoArtifactTypes DemoReqTeamWorkflow = new DemoArtifactTypes("ABRO5pC6kCmP35t06RwA", - "Demo Req Team Workflow"); - public static final DemoArtifactTypes DemoTestTeamWorkflow = new DemoArtifactTypes("ABRPeQO1qlCd4J7Bv5AA", - "Demo Test Team Workflow"); + + // @formatter:off + public static final IArtifactType DemoCodeTeamWorkflow = new DemoArtifactTypes("ABRNqDKnpGEKAyUm49gA", "Demo Code Team Workflow"); + public static final IArtifactType DemoReqTeamWorkflow = new DemoArtifactTypes("ABRO5pC6kCmP35t06RwA", "Demo Req Team Workflow"); + public static final IArtifactType DemoTestTeamWorkflow = new DemoArtifactTypes("ABRPeQO1qlCd4J7Bv5AA", "Demo Test Team Workflow"); + // @formatter:on private DemoArtifactTypes(String guid, String name) { super(guid, name); |