Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2014-12-02 16:27:06 +0000
committerAngel Avila2014-12-02 16:27:06 +0000
commitda3e7e89217e0a4846a03d91402a149f1d59bbf3 (patch)
tree0ad6e511328b76d42a4dadff7e9fc4f979c475fd
parentf8572479f464f8ccfeb1b286c099709607a87d9b (diff)
downloadorg.eclipse.osee-da3e7e89217e0a4846a03d91402a149f1d59bbf3.tar.gz
org.eclipse.osee-da3e7e89217e0a4846a03d91402a149f1d59bbf3.tar.xz
org.eclipse.osee-da3e7e89217e0a4846a03d91402a149f1d59bbf3.zip
refactor: Support message arguments as Objects in ActivityLog
-rw-r--r--plugins/org.eclipse.osee.activity.api/src/org/eclipse/osee/activity/api/ActivityLog.java14
-rw-r--r--plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java18
2 files changed, 16 insertions, 16 deletions
diff --git a/plugins/org.eclipse.osee.activity.api/src/org/eclipse/osee/activity/api/ActivityLog.java b/plugins/org.eclipse.osee.activity.api/src/org/eclipse/osee/activity/api/ActivityLog.java
index 711320774e8..682b3cbf06d 100644
--- a/plugins/org.eclipse.osee.activity.api/src/org/eclipse/osee/activity/api/ActivityLog.java
+++ b/plugins/org.eclipse.osee.activity.api/src/org/eclipse/osee/activity/api/ActivityLog.java
@@ -29,15 +29,15 @@ public interface ActivityLog {
void queryEntry(Long entryId, ActivityDataHandler handler);
- Long createEntry(Long typeId, Integer status, String... messageArgs);
+ Long createEntry(Long typeId, Integer status, Object... messageArgs);
- Long createEntry(Long typeId, Long parentId, Integer status, String... messageArgs);
+ Long createEntry(Long typeId, Long parentId, Integer status, Object... messageArgs);
- Long createUpdateableEntry(ActivityType type, String... messageArgs);
+ Long createUpdateableEntry(ActivityType type, Object... messageArgs);
- Long createEntry(ActivityType type, String... messageArgs);
+ Long createEntry(ActivityType type, Object... messageArgs);
- Long createEntry(ActivityType type, Long parentId, Integer status, String... messageArgs);
+ Long createEntry(ActivityType type, Long parentId, Integer status, Object... messageArgs);
Long createThrowableEntry(ActivityType type, Throwable throwable);
@@ -55,9 +55,9 @@ public interface ActivityLog {
void endEntryAbnormally(Long entryId, Integer status);
- Long createActivityThread(ActivityType type, Long accountId, Long serverId, Long clientId, String... messageArgs);
+ Long createActivityThread(ActivityType type, Long accountId, Long serverId, Long clientId, Object... messageArgs);
- Long createActivityThread(Long parentId, ActivityType type, Long accountId, Long serverId, Long clientId, String... messageArgs);
+ Long createActivityThread(Long parentId, ActivityType type, Long accountId, Long serverId, Long clientId, Object... messageArgs);
void createActivityTypes(ActivityType... types);
diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java
index bfa6682d4f0..d1ef06118c0 100644
--- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java
+++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java
@@ -135,29 +135,29 @@ public class ActivityLogImpl implements ActivityLog, Callable<Void> {
}
@Override
- public Long createEntry(ActivityType type, String... messageArgs) {
+ public Long createEntry(ActivityType type, Object... messageArgs) {
return createEntry(type.getTypeId(), COMPLETE_STATUS, messageArgs);
}
@Override
- public Long createUpdateableEntry(ActivityType type, String... messageArgs) {
+ public Long createUpdateableEntry(ActivityType type, Object... messageArgs) {
return createEntry(type.getTypeId(), INITIAL_STATUS, messageArgs);
}
@Override
- public Long createEntry(ActivityType type, Long parentId, Integer status, String... messageArgs) {
+ public Long createEntry(ActivityType type, Long parentId, Integer status, Object... messageArgs) {
return createEntry(type.getTypeId(), parentId, status, messageArgs);
}
@Override
- public Long createEntry(Long typeId, Integer status, String... messageArgs) {
+ public Long createEntry(Long typeId, Integer status, Object... messageArgs) {
Object[] threadRootEntry = activityMonitor.getThreadRootEntry();
Long entryId = LogEntry.ENTRY_ID.from(threadRootEntry);
return createEntry(typeId, entryId, status, messageArgs);
}
@Override
- public Long createEntry(Long typeId, Long parentId, Integer status, String... messageArgs) {
+ public Long createEntry(Long typeId, Long parentId, Integer status, Object... messageArgs) {
Object[] rootEntry = activityMonitor.getThreadRootEntry();
Long accountId = LogEntry.ACCOUNT_ID.from(rootEntry);
Long serverId = LogEntry.SERVER_ID.from(rootEntry);
@@ -167,10 +167,10 @@ public class ActivityLogImpl implements ActivityLog, Callable<Void> {
return LogEntry.ENTRY_ID.from(entry);
}
- private Object[] createEntry(Long parentId, Long typeId, Long accountId, Long serverId, Long clientId, Long duration, Integer status, String... messageArgs) {
+ private Object[] createEntry(Long parentId, Long typeId, Long accountId, Long serverId, Long clientId, Long duration, Integer status, Object... messageArgs) {
Long entryId = Lib.generateUuid();
Long startTime = System.currentTimeMillis();
- String fullMsg = Collections.toString("\n", (Object[]) messageArgs);
+ String fullMsg = Collections.toString("\n", messageArgs);
String msg = fullMsg.substring(0, Math.min(fullMsg.length(), MAX_VARCHAR_LENGTH));
// this is the parent entry so it must be inserted first (because the entry writing is asynchronous
@@ -340,12 +340,12 @@ public class ActivityLogImpl implements ActivityLog, Callable<Void> {
}
@Override
- public Long createActivityThread(ActivityType type, Long accountId, Long serverId, Long clientId, String... messageArgs) {
+ public Long createActivityThread(ActivityType type, Long accountId, Long serverId, Long clientId, Object... messageArgs) {
return createActivityThread(-1L, type, accountId, serverId, clientId, messageArgs);
}
@Override
- public Long createActivityThread(Long parentId, ActivityType type, Long accountId, Long serverId, Long clientId, String... messageArgs) {
+ public Long createActivityThread(Long parentId, ActivityType type, Long accountId, Long serverId, Long clientId, Object... messageArgs) {
Object[] entry = createEntry(parentId, type.getTypeId(), accountId, serverId, clientId, 0L, 0, messageArgs);
activityMonitor.addActivityThread(entry);
return LogEntry.ENTRY_ID.from(entry);

Back to the top