Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-05-20 16:08:58 +0000
committerRyan D. Brooks2011-05-20 16:08:58 +0000
commit7840f46b12b20a1bb3ef8b3bb934421e9fc75709 (patch)
treed8da4c3259349a190bee93f3fa9da457b853f399 /plugins/org.eclipse.osee.framework.skynet.core/src
parentf28113b5cd91d824b975255c6ca0cd51bb1b84ee (diff)
downloadorg.eclipse.osee-7840f46b12b20a1bb3ef8b3bb934421e9fc75709.tar.gz
org.eclipse.osee-7840f46b12b20a1bb3ef8b3bb934421e9fc75709.tar.xz
org.eclipse.osee-7840f46b12b20a1bb3ef8b3bb934421e9fc75709.zip
feature: ATS Programatic Transition Validation
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core/src')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java16
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeXWidgetValidator.java22
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeXWidgetValidateManager.java40
5 files changed, 20 insertions, 65 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java
index 97a848d86a1..b5ce4db7e94 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java
@@ -15,6 +15,7 @@ import java.io.StringReader;
import java.io.StringWriter;
import java.util.Collection;
import java.util.HashSet;
+import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java
index 688f21df62f..a2c25fc66b6 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java
@@ -294,7 +294,7 @@ public final class UserManager {
}
}
- public static boolean isUserInactive(Collection<IBasicUser> users) throws OseeCoreException {
+ public static boolean isUserInactive(Collection<? extends IBasicUser> users) throws OseeCoreException {
for (IBasicUser user : users) {
if (!user.isActive()) {
return true;
@@ -303,7 +303,7 @@ public final class UserManager {
return false;
}
- public static boolean isUserSystem(Collection<IBasicUser> users) throws OseeCoreException {
+ public static boolean isUserSystem(Collection<? extends IBasicUser> users) throws OseeCoreException {
for (IBasicUser user : users) {
if (isSystemUser(user)) {
return true;
@@ -321,7 +321,7 @@ public final class UserManager {
return false;
}
- public static boolean isUserCurrentUser(Collection<IBasicUser> users) throws OseeCoreException {
+ public static boolean isUserCurrentUser(Collection<? extends IBasicUser> users) throws OseeCoreException {
for (IBasicUser user : users) {
if (UserManager.getUser().equals(user)) {
return true;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
index aa537abaede..521d3fb37a5 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
@@ -27,7 +27,9 @@ import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.util.xml.Xml;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
+import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.types.IArtifact;
@@ -244,4 +246,18 @@ public final class Artifacts {
return false;
}
+ public static String getDirtyReport(Artifact artifact) {
+ String rString = null;
+ for (Attribute<?> attribute : artifact.internalGetAttributes()) {
+ if (attribute.isDirty()) {
+ rString = "Attribute: " + attribute.getNameValueDescription();
+ break;
+ }
+ }
+
+ if (rString == null) {
+ rString = RelationManager.reportHasDirtyLinks(artifact);
+ }
+ return rString;
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeXWidgetValidator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeXWidgetValidator.java
deleted file mode 100644
index 4a9b3bf9546..00000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/IOseeXWidgetValidator.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Created on May 9, 2011
- *
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
-package org.eclipse.osee.framework.skynet.core.validation;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-
-/**
- * Provider to validate XWidget/IAttributeWidget entry against Artifact store model without use of XWidget UI
- *
- * @author Donald G. Dunne
- */
-public interface IOseeXWidgetValidator {
-
- public boolean isProvider(String xWidgetName);
-
- public IStatus validate(Artifact artifact, String xWidgetName, String name);
-
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeXWidgetValidateManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeXWidgetValidateManager.java
deleted file mode 100644
index 6518b623ec9..00000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeXWidgetValidateManager.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Created on May 9, 2011
- *
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
-package org.eclipse.osee.framework.skynet.core.validation;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.internal.Activator;
-
-/**
- * @author Donald G. Dunne
- */
-public class OseeXWidgetValidateManager {
- private static final String EXTENSION_ELEMENT = "OseeXWidgetValidator";
- private static final String EXTENSION_ID = Activator.PLUGIN_ID + "." + EXTENSION_ELEMENT;
- private static final String CLASS_NAME_ATTRIBUTE = "classname";
- public static OseeXWidgetValidateManager instance = new OseeXWidgetValidateManager();
- private static ExtensionDefinedObjects<IOseeXWidgetValidator> validators;
-
- private OseeXWidgetValidateManager() {
- validators =
- new ExtensionDefinedObjects<IOseeXWidgetValidator>(EXTENSION_ID, EXTENSION_ELEMENT, CLASS_NAME_ATTRIBUTE);
- }
-
- public Collection<IStatus> validate(Artifact artifact, String xWidgetName, String name) {
- List<IStatus> statuses = new ArrayList<IStatus>();
- for (IOseeXWidgetValidator validator : validators.getObjects()) {
- if (validator.isProvider(xWidgetName)) {
- statuses.add(validator.validate(artifact, xWidgetName, name));
- }
- }
- return statuses;
- }
-}

Back to the top