aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java
index 160bf890b7..c716e24440 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/ComponentInstancePropertyDeclarator.java
@@ -1,6 +1,11 @@
package org.openecomp.sdc.be.components.property;
import fj.data.Either;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import org.apache.commons.collections.CollectionUtils;
import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
@@ -14,8 +19,6 @@ import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
import org.openecomp.sdc.be.model.operations.impl.PropertyOperation;
import org.openecomp.sdc.common.log.wrappers.Logger;
-import java.util.*;
-
@org.springframework.stereotype.Component
public class ComponentInstancePropertyDeclarator extends DefaultPropertyDeclarator<ComponentInstance, ComponentInstanceProperty> {
@@ -30,25 +33,25 @@ public class ComponentInstancePropertyDeclarator extends DefaultPropertyDeclarat
}
@Override
- ComponentInstanceProperty createDeclaredProperty(PropertyDataDefinition prop) {
+ public ComponentInstanceProperty createDeclaredProperty(PropertyDataDefinition prop) {
return new ComponentInstanceProperty(prop);
}
@Override
- Either<?, StorageOperationStatus> updatePropertiesValues(Component component, String cmptInstanceId, List<ComponentInstanceProperty> properties) {
+ public Either<?, StorageOperationStatus> updatePropertiesValues(Component component, String cmptInstanceId, List<ComponentInstanceProperty> properties) {
log.debug("#updatePropertiesValues - updating component instance properties for instance {} on component {}", cmptInstanceId, component.getUniqueId());
Map<String, List<ComponentInstanceProperty>> instProperties = Collections.singletonMap(cmptInstanceId, properties);
return toscaOperationFacade.addComponentInstancePropertiesToComponent(component, instProperties);
}
@Override
- Optional<ComponentInstance> resolvePropertiesOwner(Component component, String propertiesOwnerId) {
+ public Optional<ComponentInstance> resolvePropertiesOwner(Component component, String propertiesOwnerId) {
log.debug("#resolvePropertiesOwner - fetching component instance {} of component {}", propertiesOwnerId, component.getUniqueId());
return component.getComponentInstanceById(propertiesOwnerId);
}
@Override
- void addPropertiesListToInput(ComponentInstanceProperty declaredProp, InputDefinition input) {
+ public void addPropertiesListToInput(ComponentInstanceProperty declaredProp, InputDefinition input) {
List<ComponentInstanceProperty> propertiesList = input.getProperties();
if(propertiesList == null) {
propertiesList = new ArrayList<>(); // adding the property with the new value for UI