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)
parent.addEjbRef(ref);
|
public void | addChild(ApplicationClientDD parent, org.jboss.metamodel.descriptor.EnvEntry entry, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)Called when parsing character is complete.
parent.addEnvEntry(entry);
|
public void | addChild(ApplicationClientDD parent, LifecycleCallback lifecycleCallback, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName)
if (localName.equals("post-construct"))
parent.getPostConstructs().add(lifecycleCallback);
else if (localName.equals("pre-destroy"))
parent.getPreDestroys().add(lifecycleCallback);
else throw new IllegalArgumentException(localName);
|
public java.lang.Object | completeRoot(java.lang.Object root, org.jboss.xb.binding.UnmarshallingContext ctx, java.lang.String uri, java.lang.String name)
throw new RuntimeException("NYI");
|
public java.lang.Object | newChild(ApplicationClientDD parent, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
Object child = super.newEnvRefGroupChild(localName);
if (child != null)
return child;
if (localName.equals("post-construct") || localName.equals("pre-destroy"))
{
child = new LifecycleCallback();
}
// ignore things like display-name & description
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)
final ApplicationClientDD dd;
if (root == null)
root = dd = new ApplicationClientDD();
else dd = (ApplicationClientDD)root;
if (attrs.getLength() > 0)
{
for (int i = 0; i < attrs.getLength(); ++i)
{
if (attrs.getLocalName(i).equals("version"))
{
dd.setVersion(attrs.getValue(i));
}
else if (attrs.getLocalName(i).equals("metadata-complete"))
{
dd.setMetadataComplete(Boolean.parseBoolean(attrs.getValue(i)));
}
else if (attrs.getLocalName(i).equals("schemaLocation"))
{
// ignore
}
else if (attrs.getLocalName(i).equals("id"))
{
// ignore
}
else throw new IllegalArgumentException(attrs.getLocalName(i));
}
}
return root;
|
public static ApplicationClientDD | parse(java.net.URL ddResource)
if (ddResource == null)
return null;
log.debug("found application-client.xml " + ddResource);
ApplicationClientDDObjectFactory factory = new ApplicationClientDDObjectFactory();
UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
unmarshaller.setEntityResolver(new JBossEntityResolver());
unmarshaller.setNamespaceAware(true);
unmarshaller.setSchemaValidation(true);
unmarshaller.setValidation(true);
ApplicationClientDD dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
return dd;
|
public void | setValue(LifecycleCallback lifecycleCallback, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
if (localName.equals("lifecycle-callback-class"))
lifecycleCallback.setLifecycleCallbackClass(value);
else if (localName.equals("lifecycle-callback-method"))
lifecycleCallback.setLifecycleCallbackMethod(value);
else throw new IllegalArgumentException(localName);
|
public void | setValue(ApplicationClientDD dd, org.jboss.xb.binding.UnmarshallingContext navigator, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)Called when a child element with simple content is read for DD.
if (localName.equals("display-name"))
{
dd.setDisplayName(getValue(localName, value));
}
// else if(localName.equals("description"))
// {
// // ignore
// }
// else
// throw new IllegalArgumentException(localName);
|