Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2016-09-01 00:19:56 +0000
committerDavid Miller2016-09-06 22:43:30 +0000
commit73c6407d8b51780e581b90aa9b5865307d8a8e1d (patch)
tree39e6f9b74811b78b3f446b3f0465a98c3180421f
parent1154a973ad7343dd863de638843e6faad3e3eafb (diff)
downloadorg.eclipse.osee-73c6407d8b51780e581b90aa9b5865307d8a8e1d.tar.gz
org.eclipse.osee-73c6407d8b51780e581b90aa9b5865307d8a8e1d.tar.xz
org.eclipse.osee-73c6407d8b51780e581b90aa9b5865307d8a8e1d.zip
feature[ats_ATS276811]: Allow AWA to get log by date0.24.0.v201609062328_NRB
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/log/IAtsLog.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java23
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java17
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java7
4 files changed, 22 insertions, 27 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/log/IAtsLog.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/log/IAtsLog.java
index ebda83a7078..30f32c46a9e 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/log/IAtsLog.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/log/IAtsLog.java
@@ -25,6 +25,8 @@ public interface IAtsLog {
public abstract List<IAtsLogItem> getLogItemsReversed() throws OseeCoreException;
+ public abstract IAtsLogItem getLogItemWithTypeAsOfDate(LogType logType, Date date) throws OseeCoreException;
+
/**
* Used to reset the original originated user. Only for internal use. Kept for backward compatibility.
*/
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java
index bc16fe8aed3..e199b82c046 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java
@@ -11,16 +11,11 @@
package org.eclipse.osee.ats.core.client.task;
import java.util.Collection;
-import java.util.Date;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
-import org.eclipse.osee.ats.api.workflow.log.IAtsLog;
-import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
-import org.eclipse.osee.ats.api.workflow.log.LogType;
import org.eclipse.osee.ats.core.client.action.ActionArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
@@ -116,22 +111,4 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IAtsTask,
}
return "";
}
-
- public IAtsLogItem getLogItemWithTypeAsOfDate(LogType logType, Date date) throws OseeCoreException {
- IAtsLogItem retLogItem = null;
- IAtsLog atsLog = getLog();
- List<IAtsLogItem> logItems = atsLog.getLogItems();
- for (IAtsLogItem logItem : logItems) {
- if (logItem.getType().equals(logType)) {
- Date logItemDate = logItem.getDate();
- if (logItemDate.after(date)) {
- break;
- } else {
- retLogItem = logItem;
- }
- }
- }
-
- return retLogItem;
- }
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java
index a66ff43cdd7..bb9fd8ca222 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java
@@ -57,6 +57,22 @@ public class AtsLog implements IAtsLog {
return logItems;
}
+ @Override
+ public IAtsLogItem getLogItemWithTypeAsOfDate(LogType logType, Date date) throws OseeCoreException {
+ IAtsLogItem retLogItem = null;
+ for (IAtsLogItem logItem : logItems) {
+ if (logItem.getType().equals(logType)) {
+ Date logItemDate = logItem.getDate();
+ if (logItemDate.after(date)) {
+ break;
+ } else {
+ retLogItem = logItem;
+ }
+ }
+ }
+ return retLogItem;
+ }
+
/**
* Used to reset the original originated user. Only for internal use. Kept for backward compatibility.
*/
@@ -171,5 +187,4 @@ public class AtsLog implements IAtsLog {
public String getLogId() {
return logId;
}
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java
index 7ef44663e58..56b281ebed9 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java
@@ -64,6 +64,7 @@ public class TableDataImpl implements TableData {
for (KeyColumn keyColumn : keyColumns) {
if (keyColumn.hasNext()) {
hasNext = true;
+ break;
}
}
return hasNext;
@@ -152,7 +153,7 @@ public class TableDataImpl implements TableData {
* Subclasses should override this method (if needed) an evaluate the row of data for validity. It is the subclass's
* opportunity to reject rows and remove them from the report. This method is called once for every row after it has
* been generated in the next() method above.
- *
+ *
* @param rowData - The row of data that was just generated.
* @return Return TRUE if rowData is valid and should be included in the report. Return FALSE if rowData is invalid
* (for any reason) and should not be included in the report.
@@ -167,7 +168,7 @@ public class TableDataImpl implements TableData {
* This is nearly the same as validateRow() method (see above) but it is called after the key columns have been
* incremented and BEFORE the row's data has been generated. Therefore, the subclass that overrides this should only
* use the key column objects to determine if this row should be rejected or validated.
- *
+ *
* @return Return symantics is the same as validateRow()
* @throws OseeCoreException
*/
@@ -191,7 +192,7 @@ public class TableDataImpl implements TableData {
/**
* Subclasses should override this method if they wish to receive exceptions and error messages.
- *
+ *
* @param ex The exception to handle
*/
protected void handleExceptions(Exception ex) {

Back to the top