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 ListServiceAssembliesTask extends JbiTask { 29 30 private String state; 31 private String componentName; 32 private String serviceAssemblyName; 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 getComponentName() { 71 return componentName; 72 } 73 74 78 public void setComponentName(String componentName) { 79 this.componentName = componentName; 80 } 81 82 86 public String getServiceAssemblyName() { 87 return serviceAssemblyName; 88 } 89 90 94 public void setServiceAssemblyName(String serviceAssemblynname) { 95 this.serviceAssemblyName = serviceAssemblynname; 96 } 97 98 103 public void doExecute(AdminCommandsServiceMBean acs) throws Exception { 104 String result = acs.listServiceAssemblies(getState(), getComponentName(), getServiceAssemblyName()); 105 if (xmlOutput != null) { 106 getProject().setProperty(xmlOutput, result); 107 } 108 log(result, Project.MSG_WARN); 109 } 110 111 } | Popular Tags |