summaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/comm/PdpHeartbeatListener.java12
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java15
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/StatisticsReport.java20
3 files changed, 6 insertions, 41 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/comm/PdpHeartbeatListener.java b/main/src/main/java/org/onap/policy/pap/main/comm/PdpHeartbeatListener.java
index 027436a4..15242a92 100644
--- a/main/src/main/java/org/onap/policy/pap/main/comm/PdpHeartbeatListener.java
+++ b/main/src/main/java/org/onap/policy/pap/main/comm/PdpHeartbeatListener.java
@@ -22,6 +22,7 @@
package org.onap.policy.pap.main.comm;
+import lombok.AllArgsConstructor;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.listeners.TypedMessageListener;
import org.onap.policy.models.pdp.concepts.PdpStatus;
@@ -32,22 +33,13 @@ import org.onap.policy.pap.main.parameters.PdpParameters;
*
* @author Ram Krishna Verma (ram.krishna.verma@est.tech)
*/
+@AllArgsConstructor
public class PdpHeartbeatListener implements TypedMessageListener<PdpStatus> {
private final PdpParameters params;
private final boolean savePdpStatistics;
- /**
- * Constructs the object.
- *
- * @param params PDP parameters
- */
- public PdpHeartbeatListener(PdpParameters params, boolean savePdpStatistics) {
- this.params = params;
- this.savePdpStatistics = savePdpStatistics;
- }
-
@Override
public void onTopicEvent(final CommInfrastructure infra, final String topic, final PdpStatus message) {
diff --git a/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java b/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java
index 24e3ced6..641546c1 100644
--- a/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java
+++ b/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java
@@ -22,6 +22,7 @@
package org.onap.policy.pap.main.notification;
import java.util.Set;
+import lombok.AllArgsConstructor;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.pap.concepts.PolicyNotification;
import org.onap.policy.models.provider.PolicyModelsProvider;
@@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory;
/**
* Notifier for completion of policy updates.
*/
+@AllArgsConstructor
public class PolicyNotifier {
private static final Logger logger = LoggerFactory.getLogger(PolicyNotifier.class);
@@ -45,19 +47,6 @@ public class PolicyNotifier {
private final PolicyModelsProviderFactoryWrapper daoFactory;
-
- /**
- * Constructs the object. Loads all deployed policies into the internal cache.
- *
- * @param publisher notification publisher
- * @param daoFactory factory used to load policy deployment data from the DB
- */
- public PolicyNotifier(Publisher<PolicyNotification> publisher, PolicyModelsProviderFactoryWrapper daoFactory) {
-
- this.publisher = publisher;
- this.daoFactory = daoFactory;
- }
-
/**
* Processes a response from a PDP.
*
diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/StatisticsReport.java b/main/src/main/java/org/onap/policy/pap/main/rest/StatisticsReport.java
index 013cfab6..e84d9684 100644
--- a/main/src/main/java/org/onap/policy/pap/main/rest/StatisticsReport.java
+++ b/main/src/main/java/org/onap/policy/pap/main/rest/StatisticsReport.java
@@ -29,34 +29,18 @@ import lombok.ToString;
*
* @author Ram Krishna Verma (ram.krishna.verma@est.tech)
*/
+@Getter
+@Setter
@ToString
public class StatisticsReport {
- @Getter
- @Setter
private int code;
- @Getter
- @Setter
private long totalPdpCount;
- @Getter
- @Setter
private long totalPdpGroupCount;
- @Getter
- @Setter
private long totalPolicyDeployCount;
- @Getter
- @Setter
private long policyDeploySuccessCount;
- @Getter
- @Setter
private long policyDeployFailureCount;
- @Getter
- @Setter
private long totalPolicyDownloadCount;
- @Getter
- @Setter
private long policyDownloadSuccessCount;
- @Getter
- @Setter
private long policyDownloadFailureCount;
}