JBossClientDDObjectFactorypublic class JBossClientDDObjectFactory extends org.jboss.metamodel.descriptor.DDObjectFactory A JBossXB object factory for parsing JBoss application client descriptor files.
http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd |
Fields Summary |
---|
private static final Logger | log | private ApplicationClientDD | dd |
Constructors Summary |
---|
public JBossClientDDObjectFactory(ApplicationClientDD dd)
// JBossXB will otherwise fail later on
if (dd == null)
throw new NullPointerException("dd is null");
this.dd = dd;
|
Methods Summary |
---|
public void | addChild(ApplicationClientDD parent, org.jboss.metamodel.descriptor.EjbRef ref, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)
dd.updateEjbRef(ref);
| public void | addChild(ApplicationClientDD parent, org.jboss.metamodel.descriptor.MessageDestinationRef ref, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)
dd.updateMessageDestinationRef(ref);
| public void | addChild(ApplicationClientDD parent, org.jboss.ws.integration.ServiceRefMetaData ref, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)
dd.addServiceRef(ref);
| public void | addChild(ApplicationClientDD dd, org.jboss.metamodel.descriptor.ResourceEnvRef envRef, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)
dd.updateResourceEnvRef(envRef);
| public void | addChild(ApplicationClientDD parent, org.jboss.metamodel.descriptor.ResourceRef ref, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)
dd.updateResourceRef(ref);
| public java.lang.Object | completeRoot(java.lang.Object root, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String uri, java.lang.String name)
return root;
| public java.lang.Object | newChild(ApplicationClientDD dd, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
Object child = null;
child = newEnvRefGroupChild(localName);
if (child != null)
return child;
// space for more
return child;
| public java.lang.Object | newRoot(java.lang.Object root, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
return dd;
| public static ApplicationClientDD | parse(java.net.URL ddResource, ApplicationClientDD dd)
// TODO: how to properly fix this
if (dd == null)
dd = new ApplicationClientDD();
if (ddResource == null)
return dd;
log.debug("found jboss-client.xml " + ddResource);
JBossClientDDObjectFactory factory = new JBossClientDDObjectFactory(dd);
UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
unmarshaller.setEntityResolver(new JBossEntityResolver());
unmarshaller.setNamespaceAware(true);
unmarshaller.setSchemaValidation(true);
unmarshaller.setValidation(true);
dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
return dd;
| public void | setValue(ApplicationClientDD dd, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
if (localName.equals("jndi-name"))
dd.setJndiName(value);
else if (localName.equals("depends"))
dd.addDependency(value);
|
|