1 22 package org.jboss.system.metadata; 23 24 import java.util.Collections ; 25 import java.util.List ; 26 import java.util.Set ; 27 28 import javax.management.ObjectName ; 29 30 import org.jboss.dependency.spi.ControllerMode; 31 import org.w3c.dom.Element ; 32 33 39 public class ServiceMetaData extends AbstractMetaDataVisitorNode 40 { 41 42 public static final String XMBEAN_CODE = "org.jboss.mx.modelmbean.XMBean"; 43 44 45 private ObjectName objectName; 46 47 48 private String code; 49 50 51 private ControllerMode mode; 52 53 54 private String interfaceName; 55 56 57 private ServiceConstructorMetaData constructor; 58 59 60 private String xmbeanDD; 61 62 63 private String xmbeanCode = XMBEAN_CODE; 64 65 66 private Element xmbeanDescriptor; 67 68 69 private List <ServiceAttributeMetaData> attributes = Collections.emptyList(); 70 71 72 private List <ServiceDependencyMetaData> dependencies = Collections.emptyList(); 73 74 75 private ObjectName classLoaderName; 76 77 82 public ObjectName getObjectName() 83 { 84 return objectName; 85 } 86 87 92 public void setObjectName(ObjectName objectName) 93 { 94 if (objectName == null) 95 throw new IllegalArgumentException ("Null objectName"); 96 this.objectName = objectName; 97 } 98 99 104 public String getCode() 105 { 106 return code; 107 } 108 109 114 public void setCode(String code) 115 { 116 if (code == null) 117 throw new IllegalArgumentException ("Null code"); 118 this.code = code; 119 } 120 121 126 public ControllerMode getMode() 127 { 128 return mode; 129 } 130 131 136 public void setMode(ControllerMode mode) 137 { 138 this.mode = mode; 139 } 140 141 146 public ServiceConstructorMetaData getConstructor() 147 { 148 return constructor; 149 } 150 151 156 public void setConstructor(ServiceConstructorMetaData constructor) 157 { 158 this.constructor = constructor; 159 } 160 161 166 public String getInterfaceName() 167 { 168 return interfaceName; 169 } 170 171 176 public void setInterfaceName(String interfaceName) 177 { 178 this.interfaceName = interfaceName; 179 } 180 181 186 public String getXMBeanCode() 187 { 188 return xmbeanCode; 189 } 190 191 196 public void setXMBeanCode(String xmbeanCode) 197 { 198 if (xmbeanCode == null) 199 throw new IllegalArgumentException ("Null xmbeanCode"); 200 this.xmbeanCode = xmbeanCode; 201 } 202 203 208 public String getXMBeanDD() 209 { 210 return xmbeanDD; 211 } 212 213 218 public void setXMBeanDD(String xmbeanDD) 219 { 220 this.xmbeanDD = xmbeanDD; 221 } 222 223 228 public Element getXMBeanDescriptor() 229 { 230 return xmbeanDescriptor; 231 } 232 233 238 public void setXMBeanDescriptor(Element xmbeanDescriptor) 239 { 240 this.xmbeanDescriptor = xmbeanDescriptor; 241 } 242 243 248 public List <ServiceAttributeMetaData> getAttributes() 249 { 250 return attributes; 251 } 252 253 258 public void setAttributes(List <ServiceAttributeMetaData> attributes) 259 { 260 if (attributes == null) 261 throw new IllegalArgumentException ("Null attributes"); 262 this.attributes = attributes; 263 } 264 265 270 public List <ServiceDependencyMetaData> getDependencies() 271 { 272 return dependencies; 273 } 274 275 280 public void setDependencies(List <ServiceDependencyMetaData> dependencies) 281 { 282 if (dependencies == null) 283 throw new IllegalArgumentException ("Null dependencies"); 284 this.dependencies = dependencies; 285 } 286 287 292 public ObjectName getClassLoaderName() 293 { 294 return classLoaderName; 295 } 296 297 302 public void setClassLoaderName(ObjectName classLoaderName) 303 { 304 this.classLoaderName = classLoaderName; 305 } 306 307 protected void addChildren(Set <ServiceMetaDataVisitorNode> children) 308 { 309 children.addAll(attributes); 310 children.addAll(dependencies); 311 } 312 } 313 | Popular Tags |