com.tibco.bw.maven.plugin.test.helpers.BWTestConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bw6-maven-plugin Show documentation
Show all versions of bw6-maven-plugin Show documentation
Plugin Code for Apache Maven and TIBCO BusinessWorks™.
This is the Maven Plugin for BW6 and BWCE Build.
package com.tibco.bw.maven.plugin.test.helpers;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.io.FileUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectDependenciesResolver;
public class BWTestConfig
{
public static BWTestConfig INSTANCE = new BWTestConfig();
private File configDir;
private Process engineProcess;
private List launchConfig;
private Map> testCasesList = new HashMap<>();
private Map>> testSuiteMap = new HashMap<>();
private String tibcoHome;
private String bwHome;
private String testSuiteName;
private MavenSession session;
private MavenProject project;
ProjectDependenciesResolver resolver;
private Log logger;
private Set ESMDirectories = new HashSet<>();
private boolean runESMTest;
private String esmTestSuiteName;
public HashMap testCaseWithProcessNameMap = new HashMap<>();
public Map> testSuiteNameList = new HashMap<>();
Map userTestSuiteNames = new HashMap();
private Map> esmTestCasesList = new HashMap<>();
public HashMap>> esmTestSuiteMap = new HashMap<>();
public Map> esmTestSuiteNameList = new HashMap<>();
Map userESMTestSuiteNames = new HashMap();
private BWTestConfig()
{
}
public void reset()
{
INSTANCE = new BWTestConfig();
}
public void init( String tibcoHome , String bwHome , MavenSession session , MavenProject project , Log logger ) throws Exception
{
this.tibcoHome = tibcoHome;
this.session = session;
this.project = project;
this.bwHome = bwHome;
this.logger = logger;
initConfig();
}
private void initConfig() throws Exception
{
String temp = System.getProperty( "java.io.tmpdir" );
File file = new File( temp );
configDir = new File( file , "bwconfig");
configDir.mkdir();
FileUtils.cleanDirectory(configDir );
}
public File getConfigDir()
{
return configDir;
}
public void setConfigDir(File configDir)
{
this.configDir = configDir;
}
public Process getEngineProcess()
{
return engineProcess;
}
public void setEngineProcess(Process engineProcess)
{
this.engineProcess = engineProcess;
}
public List getLaunchConfig()
{
return launchConfig;
}
public void setLaunchConfig(List launchConfig)
{
this.launchConfig = launchConfig;
}
public String getTibcoHome()
{
return tibcoHome;
}
public void setTibcoHome(String tibcoHome)
{
this.tibcoHome = tibcoHome;
}
public String getBwHome()
{
return bwHome;
}
public void setBwHome(String bwHome)
{
this.bwHome = bwHome;
}
public MavenSession getSession()
{
return session;
}
public void setSession(MavenSession session)
{
this.session = session;
}
public MavenProject getProject()
{
return project;
}
public void setProject(MavenProject project)
{
this.project = project;
}
public Log getLogger()
{
return logger;
}
public void setLogger(Log logger)
{
this.logger = logger;
}
public String getTestSuiteName() {
return testSuiteName;
}
public void setTestSuiteName(String testSuiteName) {
this.testSuiteName = testSuiteName;
}
public List getTestCasesList(MavenProject project) {
return testCasesList.get(project);
}
public void setTestCasesList(MavenProject project, List testCasesList) {
this.testCasesList.put(project, testCasesList);
}
public Map> getTestSuiteMap(MavenProject project) {
return testSuiteMap.get(project);
}
public void setTestSuiteMap(MavenProject project, Map> testSuiteMap) {
this.testSuiteMap.put(project, testSuiteMap);
}
public HashMap getTestCaseWithProcessNameMap() {
return testCaseWithProcessNameMap;
}
public void setTestCaseWithProcessNameMap(
HashMap testCaseWithProcessNameMap) {
this.testCaseWithProcessNameMap = testCaseWithProcessNameMap;
}
public List getTestSuiteNameList(MavenProject project) {
return testSuiteNameList.get(project);
}
public void setTestSuiteNameList(MavenProject project, List testSuiteNameList) {
this.testSuiteNameList.put(project, testSuiteNameList);
}
public Map getUserTestSuiteNames() {
return userTestSuiteNames;
}
public void setUserTestSuiteNames(Map userTestSuiteNames) {
this.userTestSuiteNames = userTestSuiteNames;
}
public ProjectDependenciesResolver getResolver() {
return resolver;
}
public void setResolver(ProjectDependenciesResolver resolver) {
this.resolver = resolver;
}
public String getEsmTestSuiteName() {
return esmTestSuiteName;
}
public void setEsmTestSuiteName(String esmTestSuiteName) {
this.esmTestSuiteName = esmTestSuiteName;
}
public Set getESMDirectories() {
return ESMDirectories;
}
public void setESMDirectories(File ESMDir) {
this.ESMDirectories.add(ESMDir);
}
public List getEsmTestCasesList(String fileName) {
return esmTestCasesList.get(fileName);
}
public void setEsmTestCasesList(String dirName , List file) {
esmTestCasesList.put(dirName, file);
}
public boolean getRunESMTest() {
return runESMTest;
}
public void setRunESMTest(boolean runESMTest) {
this.runESMTest = runESMTest;
}
public Map getUserESMTestSuiteNames() {
return userESMTestSuiteNames;
}
public void setUserESMTestSuiteNames(Map userESMTestSuiteNames) {
this.userESMTestSuiteNames = userESMTestSuiteNames;
}
public List getEsmTestSuiteNameList(String esmDir) {
return esmTestSuiteNameList.get(esmDir);
}
public void setEsmTestSuiteNameList(String esmDir, List esmTestSuiteList) {
esmTestSuiteNameList.put(esmDir, esmTestSuiteList);
}
public Map > getEsmTestSuiteMap(String esmDir) {
return esmTestSuiteMap.get(esmDir);
}
public HashMap>> getEsmTestSuites() {
return esmTestSuiteMap;
}
public void setEsmTestSuiteMap(String esmDir, Map> esmTestSuite) {
this.esmTestSuiteMap.put(esmDir, esmTestSuite);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy