Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-08-02 19:21:41 +0000
committerRyan D. Brooks2016-08-31 16:17:57 +0000
commit19fa6abb24bc5f89fed8766e9f677534896e89ef (patch)
treef60cccd191d8db7f971e1b58e3aec49d145d0d4e /plugins
parente861d66493605838e51404bb5f837df49dc9b849 (diff)
downloadorg.eclipse.osee-19fa6abb24bc5f89fed8766e9f677534896e89ef.tar.gz
org.eclipse.osee-19fa6abb24bc5f89fed8766e9f677534896e89ef.tar.xz
org.eclipse.osee-19fa6abb24bc5f89fed8766e9f677534896e89ef.zip
bug[ats_ATS305531]: Create IAtsActionableItemService interface
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java37
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java9
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java3
5 files changed, 52 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java
new file mode 100644
index 00000000000..f5fadb7832b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.ai;
+
+import java.util.Collection;
+import java.util.Set;
+import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public interface IAtsActionableItemService {
+
+ Set<IAtsActionableItem> getActionableItems(IAtsObject atsObject) throws OseeCoreException;
+
+ String getActionableItemsStr(IAtsObject atsObject) throws OseeCoreException;
+
+ Collection<String> getActionableItemGuids(IAtsObject atsObject) throws OseeCoreException;
+
+ void addActionableItem(IAtsObject atsObject, IAtsActionableItem aia, IAtsChangeSet changes) throws OseeCoreException;
+
+ void removeActionableItem(IAtsObject atsObject, IAtsActionableItem aia, IAtsChangeSet changes) throws OseeCoreException;
+
+ Result setActionableItems(IAtsObject atsObject, Collection<IAtsActionableItem> newItems, IAtsChangeSet changes) throws OseeCoreException;
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
index 366a7da6574..5400a7ae55a 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
@@ -23,6 +23,7 @@ import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.column.IAtsColumnService;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
import org.eclipse.osee.ats.api.config.IAtsCache;
@@ -157,7 +158,7 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
private JdbcService jdbcService;
private IAtsWorkItemFactory workItemFactory;
private IAtsConfigItemFactory configItemFactory;
- private ActionableItemManager actionableItemManager;
+ private IAtsActionableItemService actionableItemManager;
private IRelationResolver relationResolver;
private IAtsProgramService programService;
private IAtsTeamDefinitionService teamDefinitionService;
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
index 9125ff648a4..0cbfd304f55 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
@@ -17,6 +17,7 @@ import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreService;
@@ -30,7 +31,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
/**
* @author Donald G. Dunne
*/
-public class ActionableItemManager {
+public class ActionableItemManager implements IAtsActionableItemService {
private final IAttributeResolver attrResolver;
private final IAtsStoreService atsStoreService;
@@ -42,6 +43,7 @@ public class ActionableItemManager {
this.services = services;
}
+ @Override
public Set<IAtsActionableItem> getActionableItems(IAtsObject atsObject) throws OseeCoreException {
Set<IAtsActionableItem> ais = new HashSet<>();
if (!atsStoreService.isDeleted(atsObject)) {
@@ -59,14 +61,17 @@ public class ActionableItemManager {
return ais;
}
+ @Override
public String getActionableItemsStr(IAtsObject atsObject) throws OseeCoreException {
return AtsObjects.toString("; ", getActionableItems(atsObject));
}
+ @Override
public Collection<String> getActionableItemGuids(IAtsObject atsObject) throws OseeCoreException {
return attrResolver.getAttributesToStringList(atsObject, AtsAttributeTypes.ActionableItem);
}
+ @Override
public void addActionableItem(IAtsObject atsObject, IAtsActionableItem aia, IAtsChangeSet changes) throws OseeCoreException {
String guid = AtsUtilCore.getGuid(aia);
if (!getActionableItemGuids(atsObject).contains(guid)) {
@@ -74,11 +79,13 @@ public class ActionableItemManager {
}
}
+ @Override
public void removeActionableItem(IAtsObject atsObject, IAtsActionableItem aia, IAtsChangeSet changes) throws OseeCoreException {
String guid = AtsUtilCore.getGuid(aia);
changes.deleteAttribute(atsObject, AtsAttributeTypes.ActionableItem, guid);
}
+ @Override
public Result setActionableItems(IAtsObject atsObject, Collection<IAtsActionableItem> newItems, IAtsChangeSet changes) throws OseeCoreException {
Set<IAtsActionableItem> existingAias = getActionableItems(atsObject);
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
index 4974f15cf15..c8f4f63383a 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
@@ -44,7 +45,6 @@ import org.eclipse.osee.ats.api.workflow.INewActionListener;
import org.eclipse.osee.ats.api.workflow.log.LogType;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
-import org.eclipse.osee.ats.core.ai.ActionableItemManager;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.core.workflow.state.StateManagerUtility;
@@ -68,12 +68,12 @@ public class ActionFactory implements IAtsActionFactory {
private final IAtsWorkItemFactory workItemFactory;
private final IAtsUtilService utilService;
private final ISequenceProvider sequenceProvider;
- private final ActionableItemManager actionableItemManager;
+ private final IAtsActionableItemService actionableItemManager;
private final IAttributeResolver attrResolver;
private final IAtsStateFactory stateFactory;
private final IAtsServices services;
- public ActionFactory(IAtsWorkItemFactory workItemFactory, IAtsUtilService utilService, ISequenceProvider sequenceProvider, ActionableItemManager actionableItemManager, IAttributeResolver attrResolver, IAtsStateFactory stateFactory, IAtsServices atsServices) {
+ public ActionFactory(IAtsWorkItemFactory workItemFactory, IAtsUtilService utilService, ISequenceProvider sequenceProvider, IAtsActionableItemService actionableItemManager, IAttributeResolver attrResolver, IAtsStateFactory stateFactory, IAtsServices atsServices) {
this.workItemFactory = workItemFactory;
this.utilService = utilService;
this.sequenceProvider = sequenceProvider;
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
index a72b022ed81..38d3cafaa02 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.agile.IAgileService;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.column.IAtsColumnService;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
import org.eclipse.osee.ats.api.config.IAtsCache;
@@ -140,7 +141,7 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
private IAtsUtilService utilService;
private ISequenceProvider sequenceProvider;
private IAtsActionFactory actionFactory;
- private ActionableItemManager actionableItemManager;
+ private IAtsActionableItemService actionableItemManager;
private JdbcService jdbcService;
private WorkItemNotificationProcessor workItemNotificationProcessor;
private AtsNotificationEventProcessor notificationEventProcessor;

Back to the top