summaryrefslogtreecommitdiffstats
path: root/ECOMP-PDP/src
diff options
context:
space:
mode:
authorTarun Tej Velaga <tt3868@att.com>2017-07-24 17:13:43 +0000
committerTarun Tej Velaga <tt3868@att.com>2017-07-25 14:23:59 +0000
commite92ff832cf993db876f22b2d27562fedf59f5043 (patch)
tree47429eeaaf4241905d7ea1f71dbdb5c2d0504618 /ECOMP-PDP/src
parent570290dc6ba8198e653022c2f6f8e5d01cfa8d1b (diff)
[Policy-52, Policy-92, Policy-93] Policy Enhancements and bugfixes
Change-Id: I5675cf4527e17963b3142cf7184c0df31a766197 Signed-off-by: Tarun Tej Velaga <tt3868@att.com>
Diffstat (limited to 'ECOMP-PDP/src')
-rw-r--r--ECOMP-PDP/src/main/java/org/openecomp/policy/xacml/pdp/std/functions/FunctionDefinitionCustomRegexpMatch.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/ECOMP-PDP/src/main/java/org/openecomp/policy/xacml/pdp/std/functions/FunctionDefinitionCustomRegexpMatch.java b/ECOMP-PDP/src/main/java/org/openecomp/policy/xacml/pdp/std/functions/FunctionDefinitionCustomRegexpMatch.java
index 806df2193..5b84ab0f6 100644
--- a/ECOMP-PDP/src/main/java/org/openecomp/policy/xacml/pdp/std/functions/FunctionDefinitionCustomRegexpMatch.java
+++ b/ECOMP-PDP/src/main/java/org/openecomp/policy/xacml/pdp/std/functions/FunctionDefinitionCustomRegexpMatch.java
@@ -41,7 +41,7 @@ import com.att.research.xacmlatt.pdp.std.functions.FunctionDefinitionBase;
* and returning a <code>Boolean</code> for whether the regular expression matches the string representation of the first argument.
*
*
- * @version $Revision: 0.1 $
+ * @version $Revision: 0.2 $
*
* @param <I> the java class for the data type of the function Input arguments
*/
@@ -107,7 +107,15 @@ public class FunctionDefinitionCustomRegexpMatch<I> extends FunctionDefinitionBa
regexpValue = elementValueString.substring(0,(elementValueString.length()- regexpValue.length()));
elementValueString = elementValueString.substring(regexpValue.length(),(elementValueString.length()));
//
-
+ // Supporting multiple values in the element and be able to query them.
+ if(elementValueString.contains(",")){
+ String[] elements = elementValueString.split(",");
+ for(int i=0; i<elements.length; i++){
+ if(elements[i].trim().matches(regexpValue)) {
+ return ER_TRUE;
+ }
+ }
+ }
if (elementValueString.matches(regexpValue)) {
return ER_TRUE;
} else {