Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2018-03-19 13:34:28 -0400
committerdonald.g.dunne2018-03-19 13:34:28 -0400
commite4a03f98fdea21e9ae8607448ee381192ba0e668 (patch)
tree67c201c18e309a2a85ccf7ec1364ddb402b5318a
parent2716a004eadb6dfefa6ec71648554d33a2837301 (diff)
downloadorg.eclipse.osee-e4a03f98fdea21e9ae8607448ee381192ba0e668.tar.gz
org.eclipse.osee-e4a03f98fdea21e9ae8607448ee381192ba0e668.tar.xz
org.eclipse.osee-e4a03f98fdea21e9ae8607448ee381192ba0e668.zip
Revert "feature[ats_TW1669]: Improve ExportChangeReport for OSEE Web"
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQueryService.java6
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/AtsTeamWfEndpointApi.java31
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java5
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java12
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryServiceImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java19
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryServiceImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java21
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java5
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamWfEndpointImpl.java49
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java24
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/AbstractOperation.java22
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java2
22 files changed, 24 insertions, 204 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
index 34aae372ba..55aefc5233 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
@@ -187,5 +187,5 @@ public interface IAtsServices extends IAtsEarnedValueServiceProvider, IAtsConfig
IAgileService getAgileService();
- ArtifactToken getArtifactByAtsId(String id);
+ ArtifactId getArtifactByAtsId(String id);
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQueryService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQueryService.java
index 875be36f01..2238aaf141 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQueryService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQueryService.java
@@ -17,7 +17,7 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workflow.WorkItemType;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -50,12 +50,12 @@ public interface IAtsQueryService {
@NonNull
IAtsConfigQuery createQuery(IArtifactType... artifactType);
- Collection<ArtifactToken> getArtifacts(List<Integer> ids, BranchId branch);
+ Collection<ArtifactId> getArtifacts(List<Integer> ids, BranchId branch);
void runUpdate(String query, Object... data);
IAtsOrcsScriptQuery createOrcsScriptQuery(String query, Object... data);
- Collection<ArtifactToken> getArtifactsFromQuery(String query, Object... data);
+ Collection<ArtifactId> getArtifactsFromQuery(String query, Object... data);
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
index 6d2dc9873f..9e2867a18a 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
@@ -69,6 +69,4 @@ public interface IAtsStoreService {
boolean isOfType(IAtsObject atsObject, IArtifactType artifactType);
- boolean isArtifactTypeInheritsFrom(IArtifactType artifactType, IArtifactType baseArtifactType);
-
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/AtsTeamWfEndpointApi.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/AtsTeamWfEndpointApi.java
deleted file mode 100644
index 774ba9d4e0..0000000000
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/AtsTeamWfEndpointApi.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 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.ats.api.workflow;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import org.eclipse.osee.framework.core.model.change.CompareResults;
-
-/**
- * @author Donald G. Dunne
- */
-@Path("teamwf")
-public interface AtsTeamWfEndpointApi {
-
- @GET
- @Path("{id}/changedata")
- @Produces({MediaType.APPLICATION_JSON})
- public CompareResults getChangeData(@PathParam("id") String id);
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java
index 97c8ea29bf..f39d33155c 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java
@@ -22,7 +22,6 @@ import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
-import org.eclipse.osee.framework.core.model.change.CompareResults;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -143,10 +142,6 @@ public interface IAtsBranchService {
ArtifactId getAssociatedArtifactId(BranchId branch);
- CompareResults getChangeData(BranchId branch);
-
- CompareResults getChangeData(TransactionToken transaction);
-
BranchId getWorkingBranchInWork(IAtsTeamWorkflow teamWf);
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java
index fd4ba0f766..0ad29d9274 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsWorkItemService.java
@@ -57,7 +57,4 @@ public interface IAtsWorkItemService {
IAtsWorkItemNotes getNotes(IAtsWorkItem workItem);
ITeamWorkflowProvidersLazy getTeamWorkflowProviders();
-
- IAtsWorkItem getWorkItemByAnyId(String actionId);
-
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF
index 455fd16faf..e77ef09b17 100644
--- a/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF
@@ -45,7 +45,6 @@ Import-Package: com.google.common.base,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.model,
org.eclipse.osee.framework.core.model.cache,
- org.eclipse.osee.framework.core.model.change,
org.eclipse.osee.framework.core.model.event,
org.eclipse.osee.framework.core.model.type,
org.eclipse.osee.framework.core.operation,
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java
index 72c5523a0a..a537d0c7b4 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java
@@ -26,7 +26,6 @@ import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.cache.BranchFilter;
-import org.eclipse.osee.framework.core.model.change.CompareResults;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -168,15 +167,4 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService {
public ArtifactId getAssociatedArtifactId(BranchId branch) {
return BranchManager.getAssociatedArtifactId(branch);
}
-
- @Override
- public CompareResults getChangeData(BranchId branch) {
- throw new UnsupportedOperationException("Not supported on client");
- }
-
- @Override
- public CompareResults getChangeData(TransactionToken transaction) {
- throw new UnsupportedOperationException("Not supported on client");
- }
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
index 3eec45f438..4b7ec5e528 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
@@ -190,9 +190,4 @@ public class AtsStoreService implements IAtsStoreService {
return isOfType(AtsClientService.get().getArtifact(atsObject), artifactType);
}
- @Override
- public boolean isArtifactTypeInheritsFrom(IArtifactType artifactType, IArtifactType baseArtifactType) {
- return ArtifactTypeManager.inheritsFrom(artifactType, baseArtifactType);
- }
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryServiceImpl.java
index 36f336925a..b947c8afbf 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryServiceImpl.java
@@ -34,7 +34,6 @@ import org.eclipse.osee.ats.core.query.AbstractAtsQueryService;
import org.eclipse.osee.ats.core.query.AtsWorkItemFilter;
import org.eclipse.osee.ats.core.util.AtsJsonFactory;
import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -230,7 +229,7 @@ public class AtsQueryServiceImpl extends AbstractAtsQueryService {
}
@Override
- public Collection<ArtifactToken> getArtifacts(List<Integer> ids, BranchId branch) {
+ public Collection<ArtifactId> getArtifacts(List<Integer> ids, BranchId branch) {
return Collections.castAll(ArtifactQuery.getArtifactListFromIds(ids, branch));
}
diff --git a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
index 53b0a7bc0f..d86bd61bc5 100644
--- a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
@@ -17,7 +17,6 @@ Import-Package: com.google.common.base,
org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.model,
- org.eclipse.osee.framework.core.model.change,
org.eclipse.osee.framework.core.util,
org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.jdk.core.util,
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java
index 1c83280d85..bb6f3a4019 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java
@@ -18,7 +18,6 @@ import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.query.IAtsQueryService;
import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.jdbc.JdbcService;
import org.eclipse.osee.jdbc.JdbcStatement;
@@ -50,7 +49,7 @@ public abstract class AbstractAtsQueryService implements IAtsQueryService {
}
@Override
- public Collection<ArtifactToken> getArtifactsFromQuery(String query, Object... data) {
+ public Collection<ArtifactId> getArtifactsFromQuery(String query, Object... data) {
JdbcStatement chStmt = jdbcService.getClient().getStatement();
List<Integer> ids = new LinkedList<Integer>();
try {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
index 67f6a06f7f..61114290b7 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
@@ -547,10 +547,10 @@ public abstract class AtsCoreServiceImpl implements IAtsServices {
+ "attr.ATTR_TYPE_ID = 1152921504606847877 and attr.VALUE = ?";
@Override
- public ArtifactToken getArtifactByAtsId(String id) {
- ArtifactToken artifact = null;
+ public ArtifactId getArtifactByAtsId(String id) {
+ ArtifactId artifact = null;
try {
- Collection<ArtifactToken> workItems =
+ Collection<ArtifactId> workItems =
getQueryService().getArtifactsFromQuery(ATS_ID_QUERY, getAtsBranch().getId(), id);
if (!workItems.isEmpty()) {
artifact = workItems.iterator().next();
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java
index 7855349eab..ecb1893632 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java
@@ -37,12 +37,10 @@ import org.eclipse.osee.ats.core.validator.AtsXWidgetValidateManager;
import org.eclipse.osee.ats.core.workflow.note.ArtifactNote;
import org.eclipse.osee.ats.core.workflow.note.AtsWorkItemNotes;
import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
-import org.eclipse.osee.framework.jdk.core.util.GUID;
import org.eclipse.osee.framework.jdk.core.util.Strings;
/**
@@ -190,21 +188,4 @@ public class AtsWorkItemServiceImpl implements IAtsWorkItemService {
return teamWorkflowProvidersLazy;
}
- @Override
- public IAtsWorkItem getWorkItemByAnyId(String actionId) {
- IAtsWorkItem workItem = null;
- ArtifactToken artifact = null;
- if (GUID.isValid(actionId)) {
- artifact = services.getArtifactByGuid(actionId);
- } else if (Strings.isNumeric(actionId)) {
- artifact = services.getArtifact(Long.valueOf(actionId));
- } else {
- artifact = services.getArtifactByAtsId(actionId);
- }
- if (artifact != null) {
- workItem = services.getWorkItemFactory().getWorkItem(artifact);
- }
- return workItem;
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java
index 4ce0aa7e42..c2f5aa77c6 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java
@@ -39,7 +39,6 @@ import org.eclipse.osee.ats.rest.internal.workitem.ActionUiResource;
import org.eclipse.osee.ats.rest.internal.workitem.AtsActionEndpointImpl;
import org.eclipse.osee.ats.rest.internal.workitem.AtsRuleEndpointImpl;
import org.eclipse.osee.ats.rest.internal.workitem.AtsTaskEndpointImpl;
-import org.eclipse.osee.ats.rest.internal.workitem.AtsTeamWfEndpointImpl;
import org.eclipse.osee.ats.rest.internal.workitem.AtsWorkPackageEndpointImpl;
import org.eclipse.osee.ats.rest.internal.workitem.StateResource;
import org.eclipse.osee.ats.rest.internal.world.WorldResource;
@@ -120,7 +119,6 @@ public class AtsApplication extends Application {
singletons.add(new AtsTaskEndpointImpl(atsServer));
singletons.add(new AtsNotifyEndpointImpl(atsServer));
singletons.add(new AtsWorkPackageEndpointImpl(atsServer, logger));
- singletons.add(new AtsTeamWfEndpointImpl(atsServer));
// UIs
singletons.add(new ActionUiResource(atsServer, logger));
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryServiceImpl.java
index f992258a9b..8ab6fbc597 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryServiceImpl.java
@@ -25,7 +25,7 @@ import org.eclipse.osee.ats.api.workflow.WorkItemType;
import org.eclipse.osee.ats.core.query.AbstractAtsQueryService;
import org.eclipse.osee.ats.core.query.AtsWorkItemFilter;
import org.eclipse.osee.ats.rest.IAtsServer;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -96,7 +96,7 @@ public class AtsQueryServiceImpl extends AbstractAtsQueryService {
}
@Override
- public Collection<ArtifactToken> getArtifacts(List<Integer> ids, BranchId branch) {
+ public Collection<ArtifactId> getArtifacts(List<Integer> ids, BranchId branch) {
List<Long> uuids = new LinkedList<>();
for (Integer id : ids) {
uuids.add(Long.valueOf(id));
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java
index 03a658c31a..c048ad97dc 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java
@@ -29,13 +29,11 @@ import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
-import org.eclipse.osee.framework.core.model.change.CompareResults;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.orcs.OrcsApi;
import org.eclipse.osee.orcs.data.BranchReadable;
-import org.eclipse.osee.orcs.data.TransactionReadable;
import org.eclipse.osee.orcs.search.BranchQuery;
import org.eclipse.osee.orcs.search.TransactionQuery;
@@ -183,23 +181,4 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService {
throw new UnsupportedOperationException("Not yet supported on server");
}
- @Override
- public CompareResults getChangeData(TransactionToken transaction) {
- TransactionQuery transQuery = orcsApi.getQueryFactory().transactionQuery();
- TransactionReadable startTx = transQuery.andIsPriorTx(transaction).getResults().getAtMostOneOrNull();
- CompareResults results = orcsApi.getTransactionFactory().compareTxs(startTx, transaction);
- return results;
- }
-
- @Override
- public CompareResults getChangeData(BranchId branch) {
- TransactionQuery transactionQuery2 = orcsApi.getQueryFactory().transactionQuery();
- TransactionQuery transactionQuery3 = orcsApi.getQueryFactory().transactionQuery();
- BranchId parentBranch = services.getBranchService().getParentBranch(branch);
- TransactionReadable startTx = transactionQuery2.andIsHead(branch).getResults().getExactlyOne();
- TransactionReadable endTx = transactionQuery3.andIsHead(parentBranch).getResults().getExactlyOne();
- CompareResults results = orcsApi.getTransactionFactory().compareTxs(startTx, endTx);
- return results;
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
index dba4c286e1..aacf2e3ca1 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
@@ -182,9 +182,4 @@ public class AtsStoreServiceImpl implements IAtsStoreService {
return isOfType(atsObject.getStoreObject(), artifactType);
}
- @Override
- public boolean isArtifactTypeInheritsFrom(IArtifactType artifactType, IArtifactType baseArtifactType) {
- return atsServer.getOrcsApi().getOrcsTypes().getArtifactTypes().inheritsFrom(artifactType, baseArtifactType);
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamWfEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamWfEndpointImpl.java
deleted file mode 100644
index c55800de23..0000000000
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsTeamWfEndpointImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.osee.ats.rest.internal.workitem;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import org.eclipse.osee.ats.api.IAtsServices;
-import org.eclipse.osee.ats.api.IAtsWorkItem;
-import org.eclipse.osee.ats.api.workflow.AtsTeamWfEndpointApi;
-import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.TransactionToken;
-import org.eclipse.osee.framework.core.model.change.CompareResults;
-
-/**
- * Donald G. Dunne
- */
-@Path("teamwf")
-public class AtsTeamWfEndpointImpl implements AtsTeamWfEndpointApi {
-
- private final IAtsServices services;
-
- public AtsTeamWfEndpointImpl(IAtsServices services) {
- this.services = services;
- }
-
- @Override
- @GET
- @Path("{id}/changedata")
- @Produces({MediaType.APPLICATION_JSON})
- public CompareResults getChangeData(@PathParam("id") String id) {
- IAtsWorkItem workItem = services.getWorkItemService().getWorkItemByAnyId(id);
- if (!workItem.isTeamWorkflow()) {
- throw new UnsupportedOperationException();
- }
- IAtsTeamWorkflow teamWf = workItem.getParentTeamWorkflow();
- TransactionToken trans = services.getBranchService().getEarliestTransactionId(teamWf);
- if (trans.isValid()) {
- return services.getBranchService().getChangeData(trans);
- }
- BranchId branch = services.getBranchService().getWorkingBranch(teamWf);
- if (branch.isValid()) {
- return services.getBranchService().getChangeData(branch);
- }
- return new CompareResults();
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java
index 2e542bd5b1..e7c4aed033 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java
@@ -38,7 +38,6 @@ import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.OperationLogger;
-import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.Lib;
@@ -66,17 +65,16 @@ public final class ExportChangeReportOperation extends AbstractOperation {
CoreArtifactTypes.AbstractSoftwareRequirement,
CoreArtifactTypes.InterfaceRequirement,
CoreArtifactTypes.HeadingMSWord};
+ private final IArtifactType[] DISALLOW_TYPES = {CoreArtifactTypes.ImplementationDetails};
private final String overrideDataRightsClassification;
- private final XResultData results;
- public ExportChangeReportOperation(List<TeamWorkFlowArtifact> workflows, boolean reverse, boolean writeChangeReports, String overrideDataRightsClassification, Appendable resultFolder, OperationLogger logger, XResultData results) {
+ public ExportChangeReportOperation(List<TeamWorkFlowArtifact> workflows, boolean reverse, boolean writeChangeReports, String overrideDataRightsClassification, Appendable resultFolder, OperationLogger logger) {
super("Exporting Change Report(s)", Activator.PLUGIN_ID, logger);
this.workflows = workflows;
this.reverse = reverse;
this.writeChangeReports = writeChangeReports;
this.overrideDataRightsClassification = overrideDataRightsClassification;
this.resultFolder = resultFolder;
- this.results = results;
}
@Override
@@ -106,11 +104,7 @@ public final class ExportChangeReportOperation extends AbstractOperation {
Set<ArtifactId> artIds = new HashSet<>();
Collection<Change> changes = computeChanges(workflow, monitor, artIds);
if (!changes.isEmpty() && changes.size() < 4000) {
- String log = String.format("Exporting: %s -- %s\n", workflow.toString(), workflow.getAtsId());
- logf(log);
- if (results != null) {
- results.log(log);
- }
+ logf("Exporting: %s -- %s", workflow.toString(), workflow.getAtsId());
String id = workflow.getSoleAttributeValueAsString(AtsAttributeTypes.LegacyPcrId, workflow.getAtsId());
String prefix = "/" + id;
if (writeChangeReports) {
@@ -123,7 +117,7 @@ public final class ExportChangeReportOperation extends AbstractOperation {
ArtifactDelta next = it.next();
Artifact endArtifact = next.getEndArtifact();
ArtifactType artifactType = endArtifact.getArtifactType();
- if (!artifactType.inheritsFrom(ALLOW_TYPES)) {
+ if (artifactType.inheritsFrom(DISALLOW_TYPES) || !artifactType.inheritsFrom(ALLOW_TYPES)) {
it.remove();
artIds.remove(endArtifact.getArtId());
logf("skipping: [" + endArtifact.getName().replaceAll("%",
@@ -133,9 +127,6 @@ public final class ExportChangeReportOperation extends AbstractOperation {
}
if (artifactDeltas.isEmpty()) {
logf("Nothing exported for RPCR[%s]", id);
- if (results != null) {
- results.errorf("Nothing exported for RPCR[%s]", id);
- }
continue;
}
@@ -151,10 +142,6 @@ public final class ExportChangeReportOperation extends AbstractOperation {
}
Lib.writeStringToFile(artIdsAsString, new File(resultFolder + prefix + "_ids.txt"));
} catch (IOException ex) {
- if (results != null) {
- results.errorf("Exception writing _ids.txt file for %s; exception %s", workflow.toStringWithId(),
- Lib.exceptionToString(ex));
- }
OseeCoreException.wrapAndThrow(ex);
}
}
@@ -193,8 +180,7 @@ public final class ExportChangeReportOperation extends AbstractOperation {
operation = ChangeManager.comparedToPreviousTx(pickTransaction(workflow), changes);
} else {
BranchId workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt);
- if (workingBranch != null && workingBranch.isValid() && !BranchManager.getType(
- workingBranch).isBaselineBranch()) {
+ if (workingBranch != null && !BranchManager.getType(workingBranch).isBaselineBranch()) {
operation = ChangeManager.comparedToParent(workingBranch, changes);
}
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/AbstractOperation.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/AbstractOperation.java
index c32ac11bf9..507d584c41 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/AbstractOperation.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/operation/AbstractOperation.java
@@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
/**
* This class is the basic unit of work for OSEE. All operations should be designed such that they can be chained and/or
* composed into composite operations.
- *
+ *
* @author Roberto E. Escobar
* @author Ryan D. Brooks
*/
@@ -89,7 +89,7 @@ public abstract class AbstractOperation implements IOperation {
/**
* All the operations work should be executed directly or indirectly by this method. The operation runs until its
* doWork() method terminates normally or by throwing an exception (including OperationCanceledException)
- *
+ *
* @param monitor the progress monitor to use for reporting progress to the user. It is the caller's responsibility
* to call done() on the given monitor. Accepts null, indicating that no progress should be reported and that the
* operation cannot be cancelled.
@@ -125,7 +125,7 @@ public abstract class AbstractOperation implements IOperation {
* returns
*/
public static final void checkForCancelledStatus(IProgressMonitor monitor) throws OperationCanceledException {
- if (monitor != null && monitor.isCanceled()) {
+ if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
}
@@ -143,27 +143,19 @@ public abstract class AbstractOperation implements IOperation {
}
protected final void log(String... row) {
- if (logger != null) {
- logger.log(row);
- }
+ logger.log(row);
}
protected final void log(Throwable th) {
- if (logger != null) {
- logger.log(th);
- }
+ logger.log(th);
}
protected final void log(IStatus status) {
- if (logger != null) {
- logger.log(status);
- }
+ logger.log(status);
}
protected final void logf(String format, Object... args) {
- if (logger != null) {
- logger.logf(format, args);
- }
+ logger.logf(format, args);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java
index fa3a057ef8..d251eed8af 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/ops/RenameFilesOperation.java
@@ -68,7 +68,7 @@ public class RenameFilesOperation extends AbstractOperation {
int renamedFileCount = 0;
for (int i = 0; i < size; i++) {
- if (monitor != null && monitor.isCanceled()) {
+ if (monitor.isCanceled()) {
return;
}
File file = files.get(i);

Back to the top