1 package org.openecomp.sdc.be.components.property;
4 import org.openecomp.sdc.be.model.Component;
5 import org.openecomp.sdc.be.model.ComponentInstancePropInput;
6 import org.openecomp.sdc.be.model.InputDefinition;
7 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
11 public interface PropertyDeclarator {
14 * creates a list of inputs from the given list of properties and updates the properties accordingly
15 * @param component the container
16 * @param propertiesOwnerId the id of the owner of the properties to declare (e.g ComponentInstance, Policy, Group etc)
17 * @param propsToDeclare the list of properties that are being declared as inputs
18 * @return the list of inputs that were created from the given properties
20 Either<List<InputDefinition>, StorageOperationStatus> declarePropertiesAsInputs(Component component, String propertiesOwnerId, List<ComponentInstancePropInput> propsToDeclare);
23 * returns the values of declared properties to each original state before it was declared as an input.
24 * this function is to be called when an input, that was created by declaring a property, is deleted.
25 * @param component the container of the input to be deleted
26 * @param input the input to be deleted
28 StorageOperationStatus unDeclarePropertiesAsInputs(Component component, InputDefinition input);