summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.java92
1 files changed, 44 insertions, 48 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.java
index 06d96bc3c1..fd0d733a65 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/PropertyRegexMatcher.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.
@@ -17,67 +17,63 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdc.translator.datatypes.heattotosca;
-import org.apache.commons.collections.CollectionUtils;
-
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
+import org.apache.commons.collections.CollectionUtils;
public class PropertyRegexMatcher {
- private String propertyName;
- private List<Pattern> regexPatterns;
- private String stringToSearchForPropertyValue;
-
- /**
- * Constractor for creating PropertyRegexMatcher.
- * @param propertyName property name
- * @param regexPatterns regex pattern
- * @param stringToSearchForPropertyValue string for search in the property value manipulation
- */
- public PropertyRegexMatcher(String propertyName,
- List<String> regexPatterns,
- String stringToSearchForPropertyValue) {
- this.propertyName = propertyName;
- setRegex(regexPatterns);
- this.stringToSearchForPropertyValue = stringToSearchForPropertyValue;
- }
- public String getPropertyName() {
- return propertyName;
- }
+ private String propertyName;
+ private List<Pattern> regexPatterns;
+ private String stringToSearchForPropertyValue;
- public void setPropertyName(String propertyName) {
- this.propertyName = propertyName;
- }
+ /**
+ * Constractor for creating PropertyRegexMatcher.
+ *
+ * @param propertyName property name
+ * @param regexPatterns regex pattern
+ * @param stringToSearchForPropertyValue string for search in the property value manipulation
+ */
+ public PropertyRegexMatcher(String propertyName, List<String> regexPatterns, String stringToSearchForPropertyValue) {
+ this.propertyName = propertyName;
+ setRegex(regexPatterns);
+ this.stringToSearchForPropertyValue = stringToSearchForPropertyValue;
+ }
- /**
- * Sets regex.
- *
- * @param regexPatterns the regex patterns
- */
- public void setRegex(List<String> regexPatterns) {
- if (CollectionUtils.isEmpty(this.regexPatterns)) {
- this.regexPatterns = new ArrayList<>();
+ public String getPropertyName() {
+ return propertyName;
}
- for (String regexPattern : regexPatterns) {
- this.regexPatterns.add(Pattern.compile(regexPattern));
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
}
- }
- public List<Pattern> getRegexPatterns() {
- return regexPatterns;
- }
+ /**
+ * Sets regex.
+ *
+ * @param regexPatterns the regex patterns
+ */
+ public void setRegex(List<String> regexPatterns) {
+ if (CollectionUtils.isEmpty(this.regexPatterns)) {
+ this.regexPatterns = new ArrayList<>();
+ }
+ for (String regexPattern : regexPatterns) {
+ this.regexPatterns.add(Pattern.compile(regexPattern));
+ }
+ }
- public String getStringToSearchForPropertyValue() {
- return stringToSearchForPropertyValue;
- }
+ public List<Pattern> getRegexPatterns() {
+ return regexPatterns;
+ }
- public void setStringToSearchForPropertyValue(String stringToSearchForPropertyValue) {
- this.stringToSearchForPropertyValue = stringToSearchForPropertyValue;
- }
+ public String getStringToSearchForPropertyValue() {
+ return stringToSearchForPropertyValue;
+ }
+ public void setStringToSearchForPropertyValue(String stringToSearchForPropertyValue) {
+ this.stringToSearchForPropertyValue = stringToSearchForPropertyValue;
+ }
}