summaryrefslogtreecommitdiffstats
path: root/policy-management/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src/main')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java6
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/coders/GsonProtocolCoderToolset.java7
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/ControllerConfiguration.java18
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java20
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java21
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java2
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java9
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java3
8 files changed, 3 insertions, 83 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
index 935cb11d..b8edb55e 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
@@ -20,8 +20,6 @@
package org.onap.policy.drools.controller.internal;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -78,7 +76,6 @@ public class MavenDroolsController implements DroolsController {
/**
* Policy Container, the access object to the policy-core layer.
*/
- @JsonIgnore
@GsonJsonIgnore
protected final PolicyContainer policyContainer;
@@ -658,14 +655,12 @@ public class MavenDroolsController implements DroolsController {
return this.locked;
}
- @JsonIgnore
@GsonJsonIgnore
@Override
public PolicyContainer getContainer() {
return this.policyContainer;
}
- @JsonProperty("sessions")
@GsonJsonProperty("sessions")
@Override
public List<String> getSessionNames() {
@@ -695,7 +690,6 @@ public class MavenDroolsController implements DroolsController {
return sessionNames;
}
- @JsonProperty("sessionCoordinates")
@GsonJsonProperty("sessionCoordinates")
@Override
public List<String> getCanonicalSessionNames() {
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/GsonProtocolCoderToolset.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/GsonProtocolCoderToolset.java
index 51b28d66..637e0c14 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/GsonProtocolCoderToolset.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/coders/GsonProtocolCoderToolset.java
@@ -20,7 +20,6 @@
package org.onap.policy.drools.protocol.coders;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
@@ -57,11 +56,9 @@ class GsonProtocolCoderToolset extends ProtocolCoderToolset {
/**
* Formatter for JSON encoding/decoding.
*/
- @JsonIgnore
@GsonJsonIgnore
public static final DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSxxx");
- @JsonIgnore
@GsonJsonIgnore
public static final DateTimeFormatter zuluFormat = DateTimeFormatter.ISO_INSTANT;
@@ -105,7 +102,6 @@ class GsonProtocolCoderToolset extends ProtocolCoderToolset {
/**
* decoder.
*/
- @JsonIgnore
@GsonJsonIgnore
protected final Gson decoder = new GsonBuilder().disableHtmlEscaping()
.registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
@@ -114,7 +110,6 @@ class GsonProtocolCoderToolset extends ProtocolCoderToolset {
/**
* encoder.
*/
- @JsonIgnore
@GsonJsonIgnore
protected final Gson encoder = new GsonBuilder().disableHtmlEscaping()
.registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
@@ -135,7 +130,6 @@ class GsonProtocolCoderToolset extends ProtocolCoderToolset {
*
* @return the Gson decoder
*/
- @JsonIgnore
@GsonJsonIgnore
protected Gson getDecoder() {
return this.decoder;
@@ -146,7 +140,6 @@ class GsonProtocolCoderToolset extends ProtocolCoderToolset {
*
* @return the Gson encoder
*/
- @JsonIgnore
@GsonJsonIgnore
protected Gson getEncoder() {
return this.encoder;
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/ControllerConfiguration.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/ControllerConfiguration.java
index d6504c38..663d6b83 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/ControllerConfiguration.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/ControllerConfiguration.java
@@ -20,11 +20,6 @@
package org.onap.policy.drools.protocol.configuration;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.Map;
import lombok.ToString;
@@ -40,7 +35,6 @@ import org.onap.policy.common.gson.annotation.GsonJsonProperty;
* Drools Related Information.
*
*/
-@JsonInclude(JsonInclude.Include.NON_NULL)
@ToString
public class ControllerConfiguration {
@@ -53,7 +47,6 @@ public class ControllerConfiguration {
* (Required).
*
*/
- @JsonProperty("name")
@GsonJsonProperty("name")
private String name;
/**
@@ -61,18 +54,15 @@ public class ControllerConfiguration {
* (Required).
*
*/
- @JsonProperty("operation")
@GsonJsonProperty("operation")
private String operation;
/**
* Maven Related Information.
*
*/
- @JsonProperty("drools")
@GsonJsonProperty("drools")
private DroolsConfiguration drools;
- @JsonIgnore
@GsonJsonIgnore
private Map<String, Object> additionalProperties = new HashMap<>();
@@ -105,7 +95,6 @@ public class ControllerConfiguration {
* @return
* The name
*/
- @JsonProperty("name")
@GsonJsonProperty("name")
public String getName() {
return name;
@@ -117,7 +106,6 @@ public class ControllerConfiguration {
* @param name
* The name
*/
- @JsonProperty("name")
@GsonJsonProperty("name")
public void setName(String name) {
this.name = name;
@@ -135,7 +123,6 @@ public class ControllerConfiguration {
* @return
* The operation
*/
- @JsonProperty("operation")
@GsonJsonProperty("operation")
public String getOperation() {
return operation;
@@ -148,7 +135,6 @@ public class ControllerConfiguration {
* @param operation
* The operation
*/
- @JsonProperty("operation")
@GsonJsonProperty("operation")
public void setOperation(String operation) {
this.operation = operation;
@@ -165,7 +151,6 @@ public class ControllerConfiguration {
* @return
* The drools
*/
- @JsonProperty("drools")
@GsonJsonProperty("drools")
public DroolsConfiguration getDrools() {
return drools;
@@ -177,7 +162,6 @@ public class ControllerConfiguration {
* @param drools
* The drools
*/
- @JsonProperty("drools")
@GsonJsonProperty("drools")
public void setDrools(DroolsConfiguration drools) {
this.drools = drools;
@@ -188,13 +172,11 @@ public class ControllerConfiguration {
return this;
}
- @JsonAnyGetter
@GsonJsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
- @JsonAnySetter
@GsonJsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java
index eec4df56..1d4fc8d8 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/DroolsConfiguration.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* policy-management
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,11 +20,6 @@
package org.onap.policy.drools.protocol.configuration;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.Map;
import lombok.ToString;
@@ -39,7 +34,6 @@ import org.onap.policy.common.gson.annotation.GsonJsonProperty;
* Maven Related Information.
*
*/
-@JsonInclude(JsonInclude.Include.NON_NULL)
@ToString
public class DroolsConfiguration {
@@ -48,7 +42,6 @@ public class DroolsConfiguration {
* (Required).
*
*/
- @JsonProperty("artifactId")
@GsonJsonProperty("artifactId")
private String artifactId;
@@ -57,7 +50,6 @@ public class DroolsConfiguration {
* (Required).
*
*/
- @JsonProperty("groupId")
@GsonJsonProperty("groupId")
private String groupId;
@@ -66,11 +58,9 @@ public class DroolsConfiguration {
* (Required).
*
*/
- @JsonProperty("version")
@GsonJsonProperty("version")
private String version;
- @JsonIgnore
@GsonJsonIgnore
private Map<String, Object> additionalProperties = new HashMap<>();
@@ -104,7 +94,6 @@ public class DroolsConfiguration {
* @return
* The artifactId
*/
- @JsonProperty("artifactId")
@GsonJsonProperty("artifactId")
public String getArtifactId() {
return artifactId;
@@ -117,7 +106,6 @@ public class DroolsConfiguration {
* @param artifactId
* The artifactId
*/
- @JsonProperty("artifactId")
@GsonJsonProperty("artifactId")
public void setArtifactId(String artifactId) {
this.artifactId = artifactId;
@@ -135,7 +123,6 @@ public class DroolsConfiguration {
* @return
* The groupId
*/
- @JsonProperty("groupId")
@GsonJsonProperty("groupId")
public String getGroupId() {
return groupId;
@@ -148,7 +135,6 @@ public class DroolsConfiguration {
* @param groupId
* The groupId
*/
- @JsonProperty("groupId")
@GsonJsonProperty("groupId")
public void setGroupId(String groupId) {
this.groupId = groupId;
@@ -166,7 +152,6 @@ public class DroolsConfiguration {
* @return
* The version
*/
- @JsonProperty("version")
@GsonJsonProperty("version")
public String getVersion() {
return version;
@@ -179,7 +164,6 @@ public class DroolsConfiguration {
* @param version
* The version
*/
- @JsonProperty("version")
@GsonJsonProperty("version")
public void setVersion(String version) {
this.version = version;
@@ -190,13 +174,11 @@ public class DroolsConfiguration {
return this;
}
- @JsonAnyGetter
@GsonJsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
- @JsonAnySetter
@GsonJsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
index 3ce2ad92..6596408b 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* policy-management
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,11 +20,6 @@
package org.onap.policy.drools.protocol.configuration;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -41,7 +36,6 @@ import org.onap.policy.common.gson.annotation.GsonJsonProperty;
/**
* ENGINE-CONFIGURATION.
*/
-@JsonInclude(JsonInclude.Include.NON_NULL)
@ToString
public class PdpdConfiguration {
@@ -49,19 +43,16 @@ public class PdpdConfiguration {
public static final String CONFIG_ENTITY_CONTROLLER = "controller";
/** Unique Transaction ID. This is an UUID. (Required) */
- @JsonProperty("requestID")
@GsonJsonProperty("requestID")
private String requestId;
/* Set of entities on which configuration can be performed: controller (Required) */
- @JsonProperty("entity")
@GsonJsonProperty("entity")
private String entity;
/* Controller Information, only applicable when the entity is set to controller */
- @JsonProperty("controllers")
@GsonJsonProperty("controllers")
private List<ControllerConfiguration> controllers = new ArrayList<>();
- @JsonIgnore @GsonJsonIgnore private Map<String, Object> additionalProperties = new HashMap<>();
+ @GsonJsonIgnore private Map<String, Object> additionalProperties = new HashMap<>();
protected static final Object NOT_FOUND_VALUE = new Object();
/** No args constructor for use in serialization. */
@@ -88,7 +79,6 @@ public class PdpdConfiguration {
*
* @return The requestID
*/
- @JsonProperty("requestID")
@GsonJsonProperty("requestID")
public String getRequestId() {
return requestId;
@@ -99,7 +89,6 @@ public class PdpdConfiguration {
*
* @param requestId The requestID
*/
- @JsonProperty("requestID")
@GsonJsonProperty("requestID")
public void setRequestId(String requestId) {
this.requestId = requestId;
@@ -115,7 +104,6 @@ public class PdpdConfiguration {
*
* @return The entity
*/
- @JsonProperty("entity")
@GsonJsonProperty("entity")
public String getEntity() {
return entity;
@@ -126,7 +114,6 @@ public class PdpdConfiguration {
*
* @param entity The entity
*/
- @JsonProperty("entity")
@GsonJsonProperty("entity")
public void setEntity(String entity) {
this.entity = entity;
@@ -142,7 +129,6 @@ public class PdpdConfiguration {
*
* @return The controller
*/
- @JsonProperty("controllers")
@GsonJsonProperty("controllers")
public List<ControllerConfiguration> getControllers() {
return controllers;
@@ -153,7 +139,6 @@ public class PdpdConfiguration {
*
* @param controllers controllers
*/
- @JsonProperty("controllers")
@GsonJsonProperty("controllers")
public void setControllers(List<ControllerConfiguration> controllers) {
this.controllers = controllers;
@@ -164,13 +149,11 @@ public class PdpdConfiguration {
return this;
}
- @JsonAnyGetter
@GsonJsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
- @JsonAnySetter
@GsonJsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java b/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java
index c03535b1..84247efe 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/IndexedPolicyControllerFactory.java
@@ -20,7 +20,6 @@
package org.onap.policy.drools.system;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -349,7 +348,6 @@ class IndexedPolicyControllerFactory implements PolicyControllerFactory {
/**
* {@inheritDoc}.
*/
- @JsonIgnore
@GsonJsonIgnore
@Override
public List<PolicyControllerFeatureApi> getFeatureProviders() {
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
index b58bcf5b..49461210 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngineManager.java
@@ -24,8 +24,6 @@ import static org.onap.policy.drools.system.PolicyEngineConstants.TELEMETRY_SERV
import static org.onap.policy.drools.system.PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME;
import static org.onap.policy.drools.system.PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_PORT;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.ArrayList;
@@ -194,14 +192,12 @@ class PolicyEngineManager implements PolicyEngine {
this.environment.putAll(PropertyUtil.getInterpolatedProperties(properties));
}
- @JsonIgnore
@GsonJsonIgnore
@Override
public synchronized Properties getEnvironment() {
return this.environment;
}
- @JsonIgnore
@GsonJsonIgnore
@Override
public DomainMaker getDomainMaker() {
@@ -249,7 +245,6 @@ class PolicyEngineManager implements PolicyEngine {
}
@Override
- @JsonIgnore
@GsonJsonIgnore
public ScheduledExecutorService getExecutorService() {
return executorService;
@@ -1007,14 +1002,12 @@ class PolicyEngineManager implements PolicyEngine {
getControllerFactory().destroy(controller);
}
- @JsonIgnore
@GsonJsonIgnore
@Override
public List<PolicyController> getPolicyControllers() {
return getControllerFactory().inventory();
}
- @JsonProperty("controllers")
@GsonJsonProperty("controllers")
@Override
public List<String> getPolicyControllerIds() {
@@ -1026,7 +1019,6 @@ class PolicyEngineManager implements PolicyEngine {
}
@Override
- @JsonIgnore
@GsonJsonIgnore
public Properties getProperties() {
return this.properties;
@@ -1041,7 +1033,6 @@ class PolicyEngineManager implements PolicyEngine {
return features;
}
- @JsonIgnore
@GsonJsonIgnore
@Override
public List<PolicyEngineFeatureApi> getFeatureProviders() {
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java b/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
index 4e23dab1..3f744024 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/internal/AggregatedPolicyController.java
@@ -20,7 +20,6 @@
package org.onap.policy.drools.system.internal;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -83,7 +82,6 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
/**
* Mapping topics to sinks.
*/
- @JsonIgnore
@GsonJsonIgnore
private final HashMap<String, TopicSink> topic2Sinks = new HashMap<>();
@@ -642,7 +640,6 @@ public class AggregatedPolicyController implements PolicyController, TopicListen
* {@inheritDoc}.
*/
@Override
- @JsonIgnore
@GsonJsonIgnore
public Properties getProperties() {
return this.properties;