1 16 package org.apache.juddi.datatype.publisher; 17 18 import org.apache.juddi.datatype.Name; 19 import org.apache.juddi.datatype.RegistryObject; 20 21 24 public class Publisher implements RegistryObject 25 { 26 private String publisherID; 27 private String nameValue; 28 private String emailAddress; 29 private boolean admin; 30 private boolean enabled; 31 32 35 public Publisher() 36 { 37 } 38 39 42 public Publisher(String pubID,String name) 43 { 44 this.publisherID = pubID; 45 this.nameValue = name; 46 } 47 48 51 public Publisher(String pubID,String name,boolean adminValue) 52 { 53 this(pubID,name); 54 this.admin = adminValue; 55 } 56 57 60 public void setPublisherID(String pubID) 61 { 62 this.publisherID = pubID; 63 } 64 65 68 public String getPublisherID() 69 { 70 return this.publisherID; 71 } 72 73 78 public void setName(String name) 79 { 80 this.nameValue = name; 81 } 82 83 88 public String getName() 89 { 90 return this.nameValue; 91 } 92 93 98 public void setName(Name name) 99 { 100 if (name != null) 101 this.nameValue = name.getValue(); 102 else 103 this.nameValue = null; 104 } 105 106 109 public void setEmailAddress(String email) 110 { 111 this.emailAddress = email; 112 } 113 114 117 public String getEmailAddress() 118 { 119 return this.emailAddress; 120 } 121 122 125 public void setAdmin(boolean adminValue) 126 { 127 this.admin = adminValue; 128 } 129 130 133 public void setAdminValue(String adminValue) 134 { 135 if (adminValue == null) 136 this.admin = false; 137 else 138 this.admin = (adminValue.equalsIgnoreCase("true")); 139 } 140 141 144 public boolean isAdmin() 145 { 146 return this.admin; 147 } 148 149 150 153 public void setEnabled(boolean enabledValue) 154 { 155 this.enabled = enabledValue; 156 } 157 158 161 public void setEnabledValue(String enabledValue) 162 { 163 if (enabledValue == null) 164 this.enabled = false; 165 else 166 this.enabled = (enabledValue.equalsIgnoreCase("true")); 167 } 168 169 172 public boolean isEnabled() 173 { 174 return this.enabled; 175 } 176 177 178 179 180 181 182 183 public static void main(String [] args) 185 { 186 } 187 } | Popular Tags |