Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2018-06-28 18:47:10 -0400
committerRyan D. Brooks2018-07-10 19:15:09 -0400
commitf4d06bd70208a4dbf457a139c0ba09b94396068d (patch)
treedf2223cc1e41c128bfaa8701fac5bb536a922f15
parent3f2d2e49a1e18af1dd9490f13b758ab10e2bf4f8 (diff)
downloadorg.eclipse.osee-f4d06bd70208a4dbf457a139c0ba09b94396068d.tar.gz
org.eclipse.osee-f4d06bd70208a4dbf457a139c0ba09b94396068d.tar.xz
org.eclipse.osee-f4d06bd70208a4dbf457a139c0ba09b94396068d.zip
refactor: Use ArtifactId with data rights
-rw-r--r--plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/DataRightsOperationsImpl.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightAnchor.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightEntry.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightInput.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightResult.java5
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java2
7 files changed, 18 insertions, 13 deletions
diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/DataRightsOperationsImpl.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/DataRightsOperationsImpl.java
index 030ae460b6b..1455f87974c 100644
--- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/DataRightsOperationsImpl.java
+++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/DataRightsOperationsImpl.java
@@ -88,12 +88,12 @@ public class DataRightsOperationsImpl implements DataRightsOperations {
orientation = art.getSoleAttributeValue(CoreAttributeTypes.PageType, "Portrait");
}
- request.addData(artifact.getId(), classification, PageOrientation.fromString(orientation), index);
+ request.addData(artifact, classification, PageOrientation.fromString(orientation), index);
index++;
}
}
- private DataRightAnchor getAnchor(Long id, Collection<DataRightAnchor> anchors) {
+ private DataRightAnchor getAnchor(ArtifactId id, Collection<DataRightAnchor> anchors) {
for (DataRightAnchor anchor : anchors) {
if (anchor.getId().equals(id)) {
return anchor;
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightAnchor.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightAnchor.java
index 746c4ea0aea..df25e549380 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightAnchor.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightAnchor.java
@@ -10,21 +10,23 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.model.datarights;
+import org.eclipse.osee.framework.core.data.ArtifactId;
+
/**
* @author Angel Avila
*/
public class DataRightAnchor {
- private Long id;
+ private ArtifactId id;
private DataRightId dataRightId;
private boolean isSetDataRightFooter = false;
private boolean isContinuous = false;
- public Long getId() {
+ public ArtifactId getId() {
return id;
}
- public void setId(Long id) {
+ public void setId(ArtifactId id) {
this.id = id;
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightEntry.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightEntry.java
index 7c902e7937d..4bffe1b074c 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightEntry.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightEntry.java
@@ -10,22 +10,23 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.model.datarights;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.util.PageOrientation;
/**
* @author Angel Avila
*/
public class DataRightEntry {
- private Long id;
+ private ArtifactId id;
private String classification;
private PageOrientation orientation;
private int index;
- public Long getId() {
+ public ArtifactId getId() {
return id;
}
- public void setId(Long id) {
+ public void setId(ArtifactId id) {
this.id = id;
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightInput.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightInput.java
index 5006e83cdb5..ece18d2aa44 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightInput.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightInput.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.core.model.datarights;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.util.PageOrientation;
/**
@@ -40,7 +41,7 @@ public class DataRightInput implements Iterable<DataRightEntry> {
data = null;
}
- public void addData(Long id, String classification, PageOrientation orientation, int index) {
+ public void addData(ArtifactId id, String classification, PageOrientation orientation, int index) {
DataRightEntry toAdd = new DataRightEntry();
toAdd.setClassification(classification);
toAdd.setId(id);
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightResult.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightResult.java
index e94c7440511..71d71076536 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightResult.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/datarights/DataRightResult.java
@@ -15,6 +15,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.util.PageOrientation;
import org.eclipse.osee.framework.core.util.ReportConstants;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -33,7 +34,7 @@ public class DataRightResult {
private Map<DataRightId, DataRight> dataRightIdToDataRight;
- private Map<Long, DataRightAnchor> idToAnchor;
+ private Map<ArtifactId, DataRightAnchor> idToAnchor;
public Collection<DataRightAnchor> getDataRightAnchors() {
if (dataRightAnchors == null) {
@@ -57,7 +58,7 @@ public class DataRightResult {
this.dataRights = dataRights;
}
- public String getContent(Long id, PageOrientation orientation) {
+ public String getContent(ArtifactId id, PageOrientation orientation) {
checkInitialized();
String footer = null;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java
index b73390096af..7e0066dc168 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java
@@ -161,7 +161,7 @@ public class WholeWordRenderer extends WordRenderer {
DataRightResult dataRights = ServiceUtil.getOseeClient().getDataRightsEndpoint().getDataRights(
artifact.getBranch(), classification, Collections.singletonList(ArtifactId.valueOf(artifact.getId())));
- String footer = dataRights.getContent(artifact.getId(), orientation);
+ String footer = dataRights.getContent(artifact, orientation);
Matcher startFtr = START_PATTERN.matcher(footer);
Matcher endFtr = END_PATTERN.matcher(footer);
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 4bd55627a3b..926f580ed2d 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
@@ -673,7 +673,7 @@ public class WordTemplateProcessor {
}
}
PageOrientation orientation = WordRendererUtil.getPageOrientation(artifact);
- String footer = data.getContent(artifact.getId(), orientation);
+ String footer = data.getContent(artifact, orientation);
processMetadata(artifact, wordMl);

Back to the top