summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api
diff options
context:
space:
mode:
authorAviZi <avi.ziv@amdocs.com>2017-06-09 02:39:56 +0300
committerAviZi <avi.ziv@amdocs.com>2017-06-09 02:39:56 +0300
commit280f8015d06af1f41a3ef12e8300801c7a5e0d54 (patch)
tree9c1d3978c04cd28068f02073038c936bb49ca9e0 /openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api
parentfd3821dad11780d33c5373d74c957c442489945e (diff)
[SDC-29] Amdocs OnBoard 1707 initial commit.
Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api')
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml20
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml.versionsBackup51
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java12
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java1
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java13
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java16
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java10
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java1
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java3
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java14
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json12
15 files changed, 124 insertions, 39 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
index a1659d0201..562a0f4a1a 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
@@ -1,7 +1,12 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
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>
+ <name>openecomp-sdc-model-api</name>
+ <artifactId>openecomp-sdc-model-api</artifactId>
+
+
<parent>
<groupId>org.openecomp.sdc</groupId>
<artifactId>openecomp-sdc-lib</artifactId>
@@ -9,12 +14,9 @@
<relativePath>../..</relativePath>
</parent>
- <name>openecomp-sdc-model-api</name>
- <artifactId>openecomp-sdc-model-api</artifactId>
-
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc</groupId>
+ <groupId>org.openecomp.core</groupId>
<artifactId>openecomp-facade-core</artifactId>
<version>${project.version}</version>
</dependency>
@@ -31,19 +33,19 @@
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
- <version>1.5.3</version>
+ <version>${swagger.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc</groupId>
+ <groupId>org.openecomp.core</groupId>
<artifactId>openecomp-heat-lib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc</groupId>
+ <groupId>org.openecomp.core</groupId>
<artifactId>openecomp-tosca-lib</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml.versionsBackup
new file mode 100644
index 0000000000..eba0f207e4
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml.versionsBackup
@@ -0,0 +1,51 @@
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ 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>
+
+ <name>openecomp-sdc-model-api</name>
+ <artifactId>openecomp-sdc-model-api</artifactId>
+
+
+ <parent>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-lib</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-facade-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-validation-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdc</groupId>
+ <artifactId>openecomp-sdc-versioning-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-heat-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.core</groupId>
+ <artifactId>openecomp-tosca-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java
index d547316ebf..aa8cbee7d4 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceModelDao.java
@@ -26,17 +26,11 @@ import org.openecomp.sdc.versioning.dao.types.Version;
import java.util.List;
-public interface EnrichedServiceModelDao<M, E> extends VersionableDao {
-
- M getServiceModel(String vspId, Version version);
-
- void storeServiceModel(String vspId, Version version, M serviceModel);
+public interface EnrichedServiceModelDao<M, E> extends VersionableDao,ServiceModelDao<M, E>{
void storeExternalArtifact(ServiceArtifact serviceArtifact);
- List<ServiceArtifact> getExternalArtifacts(String vspId, Version version);
-
- E getServiceModelInfo(String vspId, Version version, String name);
+ //List<ServiceArtifact> getExternalArtifacts(String vspId, Version version);
- List<String> getServiceModelContentNames();
+ //List<String> getServiceModelContentNames();
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java
index 5ea2de7fd9..631d10a9ee 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/EnrichedServiceTemplateDao.java
@@ -20,7 +20,6 @@
package org.openecomp.core.model.dao;
-
public interface EnrichedServiceTemplateDao extends ServiceTemplateDaoInter {
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java
index 20d0c56c1b..30677b70a3 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceArtifactDaoInter.java
@@ -41,4 +41,6 @@ public interface ServiceArtifactDaoInter extends VersionableDao {
Object[] getKeys(String vspId, Version version);
ServiceArtifact getArtifactInfo(String vspId, Version version, String name);
+
+ void deleteAll(String vspId, Version version);
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java
index 30bb79c100..1c13fbe760 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceModelDao.java
@@ -34,7 +34,5 @@ public interface ServiceModelDao<M, E> extends VersionableDao {
E getServiceModelInfo(String vspId, Version version, String name);
- void storeExternalArtifact(ServiceArtifact serviceArtifact);
-
- List<String> getServiceModelContentNames();
+ void deleteAll(String vspId, Version version);
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java
index c4c4cb19b7..d132a5158b 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/dao/ServiceTemplateDaoInter.java
@@ -43,4 +43,6 @@ public interface ServiceTemplateDaoInter extends VersionableDao {
String getBase(String vspId, Version version);
+ void deleteAll(String vspId, Version version);
+
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
index 87e25613fc..0e30c749fc 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceArtifactEntity.java
@@ -27,6 +27,13 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
+import org.openecomp.sdc.logging.types.LoggerConstants;
+import org.openecomp.sdc.logging.types.LoggerErrorCode;
+import org.openecomp.sdc.logging.types.LoggerErrorDescription;
+import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.versioning.dao.types.Version;
import java.io.IOException;
@@ -70,7 +77,11 @@ public class EnrichedServiceArtifactEntity implements ServiceElementEntity {
try {
this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
- } catch (IOException ioException) {
+ } catch (IOException ioException) { //todo fix typo in Traget
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+ LoggerTragetServiceName.CREATE_SERVICE_ENRICH_ARTIFACT, ErrorLevel.ERROR.name(),
+ LoggerErrorCode.DATA_ERROR.getErrorCode(),
+ LoggerErrorDescription.CREATE_ENRICH_SERVICE_ARTIFACT);
throw new RuntimeException(ioException);
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
index 526a901e47..0ebd27fe40 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/EnrichedServiceTemplateEntity.java
@@ -27,6 +27,13 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
+import org.openecomp.sdc.logging.types.LoggerConstants;
+import org.openecomp.sdc.logging.types.LoggerErrorCode;
+import org.openecomp.sdc.logging.types.LoggerErrorDescription;
+import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.versioning.dao.types.Version;
import java.io.IOException;
@@ -56,13 +63,13 @@ public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
@Column(name = "content_data")
public ByteBuffer contentData;
-
@Column(name = "base_name")
private String baseName;
public EnrichedServiceTemplateEntity() {
}
+
/**
* Instantiates a new Enriched service template entity.
*
@@ -76,12 +83,15 @@ public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
try {
this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
} catch (IOException ioException) {
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+ LoggerTragetServiceName.CREATE_ENRICH_SERVICE_TEMPLATE, ErrorLevel.ERROR.name(),
+ LoggerErrorCode.DATA_ERROR.getErrorCode(),
+ LoggerErrorDescription.CREATE_ENRICH_SERVICE_TEMPLATE);
throw new RuntimeException(ioException);
}
}
-
public String getBaseName() {
return baseName;
}
@@ -90,7 +100,6 @@ public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
this.baseName = baseName;
}
-
@Override
public String getEntityType() {
return ENTITY_TYPE;
@@ -135,7 +144,6 @@ public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
this.contentData = contentData;
}
-
/**
* Gets service template.
*
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
index fad3e604d6..7d1df0e91b 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifact.java
@@ -20,8 +20,8 @@
package org.openecomp.core.model.types;
-public class ServiceArtifact extends ServiceElement {
+public class ServiceArtifact extends ServiceElement {
public ServiceArtifact() {
super();
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
index c5dfeced8a..8abbbd3c82 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceArtifactEntity.java
@@ -27,6 +27,12 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
+import org.openecomp.sdc.logging.types.LoggerConstants;
+import org.openecomp.sdc.logging.types.LoggerErrorCode;
+import org.openecomp.sdc.logging.types.LoggerErrorDescription;
+import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.versioning.dao.types.Version;
import java.io.IOException;
@@ -71,6 +77,10 @@ public class ServiceArtifactEntity implements ServiceElementEntity {
try {
this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
} catch (IOException ioException) {
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+ LoggerTragetServiceName.CREATE_SERVICE_ARTIFACT, ErrorLevel.ERROR.name(),
+ LoggerErrorCode.DATA_ERROR.getErrorCode(),
+ LoggerErrorDescription.CREATE_SERVICE_ARTIFACT);
throw new RuntimeException(ioException);
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
index 114cf03a39..541a66f77d 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceElement.java
@@ -25,6 +25,7 @@ import org.openecomp.sdc.versioning.dao.types.Version;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
+
public class ServiceElement {
private String vspId;
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
index aa0285d6a9..9560ba306c 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplate.java
@@ -20,18 +20,17 @@
package org.openecomp.core.model.types;
+
public class ServiceTemplate extends ServiceElement {
private String baseName;
public ServiceTemplate() {
}
-
public String getBaseName() {
return baseName;
}
-
public void setBaseName(String baseName) {
this.baseName = baseName;
}
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
index f29334678f..4897c2f076 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ServiceTemplateEntity.java
@@ -27,6 +27,13 @@ import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
+import org.openecomp.sdc.logging.types.LoggerConstants;
+import org.openecomp.sdc.logging.types.LoggerErrorCode;
+import org.openecomp.sdc.logging.types.LoggerErrorDescription;
+import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
import org.openecomp.sdc.versioning.dao.types.Version;
import java.io.IOException;
@@ -56,7 +63,6 @@ public class ServiceTemplateEntity implements ServiceElementEntity {
@Column(name = "content_data")
public ByteBuffer contentData;
-
@Column(name = "base_name")
private String baseName;
@@ -76,12 +82,15 @@ public class ServiceTemplateEntity implements ServiceElementEntity {
try {
this.contentData = ByteBuffer.wrap(ByteStreams.toByteArray(entity.getContent()));
} catch (IOException ioException) {
+ MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+ LoggerTragetServiceName.CREATE_SERVICE_TEMPLATE, ErrorLevel.ERROR.name(),
+ LoggerErrorCode.DATA_ERROR.getErrorCode(),
+ LoggerErrorDescription.CREATE_SERVICE_TEMPLATE);
throw new RuntimeException(ioException);
}
}
-
public String getBaseName() {
return baseName;
}
@@ -90,7 +99,6 @@ public class ServiceTemplateEntity implements ServiceElementEntity {
this.baseName = baseName;
}
-
@Override
public String getEntityType() {
return ENTITY_TYPE;
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json
index c228b29c57..4a56c8c716 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/resources/factoryConfiguration.json
@@ -1,8 +1,8 @@
{
- "org.openecomp.core.model.dao.ServiceModelDaoFactory":"org.openecomp.sdc.model.impl.ServiceModelDaoFactoryImpl",
- "org.openecomp.core.model.dao.ServiceTemplateDaoFactory":"org.openecomp.sdc.model.impl.ServiceTemplateDaoCassandraFactoryImpl",
- "org.openecomp.core.model.dao.ServiceArtifactDaoFactory":"org.openecomp.sdc.model.impl.ServiceArtifactDaoCassandraFactoryImpl",
- "org.openecomp.core.model.dao.EnrichedServiceModelDaoFactory":"org.openecomp.sdc.model.impl.EnrichedServiceModelDaoFactoryImpl",
- "org.openecomp.core.model.dao.EnrichedServiceTemplateDaoFactory":"org.openecomp.sdc.model.impl.EnrichedServiceTemplateDaoCassandraFactoryImpl",
- "org.openecomp.core.model.dao.EnrichedServiceArtifactDaoFactory":"org.openecomp.sdc.model.impl.EnrichedServiceArtifactDaoCassandraFactoryImpl"
+ "org.openecomp.core.model.dao.ServiceModelDaoFactory": "org.openecomp.sdc.model.impl.ServiceModelDaoFactoryImpl",
+ "org.openecomp.core.model.dao.ServiceTemplateDaoFactory": "org.openecomp.sdc.model.impl.ServiceTemplateDaoCassandraFactoryImpl",
+ "org.openecomp.core.model.dao.ServiceArtifactDaoFactory": "org.openecomp.sdc.model.impl.ServiceArtifactDaoCassandraFactoryImpl",
+ "org.openecomp.core.model.dao.EnrichedServiceModelDaoFactory": "org.openecomp.sdc.model.impl.EnrichedServiceModelDaoFactoryImpl",
+ "org.openecomp.core.model.dao.EnrichedServiceTemplateDaoFactory": "org.openecomp.sdc.model.impl.EnrichedServiceTemplateDaoCassandraFactoryImpl",
+ "org.openecomp.core.model.dao.EnrichedServiceArtifactDaoFactory": "org.openecomp.sdc.model.impl.EnrichedServiceArtifactDaoCassandraFactoryImpl"
} \ No newline at end of file