aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java2
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java31
2 files changed, 16 insertions, 17 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java
index 544f030d91..85453e33d2 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/BaseBusinessLogic.java
@@ -120,7 +120,7 @@ public abstract class BaseBusinessLogic {
protected IGroupInstanceOperation groupInstanceOperation;
protected InterfaceLifecycleOperation interfaceLifecycleTypeOperation;
protected PolicyTypeOperation policyTypeOperation;
- protected ArtifactsOperations artifactToscaOperation;
+ protected ArtifactsOperations artifactToscaOperation;
protected UserValidations userValidations;
DataTypeValidatorConverter dataTypeValidatorConverter = DataTypeValidatorConverter.getInstance();
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
index 3c770d15aa..27daaf2aae 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
@@ -7,9 +7,9 @@
* 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.
@@ -96,22 +96,21 @@ public class NodeFilterValidator {
final List<String> uiConstraints,
final NodeFilterConstraintAction action) {
try {
- for (final String uiConstraint : uiConstraints) {
- if (NodeFilterConstraintAction.ADD != action && NodeFilterConstraintAction.UPDATE != action) {
- break;
- }
- final UIConstraint constraint = new ConstraintConvertor().convert(uiConstraint);
- if (ConstraintConvertor.PROPERTY_CONSTRAINT.equals(constraint.getSourceType())) {
- final Either<Boolean, ResponseFormat> booleanResponseFormatEither =
+ if (NodeFilterConstraintAction.ADD == action || NodeFilterConstraintAction.UPDATE == action) {
+ for (final String uiConstraint : uiConstraints) {
+ final UIConstraint constraint = new ConstraintConvertor().convert(uiConstraint);
+ if (ConstraintConvertor.PROPERTY_CONSTRAINT.equals(constraint.getSourceType())) {
+ final Either<Boolean, ResponseFormat> booleanResponseFormatEither =
validatePropertyConstraint(parentComponent, componentInstanceId, constraint);
- if (booleanResponseFormatEither.isRight()) {
- return booleanResponseFormatEither;
- }
- } else if (ConstraintConvertor.STATIC_CONSTRAINT.equals(constraint.getSourceType())) {
- final Either<Boolean, ResponseFormat> booleanResponseFormatEither =
+ if (booleanResponseFormatEither.isRight()) {
+ return booleanResponseFormatEither;
+ }
+ } else if (ConstraintConvertor.STATIC_CONSTRAINT.equals(constraint.getSourceType())) {
+ final Either<Boolean, ResponseFormat> booleanResponseFormatEither =
validateStaticValueAndOperator(parentComponent, componentInstanceId, constraint);
- if (booleanResponseFormatEither.isRight()) {
- return booleanResponseFormatEither;
+ if (booleanResponseFormatEither.isRight()) {
+ return booleanResponseFormatEither;
+ }
}
}
}