1 22 package org.objectweb.petals.jbi.management.systemstate; 23 24 import org.objectweb.petals.util.StringHelper; 25 26 31 public class ServiceAssemblyState { 32 private String archiveURL; 33 34 private String installURL; 35 36 private String lifecycleState; 37 38 private String name; 39 40 public ServiceAssemblyState() { 41 super(); 42 } 43 44 public ServiceAssemblyState(String name, String installURL, String zipURL, 45 String lifecycleState) { 46 super(); 47 this.name = name; 48 this.installURL = installURL; 49 this.archiveURL = zipURL; 50 this.lifecycleState = lifecycleState; 51 } 52 53 public boolean equals(Object o) { 54 if (o instanceof ServiceAssemblyState) { 55 ServiceAssemblyState cc = (ServiceAssemblyState) o; 56 57 return StringHelper.equal(name, cc.name) 58 && StringHelper.equal(installURL, cc.installURL) 59 && StringHelper.equal(archiveURL, cc.archiveURL) 60 && StringHelper.equal(lifecycleState, cc.lifecycleState); 61 } else { 62 return false; 63 } 64 } 65 66 public String getArchiveURL() { 67 return archiveURL; 68 } 69 70 public String getInstallURL() { 71 return installURL; 72 } 73 74 public String getLifecycleState() { 75 return lifecycleState; 76 } 77 78 public String getName() { 79 return name; 80 } 81 82 public int hashCode() { 83 int hashCode = 0; 84 if (archiveURL != null) { 85 hashCode += archiveURL.hashCode(); 86 } 87 if (installURL != null) { 88 hashCode += installURL.hashCode(); 89 } 90 if (lifecycleState != null) { 91 hashCode += lifecycleState.hashCode(); 92 } 93 if (name != null) { 94 hashCode += name.hashCode(); 95 } 96 return hashCode; 97 } 98 99 public void setArchiveURL(String zipURL) { 100 this.archiveURL = zipURL; 101 } 102 103 public void setInstallURL(String installURL) { 104 this.installURL = installURL; 105 } 106 107 public void setLifecycleState(String lifecycleState) { 108 this.lifecycleState = lifecycleState; 109 } 110 111 public void setName(String name) { 112 this.name = name; 113 } 114 } 115 | Popular Tags |