From 6e75dd1bfd8c1a4625c9c61a60883d28ca88fff7 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Thu, 29 Jul 2021 10:14:19 +0100 Subject: Handle VSP package upload for multi-model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iceca3f160eaeb1a6431fc3c5bbab92847e95ae4d Issue-ID: SDC-3667 Signed-off-by: André Schmid --- .../core/model/dao/EnrichedServiceModelDao.java | 6 ++-- .../openecomp/core/model/dao/ServiceModelDao.java | 11 +++++-- .../model/types/ToscaServiceModelProperty.java | 35 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ToscaServiceModelProperty.java (limited to 'openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src') 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 033c4ee11c..685abb7109 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 @@ -22,10 +22,8 @@ package org.openecomp.core.model.dao; import org.openecomp.core.model.types.ServiceArtifact; import org.openecomp.sdc.versioning.dao.VersionableDao; -public interface EnrichedServiceModelDao extends VersionableDao, ServiceModelDao { +public interface EnrichedServiceModelDao extends VersionableDao, ServiceModelDao { void storeExternalArtifact(ServiceArtifact serviceArtifact); - //List getExternalArtifacts(String vspId, Version version); - //List getServiceModelContentNames(); -} +} 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 7908711023..d3c1b8b3e9 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 @@ -22,14 +22,19 @@ package org.openecomp.core.model.dao; import org.openecomp.sdc.versioning.dao.VersionableDao; import org.openecomp.sdc.versioning.dao.types.Version; -public interface ServiceModelDao extends VersionableDao { +public interface ServiceModelDao extends VersionableDao { M getServiceModel(String vspId, Version version); + /** + * Store a service model. + * + * @param vspId the Vendor Software Product id + * @param version the Vendor Software Product version + * @param serviceModel the service model to store + */ void storeServiceModel(String vspId, Version version, M serviceModel); - E getServiceModelInfo(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/types/ToscaServiceModelProperty.java b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ToscaServiceModelProperty.java new file mode 100644 index 0000000000..e344bf63ff --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main/java/org/openecomp/core/model/types/ToscaServiceModelProperty.java @@ -0,0 +1,35 @@ +/* + * - + * ============LICENSE_START======================================================= + * Copyright (C) 2021 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.openecomp.core.model.types; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum ToscaServiceModelProperty { + BASE("base"), + MODELS("models"); + + private final String name; +} + -- cgit 1.2.3-korg