1 17 18 package org.apache.geronimo.plugin.packaging; 19 20 import java.io.File ; 21 import javax.management.MalformedObjectNameException ; 22 import javax.management.ObjectName ; 23 24 29 public abstract class AbstractDistributor { 30 private String user; 31 private String password; 32 private String url; 33 private File artifact; 34 protected ObjectName storeName; 35 36 public String getUser() { 37 return user; 38 } 39 40 45 public void setUser(String user) { 46 this.user = user; 47 } 48 49 public String getPassword() { 50 return password; 51 } 52 53 58 public void setPassword(String password) { 59 this.password = password; 60 } 61 62 public String getUrl() { 63 return url; 64 } 65 66 71 public void setUrl(String url) { 72 this.url = url; 73 } 74 75 public File getArtifact() { 76 return artifact; 77 } 78 79 84 public void setArtifact(File artifact) { 85 this.artifact = artifact; 86 } 87 88 public String getStoreName() { 89 return storeName.toString(); 90 } 91 92 99 public void setStoreName(String storeName) { 100 try { 101 this.storeName = new ObjectName (storeName); 102 } catch (MalformedObjectNameException e) { 103 throw new IllegalArgumentException ("Invalid storeName: " + storeName); 104 } 105 } 106 107 public abstract void execute() throws Exception ; 108 } 109 | Popular Tags |