Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-07-20 20:46:53 +0000
committerRyan D. Brooks2016-08-31 16:17:56 +0000
commite861d66493605838e51404bb5f837df49dc9b849 (patch)
tree210579b19ec7c23e21282d963520b0c1e097d408 /plugins
parent3d38da4ee5e1a0b8876cc2513fe8298241aee828 (diff)
downloadorg.eclipse.osee-e861d66493605838e51404bb5f837df49dc9b849.tar.gz
org.eclipse.osee-e861d66493605838e51404bb5f837df49dc9b849.tar.xz
org.eclipse.osee-e861d66493605838e51404bb5f837df49dc9b849.zip
bug[ats_ATS302825]: Remove IAtsClient.getConfigObject
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java18
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java2
7 files changed, 15 insertions, 32 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
index b936adb158b..8f6aefb2e4c 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
@@ -52,8 +52,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
*/
public interface IAtsClient extends IAtsServices, IAtsNotifier, IAttributeResolverProvider, IAtsReviewServiceProvider, IAtsBranchServiceProvider, IAtsWorkItemArtifactServiceProvider, IAtsWorkItemServiceProvider, IAtsCacheProvider, ITeamDefinitionFactory, IActionableItemFactory, IArtifactProvider, IAtsVersionServiceProvider, IAtsEarnedValueServiceProvider {
- <T extends IAtsConfigObject> T getConfigObject(Artifact artifact) throws OseeCoreException;
-
Artifact getConfigArtifact(IAtsConfigObject atsConfigObject) throws OseeCoreException;
/**
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 2656fc6fb47..366a7da6574 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
@@ -27,7 +27,6 @@ import org.eclipse.osee.ats.api.column.IAtsColumnService;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
import org.eclipse.osee.ats.api.config.IAtsCache;
import org.eclipse.osee.ats.api.data.AtsArtifactToken;
-import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.ev.IAtsEarnedValueService;
@@ -90,12 +89,9 @@ import org.eclipse.osee.ats.core.client.util.IArtifactMembersCache;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.client.workflow.ChangeTypeUtil;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionListeners;
-import org.eclipse.osee.ats.core.config.ActionableItem;
import org.eclipse.osee.ats.core.config.AtsCache;
import org.eclipse.osee.ats.core.config.IActionableItemFactory;
import org.eclipse.osee.ats.core.config.ITeamDefinitionFactory;
-import org.eclipse.osee.ats.core.config.TeamDefinition;
-import org.eclipse.osee.ats.core.config.Version;
import org.eclipse.osee.ats.core.program.AtsProgramService;
import org.eclipse.osee.ats.core.util.ActionFactory;
import org.eclipse.osee.ats.core.util.AtsCoreFactory;
@@ -279,20 +275,6 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
}
- @SuppressWarnings("unchecked")
- @Override
- public <T extends IAtsConfigObject> T getConfigObject(Artifact artifact) throws OseeCoreException {
- if (artifact.isOfType(AtsArtifactTypes.Version)) {
- return (T) new Version(logger, this, artifact);
- } else if (artifact.isOfType(AtsArtifactTypes.TeamDefinition)) {
- return (T) new TeamDefinition(logger, this, artifact);
- } else if (artifact.isOfType(AtsArtifactTypes.ActionableItem)) {
- return (T) new ActionableItem(logger, this, artifact);
- }
- throw new UnsupportedOperationException(String.format("Unhandled config object type %s object %s",
- artifact.getArtifactTypeName(), artifact.toStringWithId()));
- }
-
@Override
public Artifact getConfigArtifact(IAtsConfigObject atsConfigObject) throws OseeCoreException {
return (Artifact) atsConfigObject.getStoreObject();
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java
index 8c6b150facd..be8f5d03274 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java
@@ -28,8 +28,11 @@ import org.eclipse.osee.ats.core.client.IAtsClient;
import org.eclipse.osee.ats.core.client.agile.AgileFeatureGroup;
import org.eclipse.osee.ats.core.client.agile.AgileTeam;
import org.eclipse.osee.ats.core.config.AbstractConfigItemFactory;
+import org.eclipse.osee.ats.core.config.ActionableItem;
import org.eclipse.osee.ats.core.config.Country;
import org.eclipse.osee.ats.core.config.Program;
+import org.eclipse.osee.ats.core.config.TeamDefinition;
+import org.eclipse.osee.ats.core.config.Version;
import org.eclipse.osee.ats.core.insertion.Insertion;
import org.eclipse.osee.ats.core.insertion.InsertionActivity;
import org.eclipse.osee.ats.core.model.WorkPackage;
@@ -96,7 +99,7 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
public IAtsVersion getVersion(ArtifactId artifact) {
IAtsVersion version = null;
if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.Version)) {
- version = (IAtsVersion) atsClient.getConfigObject((Artifact) artifact);
+ version = new Version(logger, atsClient, artifact);
}
return version;
}
@@ -105,7 +108,7 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
public IAtsTeamDefinition getTeamDef(ArtifactId artifact) throws OseeCoreException {
IAtsTeamDefinition teamDef = null;
if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.TeamDefinition)) {
- teamDef = (IAtsTeamDefinition) atsClient.getConfigObject((Artifact) artifact);
+ teamDef = new TeamDefinition(logger, atsClient, artifact);
}
return teamDef;
}
@@ -114,7 +117,7 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
public IAtsActionableItem getActionableItem(ArtifactId artifact) throws OseeCoreException {
IAtsActionableItem ai = null;
if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.ActionableItem)) {
- ai = (IAtsActionableItem) atsClient.getConfigObject((Artifact) artifact);
+ ai = new ActionableItem(logger, atsClient, artifact);
}
return ai;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java
index 9c6862289c5..91ab82c4dc2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java
@@ -59,7 +59,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask {
// load top team into cache
Artifact topTeamDefArt =
ArtifactQuery.getArtifactFromToken(AtsArtifactToken.TopTeamDefinition, AtsUtilCore.getAtsBranch());
- IAtsTeamDefinition teamDef = AtsClientService.get().getConfigObject(topTeamDefArt);
+ IAtsTeamDefinition teamDef = AtsClientService.get().getConfigItem(topTeamDefArt);
AtsChangeSet changes = new AtsChangeSet("Set Top Team Work Definition");
changes.setSoleAttributeValue(teamDef, AtsAttributeTypes.WorkflowDefinition,
IAtsWorkDefinitionAdmin.TeamWorkflowDefaultDefinitionId);
@@ -68,7 +68,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask {
// load top ai into cache
Artifact topAiArt =
ArtifactQuery.getArtifactFromToken(AtsArtifactToken.TopActionableItem, AtsUtilCore.getAtsBranch());
- IAtsActionableItem aia = AtsClientService.get().getConfigObject(topAiArt);
+ IAtsActionableItem aia = AtsClientService.get().getConfigItem(topAiArt);
changes.setSoleAttributeValue(aia, AtsAttributeTypes.Actionable, false);
changes.execute();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java
index c0e4234d841..1d8ad1759b1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java
@@ -128,7 +128,7 @@ public class CopyAtsConfigurationOperation extends AbstractOperation {
// Get or create new team definition
Artifact newAiArt = duplicateTeamDefinitionOrActionableItem(changes, fromAiArt);
changes.add(newAiArt);
- IAtsActionableItem newAi = AtsClientService.get().getConfigObject(newAiArt);
+ IAtsActionableItem newAi = AtsClientService.get().getConfigItem(newAiArt);
changes.relate(parentAiArt, CoreRelationTypes.Default_Hierarchical__Child, newAi);
existingArtifacts.add(parentAiArt);
newArtifacts.add(newAiArt);
@@ -152,8 +152,8 @@ public class CopyAtsConfigurationOperation extends AbstractOperation {
// Handle all children
for (Artifact childFromAiArt : fromAiArt.getChildren()) {
if (childFromAiArt.isOfType(AtsArtifactTypes.ActionableItem)) {
- IAtsActionableItem childAi = AtsClientService.get().getConfigObject(childFromAiArt);
- IAtsActionableItem newChildAi = AtsClientService.get().getConfigObject(newAiArt);
+ IAtsActionableItem childAi = AtsClientService.get().getConfigItem(childFromAiArt);
+ IAtsActionableItem newChildAi = AtsClientService.get().getConfigItem(newAiArt);
createActionableItems(changes, childAi, newChildAi);
}
}
@@ -167,7 +167,7 @@ public class CopyAtsConfigurationOperation extends AbstractOperation {
Artifact newTeamDefArt = duplicateTeamDefinitionOrActionableItem(changes, fromTeamDefArt);
changes.add(newTeamDefArt);
- IAtsTeamDefinition newTeamDef = AtsClientService.get().getConfigObject(newTeamDefArt);
+ IAtsTeamDefinition newTeamDef = AtsClientService.get().getConfigItem(newTeamDefArt);
parentTeamDefArt.addChild(newTeamDefArt);
changes.add(parentTeamDefArt);
@@ -180,7 +180,7 @@ public class CopyAtsConfigurationOperation extends AbstractOperation {
// handle all children
for (Artifact childFromTeamDefArt : fromTeamDefArt.getChildren()) {
if (childFromTeamDefArt.isOfType(AtsArtifactTypes.TeamDefinition)) {
- IAtsTeamDefinition childFromTeamDef = AtsClientService.get().getConfigObject(childFromTeamDefArt);
+ IAtsTeamDefinition childFromTeamDef = AtsClientService.get().getConfigItem(childFromTeamDefArt);
AtsClientService.get().getCache().getByUuid(childFromTeamDefArt.getUuid(), IAtsTeamDefinition.class);
createTeamDefinitions(changes, childFromTeamDef, newTeamDef);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
index 93794463d9f..836a4d90479 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
@@ -107,7 +107,7 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
Artifact aiArt = ArtifactQuery.getArtifactFromId(token.getGuid(), AtsUtilCore.getAtsBranch());
if (aiArt != null) {
- IAtsActionableItem item = AtsClientService.get().getConfigObject(aiArt);
+ IAtsActionableItem item = AtsClientService.get().getConfigItem(aiArt);
aias.add(item);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java
index 603050030f7..e0e45a622d8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java
@@ -49,7 +49,7 @@ public class SubscribeByTeamDefinition extends XNavigateItemAction {
for (Artifact art : AtsClientService.get().getUserServiceClient().getCurrentOseeUser().getRelatedArtifacts(
AtsRelationTypes.SubscribedUser_Artifact)) {
if (art.isOfType(AtsArtifactTypes.TeamDefinition)) {
- objs.add((IAtsTeamDefinition) AtsClientService.get().getConfigObject(art));
+ objs.add((IAtsTeamDefinition) AtsClientService.get().getConfigItem(art));
}
}
diag.setInitialTeamDefs(objs);

Back to the top