1 17 package org.apache.servicemix.jbi.management.task; 18 19 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean; 20 import org.apache.tools.ant.BuildException; 21 import org.apache.tools.ant.Project; 22 23 28 public class ListServiceEnginesTask extends JbiTask { 29 30 private String state; 31 private String serviceAssemblyName; 32 private String sharedLibraryName; 33 private String xmlOutput; 34 35 38 public String isXmlOutput() { 39 return xmlOutput; 40 } 41 42 45 public void setXmlOutput(String xmlOutput) { 46 this.xmlOutput = xmlOutput; 47 } 48 49 50 54 public String getState() { 55 return state; 56 } 57 58 62 public void setState(String state) { 63 this.state = state; 64 } 65 66 70 public String getServiceAssemblyName() { 71 return serviceAssemblyName; 72 } 73 74 78 public void setServiceAssemblyName(String serviceAssemblyName) { 79 this.serviceAssemblyName = serviceAssemblyName; 80 } 81 82 86 public String getSharedLibraryName() { 87 return sharedLibraryName; 88 } 89 90 94 public void setSharedLibraryName(String sharedLibraryName) { 95 this.sharedLibraryName = sharedLibraryName; 96 } 97 98 99 104 public void doExecute(AdminCommandsServiceMBean acs) throws Exception { 105 String result = acs.listComponents(false, true, true, getState(), getSharedLibraryName(), getServiceAssemblyName()); 106 if (xmlOutput != null) { 107 getProject().setProperty(xmlOutput, result); 108 } 109 log(result, Project.MSG_WARN); 110 } 111 112 } 113 | Popular Tags |