Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-10-31 16:18:23 -0400
committerDavid W. Miller2016-10-31 16:18:23 -0400
commitdea3f7df23c2a4a93cecfdcfd265add78af9c701 (patch)
tree0d117c70508d0f58fe0aab893a4a1f2602807429
parent998a0d1634b94ad8683bfc369a817720a85d7323 (diff)
downloadorg.eclipse.osee-dea3f7df23c2a4a93cecfdcfd265add78af9c701.tar.gz
org.eclipse.osee-dea3f7df23c2a4a93cecfdcfd265add78af9c701.tar.xz
org.eclipse.osee-dea3f7df23c2a4a93cecfdcfd265add78af9c701.zip
refactor: Remove IBasicArtifact.getFullArtifact
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java24
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/IBasicArtifact.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java20
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java31
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java14
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java3
15 files changed, 53 insertions, 101 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java
index f81a42389e..07658992b4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.ats.util.FavoritesManager;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.types.IArtifact;
import org.eclipse.osee.framework.ui.skynet.ArtifactImageManager;
import org.eclipse.osee.framework.ui.skynet.ArtifactImageProvider;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
@@ -66,18 +65,17 @@ public class AtsArtifactImageProvider extends ArtifactImageProvider {
}
@Override
- public String setupImage(IArtifact artifact) throws OseeCoreException {
- Artifact aArtifact = artifact.getFullArtifact();
- if (aArtifact.isOfType(AtsArtifactTypes.Version)) {
- if (aArtifact.getSoleAttributeValue(AtsAttributeTypes.NextVersion, false)) {
- return ArtifactImageManager.setupImage(aArtifact, AtsImage.NEXT, Location.BOT_RIGHT);
+ public String setupImage(Artifact artifact) throws OseeCoreException {
+ if (artifact.isOfType(AtsArtifactTypes.Version)) {
+ if (artifact.getSoleAttributeValue(AtsAttributeTypes.NextVersion, false)) {
+ return ArtifactImageManager.setupImage(artifact, AtsImage.NEXT, Location.BOT_RIGHT);
}
- if (aArtifact.getSoleAttributeValue(AtsAttributeTypes.Released, false)) {
- return ArtifactImageManager.setupImage(aArtifact, AtsImage.RELEASED, Location.TOP_RIGHT);
+ if (artifact.getSoleAttributeValue(AtsAttributeTypes.Released, false)) {
+ return ArtifactImageManager.setupImage(artifact, AtsImage.RELEASED, Location.TOP_RIGHT);
}
- if (aArtifact.getSoleAttributeValue(AtsAttributeTypes.VersionLocked,
- false) && !aArtifact.getSoleAttributeValue(AtsAttributeTypes.Released, false)) {
- return ArtifactImageManager.setupImage(aArtifact, AtsImage.VERSION_LOCKED, Location.BOT_RIGHT);
+ if (artifact.getSoleAttributeValue(AtsAttributeTypes.VersionLocked,
+ false) && !artifact.getSoleAttributeValue(AtsAttributeTypes.Released, false)) {
+ return ArtifactImageManager.setupImage(artifact, AtsImage.VERSION_LOCKED, Location.BOT_RIGHT);
}
}
@@ -101,11 +99,11 @@ public class AtsArtifactImageProvider extends ArtifactImageProvider {
AbstractWorkflowArtifact stateMachine = (AbstractWorkflowArtifact) artifact;
if (SubscribeManager.isSubscribed(stateMachine, AtsClientService.get().getUserService().getCurrentUser())) {
// was 8,6
- return ArtifactImageManager.setupImage(aArtifact, AtsImage.SUBSCRIBED_OVERLAY, Location.BOT_RIGHT);
+ return ArtifactImageManager.setupImage(artifact, AtsImage.SUBSCRIBED_OVERLAY, Location.BOT_RIGHT);
}
if (FavoritesManager.isFavorite(stateMachine, AtsClientService.get().getUserService().getCurrentUser())) {
// was 7,0
- return ArtifactImageManager.setupImage(aArtifact, AtsImage.FAVORITE_OVERLAY, Location.TOP_RIGHT);
+ return ArtifactImageManager.setupImage(artifact, AtsImage.FAVORITE_OVERLAY, Location.TOP_RIGHT);
}
}
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java
index ecb3e8f590..2bdc344cc5 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.client.integration.tests.integration.skynet.core.utils;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.types.IArtifact;
/**
@@ -59,12 +58,6 @@ public class MockIArtifact extends NamedIdentity<String> implements IArtifact {
}
@Override
- public Artifact getFullArtifact() {
- wasGetFullArtifactCalled = true;
- return null;
- }
-
- @Override
public String toString() {
return String.format("[%s]", getGuid());
}
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java
index f9730106fe..bcd1b603ed 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java
@@ -52,13 +52,7 @@ public class MockArtifact extends NamedIdentity<String> implements IBasicArtifac
}
@Override
- public Object getFullArtifact() {
- return null;
- }
-
- @Override
public Long getId() {
return Long.valueOf(artId);
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java
index d6ce7da87d..e8c6571fff 100644
--- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java
+++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java
@@ -52,13 +52,7 @@ public class MockArtifact extends NamedIdentity<String> implements IBasicArtifac
}
@Override
- public Object getFullArtifact() {
- return null;
- }
-
- @Override
public Long getId() {
return Long.valueOf(artId);
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/IBasicArtifact.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/IBasicArtifact.java
index 0dfa020a98..16a3191c0d 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/IBasicArtifact.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/IBasicArtifact.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.core.model;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
* @author Roberto E. Escobar
@@ -23,6 +22,4 @@ public interface IBasicArtifact<T> extends ArtifactToken {
@Override
ArtifactType getArtifactType();
-
- T getFullArtifact() throws OseeCoreException;
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java
index 6cc9ca35ee..66e706a042 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java
@@ -12,10 +12,8 @@ package org.eclipse.osee.framework.skynet.core.mocks;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.types.IArtifact;
/**
@@ -66,12 +64,6 @@ public class MockIArtifact extends NamedIdentity<String> implements IArtifact {
}
@Override
- public Artifact getFullArtifact() {
- wasGetFullArtifactCalled = true;
- return null;
- }
-
- @Override
public String toString() {
return String.format("[%s]", getGuid());
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java
index 3edc3f748f..47a4f7a931 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java
@@ -12,9 +12,9 @@ package org.eclipse.osee.framework.skynet.core;
import java.util.Collection;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
@@ -34,8 +34,8 @@ public interface AccessPolicy {
PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException;
- PermissionStatus hasArtifactPermission(Collection<? extends IBasicArtifact<?>> artifacts, PermissionEnum permission, Level level) throws OseeCoreException;
+ PermissionStatus hasArtifactPermission(Collection<Artifact> artifacts, PermissionEnum permission, Level level) throws OseeCoreException;
- PermissionStatus canRelationBeModified(IBasicArtifact<?> subject, Collection<? extends IBasicArtifact<?>> toBeRelated, RelationTypeSide relationTypeSide, Level level) throws OseeCoreException;
+ PermissionStatus canRelationBeModified(Artifact subject, Collection<Artifact> toBeRelated, RelationTypeSide relationTypeSide, Level level) throws OseeCoreException;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index d45a1057b9..5fb2b4c894 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -1696,11 +1696,6 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
return modType;
}
- @Override
- public final Artifact getFullArtifact() {
- return this;
- }
-
public final DefaultBasicGuidArtifact getBasicGuidArtifact() {
return new DefaultBasicGuidArtifact(getBranch(), getArtifactTypeId(), this);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java
index f53d446044..9fbbab51c4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java
@@ -18,7 +18,6 @@ import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
-import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.enums.RelationSide;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
@@ -131,7 +130,7 @@ public class AccessPolicyImpl implements AccessPolicy {
}
@Override
- public PermissionStatus hasArtifactPermission(Collection<? extends IBasicArtifact<?>> artifacts, PermissionEnum permission, Level level) throws OseeCoreException {
+ public PermissionStatus hasArtifactPermission(Collection<Artifact> artifacts, PermissionEnum permission, Level level) throws OseeCoreException {
User currentUser = getCurrentUser();
AccessDataQuery query = getAccessService().getAccessData(currentUser, artifacts);
@@ -139,12 +138,9 @@ public class AccessPolicyImpl implements AccessPolicy {
if (!OseeClientProperties.isInDbInit()) {
permissionStatus = new PermissionStatus();
if (artifacts != null) {
- for (IBasicArtifact<?> artifact : artifacts) {
- if (artifact instanceof Artifact) {
- Artifact fullArtifact = ((Artifact) artifact).getFullArtifact();
- if (fullArtifact.isInDb()) {
- query.artifactMatches(permission, artifact, permissionStatus);
- }
+ for (Artifact artifact : artifacts) {
+ if (artifact.isInDb()) {
+ query.artifactMatches(permission, artifact, permissionStatus);
}
if (printErrorMessage(currentUser, artifacts, permissionStatus, level)) {
break;
@@ -183,10 +179,10 @@ public class AccessPolicyImpl implements AccessPolicy {
}
@Override
- public PermissionStatus canRelationBeModified(IBasicArtifact<?> subject, Collection<? extends IBasicArtifact<?>> toBeRelated, RelationTypeSide relationTypeSide, Level level) throws OseeCoreException {
+ public PermissionStatus canRelationBeModified(Artifact subject, Collection<Artifact> toBeRelated, RelationTypeSide relationTypeSide, Level level) throws OseeCoreException {
PermissionStatus subjectPermission = canRelationBeModifiedHelper(subject, null, relationTypeSide, level);
if (subjectPermission.matched() && toBeRelated != null && !toBeRelated.isEmpty()) {
- for (IBasicArtifact<?> art : toBeRelated) {
+ for (Artifact art : toBeRelated) {
RelationSide otherSide = relationTypeSide.getSide().oppositeSide();
PermissionStatus toBeRelatedPermission =
canRelationBeModifiedHelper(art, null, new RelationTypeSide(relationTypeSide, otherSide), level);
@@ -198,12 +194,12 @@ public class AccessPolicyImpl implements AccessPolicy {
return subjectPermission;
}
- private PermissionStatus canRelationBeModifiedHelper(IBasicArtifact<?> subject, Collection<? extends IBasicArtifact<?>> toBeRelated, RelationTypeSide relationTypeSide, Level level) throws OseeCoreException {
+ private PermissionStatus canRelationBeModifiedHelper(Artifact subject, Collection<Artifact> toBeRelated, RelationTypeSide relationTypeSide, Level level) throws OseeCoreException {
PermissionStatus status = hasArtifactRelationPermission(java.util.Collections.singleton(subject),
java.util.Collections.singleton(relationTypeSide), PermissionEnum.WRITE, level);
if (!status.matched()) {
- ArrayList<IBasicArtifact<?>> artifacts = new ArrayList<>();
+ ArrayList<Artifact> artifacts = new ArrayList<>();
artifacts.add(subject);
if (toBeRelated != null) {
artifacts.addAll(toBeRelated);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java
index 6a3472d2a2..657070e4b3 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java
@@ -15,9 +15,9 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
@@ -33,7 +33,7 @@ import org.junit.Test;
/**
* Test Case for {@link ArtifactPromptChange}
- *
+ *
* @author Jeff C. Phillips
*/
public class ArtifactPromptChangeTest {
@@ -78,12 +78,12 @@ public class ArtifactPromptChangeTest {
}
@Override
- public PermissionStatus hasArtifactPermission(Collection<? extends IBasicArtifact<?>> artifacts, PermissionEnum permission, Level level) {
+ public PermissionStatus hasArtifactPermission(Collection<Artifact> artifacts, PermissionEnum permission, Level level) {
return new PermissionStatus();
}
@Override
- public PermissionStatus canRelationBeModified(IBasicArtifact<?> subject, Collection<? extends IBasicArtifact<?>> toBeRelated, RelationTypeSide relationTypeSide, Level level) {
+ public PermissionStatus canRelationBeModified(Artifact subject, Collection<Artifact> toBeRelated, RelationTypeSide relationTypeSide, Level level) {
return new PermissionStatus();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java
index 0f7dd1acd4..b77207aec8 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java
@@ -31,7 +31,6 @@ import org.eclipse.osee.framework.skynet.core.change.Change;
import org.eclipse.osee.framework.skynet.core.conflict.ArtifactConflict;
import org.eclipse.osee.framework.skynet.core.conflict.AttributeConflict;
import org.eclipse.osee.framework.skynet.core.conflict.Conflict;
-import org.eclipse.osee.framework.skynet.core.types.IArtifact;
import org.eclipse.osee.framework.ui.skynet.artifact.annotation.ArtifactAnnotation;
import org.eclipse.osee.framework.ui.skynet.artifact.annotation.AttributeAnnotationManager;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
@@ -257,26 +256,25 @@ public final class ArtifactImageManager {
return ImageManager.getImage(FrameworkImage.INFO_LG);
}
- public synchronized static Image getImage(IArtifact artifact) {
+ public synchronized static Image getImage(Artifact artifact) {
return ImageManager.getImage(setupImage(artifact));
}
- public synchronized static ImageDescriptor getImageDescriptor(IArtifact artifact) {
+ public synchronized static ImageDescriptor getImageDescriptor(Artifact artifact) {
return ImageManager.getImageDescriptor(setupImage(artifact));
}
- private synchronized static String setupImage(IArtifact artifact) {
+ private synchronized static String setupImage(Artifact artifact) {
try {
- Artifact castedArtifact = artifact.getFullArtifact();
IArtifactType type = artifact.getArtifactType();
ArtifactImageProvider imageProvider = providersOverrideImageMap.get(type);
if (imageProvider != null) {
- return imageProvider.setupImage(castedArtifact);
+ return imageProvider.setupImage(artifact);
} else {
KeyedImage imageKey = artifactTypeImageMap.get(type);
if (imageKey != null) {
- if (AccessControlManager.hasLock(castedArtifact)) {
- return getLockedImage(imageKey, castedArtifact);
+ if (AccessControlManager.hasLock(artifact)) {
+ return getLockedImage(imageKey, artifact);
}
return ImageManager.setupImage(imageKey);
}
@@ -288,18 +286,17 @@ public final class ArtifactImageManager {
return setupImageNoProviders(artifact);
}
- protected synchronized static String setupImageNoProviders(IArtifact artifact) {
+ protected synchronized static String setupImageNoProviders(Artifact artifact) {
KeyedImage baseImageEnum = null;
try {
- Artifact castedArtifact = artifact.getFullArtifact();
- baseImageEnum = BaseImage.getBaseImageEnum(castedArtifact);
+ baseImageEnum = BaseImage.getBaseImageEnum(artifact);
- if (AccessControlManager.hasLock(castedArtifact)) {
- return getLockedImage(baseImageEnum, castedArtifact);
+ if (AccessControlManager.hasLock(artifact)) {
+ return getLockedImage(baseImageEnum, artifact);
}
- AttributeAnnotationManager.get(castedArtifact);
- if (AttributeAnnotationManager.isAnnotationWarning(castedArtifact)) {
+ AttributeAnnotationManager.get(artifact);
+ if (AttributeAnnotationManager.isAnnotationWarning(artifact)) {
return ImageManager.setupImageWithOverlay(baseImageEnum, FrameworkImage.WARNING_OVERLAY,
Location.BOT_LEFT).getImageKey();
}
@@ -309,9 +306,9 @@ public final class ArtifactImageManager {
return ImageManager.setupImage(baseImageEnum);
}
- private static String getLockedImage(KeyedImage baseImageEnum, Artifact castedArtifact) {
+ private static String getLockedImage(KeyedImage baseImageEnum, Artifact artifact) {
KeyedImage locked = FrameworkImage.LOCKED_NO_ACCESS;
- if (AccessControlManager.hasLockAccess(castedArtifact)) {
+ if (AccessControlManager.hasLockAccess(artifact)) {
locked = FrameworkImage.LOCKED_WITH_ACCESS;
}
return ImageManager.setupImageWithOverlay(baseImageEnum, locked, Location.TOP_LEFT).getImageKey();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageProvider.java
index d88b116fef..aae961104e 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageProvider.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.framework.ui.skynet;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.types.IArtifact;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* This class allows plugins to provide the base images for artifact types by registering via ImageManger.registerImage.
@@ -28,7 +28,7 @@ public abstract class ArtifactImageProvider {
* call. Alternatively, providers that wish to defer to the basic implementation should call return
* super.setupImage()
*/
- public String setupImage(IArtifact artifact) throws OseeCoreException {
+ public String setupImage(Artifact artifact) throws OseeCoreException {
return ArtifactImageManager.setupImageNoProviders(artifact);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java
index 599039c9e6..280e807897 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java
@@ -30,7 +30,6 @@ import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
-import org.eclipse.osee.framework.skynet.core.types.IArtifact;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.skynet.util.DynamicImage;
import org.eclipse.osee.framework.ui.skynet.util.DynamicImages;
@@ -160,17 +159,16 @@ public class FrameworkArtifactImageProvider extends ArtifactImageProvider {
}
@Override
- public String setupImage(IArtifact artifact) throws OseeCoreException {
- Artifact aArtifact = artifact.getFullArtifact();
- if (aArtifact.isDeleted()) {
+ public String setupImage(Artifact artifact) throws OseeCoreException {
+ if (artifact.isDeleted()) {
return null;
}
- if (aArtifact.isOfType(CoreArtifactTypes.User)) {
- if (((User) aArtifact).isSystemUser()) {
+ if (artifact.isOfType(CoreArtifactTypes.User)) {
+ if (((User) artifact).isSystemUser()) {
return ImageManager.setupImage(FrameworkImage.USER_GREY);
- } else if (!((User) aArtifact).isActive()) {
+ } else if (!((User) artifact).isActive()) {
return ImageManager.setupImage(FrameworkImage.USER_YELLOW);
- } else if (((User) aArtifact).equals(UserManager.getUser())) {
+ } else if (((User) artifact).equals(UserManager.getUser())) {
return ImageManager.setupImage(FrameworkImage.USER_RED);
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java
index ba6e567c46..aa8faf2253 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java
@@ -213,8 +213,7 @@ public class ArtifactFormPage extends FormPage {
updateTitle(form);
updateImage(form);
updateArtifactInfoArea(toolkit, form, true);
- applPart = new ArtifactFormPageViewApplicability(getEditor().getArtifactFromEditorInput().getFullArtifact(),
- toolkit, form);
+ applPart = new ArtifactFormPageViewApplicability(getEditor().getArtifactFromEditorInput(), toolkit, form);
applPart.create();
addToolBar(toolkit, form, true);
FormsUtil.addHeadingGradient(toolkit, form, true);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java
index e45945582e..fd5d48f000 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java
@@ -48,7 +48,6 @@ import org.eclipse.osee.framework.skynet.core.conflict.ConflictManagerExternal;
import org.eclipse.osee.framework.skynet.core.httpRequests.CommitBranchHttpRequestOperation;
import org.eclipse.osee.framework.skynet.core.revision.ConflictManagerInternal;
import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
-import org.eclipse.osee.framework.skynet.core.types.IArtifact;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.plugin.util.ListSelectionDialogNoSave;
@@ -418,7 +417,7 @@ public class MergeXWidget extends GenericXWidget implements IOseeTreeReportProvi
private void refreshAssociatedArtifactItem(BranchId sourceBranch) {
try {
- IArtifact branchAssociatedArtifact = BranchManager.getAssociatedArtifact(sourceBranch);
+ Artifact branchAssociatedArtifact = BranchManager.getAssociatedArtifact(sourceBranch);
if (branchAssociatedArtifact != null) {
openAssociatedArtifactAction.setImageDescriptor(
ArtifactImageManager.getImageDescriptor(branchAssociatedArtifact));

Back to the top