2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.services.composition;
23 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
24 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.CompositionEntity;
25 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
26 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
27 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
28 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionData;
29 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
30 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityValidationData;
31 import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.SchemaTemplateContext;
32 import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.SchemaTemplateInput;
33 import org.openecomp.sdc.versioning.dao.types.Version;
35 import java.util.Collection;
39 public interface CompositionEntityDataManager {
41 Map<CompositionEntityId, Collection<String>> validateEntitiesQuestionnaire();
43 void addEntity(CompositionEntity entity, SchemaTemplateInput schemaTemplateInput);
45 CompositionEntityValidationData validateEntity(CompositionEntity entity,
46 SchemaTemplateContext schemaTemplateContext,
47 SchemaTemplateInput schemaTemplateInput);
51 void addErrorsToTrees(Map<CompositionEntityId, Collection<String>> errors);
53 Set<CompositionEntityValidationData> getEntityListWithErrors();
55 Collection<CompositionEntityValidationData> getTrees();
57 void saveCompositionData(String vspId, Version version, CompositionData compositionData);
59 Set<CompositionEntityValidationData> getAllErrorsByVsp(String vspId);
61 void saveComponents(String vspId, Version version, CompositionData compositionData,
62 Map<String, String> networkIdByName);
64 void saveNicsByComponent(String vspId, Version version,
65 Map<String, String> networkIdByName, Component component,
68 Map<String, String> saveNetworks(String vspId, Version version,
69 CompositionData compositionData);
71 NetworkEntity createNetwork(NetworkEntity network);
73 ComponentEntity createComponent(ComponentEntity component);
75 NicEntity createNic(NicEntity nic);