1 7 8 package org.openejb.alt.config.sys; 9 10 14 import java.io.IOException ; 15 import java.io.Reader ; 16 import java.io.Serializable ; 17 import java.io.Writer ; 18 import org.exolab.castor.xml.MarshalException; 19 import org.exolab.castor.xml.Marshaller; 20 import org.exolab.castor.xml.Unmarshaller; 21 import org.exolab.castor.xml.ValidationException; 22 import org.xml.sax.ContentHandler ; 23 24 29 public class ServiceProvider implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _id; 40 41 44 private java.lang.String _providerType; 45 46 49 private java.lang.String _displayName; 50 51 54 private java.lang.String _description; 55 56 59 private java.lang.String _className; 60 61 64 private java.lang.String _content = ""; 65 66 69 private org.openejb.alt.config.sys.PropertiesFile _propertiesFile; 70 71 74 private org.openejb.alt.config.sys.Lookup _lookup; 75 76 77 81 public ServiceProvider() { 82 super(); 83 setContent(""); 84 } 86 87 91 96 public java.lang.String getClassName() 97 { 98 return this._className; 99 } 101 107 public java.lang.String getContent() 108 { 109 return this._content; 110 } 112 117 public java.lang.String getDescription() 118 { 119 return this._description; 120 } 122 127 public java.lang.String getDisplayName() 128 { 129 return this._displayName; 130 } 132 137 public java.lang.String getId() 138 { 139 return this._id; 140 } 142 147 public org.openejb.alt.config.sys.Lookup getLookup() 148 { 149 return this._lookup; 150 } 152 157 public org.openejb.alt.config.sys.PropertiesFile getPropertiesFile() 158 { 159 return this._propertiesFile; 160 } 162 167 public java.lang.String getProviderType() 168 { 169 return this._providerType; 170 } 172 175 public boolean isValid() 176 { 177 try { 178 validate(); 179 } 180 catch (org.exolab.castor.xml.ValidationException vex) { 181 return false; 182 } 183 return true; 184 } 186 191 public void marshal(java.io.Writer out) 192 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 193 { 194 195 Marshaller.marshal(this, out); 196 } 198 203 public void marshal(org.xml.sax.ContentHandler handler) 204 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 205 { 206 207 Marshaller.marshal(this, handler); 208 } 210 215 public void setClassName(java.lang.String className) 216 { 217 this._className = className; 218 } 220 226 public void setContent(java.lang.String content) 227 { 228 this._content = content; 229 } 231 236 public void setDescription(java.lang.String description) 237 { 238 this._description = description; 239 } 241 246 public void setDisplayName(java.lang.String displayName) 247 { 248 this._displayName = displayName; 249 } 251 256 public void setId(java.lang.String id) 257 { 258 this._id = id; 259 } 261 266 public void setLookup(org.openejb.alt.config.sys.Lookup lookup) 267 { 268 this._lookup = lookup; 269 } 271 276 public void setPropertiesFile(org.openejb.alt.config.sys.PropertiesFile propertiesFile) 277 { 278 this._propertiesFile = propertiesFile; 279 } 281 286 public void setProviderType(java.lang.String providerType) 287 { 288 this._providerType = providerType; 289 } 291 296 public static java.lang.Object unmarshal(java.io.Reader reader) 297 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 298 { 299 return (org.openejb.alt.config.sys.ServiceProvider) Unmarshaller.unmarshal(org.openejb.alt.config.sys.ServiceProvider.class, reader); 300 } 302 305 public void validate() 306 throws org.exolab.castor.xml.ValidationException 307 { 308 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 309 validator.validate(this); 310 } 312 } 313 | Popular Tags |