Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-08-16 09:39:46 -0400
committerRyan D. Brooks2017-08-16 11:39:19 -0400
commit2eb00c778e22abeb66aa44df85f85f415e31ca1f (patch)
tree9597c25dce9ed797c52b566637eeefc35f5ed050
parent835e22ee35906b25687ad43e9c07784911c3e6ef (diff)
downloadorg.eclipse.osee-2eb00c778e22abeb66aa44df85f85f415e31ca1f.tar.gz
org.eclipse.osee-2eb00c778e22abeb66aa44df85f85f415e31ca1f.tar.xz
org.eclipse.osee-2eb00c778e22abeb66aa44df85f85f415e31ca1f.zip
refactor: Remove ArtifactQuery.getArtifactFromId using Long
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java7
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java2
3 files changed, 3 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java
index 91b0164db4..e824567b6f 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java
@@ -238,7 +238,7 @@ public class PublishWithSpecifiedTemplate extends AbstractBlam {
JSONObject id = null;
for (int i = 0; i < artifactIds.length(); i++) {
id = artifactIds.getJSONObject(i);
- Long artifactId = id.getLong("id");
+ ArtifactId artifactId = ArtifactId.valueOf(id.getLong("id"));
Artifact artifact = ArtifactQuery.getArtifactFromId(artifactId, branch, EXCLUDE_DELETED);
artifacts.add(artifact);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index 4283da756f..81db509cc2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
@@ -119,10 +119,6 @@ public class ArtifactQuery {
return getOrCheckArtifactFromId(artifactId, branch, deletionFlag, QueryType.CHECK);
}
- public static Artifact getArtifactFromId(Long artId, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException {
- return getOrCheckArtifactFromId(ArtifactId.valueOf(artId), branch, allowDeleted, QueryType.GET);
- }
-
private static Artifact getOrCheckArtifactFromId(ArtifactId artifactId, BranchId branch, DeletionFlag allowDeleted, QueryType queryType) throws OseeCoreException {
ArtifactToken artifactToken;
if (artifactId instanceof ArtifactToken) {
@@ -1001,5 +997,4 @@ public class ArtifactQuery {
long transactionId = jdbcClient.fetch(-1L, query, artifact, artifact.getBranch(), artifact, artifact.getBranch());
return !artifact.getTransaction().getId().equals(transactionId);
}
-
-}
+} \ No newline at end of file
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 25f090aa2d..49b05a2e93 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
@@ -429,7 +429,7 @@ public class WordTemplateProcessor {
JSONObject id = null;
for (int i = 0; i < artifactIds.length(); i++) {
id = artifactIds.getJSONObject(i);
- Long artifactId = id.getLong("id");
+ ArtifactId artifactId = ArtifactId.valueOf(id.getLong("id"));
Artifact artifact = ArtifactQuery.getArtifactFromId(artifactId, branch, EXCLUDE_DELETED);
artifacts.add(artifact);
}

Back to the top