summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml11
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java1
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapApplicationConfigEntityToApplicationConfigDto.java3
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapConfigurationDataToConfigurationDataDto.java3
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java33
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ApplicationConfigDto.java3
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ConfigurationDataDto.java3
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml11
9 files changed, 56 insertions, 21 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
index de45b5a0e8..1c99280735 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
@@ -4,21 +4,20 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <artifactId>application-config-rest-services</artifactId>
+
<parent>
<groupId>org.openecomp.sdc</groupId>
<artifactId>application-config-rest</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <artifactId>application-config-rest-services</artifactId>
- <!--packaging>pom</packaging-->
-
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
- <version>1.5.3</version>
+ <version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
@@ -33,7 +32,7 @@
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
- <version>1</version>
+ <version>${javax.inject.version}</version>
</dependency>
<dependency>
<groupId>org.openecomp.sdc</groupId>
@@ -59,4 +58,4 @@
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
index df743a6a93..6c95a14319 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
@@ -37,7 +37,6 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-
@Path("/v1.0/application-configuration")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapApplicationConfigEntityToApplicationConfigDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapApplicationConfigEntityToApplicationConfigDto.java
index 4d43e37769..4ced6ba302 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapApplicationConfigEntityToApplicationConfigDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapApplicationConfigEntityToApplicationConfigDto.java
@@ -24,6 +24,9 @@ import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfig
import org.openecomp.sdcrests.applicationconfiguration.types.ApplicationConfigDto;
import org.openecomp.sdcrests.mapping.MappingBase;
+/**
+ * Created by Talio on 8/10/2016.
+ */
public class MapApplicationConfigEntityToApplicationConfigDto
extends MappingBase<ApplicationConfigEntity, ApplicationConfigDto> {
@Override
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapConfigurationDataToConfigurationDataDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapConfigurationDataToConfigurationDataDto.java
index 6865c676ec..c86628d301 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapConfigurationDataToConfigurationDataDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/mapping/MapConfigurationDataToConfigurationDataDto.java
@@ -24,6 +24,9 @@ import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
import org.openecomp.sdcrests.applicationconfiguration.types.ConfigurationDataDto;
import org.openecomp.sdcrests.mapping.MappingBase;
+/**
+ * Created by Talio on 8/9/2016.
+ */
public class MapConfigurationDataToConfigurationDataDto
extends MappingBase<ConfigurationData, ConfigurationDataDto> {
@Override
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java
index 81f7251fdc..4ffe4488da 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/services/ApplicationConfigurationImpl.java
@@ -24,13 +24,17 @@ import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfig
import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.sdc.applicationconfig.ApplicationConfigManager;
+import org.openecomp.sdc.common.utils.CommonUtil;
+import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
+import org.openecomp.sdc.logging.types.LoggerConstants;
+import org.openecomp.sdc.logging.types.LoggerServiceName;
import org.openecomp.sdcrests.applicationconfig.rest.ApplicationConfiguration;
import org.openecomp.sdcrests.applicationconfig.rest.mapping.MapApplicationConfigEntityToApplicationConfigDto;
import org.openecomp.sdcrests.applicationconfig.rest.mapping.MapConfigurationDataToConfigurationDataDto;
import org.openecomp.sdcrests.applicationconfiguration.types.ApplicationConfigDto;
import org.openecomp.sdcrests.applicationconfiguration.types.ConfigurationDataDto;
import org.openecomp.sdcrests.wrappers.GenericCollectionWrapper;
-
+import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
@@ -38,38 +42,59 @@ import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.util.Collection;
import javax.inject.Named;
-
import javax.ws.rs.core.Response;
+/**
+ * Created by Talio on 8/8/2016.
+ */
+
@Named
@Service("applicationConfiguration")
@Scope(value = "prototype")
public class ApplicationConfigurationImpl implements ApplicationConfiguration {
+ private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
@Autowired
private ApplicationConfigManager applicationConfigManager;
-
@Override
public Response insertToTable(String namespace, String key, InputStream fileContainingSchema) {
+
+ mdcDataDebugMessage.debugEntryMessage(null, null);
+
+ MDC.put(LoggerConstants.SERVICE_NAME,
+ LoggerServiceName.Insert_To_ApplicationConfig_Table.toString());
String value = new String(FileUtils.toByteArray(fileContainingSchema));
applicationConfigManager.insertIntoTable(namespace, key, value);
+ mdcDataDebugMessage.debugExitMessage(null, null);
return Response.ok().build();
}
@Override
public Response getFromTable(String namespace, String key) {
+
+ mdcDataDebugMessage.debugEntryMessage(null, null);
+
+ MDC.put(LoggerConstants.SERVICE_NAME,
+ LoggerServiceName.Get_From_ApplicationConfig_Table.toString());
ConfigurationData value = applicationConfigManager.getFromTable(namespace, key);
ConfigurationDataDto valueDto = new MapConfigurationDataToConfigurationDataDto()
.applyMapping(value, ConfigurationDataDto.class);
+ mdcDataDebugMessage.debugExitMessage(null, null);
+
return Response.ok(valueDto).build();
}
@Override
public Response getListOfConfigurationByNamespaceFromTable(String namespace) {
+
+ mdcDataDebugMessage.debugEntryMessage(null, null);
+
+ MDC.put(LoggerConstants.SERVICE_NAME, LoggerServiceName
+ .Get_List_From_ApplicationConfig_Table_By_Namespace.toString());
Collection<ApplicationConfigEntity> applicationConfigEntities =
applicationConfigManager.getListOfConfigurationByNamespace(namespace);
GenericCollectionWrapper<ApplicationConfigDto> applicationConfigWrapper =
@@ -82,6 +107,8 @@ public class ApplicationConfigurationImpl implements ApplicationConfiguration {
.add(mapper.applyMapping(applicationConfigEntity, ApplicationConfigDto.class));
}
+ mdcDataDebugMessage.debugExitMessage(null, null);
+
return Response.ok(applicationConfigWrapper).build();
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml
index 6bc5ce9285..111d92d075 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/pom.xml
@@ -4,14 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>application-config-rest-types</artifactId>
+
<parent>
<groupId>org.openecomp.sdc</groupId>
<artifactId>application-config-rest</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest-types</artifactId>
-
-
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ApplicationConfigDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ApplicationConfigDto.java
index 4d2f160d51..787a191bd9 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ApplicationConfigDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ApplicationConfigDto.java
@@ -20,6 +20,9 @@
package org.openecomp.sdcrests.applicationconfiguration.types;
+/**
+ * Created by Talio on 8/10/2016.
+ */
public class ApplicationConfigDto {
private String key;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ConfigurationDataDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ConfigurationDataDto.java
index fcabcf5e89..2a523783ab 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ConfigurationDataDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-types/src/main/java/org/openecomp/sdcrests/applicationconfiguration/types/ConfigurationDataDto.java
@@ -20,6 +20,9 @@
package org.openecomp.sdcrests.applicationconfiguration.types;
+/**
+ * Created by Talio on 8/9/2016.
+ */
public class ConfigurationDataDto {
private String value;
private long timeStamp;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml
index 565840a813..f00133dbc4 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/pom.xml
@@ -4,20 +4,19 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>application-config-rest</artifactId>
+ <packaging>pom</packaging>
+
<parent>
<groupId>org.openecomp.sdc</groupId>
<artifactId>openecomp-sdc-rest-webapp</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>application-config-rest</artifactId>
- <packaging>pom</packaging>
-
-
<modules>
<module>application-config-rest-services</module>
<module>application-config-rest-types</module>
</modules>
-</project> \ No newline at end of file
+</project>