summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/TcaPolicyDelegate.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java12
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/sdc/SdcRequests.java4
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java10
-rw-r--r--src/main/java/org/onap/clamp/clds/config/ClampProperties.java (renamed from src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java)33
-rw-r--r--src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java20
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java16
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java4
15 files changed, 52 insertions, 79 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
index f9240581..9226604a 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
@@ -31,7 +31,7 @@ import java.util.Date;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.exception.dcae.DcaeDeploymentException;
import org.onap.clamp.clds.util.LoggingUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,7 +47,7 @@ public class DcaeDispatcherServices {
protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DcaeDispatcherServices.class);
protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
private static final String STATUS_URL_LOG = "Status URL extracted: ";
private static final String DCAE_URL_PREFIX = "/dcae-deployments/";
private static final String DCAE_URL_PROPERTY_NAME = "dcae.dispatcher.url";
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
index 4a2f32e6..c4abebdc 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
@@ -41,7 +41,7 @@ import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsModel;
@@ -63,7 +63,7 @@ public class DcaeInventoryServices {
protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
private static final String DCAE_INVENTORY_URL = "dcae.inventory.url";
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
@Autowired
private CldsDao cldsDao;
diff --git a/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java
index 4e165e14..37259cdf 100644
--- a/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/HolmesPolicyDelegate.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import org.apache.camel.Exchange;
import org.apache.camel.Handler;
import org.onap.clamp.clds.client.req.policy.PolicyClient;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.properties.Holmes;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,7 +48,7 @@ public class HolmesPolicyDelegate {
@Autowired
private PolicyClient policyClient;
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
/**
* Perform activity. Send Holmes info to policy api.
diff --git a/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
index ec83db9d..ae288056 100644
--- a/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/OperationalPolicyDelegate.java
@@ -33,7 +33,7 @@ import org.apache.camel.Exchange;
import org.apache.camel.Handler;
import org.onap.clamp.clds.client.req.policy.OperationalPolicyReq;
import org.onap.clamp.clds.client.req.policy.PolicyClient;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.Policy;
import org.onap.clamp.clds.model.properties.PolicyChain;
@@ -61,7 +61,7 @@ public class OperationalPolicyDelegate {
* Automatically injected by Spring, define in CldsConfiguration as a bean.
*/
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
/**
* Perform activity. Send Operational Policy info to policy api.
diff --git a/src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java b/src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java
index 438ea472..64e19f92 100644
--- a/src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java
@@ -35,7 +35,7 @@ import org.apache.camel.Handler;
import org.apache.commons.codec.DecoderException;
import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices;
import org.onap.clamp.clds.client.req.sdc.SdcRequests;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.DcaeEvent;
import org.onap.clamp.clds.model.properties.Global;
import org.onap.clamp.clds.model.properties.ModelProperties;
@@ -55,7 +55,7 @@ public class SdcSendReqDelegate {
@Autowired
private SdcRequests sdcReq;
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
/**
* Perform activity. Send to sdc proxy.
diff --git a/src/main/java/org/onap/clamp/clds/client/TcaPolicyDelegate.java b/src/main/java/org/onap/clamp/clds/client/TcaPolicyDelegate.java
index 55fe2c57..e16e8c35 100644
--- a/src/main/java/org/onap/clamp/clds/client/TcaPolicyDelegate.java
+++ b/src/main/java/org/onap/clamp/clds/client/TcaPolicyDelegate.java
@@ -32,7 +32,7 @@ import org.apache.camel.Exchange;
import org.apache.camel.Handler;
import org.onap.clamp.clds.client.req.policy.PolicyClient;
import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.Tca;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,7 +47,7 @@ public class TcaPolicyDelegate {
protected static final EELFLogger logger = EELFManager.getInstance().getLogger(TcaPolicyDelegate.class);
protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
@Autowired
private PolicyClient policyClient;
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java
index 434da4b6..d3e8a541 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyReq.java
@@ -39,7 +39,7 @@ import java.util.Map;
import javax.ws.rs.BadRequestException;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.properties.Global;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.PolicyChain;
@@ -80,7 +80,7 @@ public class OperationalPolicyReq {
* @throws BuilderException
* @throws UnsupportedEncodingException
*/
- public static Map<AttributeType, Map<String, String>> formatAttributes(CldsReferenceProperties refProp, ModelProperties prop,
+ public static Map<AttributeType, Map<String, String>> formatAttributes(ClampProperties refProp, ModelProperties prop,
String modelElementId, PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
Global global = prop.getGlobal();
prop.setCurrentModelElementId(modelElementId);
@@ -163,7 +163,7 @@ public class OperationalPolicyReq {
* @throws BuilderException
* @throws UnsupportedEncodingException
*/
- protected static String formatOpenLoopYaml(CldsReferenceProperties refProp, ModelProperties prop, String modelElementId,
+ protected static String formatOpenLoopYaml(ClampProperties refProp, ModelProperties prop, String modelElementId,
PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
// get property objects
Global global = prop.getGlobal();
@@ -193,7 +193,7 @@ public class OperationalPolicyReq {
* @throws BuilderException
* @throws UnsupportedEncodingException
*/
- protected static String formatYaml(CldsReferenceProperties refProp, ModelProperties prop, String modelElementId,
+ protected static String formatYaml(ClampProperties refProp, ModelProperties prop, String modelElementId,
PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
// get property objects
Global global = prop.getGlobal();
@@ -251,7 +251,7 @@ public class OperationalPolicyReq {
* @throws BuilderException
* @throws UnsupportedEncodingException
*/
- protected static String formateNodeBYaml(CldsReferenceProperties refProp, ModelProperties prop, String modelElementId,
+ protected static String formateNodeBYaml(ClampProperties refProp, ModelProperties prop, String modelElementId,
PolicyChain policyChain) throws BuilderException, UnsupportedEncodingException {
// get property objects
Global global = prop.getGlobal();
@@ -329,7 +329,7 @@ public class OperationalPolicyReq {
* @param inOrigList
* @return
*/
- private static List<PolicyItem> addAOTSActorRecipe(CldsReferenceProperties refProp, String service, List<PolicyItem> inOrigList) {
+ private static List<PolicyItem> addAOTSActorRecipe(ClampProperties refProp, String service, List<PolicyItem> inOrigList) {
List<PolicyItem> outList = new ArrayList<>();
try {
PolicyItem policyItem = inOrigList.get(0);
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java b/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
index 06eff4ef..5160d04a 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
@@ -37,7 +37,7 @@ import java.util.UUID;
import javax.ws.rs.BadRequestException;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.exception.policy.PolicyClientException;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.util.LoggingUtils;
@@ -76,7 +76,7 @@ public class PolicyClient {
@Autowired
protected ApplicationContext appContext;
@Autowired
- protected CldsReferenceProperties refProp;
+ protected ClampProperties refProp;
/**
* Perform BRMS policy type.
diff --git a/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java b/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
index c01fe6a3..5664653b 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
@@ -58,7 +58,7 @@ import org.apache.commons.csv.CSVRecord;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHeaders;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.exception.sdc.SdcCommunicationException;
import org.onap.clamp.clds.model.CldsAlarmCondition;
import org.onap.clamp.clds.model.CldsServiceData;
@@ -93,7 +93,7 @@ public class SdcCatalogServices {
private static final String SDC_INSTANCE_ID_CLAMP = "CLAMP-Tool";
private static final String RESOURCE_URL_PREFIX = "resources";
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
/**
* Return SDC id and pw as a HTTP Basic Auth string (for example: Basic
diff --git a/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcRequests.java b/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcRequests.java
index 214933d4..e34b7e90 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcRequests.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcRequests.java
@@ -41,7 +41,7 @@ import java.util.Map.Entry;
import org.apache.commons.codec.DecoderException;
import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.model.properties.Global;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.Tca;
@@ -61,7 +61,7 @@ public class SdcRequests {
@Autowired
private SdcCatalogServices sdcCatalogServices;
@Autowired
- protected CldsReferenceProperties refProp;
+ protected ClampProperties refProp;
/**
* Format the Blueprint from a Yaml
diff --git a/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java b/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
index 73355a7a..f5146915 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
@@ -32,7 +32,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
import java.util.Map;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.exception.TcaRequestFormatterException;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.Tca;
@@ -64,7 +64,7 @@ public class TcaRequestFormatter {
* The Model Prop created from BPMN JSON and BPMN properties JSON
* @return The Json string containing that should be sent to policy
*/
- public static String createPolicyJson(CldsReferenceProperties refProp, ModelProperties modelProperties) {
+ public static String createPolicyJson(ClampProperties refProp, ModelProperties modelProperties) {
try {
String service = modelProperties.getGlobal().getService();
Tca tca = modelProperties.getType(Tca.class);
@@ -103,7 +103,7 @@ public class TcaRequestFormatter {
* modelProperties.setCurrentModelElementId will be used
* @return The Json node containing what should be sent to policy
*/
- public static JsonNode createPolicyContent(CldsReferenceProperties refProp, ModelProperties modelProperties, String service,
+ public static JsonNode createPolicyContent(ClampProperties refProp, ModelProperties modelProperties, String service,
String policyName, Tca tca) {
try {
String serviceToUse = service;
@@ -153,7 +153,7 @@ public class TcaRequestFormatter {
* The Model Properties created from BPMN JSON and BPMN
* properties JSON
*/
- private static void addThresholds(CldsReferenceProperties refProp, String service, ObjectNode appendToNode, TcaItem tcaItem,
+ private static void addThresholds(ClampProperties refProp, String service, ObjectNode appendToNode, TcaItem tcaItem,
ModelProperties modelProperties) {
ArrayNode tcaNodes = appendToNode.withArray("thresholds");
ObjectNode tcaNode;
@@ -185,7 +185,7 @@ public class TcaRequestFormatter {
* The yaml string received from the UI
* @return The updated YAML as a string
*/
- public static String updatedBlueprintWithConfiguration(CldsReferenceProperties refProp, ModelProperties modelProperties,
+ public static String updatedBlueprintWithConfiguration(ClampProperties refProp, ModelProperties modelProperties,
String yamlValue) {
String jsonPolicy = ((ObjectNode) createPolicyContent(refProp, modelProperties, null, null, null)).toString();
logger.info("Yaml that will be updated:" + yamlValue);
diff --git a/src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java b/src/main/java/org/onap/clamp/clds/config/ClampProperties.java
index b234b932..66f35acc 100644
--- a/src/main/java/org/onap/clamp/clds/config/CldsReferenceProperties.java
+++ b/src/main/java/org/onap/clamp/clds/config/ClampProperties.java
@@ -29,43 +29,24 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
-import java.util.Properties;
-
-import javax.annotation.PostConstruct;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
-import org.springframework.core.io.Resource;
+import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
/**
- * Holds reference properties.
+ * Holds Clamp properties and add some functionalities.
*/
@Component
-public class CldsReferenceProperties {
+public class ClampProperties {
@Autowired
private ApplicationContext appContext;
- private Properties prop;
- @Value("${org.onap.clamp.config.files.cldsReference:'classpath:/clds/clds-reference.properties'}")
- private String cldsReferenceValuesFile;
-
- @PostConstruct
- public void loadConfiguration() throws IOException {
- prop = new Properties();
- Resource resource = appContext.getResource(cldsReferenceValuesFile);
- prop.load(resource.getInputStream());
- }
-
- public CldsReferenceProperties(String referenceValuesFile) throws IOException {
- cldsReferenceValuesFile = referenceValuesFile;
- loadConfiguration();
- }
-
- public CldsReferenceProperties() {
- }
+ @Autowired
+ private Environment env;
+ public static final String CONFIG_PREFIX = "clamp.config.";
/**
* get property value.
@@ -75,7 +56,7 @@ public class CldsReferenceProperties {
* @return The string with the value
*/
public String getStringValue(String key) {
- return prop.getProperty(key);
+ return env.getProperty(CONFIG_PREFIX + key);
}
/**
diff --git a/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java b/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
index 12dc3641..51bd6954 100644
--- a/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
+++ b/src/main/java/org/onap/clamp/clds/config/spring/CldsSecurityConfigUsers.java
@@ -45,28 +45,22 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
* This class is used to enable the HTTP authentication to login. It requires a
* specific JSON file containing the user definition
* (classpath:etc/config/clds/clds-users.json).
- *
*/
@Configuration
@EnableWebSecurity
@Profile("clamp-spring-authentication")
public class CldsSecurityConfigUsers extends WebSecurityConfigurerAdapter {
- protected static final EELFLogger logger = EELFManager.getInstance()
- .getLogger(CldsSecurityConfigUsers.class);
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsSecurityConfigUsers.class);
protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
-
@Autowired
- private ApplicationContext appContext;
-
+ private ApplicationContext appContext;
@Value("${org.onap.clamp.config.files.cldsUsers:'classpath:etc/config/clds/clds-users.json'}")
- private String cldsUsersFile;
-
- @Value("${CLDS_PERMISSION_TYPE_CL:permission-type-cl}")
- private String cldsPersmissionTypeCl;
-
+ private String cldsUsersFile;
+ @Value("${clamp.config.security.permission.type.cl:permission-type-cl}")
+ private String cldsPersmissionTypeCl;
@Value("${CLDS_PERMISSION_INSTANCE:dev}")
- private String cldsPermissionInstance;
+ private String cldsPermissionInstance;
/**
* This method configures on which URL the authorization will be enabled.
@@ -93,13 +87,11 @@ public class CldsSecurityConfigUsers extends WebSecurityConfigurerAdapter {
public void configureGlobal(AuthenticationManagerBuilder auth) {
try {
CldsUser[] usersList = loadUsers();
-
// no users defined
if (null == usersList) {
logger.warn("No users defined. Users should be defined under " + cldsUsersFile);
return;
}
-
for (CldsUser user : usersList) {
auth.inMemoryAuthentication().withUser(user.getUser()).password(user.getPassword())
.roles(user.getPermissionsString());
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index a9b1b771..3b6bc377 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -62,7 +62,7 @@ import org.onap.clamp.clds.camel.CamelProxy;
import org.onap.clamp.clds.client.DcaeDispatcherServices;
import org.onap.clamp.clds.client.DcaeInventoryServices;
import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices;
-import org.onap.clamp.clds.config.CldsReferenceProperties;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.exception.CldsConfigException;
import org.onap.clamp.clds.exception.policy.PolicyClientException;
@@ -105,17 +105,17 @@ public class CldsService extends SecureServiceBase {
@Autowired
private ApplicationContext appContext;
private static final String RESOURCE_NAME = "clds-version.properties";
- @Value("${CLDS_PERMISSION_TYPE_CL:permission-type-cl}")
+ @Value("${clamp.config.security.permission.type.cl:permission-type-cl}")
private String cldsPersmissionTypeCl;
- @Value("${CLDS_PERMISSION_TYPE_CL_MANAGE:permission-type-cl-manage}")
+ @Value("${clamp.config.security.permission.type.cl.manage:permission-type-cl-manage}")
private String cldsPermissionTypeClManage;
- @Value("${CLDS_PERMISSION_TYPE_CL_EVENT:permission-type-cl-event}")
+ @Value("${clamp.config.security.permission.type.cl.event:permission-type-cl-event}")
private String cldsPermissionTypeClEvent;
- @Value("${CLDS_PERMISSION_TYPE_FILTER_VF:permission-type-filter-vf}")
+ @Value("${clamp.config.security.permission.type.filter.vf:permission-type-filter-vf}")
private String cldsPermissionTypeFilterVf;
- @Value("${CLDS_PERMISSION_TYPE_TEMPLATE:permission-type-template}")
+ @Value("${clamp.config.security.permission.type.template:permission-type-template}")
private String cldsPermissionTypeTemplate;
- @Value("${CLDS_PERMISSION_INSTANCE:dev}")
+ @Value("${clamp.config.security.permission.instance:dev}")
private String cldsPermissionInstance;
private SecureServicePermission permissionReadCl;
private SecureServicePermission permissionUpdateCl;
@@ -140,7 +140,7 @@ public class CldsService extends SecureServiceBase {
@Autowired
private XslTransformer cldsBpmnTransformer;
@Autowired
- private CldsReferenceProperties refProp;
+ private ClampProperties refProp;
@Autowired
private SdcCatalogServices sdcCatalogServices;
@Autowired
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java b/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
index e64f74bb..1b03922d 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsTemplateService.java
@@ -55,9 +55,9 @@ import org.springframework.stereotype.Component;
@Path("/cldsTempate")
public class CldsTemplateService extends SecureServiceBase {
- @Value("${CLDS_PERMISSION_TYPE_TEMPLATE:permission-type-template}")
+ @Value("${clamp.config.security.permission.type.template:permission-type-template}")
private String cldsPermissionTypeTemplate;
- @Value("${CLDS_PERMISSION_INSTANCE:dev}")
+ @Value("${clamp.config.security.permission.instance:dev}")
private String cldsPermissionInstance;
private SecureServicePermission permissionReadTemplate;
private SecureServicePermission permissionUpdateTemplate;