diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r-- | bpmn/MSOCommonBPMN/pom.xml | 2 | ||||
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml index f0b7371a75..f589f03b83 100644 --- a/bpmn/MSOCommonBPMN/pom.xml +++ b/bpmn/MSOCommonBPMN/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.openecomp.so</groupId> <artifactId>bpmn</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> </parent> <artifactId>MSOCommonBPMN</artifactId> <name>MSOCommonBPMN</name> diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy index 94b423669d..06992455a2 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/MsoUtils.groovy @@ -59,6 +59,21 @@ class MsoUtils { }
return nodes
}
+ /**
+ * Note: this uses XmlParser instead of XmlSlurper, thus it is not as
+ * efficient because it instantiates the whole DOM tree.
+ * @param xmlInput
+ * @param element
+ * @return a list of Nodes, or {@code null} if <i>xmlInput</i> is {@code null}
+ */
+ def getMultNodeObjects(xmlInput, element){
+ def nodes=null
+ if(xmlInput!=null){
+ def xml= new XmlParser().parseText(xmlInput)
+ nodes = xml.'**'.findAll{ node-> node.name() == element }
+ }
+ return nodes
+ }
def getNodeText1(xmlInput,element){
def rtn=null
if(xmlInput!=null){
|