Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2011-02-18 14:29:45 -0500
committerRyan D. Brooks2011-02-18 14:29:45 -0500
commit9670909cb814f918c24c53bbe6d7f1b4a09ca573 (patch)
tree05e5960784a5e0050ed50793058f0331f106320a /plugins/org.eclipse.osee.coverage
parent612bc2128b40eff24709aced29b9d2bd2557953f (diff)
downloadorg.eclipse.osee-9670909cb814f918c24c53bbe6d7f1b4a09ca573.tar.gz
org.eclipse.osee-9670909cb814f918c24c53bbe6d7f1b4a09ca573.tar.xz
org.eclipse.osee-9670909cb814f918c24c53bbe6d7f1b4a09ca573.zip
refactor: Cleanup token creation and inheritance
Create static TokenFactory to handle token creation Create HasArtifactType interface Create HasBranch interface Fix ArtifactToken inheritance Remove token subclasses
Diffstat (limited to 'plugins/org.eclipse.osee.coverage')
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageArtifactTypes.java14
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageAttributeTypes.java29
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageRelationTypes.java40
3 files changed, 33 insertions, 50 deletions
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 df3de999e9..f35ac25cd6 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
@@ -11,20 +11,20 @@
package org.eclipse.osee.coverage.store;
import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.data.NamedIdentity;
+import org.eclipse.osee.framework.core.data.TokenFactory;
/**
* @author Don Dunne
*/
-public final class CoverageArtifactTypes extends NamedIdentity implements IArtifactType {
+public final class CoverageArtifactTypes {
// @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");
+ public static final IArtifactType CoveragePackage = TokenFactory.createArtifactType("AARFcyA9zyD3uEK8akgA", "Coverage Package");
+ public static final IArtifactType CoverageUnit = TokenFactory.createArtifactType("ALZS3MQdCCIUvEYlZeAA", "Coverage Unit");
+ public static final IArtifactType CoverageFolder = TokenFactory.createArtifactType("ALZR_AbpJTTf6QQn2iAA", "Coverage Folder");
// @formatter:on
- private CoverageArtifactTypes(String guid, String name) {
- super(guid, name);
+ private CoverageArtifactTypes() {
+ // Constants
}
}
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 5069f66e5b..93a18bec33 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
@@ -11,26 +11,27 @@
package org.eclipse.osee.coverage.store;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.NamedIdentity;
+import org.eclipse.osee.framework.core.data.TokenFactory;
/**
* @author Ryan D. Brooks
*/
-public class CoverageAttributeTypes extends NamedIdentity implements IAttributeType {
+public final class CoverageAttributeTypes {
+
// @formatter:off
- 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 WorkProductTaskGuid = new CoverageAttributeTypes("A+m7Y2sV2z83QUlkzIAA", "coverage.WorkProductTaskGuid");
- public static final IAttributeType WorkProductPcrGuid = new CoverageAttributeTypes("AWuQmRuq1gwrejEWRgAA", "coverage.WorkProductPcrGuid");
- public static final IAttributeType Notes = new CoverageAttributeTypes("AARERmIjazD1udUwfLgA", "coverage.Notes");
- public static final IAttributeType Order = new CoverageAttributeTypes("AD72opMBR1pFxB0hVpQA", "coverage.Order");
+ public static final IAttributeType Assignees = TokenFactory.createAttributeType("AARCA+XjSyKjnh3sweQA", "coverage.Assignees");
+ public static final IAttributeType Item = TokenFactory.createAttributeType("AARr8BmsQHKLOHNzOcQA", "coverage.Coverage Item");
+ public static final IAttributeType Options = TokenFactory.createAttributeType("AAF+8+sqyELZ2mdVV_AA", "coverage.Coverage Options");
+ public static final IAttributeType FileContents = TokenFactory.createAttributeType("AARDJK8YAT3SDnghjQgA", "coverage.File Contents");
+ public static final IAttributeType Location = TokenFactory.createAttributeType("AARA2XwhNRddgQrd0iwA", "coverage.Location");
+ public static final IAttributeType Namespace = TokenFactory.createAttributeType("AAQ_v6uUrh0j39+4D5gA", "coverage.Namespace");
+ public static final IAttributeType WorkProductTaskGuid = TokenFactory.createAttributeType("A+m7Y2sV2z83QUlkzIAA", "coverage.WorkProductTaskGuid");
+ public static final IAttributeType WorkProductPcrGuid = TokenFactory.createAttributeType("AWuQmRuq1gwrejEWRgAA", "coverage.WorkProductPcrGuid");
+ public static final IAttributeType Notes = TokenFactory.createAttributeType("AARERmIjazD1udUwfLgA", "coverage.Notes");
+ public static final IAttributeType Order = TokenFactory.createAttributeType("AD72opMBR1pFxB0hVpQA", "coverage.Order");
// @formatter:on
- private CoverageAttributeTypes(String guid, String name) {
- super(guid, name);
+ private CoverageAttributeTypes() {
+ // Constants
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageRelationTypes.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageRelationTypes.java
index a54a818446..165cd7dcf8 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageRelationTypes.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/CoverageRelationTypes.java
@@ -10,43 +10,25 @@
*******************************************************************************/
package org.eclipse.osee.coverage.store;
-import org.eclipse.osee.framework.core.data.NamedIdentity;
-import org.eclipse.osee.framework.core.enums.IRelationEnumeration;
+import org.eclipse.osee.framework.core.data.IRelationTypeSide;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.RelationSide;
/**
* @author Donald G. Dunne
*/
-public class CoverageRelationTypes extends NamedIdentity implements IRelationEnumeration {
- private final RelationSide relationSide;
+public final class CoverageRelationTypes {
- public static final CoverageRelationTypes TeamWorkflowTargetedForVersion_Version = new CoverageRelationTypes(
+ public static final IRelationTypeSide TeamWorkflowTargetedForVersion_Version = TokenFactory.createRelationTypeSide(
RelationSide.SIDE_B, "AAMFE99pzm4zSibDT9gA", "TeamWorkflowTargetedForVersion");
- public static final CoverageRelationTypes TeamWorkflowTargetedForVersion_Workflow = new CoverageRelationTypes(
+ public static final IRelationTypeSide TeamWorkflowTargetedForVersion_Workflow = TokenFactory.createRelationTypeSide(
RelationSide.SIDE_A, "AAMFE99pzm4zSibDT9gA", "TeamWorkflowTargetedForVersion");
- public static final CoverageRelationTypes ActionToWorkflow_Action = new CoverageRelationTypes(RelationSide.SIDE_A,
- "AAMFE953ixQThusHUPwA", "ActionToWorkflow");
- public static final CoverageRelationTypes ActionToWorkflow_WorkFlow = new CoverageRelationTypes(RelationSide.SIDE_B,
- "AAMFE953ixQThusHUPwA", "ActionToWorkflow");
+ public static final IRelationTypeSide ActionToWorkflow_Action = TokenFactory.createRelationTypeSide(
+ RelationSide.SIDE_A, "AAMFE953ixQThusHUPwA", "ActionToWorkflow");
+ public static final IRelationTypeSide ActionToWorkflow_WorkFlow = TokenFactory.createRelationTypeSide(
+ RelationSide.SIDE_B, "AAMFE953ixQThusHUPwA", "ActionToWorkflow");
- private CoverageRelationTypes(RelationSide relationSide, String guid, String name) {
- super(guid, name);
- this.relationSide = relationSide;
+ private CoverageRelationTypes() {
+ // Constants
}
-
- @Override
- public RelationSide getSide() {
- return relationSide;
- }
-
- @Override
- public int hashCode() {
- return super.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- return super.equals(obj);
- }
-
} \ No newline at end of file

Back to the top