aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java')
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/ActivityLogManager.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/ActivityLogManager.java)8
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/ActivityLogManagerFactory.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/ActivityLogManagerFactory.java)3
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/impl/ActivityLogManagerFactoryImpl.java)17
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImpl.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/impl/ActivityLogManagerImpl.java)39
4 files changed, 34 insertions, 33 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/ActivityLogManager.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/ActivityLogManager.java
index a40e1018d7..06de3e11b6 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/ActivityLogManager.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/ActivityLogManager.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.activityLog;
+package org.openecomp.sdc.activitylog;
import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -26,6 +26,8 @@ import org.openecomp.sdc.versioning.dao.types.Version;
import java.util.Collection;
public interface ActivityLogManager {
- void addActionLog(ActivityLogEntity activityLogEntity, String user);
- Collection<ActivityLogEntity> listActivityLogs(String itemId, Version versionId, String user);
+
+ void logActivity(ActivityLogEntity activityLogEntity);
+
+ Collection<ActivityLogEntity> listLoggedActivities(String itemId, Version versionId);
}
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/ActivityLogManagerFactory.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/ActivityLogManagerFactory.java
index 9816b76486..93010f6560 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/ActivityLogManagerFactory.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/ActivityLogManagerFactory.java
@@ -17,11 +17,10 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.activityLog;
+package org.openecomp.sdc.activitylog;
import org.openecomp.core.factory.api.AbstractComponentFactory;
import org.openecomp.core.factory.api.AbstractFactory;
-import org.openecomp.sdc.activityLog.ActivityLogManager;
public abstract class ActivityLogManagerFactory extends AbstractComponentFactory<ActivityLogManager> {
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/impl/ActivityLogManagerFactoryImpl.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java
index 491192470d..5dc7f849fc 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/impl/ActivityLogManagerFactoryImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java
@@ -17,17 +17,18 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.activityLog.impl;
+package org.openecomp.sdc.activitylog.impl;
-import org.openecomp.sdc.activityLog.ActivityLogManager;
-import org.openecomp.sdc.activityLog.ActivityLogManagerFactory;
+import org.openecomp.sdc.activitylog.ActivityLogManager;
+import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
import org.openecomp.sdc.activitylog.dao.ActivityLogDaoFactory;
public class ActivityLogManagerFactoryImpl extends ActivityLogManagerFactory {
- private static final ActivityLogManager INSTANCE = new ActivityLogManagerImpl(
- ActivityLogDaoFactory.getInstance().createInterface()
- );
+ private static final ActivityLogManager INSTANCE =
+ new ActivityLogManagerImpl(ActivityLogDaoFactory.getInstance().createInterface());
- @Override
- public ActivityLogManager createInterface() {return INSTANCE;}
+ @Override
+ public ActivityLogManager createInterface() {
+ return INSTANCE;
+ }
}
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/impl/ActivityLogManagerImpl.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImpl.java
index 324af2095a..711fd68a8e 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activityLog/impl/ActivityLogManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImpl.java
@@ -18,36 +18,35 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.activityLog.impl;
+package org.openecomp.sdc.activitylog.impl;
import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.sdc.activityLog.ActivityLogManager;
+import org.openecomp.sdc.activitylog.ActivityLogManager;
import org.openecomp.sdc.activitylog.dao.ActivityLogDao;
-import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
+import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import org.openecomp.sdc.versioning.dao.types.Version;
import java.util.Collection;
public class ActivityLogManagerImpl implements ActivityLogManager {
- private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
- private ActivityLogDao activityLogDao;
+ private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+ private ActivityLogDao activityLogDao;
- public ActivityLogManagerImpl(ActivityLogDao activityLogDao) {
- this.activityLogDao = activityLogDao;
- }
+ public ActivityLogManagerImpl(ActivityLogDao activityLogDao) {
+ this.activityLogDao = activityLogDao;
+ }
- @Override
- public void addActionLog(ActivityLogEntity activityLogEntity, String user) {
- mdcDataDebugMessage.debugEntryMessage("ITEM id", activityLogEntity.getItemId());
- activityLogEntity.setId(CommonMethods.nextUuId());
- activityLogDao.create(activityLogEntity);
- }
+ @Override
+ public void logActivity(ActivityLogEntity activityLogEntity) {
+ mdcDataDebugMessage.debugEntryMessage("ITEM id", activityLogEntity.getItemId());
+ activityLogEntity.setId(CommonMethods.nextUuId());
+ activityLogDao.create(activityLogEntity);
+ }
- @Override
- public Collection<ActivityLogEntity> listActivityLogs(String itemId, Version version, String user) {
- mdcDataDebugMessage.debugEntryMessage("ITEM id", itemId);
- String versionId = version.getMinor() == 0 ? String.valueOf(version.getMajor()) : String.valueOf(version.getMajor()+1);
- return activityLogDao.getActivityLogListForItem(itemId, versionId);
- }
+ @Override
+ public Collection<ActivityLogEntity> listLoggedActivities(String itemId, Version version) {
+ mdcDataDebugMessage.debugEntryMessage("ITEM id", itemId);
+ return activityLogDao.list(new ActivityLogEntity(itemId, version));
+ }
}