All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tibco.bw.maven.plugin.test.coverage.ProcessParser Maven / Gradle / Ivy

Go to download

Plugin Code for Apache Maven and TIBCO BusinessWorks™. This is the Maven Plugin for BW6 and BWCE Build.

There is a newer version: 2.9.9
Show newest version
package com.tibco.bw.maven.plugin.test.coverage;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class ProcessParser extends DefaultHandler
{
	
	private ProcessCoverage  coverage = new ProcessCoverage();
	
	
	@Override
	public void startElement(String namespaceURI, String localName, String qName, Attributes attr) throws SAXException 
	{
		String name = qName.toString();
		
		switch( name )
		{
			case "bpws:process" :
			
				String processName = attr.getValue("name");
				coverage.setProcessName(processName);
				
			break;
			
			case "tibex:ProcessInfo":
				String callable = attr.getValue("callable");
				coverage.setSubProcess( Boolean.parseBoolean(callable));
			break;
			
			case "bpws:link":
				String transition = attr.getValue("name");
				coverage.getTransitions().add(transition);
				
			break;
			
			case "tibex:activityExtension":
			case "tibex:receiveEvent":
			case "tibex:extActivity":	
				String activity = attr.getValue("name");
				coverage.getActivities().add( activity );
			break;
		}
				
	}


	public ProcessCoverage getCoverage() {
		return coverage;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy