Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-09-29 19:08:35 -0400
committerRyan D. Brooks2010-09-29 19:08:35 -0400
commitce90c86c8968f671825f8ac40da91fdc8bf4814f (patch)
tree2463bb2d2c2e6f5de8b828e1ad03a00824435926
parente1eec18def44e1dfde27033eb5ef0685268c88b9 (diff)
downloadorg.eclipse.osee-ce90c86c8968f671825f8ac40da91fdc8bf4814f.tar.gz
org.eclipse.osee-ce90c86c8968f671825f8ac40da91fdc8bf4814f.tar.xz
org.eclipse.osee-ce90c86c8968f671825f8ac40da91fdc8bf4814f.zip
refinement: Add AtsNote and AtsLog tests
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_Demo_Suite.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_TestDb_Suite.java13
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/AtsLogTest.java61
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/LogItemTest.java (renamed from plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/LogItemTest.java)29
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/AtsNoteTest.java66
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/NoteItemTest.java (renamed from plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/NoteItemTest.java)23
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java19
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ArtifactLog.java73
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java)96
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ILogStorageProvider.java19
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogItem.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/LogItem.java)41
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java26
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/ArtifactNote.java83
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/AtsNote.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java)42
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/INoteStorageProvider.java21
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/NoteItem.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/NoteItem.java)2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java4
40 files changed, 501 insertions, 204 deletions
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_Demo_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_Demo_Suite.java
index 36f468b165..f077d7cc0f 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_Demo_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_Demo_Suite.java
@@ -11,7 +11,10 @@
package org.eclipse.osee.ats.test;
import static org.junit.Assert.assertTrue;
-import org.eclipse.osee.ats.test.artifact.LogItemTest;
+import org.eclipse.osee.ats.test.artifact.log.AtsLogTest;
+import org.eclipse.osee.ats.test.artifact.log.LogItemTest;
+import org.eclipse.osee.ats.test.artifact.note.AtsNoteTest;
+import org.eclipse.osee.ats.test.artifact.note.NoteItemTest;
import org.eclipse.osee.ats.test.config.AtsBranchConfigurationTest;
import org.eclipse.osee.ats.test.editor.SMAPrintTest;
import org.eclipse.osee.ats.test.health.AtsValidateAtsDatabaseTest;
@@ -32,6 +35,9 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
LogItemTest.class,
+ AtsLogTest.class,
+ NoteItemTest.class,
+ AtsNoteTest.class,
RendererManagerTest.class,
SMAPrintTest.class,
AtsImageTest.class,
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_TestDb_Suite.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_TestDb_Suite.java
index 2c96d745c8..52fb233af7 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_TestDb_Suite.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/AtsTest_TestDb_Suite.java
@@ -10,14 +10,23 @@
*******************************************************************************/
package org.eclipse.osee.ats.test;
-import org.eclipse.osee.ats.test.artifact.LogItemTest;
+import org.eclipse.osee.ats.test.artifact.log.AtsLogTest;
+import org.eclipse.osee.ats.test.artifact.log.LogItemTest;
+import org.eclipse.osee.ats.test.artifact.note.AtsNoteTest;
+import org.eclipse.osee.ats.test.artifact.note.NoteItemTest;
import org.eclipse.osee.ats.test.config.AtsBranchConfigurationTest;
import org.eclipse.osee.ats.test.util.AtsImageTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({LogItemTest.class, AtsImageTest.class, AtsBranchConfigurationTest.class})
+@Suite.SuiteClasses({
+ LogItemTest.class,
+ AtsLogTest.class,
+ NoteItemTest.class,
+ AtsNoteTest.class,
+ AtsImageTest.class,
+ AtsBranchConfigurationTest.class})
/**
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/AtsLogTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/AtsLogTest.java
new file mode 100644
index 0000000000..db2806b331
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/AtsLogTest.java
@@ -0,0 +1,61 @@
+/*
+ * Created on Sep 29, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.test.artifact.log;
+
+import java.util.Date;
+import junit.framework.Assert;
+import org.eclipse.osee.ats.artifact.log.AtsLog;
+import org.eclipse.osee.ats.artifact.log.ILogStorageProvider;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.GUID;
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.junit.Test;
+
+public class AtsLogTest {
+
+ @Test
+ public void testToAndFromStore() throws OseeCoreException {
+ Date date = new Date();
+ SimpleLogStore store = new SimpleLogStore();
+ AtsLog log = new AtsLog(store);
+ LogItem item = LogItemTest.getTestLogItem(date);
+ log.addLogItem(item);
+
+ AtsLog log2 = new AtsLog(store);
+ Assert.assertEquals(1, log2.getLogItems().size());
+ LogItem loadItem = log2.getLogItems().iterator().next();
+ LogItemTest.validateItem(loadItem, date);
+ }
+
+ public class SimpleLogStore implements ILogStorageProvider {
+
+ String store = "";
+
+ @Override
+ public String getLogXml() {
+ return store;
+ }
+
+ @Override
+ public Result saveLogXml(String xml) {
+ store = xml;
+ return Result.TrueResult;
+ }
+
+ @Override
+ public String getLogTitle() {
+ return "This is the title";
+ }
+
+ @Override
+ public String getLogId() {
+ return GUID.create();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/LogItemTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/LogItemTest.java
index d1e0082636..61f06e07a8 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/LogItemTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/log/LogItemTest.java
@@ -3,15 +3,15 @@
*
* PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
*/
-package org.eclipse.osee.ats.test.artifact;
+package org.eclipse.osee.ats.test.artifact.log;
import java.util.Date;
-import java.util.List;
import junit.framework.Assert;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
+import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.junit.Test;
@@ -25,7 +25,7 @@ public class LogItemTest {
validateItem(item, date);
}
- private void validateItem(LogItem item, Date date) throws OseeCoreException {
+ public static void validateItem(LogItem item, Date date) throws OseeCoreException {
Assert.assertEquals(LogType.Error, item.getType());
Assert.assertEquals(date, item.getDate());
Assert.assertEquals(UserManager.getUser(), item.getUser());
@@ -54,19 +54,7 @@ public class LogItemTest {
validateItem(item, date);
}
- @Test
- public void testToXml() throws OseeCoreException {
- Date date = new Date();
- LogItem item = getTestLogItem(date);
-
- String xml = item.toXml();
- List<LogItem> items = LogItem.getLogItems(xml, "ASDF4");
- Assert.assertEquals(1, items.size());
- LogItem loadItem = items.iterator().next();
- validateItem(loadItem, date);
- }
-
- private LogItem getTestLogItem(Date date) throws OseeCoreException {
+ public static LogItem getTestLogItem(Date date) throws OseeCoreException {
return new LogItem(LogType.Error, date, UserManager.getUser(), "Analyze", "my msg", "ASDF4");
}
@@ -75,7 +63,8 @@ public class LogItemTest {
Date date = new Date();
LogItem item = getTestLogItem(date);
- Assert.assertEquals("asdf", item.toString());
+ Assert.assertEquals("my msg (Error)from Analyze by Dunne, Donald G on " + DateUtil.getMMDDYYHHMM(date),
+ item.toString());
}
@Test
@@ -83,7 +72,7 @@ public class LogItemTest {
Date date = new Date();
LogItem item = getTestLogItem(date);
- Assert.assertEquals("asdf", item.toHTML(AHTML.LABEL_FONT));
+ Assert.assertEquals("NOTE (Error): my msg (Dunne, Donald G)", item.toHTML(AHTML.LABEL_FONT));
}
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/AtsNoteTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/AtsNoteTest.java
new file mode 100644
index 0000000000..d65c0e65b6
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/AtsNoteTest.java
@@ -0,0 +1,66 @@
+/*
+ * Created on Sep 29, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.test.artifact.note;
+
+import java.util.Date;
+import junit.framework.Assert;
+import org.eclipse.osee.ats.artifact.note.AtsNote;
+import org.eclipse.osee.ats.artifact.note.INoteStorageProvider;
+import org.eclipse.osee.ats.artifact.note.NoteItem;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.GUID;
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.junit.Test;
+
+public class AtsNoteTest {
+
+ @Test
+ public void testToAndFromStore() throws OseeCoreException {
+ Date date = new Date();
+ SimpleNoteStore store = new SimpleNoteStore();
+ AtsNote log = new AtsNote(store);
+ NoteItem item = NoteItemTest.getTestNoteItem(date);
+ log.addNoteItem(item);
+
+ AtsNote log2 = new AtsNote(store);
+ Assert.assertEquals(1, log2.getNoteItems().size());
+ NoteItem loadItem = log2.getNoteItems().iterator().next();
+ NoteItemTest.validate(loadItem, date);
+ }
+
+ public class SimpleNoteStore implements INoteStorageProvider {
+
+ String store = "";
+
+ @Override
+ public String getNoteXml() {
+ return store;
+ }
+
+ @Override
+ public Result saveNoteXml(String xml) {
+ store = xml;
+ return Result.TrueResult;
+ }
+
+ @Override
+ public String getNoteTitle() {
+ return "This is the title";
+ }
+
+ @Override
+ public String getNoteId() {
+ return GUID.create();
+ }
+
+ @Override
+ public boolean isNoteable() {
+ return false;
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/NoteItemTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/NoteItemTest.java
index 3e09d3d0d8..5768cb74e8 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/NoteItemTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/artifact/note/NoteItemTest.java
@@ -3,15 +3,16 @@
*
* PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
*/
-package org.eclipse.osee.ats.test.artifact;
+package org.eclipse.osee.ats.test.artifact.note;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import junit.framework.Assert;
import org.eclipse.osee.ats.NoteType;
-import org.eclipse.osee.ats.artifact.NoteItem;
+import org.eclipse.osee.ats.artifact.note.NoteItem;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.junit.Test;
@@ -25,14 +26,14 @@ public class NoteItemTest {
validate(item, date);
}
- private void validate(NoteItem item, Date date) throws OseeCoreException {
+ public static void validate(NoteItem item, Date date) throws OseeCoreException {
Assert.assertEquals(NoteType.Comment, item.getType());
Assert.assertEquals("Implement", item.getState());
Assert.assertEquals(UserManager.getUser(), item.getUser());
Assert.assertEquals("my msg", item.getMsg());
}
- private NoteItem getTestNoteItem(Date date) throws OseeCoreException {
+ public static NoteItem getTestNoteItem(Date date) throws OseeCoreException {
return new NoteItem(NoteType.Comment, "Implement", String.valueOf(date.getTime()), UserManager.getUser(),
"my msg");
}
@@ -51,7 +52,9 @@ public class NoteItemTest {
Date date = new Date();
NoteItem item = getTestNoteItem(date);
- Assert.assertEquals("asdf", item.toString());
+ Assert.assertEquals(
+ "Note: Comment from Dunne, Donald G for \"Implement\" on " + DateUtil.getMMDDYYHHMM(date) + " - my msg",
+ item.toString());
}
@Test
@@ -63,7 +66,11 @@ public class NoteItemTest {
"another message");
String xml = NoteItem.toXml(Arrays.asList(item, item2));
- Assert.assertEquals("asdf", xml);
+ Assert.assertEquals(
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><AtsNote>" + //
+ "<Item date=\"" + date.getTime() + "\" msg=\"my msg\" state=\"Implement\" type=\"Comment\" userId=\"" + UserManager.getUser().getUserId() + "\"/>" + //
+ "<Item date=\"" + date.getTime() + "\" msg=\"another message\" state=\"Analyze\" type=\"Question\" userId=\"" + UserManager.getUser().getUserId() + "\"/></AtsNote>",
+ xml);
List<NoteItem> items = NoteItem.fromXml(xml, "ASDF4");
validate(items.iterator().next(), date);
@@ -81,7 +88,9 @@ public class NoteItemTest {
Date date = new Date();
NoteItem item = getTestNoteItem(date);
- Assert.assertEquals("asdf", item.toHTML());
+ Assert.assertEquals(
+ "<b>Note:</b>Comment from Dunne, Donald G for \"Implement\" on " + DateUtil.getMMDDYYHHMM(date) + " - my msg",
+ item.toHTML());
}
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
index a38d2d61fc..ac979f6e21 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
@@ -16,8 +16,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import junit.framework.Assert;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.util.AtsNotifyUsers;
import org.eclipse.osee.ats.util.AtsNotifyUsers.NotifyType;
import org.eclipse.osee.ats.util.AtsUtil;
diff --git a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
index 57430da953..deb6cead52 100644
--- a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
@@ -31,6 +31,7 @@ Export-Package: org.eclipse.osee.ats,
org.eclipse.osee.ats.actions,
org.eclipse.osee.ats.actions.wizard,
org.eclipse.osee.ats.artifact,
+ org.eclipse.osee.ats.artifact.log,
org.eclipse.osee.ats.config,
org.eclipse.osee.ats.config.wizard,
org.eclipse.osee.ats.editor,
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java
index bbd8fb133b..cf5a16145b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java
@@ -19,8 +19,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.TaskArtifact.TaskStates;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.config.AtsCacheManager;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java
index cfd25c5e6c..438e6fc584 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java
@@ -22,7 +22,12 @@ import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import org.eclipse.nebula.widgets.xviewer.XViewerCells;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
+import org.eclipse.osee.ats.artifact.log.ArtifactLog;
+import org.eclipse.osee.ats.artifact.log.AtsLog;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
+import org.eclipse.osee.ats.artifact.note.ArtifactNote;
+import org.eclipse.osee.ats.artifact.note.AtsNote;
import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager;
import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
@@ -93,8 +98,8 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
private StateManager stateMgr;
private DeadlineManager deadlineMgr;
private SMAEditor editor;
- private ATSLog atsLog;
- private ATSNote atsNote;
+ private AtsLog atsLog;
+ private AtsNote atsNote;
private boolean inTransition = false;
public AbstractWorkflowArtifact(ArtifactFactory parentFactory, String guid, String humanReadableId, Branch branch, ArtifactType artifactType) throws OseeCoreException {
@@ -128,8 +133,8 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
try {
deadlineMgr = new DeadlineManager(this);
stateMgr = new StateManager(this);
- atsLog = new ATSLog(this);
- atsNote = new ATSNote(this);
+ atsLog = new AtsLog(new ArtifactLog(this));
+ atsNote = new AtsNote(new ArtifactNote(this));
AtsNotification.notifyNewAssigneesAndReset(this, true);
AtsNotification.notifyOriginatorAndReset(this, true);
} catch (Exception ex) {
@@ -1183,11 +1188,11 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
SMAEditor.close(java.util.Collections.singleton(this), save);
}
- public ATSLog getLog() {
+ public AtsLog getLog() {
return atsLog;
}
- public ATSNote getNotes() {
+ public AtsNote getNotes() {
return atsNote;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ArtifactLog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ArtifactLog.java
new file mode 100644
index 0000000000..29eedac09b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ArtifactLog.java
@@ -0,0 +1,73 @@
+/*
+ * Created on Sep 29, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.artifact.log;
+
+import java.lang.ref.WeakReference;
+import java.util.logging.Level;
+import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
+import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+
+public class ArtifactLog implements ILogStorageProvider {
+ private final WeakReference<Artifact> artifactRef;
+
+ public ArtifactLog(Artifact artifact) {
+ this.artifactRef = new WeakReference<Artifact>(artifact);
+ }
+
+ @Override
+ public String getLogXml() {
+ try {
+ return getArtifact().getSoleAttributeValue(AtsAttributeTypes.Log, "");
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ return "getLogXml exception " + ex.getLocalizedMessage();
+ }
+ }
+
+ @Override
+ public Result saveLogXml(String xml) {
+ try {
+ getArtifact().setSoleAttributeValue(AtsAttributeTypes.Log, xml);
+ return Result.TrueResult;
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ return new Result("saveLogXml exception " + ex.getLocalizedMessage());
+ }
+ }
+
+ public Artifact getArtifact() throws OseeStateException {
+ if (artifactRef.get() == null) {
+ throw new OseeStateException("Artifact has been garbage collected");
+ }
+ return artifactRef.get();
+ }
+
+ @Override
+ public String getLogTitle() {
+ try {
+ return "History for \"" + getArtifact().getArtifactTypeName() + "\" - " + getArtifact().getHumanReadableId() + " - titled \"" + getArtifact().getName() + "\"";
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ return "getLogTitle exception " + ex.getLocalizedMessage();
+ }
+ }
+
+ @Override
+ public String getLogId() {
+ try {
+ return getArtifact().getHumanReadableId();
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
+ return "unknown";
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java
index 39fe737405..304a80013c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSLog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java
@@ -9,67 +9,48 @@
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.artifact;
+package org.eclipse.osee.ats.artifact.log;
-import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.DefaultTeamState;
-import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
+import org.eclipse.osee.framework.jdk.core.util.AXml;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.jdk.core.util.xml.Jaxp;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
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.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* @author Donald G. Dunne
*/
-public class ATSLog {
+public class AtsLog {
- private final WeakReference<Artifact> artifactRef;
private boolean enabled = true;
private final static String ATS_LOG_TAG = "AtsLog";
private final static String LOG_ITEM_TAG = "Item";
private LogItem cancelledLogItem;
private LogItem completedLogItem;
- public static enum LogType {
- None,
- Originated,
- StateComplete,
- StateCancelled,
- StateEntered,
- Released,
- Error,
- Assign,
- Note,
- Metrics;
-
- public static LogType getType(String type) throws OseeArgumentException {
- for (Enum<LogType> e : LogType.values()) {
- if (e.name().equals(type)) {
- return (LogType) e;
- }
- }
- throw new OseeArgumentException("Unhandled LogType: [%s]", type);
- }
+ private final ILogStorageProvider storeProvider;
+ private final static Pattern LOG_ITEM_PATTERN =
+ Pattern.compile("<Item date=\"(.*?)\" msg=\"(.*?)\" state=\"(.*?)\" type=\"(.*?)\" userId=\"(.*?)\"/>");
+ private final static Pattern LOG_ITEM_TAG_PATTERN = Pattern.compile("<Item ");
- };
-
- public ATSLog(Artifact artifact) {
- this.artifactRef = new WeakReference<Artifact>(artifact);
+ public AtsLog(ILogStorageProvider storeProvider) {
+ this.storeProvider = storeProvider;
}
@Override
@@ -92,24 +73,39 @@ public class ATSLog {
}
StringBuffer sb = new StringBuffer();
if (showLog) {
- sb.append(AHTML.addSpace(1) + AHTML.getLabelStr(
- AHTML.LABEL_FONT,
- "History for \"" + getArtifact().getArtifactTypeName() + "\" - " + getArtifact().getHumanReadableId() + " - titled \"" + getArtifact().getName() + "\""));
+ sb.append(AHTML.addSpace(1) + AHTML.getLabelStr(AHTML.LABEL_FONT, storeProvider.getLogTitle()));
}
sb.append(getTable());
return sb.toString();
}
- public Artifact getArtifact() throws OseeStateException {
- if (artifactRef.get() == null) {
- throw new OseeStateException("Artifact has been garbage collected");
- }
- return artifactRef.get();
- }
-
public List<LogItem> getLogItems() throws OseeCoreException {
- String xml = getArtifact().getSoleAttributeValue(AtsAttributeTypes.Log, "");
- return LogItem.getLogItems(xml, getArtifact().getHumanReadableId());
+ String xml = storeProvider.getLogXml();
+ return getLogItems(xml, storeProvider.getLogId());
+ }
+
+ private List<LogItem> getLogItems(String xml, String id) throws OseeCoreException {
+ List<LogItem> logItems = new ArrayList<LogItem>();
+ if (!xml.isEmpty()) {
+ Matcher m = LOG_ITEM_PATTERN.matcher(xml);
+ while (m.find()) {
+ LogItem item = new LogItem(m.group(4), m.group(1), Strings.intern(m.group(5)), Strings.intern(m.group(3)), // NOPMD by b0727536 on 9/29/10 8:52 AM
+ AXml.xmlToText(m.group(2)), id);
+ logItems.add(item);
+ }
+
+ Matcher m2 = LOG_ITEM_TAG_PATTERN.matcher(xml);
+ int openTagsFound = 0;
+ while (m2.find()) {
+ openTagsFound++;
+ }
+ if (logItems.size() != openTagsFound) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, String.format(
+ "ATS Log: open tags found %d doesn't match log items parsed %d for %s", openTagsFound, logItems.size(),
+ id));
+ }
+ }
+ return logItems;
}
public Date getLastStatusedDate() throws OseeCoreException {
@@ -134,7 +130,7 @@ public class ATSLog {
element.setAttribute("msg", item.getMsg());
rootElement.appendChild(element);
}
- getArtifact().setSoleAttributeValue(AtsAttributeTypes.Log, Jaxp.getDocumentXml(doc));
+ storeProvider.saveLogXml(Jaxp.getDocumentXml(doc));
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't create ats log document", ex);
}
@@ -280,14 +276,10 @@ public class ATSLog {
if (!enabled) {
return;
}
- if (artifactRef.get() == null) {
- OseeLog.log(AtsPlugin.class, Level.SEVERE, "Artifact unexpectedly garbage collected");
- } else {
- LogItem logItem = new LogItem(type, date, user, state, msg, getArtifact().getHumanReadableId());
- List<LogItem> logItems = getLogItems();
- logItems.add(logItem);
- putLogItems(logItems);
- }
+ LogItem logItem = new LogItem(type, date, user, state, msg, storeProvider.getLogId());
+ List<LogItem> logItems = getLogItems();
+ logItems.add(logItem);
+ putLogItems(logItems);
}
public void clearLog() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ILogStorageProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ILogStorageProvider.java
new file mode 100644
index 0000000000..07a9f91c7b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/ILogStorageProvider.java
@@ -0,0 +1,19 @@
+/*
+ * Created on Sep 29, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.artifact.log;
+
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+
+public interface ILogStorageProvider {
+
+ String getLogXml();
+
+ Result saveLogXml(String xml);
+
+ String getLogTitle();
+
+ String getLogId();
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/LogItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogItem.java
index 0dd30f37b8..2a4ad067fc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/LogItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogItem.java
@@ -8,25 +8,18 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.artifact;
+package org.eclipse.osee.ats.artifact.log;
import static org.eclipse.osee.framework.jdk.core.util.Strings.intern;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Date;
-import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.UserNotInDatabase;
-import org.eclipse.osee.framework.jdk.core.util.AXml;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -42,34 +35,6 @@ public class LogItem {
private User user;
private LogType type = LogType.None;
private final String userId;
- private final static Pattern LOG_ITEM_PATTERN =
- Pattern.compile("<Item date=\"(.*?)\" msg=\"(.*?)\" state=\"(.*?)\" type=\"(.*?)\" userId=\"(.*?)\"/>");
- private final static Pattern LOG_ITEM_TAG_PATTERN = Pattern.compile("<Item ");
-
- public static List<LogItem> getLogItems(String xml, String id) throws OseeCoreException {
- List<LogItem> logItems = new ArrayList<LogItem>();
- if (!xml.isEmpty()) {
- Matcher m = LOG_ITEM_PATTERN.matcher(xml);
- while (m.find()) {
- LogItem item =
- new LogItem(m.group(4), m.group(1), Strings.intern(m.group(5)), Strings.intern(m.group(3)), // NOPMD by b0727536 on 9/29/10 8:52 AM
- AXml.xmlToText(m.group(2)), id);
- logItems.add(item);
- }
-
- Matcher m2 = LOG_ITEM_TAG_PATTERN.matcher(xml);
- int openTagsFound = 0;
- while (m2.find()) {
- openTagsFound++;
- }
- if (logItems.size() != openTagsFound) {
- OseeLog.log(AtsPlugin.class, Level.SEVERE, String.format(
- "ATS Log: open tags found %d doesn't match log items parsed %d for %s", openTagsFound, logItems.size(),
- id));
- }
- }
- return logItems;
- }
public LogItem(LogType type, Date date, User user, String state, String msg, String hrid) throws OseeCoreException {
this(type.name(), String.valueOf(date.getTime()), user.getUserId(), state, msg, hrid);
@@ -95,10 +60,6 @@ public class LogItem {
this(LogType.getType(type), date, userId, state, msg, hrid);
}
- public String toXml() throws OseeCoreException {
- return "<type>" + type.name() + "</type><date>" + date.getTime() + "</date><user>" + user.getUserId() + "</user><state>" + (state == null ? "" : state) + "</state><msg>" + (msg == null ? "" : msg) + "</msg>";
- }
-
public Date getDate() {
return date;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java
new file mode 100644
index 0000000000..01cfa28be5
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java
@@ -0,0 +1,26 @@
+package org.eclipse.osee.ats.artifact.log;
+
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
+
+public enum LogType {
+ None,
+ Originated,
+ StateComplete,
+ StateCancelled,
+ StateEntered,
+ Released,
+ Error,
+ Assign,
+ Note,
+ Metrics;
+
+ public static LogType getType(String type) throws OseeArgumentException {
+ for (Enum<LogType> e : LogType.values()) {
+ if (e.name().equals(type)) {
+ return (LogType) e;
+ }
+ }
+ throw new OseeArgumentException("Unhandled LogType: [%s]", type);
+ }
+
+};
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/ArtifactNote.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/ArtifactNote.java
new file mode 100644
index 0000000000..b1f8522871
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/ArtifactNote.java
@@ -0,0 +1,83 @@
+/*
+ * Created on Sep 29, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.artifact.note;
+
+import java.lang.ref.WeakReference;
+import java.util.logging.Level;
+import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
+import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeStateException;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+
+public class ArtifactNote implements INoteStorageProvider {
+ private final WeakReference<Artifact> artifactRef;
+
+ public ArtifactNote(Artifact artifact) {
+ this.artifactRef = new WeakReference<Artifact>(artifact);
+ }
+
+ @Override
+ public String getNoteXml() {
+ try {
+ return getArtifact().getSoleAttributeValue(AtsAttributeTypes.StateNotes, "");
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ return "getLogXml exception " + ex.getLocalizedMessage();
+ }
+ }
+
+ @Override
+ public Result saveNoteXml(String xml) {
+ try {
+ getArtifact().setSoleAttributeValue(AtsAttributeTypes.StateNotes, xml);
+ return Result.TrueResult;
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ return new Result("saveLogXml exception " + ex.getLocalizedMessage());
+ }
+ }
+
+ public Artifact getArtifact() throws OseeStateException {
+ if (artifactRef.get() == null) {
+ throw new OseeStateException("Artifact has been garbage collected");
+ }
+ return artifactRef.get();
+ }
+
+ @Override
+ public String getNoteTitle() {
+ try {
+ return "History for \"" + getArtifact().getArtifactTypeName() + "\" - " + getArtifact().getHumanReadableId() + " - titled \"" + getArtifact().getName() + "\"";
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ return "getLogTitle exception " + ex.getLocalizedMessage();
+ }
+ }
+
+ @Override
+ public String getNoteId() {
+ try {
+ return getArtifact().getHumanReadableId();
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
+ return "unknown";
+ }
+
+ @Override
+ public boolean isNoteable() {
+ try {
+ return getArtifact().isAttributeTypeValid(AtsAttributeTypes.StateNotes);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/AtsNote.java
index df55dda6fa..f6daceb905 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ATSNote.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/AtsNote.java
@@ -8,9 +8,8 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.artifact;
+package org.eclipse.osee.ats.artifact.note;
-import java.lang.ref.WeakReference;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -19,34 +18,23 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
-import java.util.logging.Level;
import org.eclipse.osee.ats.NoteType;
import org.eclipse.osee.ats.internal.AtsPlugin;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.User;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* @author Donald G. Dunne
*/
-public class ATSNote {
- private final WeakReference<Artifact> artifactRef;
+public class AtsNote {
private boolean enabled = true;
+ private final INoteStorageProvider storeProvder;
- public ATSNote(Artifact artifact) {
- this.artifactRef = new WeakReference<Artifact>(artifact);
- }
-
- public Artifact getArtifact() throws OseeStateException {
- if (artifactRef.get() == null) {
- throw new OseeStateException("Artifact has been garbage collected");
- }
- return artifactRef.get();
+ public AtsNote(INoteStorageProvider storeProvder) {
+ this.storeProvder = storeProvder;
}
public void addNote(NoteType type, String state, String msg, User user) {
@@ -73,9 +61,9 @@ public class ATSNote {
public List<NoteItem> getNoteItems() {
try {
- String xml = getArtifact().getSoleAttributeValue(AtsAttributeTypes.StateNotes, "");
+ String xml = storeProvder.getNoteXml();
if (Strings.isValid(xml)) {
- return NoteItem.fromXml(xml, getArtifact().getHumanReadableId());
+ return NoteItem.fromXml(xml, storeProvder.getNoteId());
}
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
@@ -86,30 +74,18 @@ public class ATSNote {
public void saveNoteItems(List<NoteItem> items) {
try {
String xml = NoteItem.toXml(items);
- getArtifact().setSoleAttributeValue(AtsAttributeTypes.StateNotes, xml);
+ storeProvder.saveNoteXml(xml);
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't create ats note document", ex);
}
}
- private boolean hasStateNotesAttribute() {
- try {
- if (getArtifact().getAttributes(AtsAttributeTypes.StateNotes).isEmpty()) {
- return false;
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
- return false;
- }
- return true;
- }
-
/**
* Display Note Table; If state == null, only display non-state notes Otherwise, show only notes associated with
* state
*/
public String getTable(String state) {
- if (!hasStateNotesAttribute()) {
+ if (!storeProvder.isNoteable()) {
return "";
}
ArrayList<NoteItem> showNotes = new ArrayList<NoteItem>();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/INoteStorageProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/INoteStorageProvider.java
new file mode 100644
index 0000000000..6a66759420
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/INoteStorageProvider.java
@@ -0,0 +1,21 @@
+/*
+ * Created on Sep 29, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.artifact.note;
+
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+
+public interface INoteStorageProvider {
+
+ String getNoteXml();
+
+ Result saveNoteXml(String xml);
+
+ String getNoteTitle();
+
+ String getNoteId();
+
+ boolean isNoteable();
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/NoteItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/NoteItem.java
index d49597d281..0b33d41263 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/NoteItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/note/NoteItem.java
@@ -9,7 +9,7 @@
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.artifact;
+package org.eclipse.osee.ats.artifact.note;
import java.util.ArrayList;
import java.util.Date;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
index af65a425ba..dc1b3b49af 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
@@ -17,9 +17,9 @@ import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.artifact.AbstractTaskableArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.NoteItem;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.note.NoteItem;
import org.eclipse.osee.ats.editor.widget.ReviewInfoXWidget;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
index 9934a9900f..73f04a84f1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
@@ -21,14 +21,14 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.AbstractTaskableArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager;
import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
import org.eclipse.osee.ats.editor.widget.ReviewInfoXWidget;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java
index 8b748852cc..0701ce32b2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java
@@ -39,9 +39,9 @@ import org.eclipse.osee.ats.actions.ShowChangeReportAction;
import org.eclipse.osee.ats.actions.ShowMergeManagerAction;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.GoalArtifact;
-import org.eclipse.osee.ats.artifact.NoteItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.note.NoteItem;
import org.eclipse.osee.ats.config.AtsBulkLoad;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index 8bc5bd1e7c..8d3ece9a21 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -26,18 +26,18 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osee.ats.AtsOpenOption;
-import org.eclipse.osee.ats.artifact.ATSLog;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.ActionArtifact;
import org.eclipse.osee.ats.artifact.ActionableItemArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
+import org.eclipse.osee.ats.artifact.log.AtsLog;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.task.TaskEditor;
import org.eclipse.osee.ats.task.TaskEditorSimpleProvider;
@@ -751,7 +751,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
if (art instanceof AbstractWorkflowArtifact) {
AbstractWorkflowArtifact sma = (AbstractWorkflowArtifact) art;
try {
- ATSLog log = sma.getLog();
+ AtsLog log = sma.getLog();
if (log.getOriginator() == null) {
try {
testNameToResultsMap.put(
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java
index 8913fc4c39..5845f9c1e2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java
@@ -17,12 +17,12 @@ import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.ats.actions.wizard.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
+import org.eclipse.osee.ats.artifact.AbstractTaskableArtifact;
import org.eclipse.osee.ats.artifact.ActionArtifact.CreateTeamOption;
import org.eclipse.osee.ats.artifact.TaskArtifact;
-import org.eclipse.osee.ats.artifact.AbstractTaskableArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkflowExtensions;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.ActionManager;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java
index 89fc19dda8..b6ab441926 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java
@@ -15,7 +15,6 @@ import java.util.Date;
import java.util.logging.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.ats.actions.wizard.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.ActionArtifact;
import org.eclipse.osee.ats.artifact.ActionArtifact.CreateTeamOption;
import org.eclipse.osee.ats.artifact.ActionableItemArtifact;
@@ -23,6 +22,7 @@ import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkflowExtensions;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsPriority.PriorityType;
import org.eclipse.osee.framework.core.data.IArtifactType;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java
index 8ca95f2941..bd4dacedaa 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java
@@ -19,8 +19,8 @@ import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.osee.ats.artifact.AbstractAtsArtifact;
-import org.eclipse.osee.ats.artifact.ActionArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.ActionArtifact;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java
index 40dcb6117f..3214b8e670 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java
@@ -14,12 +14,12 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.ActionableItemArtifact;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.widgets.role.UserRole;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java
index b024505c46..cd25ec41fa 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java
@@ -15,10 +15,10 @@ import java.util.List;
import java.util.Set;
import org.eclipse.jface.window.Window;
import org.eclipse.nebula.widgets.xviewer.XViewerCells;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.GoalArtifact;
import org.eclipse.osee.ats.artifact.GoalArtifact.GoalState;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
index 7eaaa9deb5..c03e16b706 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
@@ -16,12 +16,12 @@ import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.AbstractAtsArtifact;
-import org.eclipse.osee.ats.artifact.ATSLog;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.AtsLog;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.widgets.SMAState;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -276,7 +276,7 @@ public class Overview {
}
public void addLog(AbstractWorkflowArtifact artifact) throws OseeCoreException {
- ATSLog artifactLog = artifact.getLog();
+ AtsLog artifactLog = artifact.getLog();
if (artifactLog != null && artifactLog.getLogItems().size() > 0) {
addTable(artifact.getLog().getTable());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java
index 49dcab17c2..a757de1dba 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PromptChangeUtil.java
@@ -16,8 +16,8 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java
index aa98f56c34..ab422a1703 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java
@@ -17,10 +17,10 @@ import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.eclipse.osee.ats.artifact.ActionArtifact;
-import org.eclipse.osee.ats.artifact.GoalArtifact;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.ActionArtifact;
+import org.eclipse.osee.ats.artifact.GoalArtifact;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java
index c58ecb7c53..9c07871457 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java
@@ -14,11 +14,11 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
+import org.eclipse.osee.ats.artifact.log.LogItem;
import org.eclipse.osee.ats.util.AtsPriority.PriorityType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java
index 07e4fd33d9..69c0dd7971 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java
@@ -17,10 +17,10 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.util.widgets.SMAState;
import org.eclipse.osee.ats.util.widgets.XCurrentStateDam;
import org.eclipse.osee.ats.util.widgets.XStateDam;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java
index 8221c88dd9..16f6c6f22d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java
@@ -15,13 +15,13 @@ import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java
index 96471c8a02..350e7df508 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java
@@ -12,10 +12,10 @@ package org.eclipse.osee.ats.util.widgets;
import java.util.Date;
import java.util.Set;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java
index 0e9f6684e6..2498aede3d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java
@@ -13,10 +13,10 @@ package org.eclipse.osee.ats.workflow.item;
import java.util.Arrays;
import java.util.Collection;
import java.util.logging.Level;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
+import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java
index e058f7838c..17960da848 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddPeerToPeerReviewRule.java
@@ -13,11 +13,11 @@ package org.eclipse.osee.ats.workflow.item;
import java.util.Collection;
import java.util.Date;
import java.util.logging.Level;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
+import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
-import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java
index 1e684f6cbe..262517637a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.item;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.XOption;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java
index 4765293897..7a18f48b0c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.item;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.XOption;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java
index 02810ea4d0..4e3b7e97df 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java
@@ -10,9 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.item;
-import org.eclipse.osee.ats.artifact.ATSLog.LogType;
-import org.eclipse.osee.ats.artifact.LogItem;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogItem;
+import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.XOption;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData;

Back to the top