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 ListSharedLibrariesTask extends JbiTask { 29 30 private String componentName; 31 private String sharedLibraryName; 32 private String xmlOutput; 33 34 37 public String isXmlOutput() { 38 return xmlOutput; 39 } 40 41 44 public void setXmlOutput(String xmlOutput) { 45 this.xmlOutput = xmlOutput; 46 } 47 48 49 53 public String getComponentName() { 54 return componentName; 55 } 56 57 61 public void setComponentName(String componentName) { 62 this.componentName = componentName; 63 } 64 65 69 public String getSharedLibraryName() { 70 return sharedLibraryName; 71 } 72 73 77 public void setSharedLibraryName(String sharedLibraryName) { 78 this.sharedLibraryName = sharedLibraryName; 79 } 80 81 86 public void doExecute(AdminCommandsServiceMBean acs) throws Exception { 87 String result = acs.listSharedLibraries(getComponentName(), getSharedLibraryName()); 88 if (xmlOutput != null) { 89 getProject().setProperty(xmlOutput, result); 90 } 91 log(result, Project.MSG_WARN); 92 } 93 94 } 95 | Popular Tags |