diff options
author | andre.schmid <andre.schmid@est.tech> | 2021-07-29 10:14:19 +0100 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2021-08-17 08:12:35 +0000 |
commit | 6e75dd1bfd8c1a4625c9c61a60883d28ca88fff7 (patch) | |
tree | a489c38d90b399e7c446e082c977aa3d4974ba94 /openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main | |
parent | 855a434b4f6555aa43091cdaeef14a33e418458d (diff) |
Handle VSP package upload for multi-model
Change-Id: Iceca3f160eaeb1a6431fc3c5bbab92847e95ae4d
Issue-ID: SDC-3667
Signed-off-by: André Schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/src/main')
3 files changed, 45 insertions, 7 deletions
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<M, E> extends VersionableDao, ServiceModelDao<M, E> { +public interface EnrichedServiceModelDao<M> extends VersionableDao, ServiceModelDao<M> { void storeExternalArtifact(ServiceArtifact serviceArtifact); - //List<ServiceArtifact> getExternalArtifacts(String vspId, Version version); - //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/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<M, E> extends VersionableDao { +public interface ServiceModelDao<M> 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; +} + |