Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-05-22 02:20:23 +0000
committerddunne2010-05-22 02:20:23 +0000
commit8b2efa59cec5f008cfa107344007981accbf2392 (patch)
tree5ade08c3848a67f53cf52ade83474d9dd7e91339 /plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define
parent79386382edf2b670fbacd27b8b534c5b85290602 (diff)
downloadorg.eclipse.osee-8b2efa59cec5f008cfa107344007981accbf2392.tar.gz
org.eclipse.osee-8b2efa59cec5f008cfa107344007981accbf2392.tar.xz
org.eclipse.osee-8b2efa59cec5f008cfa107344007981accbf2392.zip
IArtifactType conversion
Diffstat (limited to 'plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define')
-rw-r--r--plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteArtifactTypes.java25
-rw-r--r--plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java6
-rw-r--r--plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/TestRunOperator.java10
3 files changed, 8 insertions, 33 deletions
diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteArtifactTypes.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteArtifactTypes.java
deleted file mode 100644
index aee1d396fd7..00000000000
--- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/AUTOGEN/OteArtifactTypes.java
+++ /dev/null
@@ -1,25 +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.ote.define.AUTOGEN;
-
-import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.data.NamedIdentity;
-import org.eclipse.osee.framework.skynet.core.utility.Requirements;
-
-public class OteArtifactTypes extends NamedIdentity implements IArtifactType {
- public static final OteArtifactTypes TEST_RUN = new OteArtifactTypes("AAMFDjqDHWo+orlSpaQA", Requirements.TEST_RUN);
- public static final OteArtifactTypes TEST_SCRIPT =
- new OteArtifactTypes("AAMFDikEi0TGK27TKPgA", Requirements.TEST_CASE);
-
- private OteArtifactTypes(String guid, String name) {
- super(guid, name);
- }
-} \ No newline at end of file
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 790a337df40..7109bdac5a2 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,6 +16,7 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
+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;
@@ -26,15 +27,14 @@ 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.search.ArtifactQuery;
import org.eclipse.osee.ote.define.OteDefinePlugin;
-import org.eclipse.osee.ote.define.AUTOGEN.OteArtifactTypes;
/**
* @author Roberto E. Escobar
*/
public class OteArtifactFetcher<T extends Artifact> {
- private final OteArtifactTypes oteArtifactType;
+ private final CoreArtifactTypes oteArtifactType;
- protected OteArtifactFetcher(OteArtifactTypes oteArtifactType) {
+ protected OteArtifactFetcher(CoreArtifactTypes oteArtifactType) {
this.oteArtifactType = oteArtifactType;
}
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 fde3d6b7519..a3c803eb346 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.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -26,7 +27,6 @@ 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.providers.IAttributeDataProvider;
import org.eclipse.osee.framework.skynet.core.attribute.providers.MappedAttributeDataProvider;
-import org.eclipse.osee.ote.define.AUTOGEN.OteArtifactTypes;
import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes;
/**
@@ -34,10 +34,10 @@ import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes;
*/
public class TestRunOperator {
private static final OteArtifactFetcher<Artifact> TEST_RUN_ARTIFACT_FETCHER =
- new OteArtifactFetcher<Artifact>(OteArtifactTypes.TEST_RUN);
+ new OteArtifactFetcher<Artifact>(CoreArtifactTypes.TestRun);
private static final OteArtifactFetcher<Artifact> TEST_SCRIPT_ARTIFACT_FETCHER =
- new OteArtifactFetcher<Artifact>(OteArtifactTypes.TEST_SCRIPT);
+ new OteArtifactFetcher<Artifact>(CoreArtifactTypes.TestCase);
private final Artifact artifact;
@@ -55,9 +55,9 @@ public class TestRunOperator {
private void checkForType(Artifact artifact) throws OseeArgumentException {
try {
- if (!artifact.isOfType(OteArtifactTypes.TEST_RUN.getName())) {
+ if (!artifact.isOfType(CoreArtifactTypes.TestRun)) {
throw new OseeArgumentException(String.format("Unable to operate on type [%s]. Only [%s] allowed.",
- artifact.getArtifactTypeName(), OteArtifactTypes.TEST_RUN.getName()));
+ artifact.getArtifactTypeName(), CoreArtifactTypes.TestRun));
}
} catch (OseeCoreException e) {
// TODO Auto-generated catch block

Back to the top