Methods Summary |
---|
public void | addDescriptor(java.lang.Object descriptor)Adds a new DOL descriptor instance to the descriptor instance associated with
this XMLNode
if (getParentNode()==null) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
new Object[] {descriptor , toString()});
throw new RuntimeException("Cannot add " + descriptor + " to " + toString());
} else {
getParentNode().addDescriptor(descriptor);
}
|
protected void | addNamespaceDeclaration(org.w3c.dom.Element node, com.sun.enterprise.deployment.Descriptor descriptor)Any node can now declare its own namespace. this apply to DDs only
when dealing with deployment extensions. Write any declared
namespace declaration
// declare now all remaining namepace...
Map prefixMapping = (descriptor != null ) ?
descriptor.getPrefixMapping() : null;
if (prefixMapping!=null) {
for (Iterator itr =prefixMapping.keySet().iterator();itr.hasNext();) {
String prefix = (String) itr.next();
String namespaceURI = (String) prefixMapping.get(prefix);
setAttributeNS(node, prefix, namespaceURI);
}
}
|
protected void | addNodeDescriptor(com.sun.enterprise.deployment.node.DeploymentDescriptorNode node)Adds a new DOL descriptor instance to the descriptor associated with this
XMLNode
// if there is no descriptor associated with this class, the addDescriptor should implement
// the fate of this new descriptor.
if (getDescriptor()==null) {
addDescriptor(node.getDescriptor());
return;
}
String xmlRootTag = node.getXMLRootTag().getQName();
if (addMethods!=null && addMethods.containsKey(xmlRootTag)) {
try {
Method toInvoke = getDescriptor().getClass().getMethod(
(String) addMethods.get(xmlRootTag),
new Class[] { node.getDescriptor().getClass() });
toInvoke.invoke(getDescriptor(), new Object[] {node.getDescriptor()});
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
if (t instanceof IllegalArgumentException) {
// We report the error but we continue loading, this will allow the verifier to catch these errors or to register
// an error handler for notification
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
new Object[]{node.getDescriptor().getClass() , getDescriptor().getClass()});
} else {
t.printStackTrace();
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
new Object[]{t.toString(), null});
}
} catch(Throwable t) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
new Object[] {node.getDescriptor().getClass() , getDescriptor().getClass() });
t.printStackTrace();
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.addDescriptorFailure",
new Object[]{t.toString(), null});
}
} else {
addDescriptor(node.getDescriptor());
}
|
public void | addPrefixMapping(java.lang.String prefix, java.lang.String uri)notify of a new prefix mapping used in this document
Object o = getDescriptor();
if (o instanceof Descriptor) {
Descriptor descriptor = (Descriptor) o;
descriptor.addPrefixMapping(prefix, uri);
}
|
public static org.w3c.dom.Element | appendChild(org.w3c.dom.Node parent, java.lang.String elementName)
Append a new element child to the current node
Element child = getOwnerDocument(parent).createElement(elementName);
parent.appendChild(child);
return child;
|
public void | appendQNameChild(java.lang.String elementName, org.w3c.dom.Node parent, java.lang.String namespaceUri, java.lang.String localPart, java.lang.String prefix)
if( prefix == null ) {
// @@@ make configurable??
prefix = elementName + "_ns__";
}
String elementValue = composeQNameValue(prefix, localPart);
Element element = (Element) appendTextChild
(parent, elementName, elementValue);
// Always set prefix mapping on leaf node. If the DOL was
// populated from an existing deployment descriptor it does
// not preserve the original node structure of the XML document,
// so we can't reliably know what level to place mapping.
// Alternatively, if we're writing out a descriptor that was created
// by the deploytool, there is no prefix->namespace information in
// the first place.
setAttributeNS(element, prefix, namespaceUri);
|
public static org.w3c.dom.Node | appendTextChild(org.w3c.dom.Node parent, java.lang.String elementName, java.lang.String text)
Append a new text child
if (text == null || text.length()==0)
return null;
Node child = appendChild(parent, elementName);
child.appendChild(getOwnerDocument(child).createTextNode(text));
return child;
|
public static org.w3c.dom.Node | appendTextChild(org.w3c.dom.Node parent, java.lang.String elementName, int value)
Append a new text child
return appendTextChild(parent, elementName, String.valueOf(value));
|
public java.lang.String | composeQNameValue(java.lang.String prefix, java.lang.String localPart)
return ( (prefix != null) && !(prefix.equals("")) ) ?
prefix + QNAME_SEPARATOR + localPart : localPart;
|
public boolean | endElement(XMLElement element)receives notification of the end of an XML element by the Parser
//DOLUtils.getDefaultLogger().finer("ENDELEMENT : " + "in " + getXMLRootTag() + " Node, endElement " + element.getQName());
boolean allDone = element.equals(getXMLRootTag());
if (allDone) {
postParsing();
if (getParentNode()!=null && getDescriptor()!=null) {
((DeploymentDescriptorNode) getParentNode()).addNodeDescriptor(this);
}
}
return allDone;
|
public static org.w3c.dom.Node | forceAppendTextChild(org.w3c.dom.Node parent, java.lang.String elementName, java.lang.String text)
Append a new text child even if text is empty
Node child = appendChild(parent, elementName);
if (text != null && text.length()!=0) {
child.appendChild(getOwnerDocument(child).createTextNode(text));
}
return child;
|
public java.lang.Object | getDescriptor()
if (abstractDescriptor==null) {
abstractDescriptor = DescriptorFactory.getDescriptor(getXMLPath());
}
return abstractDescriptor;
|
protected java.util.Map | getDispatchTable()all sub-implementation of this class can use a dispatch table to map xml element to
method name on the descriptor class for setting the element value.
// no need to be synchronized for now
Map table = new HashMap();
table.put(TagNames.DESCRIPTION, "setDescription");
return table;
|
public XMLNode | getHandlerFor(XMLElement element)
if (handlers==null) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {this , "No handler registered"});
return null;
} else {
Class c = (Class) handlers.get(element.getQName());
if (c==null) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {element.getQName(), "No handler registered"});
return null;
}
if (DOLUtils.getDefaultLogger().isLoggable(Level.FINER)) {
DOLUtils.getDefaultLogger().finer("New Handler requested for " + c);
}
DeploymentDescriptorNode node;
try {
node = (DeploymentDescriptorNode) c.newInstance();
node.setParentNode(this);
node.setXMLRootTag(element);
node.getDescriptor();
} catch(Exception e) {
e.printStackTrace();
return null;
}
return node;
}
|
public java.lang.String | getLocalPartFromQName(java.lang.String qname)Return local part from qname, where qname is an xsd:QName.
QName ::= (Prefix ':')? LocalPart
StringTokenizer tokenizer = new StringTokenizer(qname, QNAME_SEPARATOR);
String localPart = qname;
if( tokenizer.countTokens() == 2 ) {
// skip namespace prefix.
tokenizer.nextToken();
localPart = tokenizer.nextToken();
}
return localPart;
|
protected static org.w3c.dom.Document | getOwnerDocument(org.w3c.dom.Node node)
if (node instanceof Document) {
return (Document) node;
}
return node.getOwnerDocument();
|
public XMLNode | getParentNode()
return parentNode;
|
public java.lang.String | getPrefixFromQName(java.lang.String qname)
StringTokenizer tokenizer = new StringTokenizer(qname, QNAME_SEPARATOR);
return (tokenizer.countTokens() == 2) ?
tokenizer.nextToken() : "";
|
public java.lang.String | getXMLPath()
if (getParentNode()!=null) {
return getParentNode().getXMLPath() + "/" + getXMLRootTag().getQName();
} else {
return getXMLRootTag().getQName();
}
|
protected XMLElement | getXMLRootTag()
return xmlTag;
|
public boolean | handlesElement(XMLElement element)
// If we have no handlers for sub-nodes, it means we handle this XML tag
if (handlers==null)
return true;
// Let's iterator over all registered handlers to find one which is responsible
// for handling the XML tag.
for (Enumeration handlersIterator = handlers.keys();handlersIterator.hasMoreElements();) {
String subElement = (String) handlersIterator.nextElement();
if (element.getQName().equals(subElement)) {
return false;
}
}
return true;
|
public void | postParsing()notification of the end of XML parsing for this node
|
protected void | registerElementHandler(XMLElement element, java.lang.Class handler)register a new XMLNode handler for a particular XML tag.
if (handlers==null) {
handlers = new Hashtable();
}
handlers.put(element.getQName(), handler);
|
protected void | registerElementHandler(XMLElement element, java.lang.Class handler, java.lang.String addMethodName)register a new XMLNode handler for a particular XML tag.
registerElementHandler(element, handler);
if (addMethods==null) {
addMethods = new Hashtable();
}
addMethods.put(element.getQName(), addMethodName);
|
public java.lang.String | resolvePrefix(XMLElement element, java.lang.String prefix)Resolve a QName prefix to its corresponding Namespace URI by
searching up node chain starting with child.
// If prefix is empty string, returned namespace URI
// is the default namespace.
return element.getPrefixURIMapping(prefix);
|
public static void | setAttribute(org.w3c.dom.Element parent, java.lang.String elementName, java.lang.String text)
Append a new attribute to an element
if (text == null || text.length()==0)
return;
parent.setAttribute(elementName, text);
|
public static void | setAttributeNS(org.w3c.dom.Element element, java.lang.String prefix, java.lang.String namespaceURI)Set a namespace attribute on an element.
String nsPrefix = prefix.equals("") ? "xmlns" :
"xmlns" + QNAME_SEPARATOR + prefix;
element.setAttributeNS("http://www.w3.org/2000/xmlns/", nsPrefix,
namespaceURI);
|
protected boolean | setAttributeValue(XMLElement elementName, XMLElement attributeName, java.lang.String value)parsed an attribute of an element
// we do not support id attribute for the moment
if (attributeName.getQName().equals(TagNames.ID)) {
return true;
}
return false;
|
protected void | setDescriptorInfo(java.lang.Object target, java.lang.String methodName, java.lang.String value)call a setter method on a descriptor with a new value
if (DOLUtils.getDefaultLogger().isLoggable(Level.FINE)) {
DOLUtils.getDefaultLogger().fine("in " + target.getClass() + " method " + methodName + " with " + value );
}
try {
Method toInvoke = target.getClass().getMethod(methodName, new Class[] { String.class });
toInvoke.invoke(target, new Object[] {value});
} catch(NoSuchMethodException e1) {
try {
// try with int as a parameter
Method toInvoke = target.getClass().getMethod(methodName, new Class[] { int.class });
toInvoke.invoke(target, new Object[] {Integer.valueOf(value)});
} catch (NumberFormatException nfe) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object []{ getXMLPath().toString() , nfe.toString()});
} catch(NoSuchMethodException e2) {
// try with boolean as a parameter
Method toInvoke = target.getClass().getMethod(methodName, new Class[] { boolean.class });
toInvoke.invoke(target, new Object[] {Boolean.valueOf(value)});
}
}
|
public void | setElementValue(XMLElement element, java.lang.String value)receives notification of the value for a particular tag
//DOLUtils.getDefaultLogger().finer("SETELEMENTVALUE : " + "in " + getXMLRootTag() + " Node, startElement " + element.getQName());
Map dispatchTable = getDispatchTable();
if (dispatchTable != null) {
if (dispatchTable.containsKey(element.getQName())) {
if (dispatchTable.get(element.getQName())==null) {
// we just ignore these values from the DDs
if (DOLUtils.getDefaultLogger().isLoggable(Level.FINER)) {
DOLUtils.getDefaultLogger().finer("Deprecated element " + element.getQName() + " with value " + value + " is ignored");
}
return;
}
try {
Object descriptor = getDescriptor();
if (descriptor!=null) {
setDescriptorInfo(descriptor, (String) dispatchTable.get(element.getQName()), (String) value);
} else {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {element.getQName() , value });
}
return;
} catch (InvocationTargetException e) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {dispatchTable.get(element.getQName()) , getDescriptor().getClass()});
Throwable t = e.getTargetException();
if (t instanceof IllegalArgumentException) {
// We report the error but we continue loading, this will allow the verifier to catch these errors or to register
// an error handler for notification
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {element , value});
} else {
t.printStackTrace();
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {t.toString(), null});
}
} catch(Throwable t) {
t.printStackTrace();
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {t.toString(), null});
}
}
}
if (value.trim().length()!=0) {
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
new Object[] {element.getQName() , value });
}
return;
|
public void | setParentNode(XMLNode parentNode)set the parent node for the current instance.
this.parentNode = parentNode;
|
protected void | setXMLRootTag(XMLElement element)sets the XML tag associated with this XMLNode
xmlTag = element;
|
public void | startElement(XMLElement element, org.xml.sax.Attributes attributes)SAX Parser API implementation, we don't really care for now.
//DOLUtils.getDefaultLogger().finer("STARTELEMENT : " + "in " + getXMLRootTag() + " Node, startElement " + element.getQName());
if (!this.getXMLRootTag().equals(element))
return;
if (attributes.getLength()>0) {
for (int i=0;i<attributes.getLength();i++) {
if (DOLUtils.getDefaultLogger().isLoggable(Level.FINER)) {
DOLUtils.getDefaultLogger().finer("With attribute " + attributes.getQName(i));
DOLUtils.getDefaultLogger().finer("With value " + attributes.getValue(i));
}
// we try the setAttributeValue first, if not processed then the setElement
if (!setAttributeValue(element, new XMLElement(attributes.getQName(i)), attributes.getValue(i))) {
setElementValue(new XMLElement(attributes.getQName(i)), attributes.getValue(i));
}
}
}
|
protected void | writeAroundInvokeDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator aroundInvokeDescs)
if (aroundInvokeDescs == null || !aroundInvokeDescs.hasNext())
return;
AroundInvokeNode subNode = new AroundInvokeNode();
for(; aroundInvokeDescs.hasNext();) {
LifecycleCallbackDescriptor next =
(LifecycleCallbackDescriptor) aroundInvokeDescs.next();
subNode.writeDescriptor(parentNode,
EjbTagNames.AROUND_INVOKE_METHOD, next);
}
|
private void | writeDeploymentExtensionDescriptor(org.w3c.dom.Node parentNode, com.sun.enterprise.deployment.Descriptor descriptor)write the deployment extension nodes associated with this node
Iterator itr = descriptor.getDeploymentExtensions();
if (itr==null) {
return;
}
DeploymentExtensionNode subNode = new DeploymentExtensionNode();
subNode.writeDescriptor(parentNode, itr);
|
public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor descriptor)write the descriptor class to a DOM tree and return it
return writeDescriptor(parent, getXMLRootTag().getQName(), descriptor);
|
public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.Descriptor descriptor)write the descriptor class to a DOM tree and return it
Node node = appendChild(parent, nodeName);
return node;
|
protected void | writeEjbReferenceDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator refs)write the ejb references (local or remote) to the DOM tree
if (refs==null || !refs.hasNext())
return;
EjbReferenceNode subNode = new EjbReferenceNode();
// ejb-ref*
Set localRefDescs = new HashSet();
for (;refs.hasNext();) {
EjbReference ejbRef = (EjbReference) refs.next();
if (ejbRef.isLocal()) {
localRefDescs.add(ejbRef);
} else {
subNode.writeDescriptor(parentNode, TagNames.EJB_REFERENCE, ejbRef);
}
}
// ejb-local-ref*
for (Iterator e=localRefDescs.iterator(); e.hasNext();) {
EjbReference ejbRef = (EjbReference) e.next();
subNode.writeDescriptor(parentNode, TagNames.EJB_LOCAL_REFERENCE,ejbRef);
}
|
protected void | writeEntityManagerFactoryReferenceDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator entityMgrFactoryRefs)write a list of entity manager factory reference descriptors to
a DOM Tree
if (entityMgrFactoryRefs==null || !entityMgrFactoryRefs.hasNext())
return;
EntityManagerFactoryReferenceNode subNode =
new EntityManagerFactoryReferenceNode();
for (;entityMgrFactoryRefs.hasNext();) {
EntityManagerFactoryReferenceDescriptor aEntityMgrFactoryRef =
(EntityManagerFactoryReferenceDescriptor)entityMgrFactoryRefs.next();
subNode.writeDescriptor(parentNode, TagNames.PERSISTENCE_UNIT_REF, aEntityMgrFactoryRef);
}
|
protected void | writeEntityManagerReferenceDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator entityMgrRefs)write a list of entity manager reference descriptors to a DOM Tree
if (entityMgrRefs==null || !entityMgrRefs.hasNext())
return;
EntityManagerReferenceNode subNode = new EntityManagerReferenceNode();
for (;entityMgrRefs.hasNext();) {
EntityManagerReferenceDescriptor aEntityMgrRef = (EntityManagerReferenceDescriptor)entityMgrRefs.next();
subNode.writeDescriptor(parentNode, TagNames.PERSISTENCE_CONTEXT_REF, aEntityMgrRef);
}
|
protected void | writeEnvEntryDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator envEntries)write a list of env entry descriptors to a DOM Tree
if (envEntries==null || !envEntries.hasNext())
return;
EnvEntryNode subNode = new EnvEntryNode();
for (;envEntries.hasNext();) {
EnvironmentProperty envProp = (EnvironmentProperty) envEntries.next();
subNode.writeDescriptor(parentNode, TagNames.ENVIRONMENT_PROPERTY, envProp);
}
|
protected void | writeJNDIEnvironmentRefs(org.w3c.dom.Node node, com.sun.enterprise.deployment.JndiNameEnvironment descriptor)writes jndi environment references group nodes
/* <xsd:element name="env-entry"
type="javaee:env-entryType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeEnvEntryDescriptors(node, descriptor.getEnvironmentProperties().iterator());
/* <xsd:element name="ejb-ref"
type="javaee:ejb-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
/* <xsd:element name="ejb-local-ref"
type="javaee:ejb-local-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeEjbReferenceDescriptors(node,
descriptor.getEjbReferenceDescriptors().iterator());
/* <xsd:group ref="javaee:service-refGroup"/>
*/
writeServiceReferenceDescriptors(node, descriptor.getServiceReferenceDescriptors().iterator());
/* <xsd:element name="resource-ref"
type="javaee:resource-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeResourceRefDescriptors(node, descriptor.getResourceReferenceDescriptors().iterator());
/* <xsd:element name="resource-env-ref"
type="javaee:resource-env-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeResourceEnvRefDescriptors(node, descriptor.getJmsDestinationReferenceDescriptors().iterator());
/* <xsd:element name="message-destination-ref"
type="javaee:message-destination-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeMessageDestinationRefDescriptors(node, descriptor.getMessageDestinationReferenceDescriptors().iterator());
/* <xsd:element name="persistence-context-ref"
type="javaee:persistence-context-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeEntityManagerReferenceDescriptors(node, descriptor.getEntityManagerReferenceDescriptors().iterator());
/* <xsd:element name="persistence-unit-ref"
type="javaee:persistence-unit-refType"
minOccurs="0" maxOccurs="unbounded"/>
*/
writeEntityManagerFactoryReferenceDescriptors(node, descriptor.getEntityManagerFactoryReferenceDescriptors().iterator());
/* <xsd:element name="post-construct"
type="javaee:lifecycle-callbackType"
minOccurs="0"
maxOccurs="unbounded"/>
*/
writePostConstructDescriptors(node, descriptor.getPostConstructDescriptors().iterator());
/* <xsd:element name="pre-destroy"
type="javaee:lifecycle-callbackType"
minOccurs="0"
maxOccurs="unbounded"/>
*/
writePreDestroyDescriptors(node, descriptor.getPreDestroyDescriptors().iterator());
|
protected void | writeLocalizedDescriptions(org.w3c.dom.Node node, com.sun.enterprise.deployment.Descriptor desc)writes iocalized descriptions (if any) to the DOM node
LocalizedInfoNode localizedNode = new LocalizedInfoNode();
localizedNode.writeLocalizedMap(node, TagNames.DESCRIPTION, desc.getLocalizedDescriptions());
|
protected void | writeMessageDestinationRefDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator msgDestRefs)write a list of message destination reference descriptors to a DOM Tree
if (msgDestRefs==null || !msgDestRefs.hasNext())
return;
MessageDestinationRefNode subNode = new MessageDestinationRefNode();
for (;msgDestRefs.hasNext();) {
MessageDestinationReferenceDescriptor next =
(MessageDestinationReferenceDescriptor) msgDestRefs.next();
subNode.writeDescriptor(parentNode,
TagNames.MESSAGE_DESTINATION_REFERENCE,
next);
}
|
protected void | writePostActivateDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator postActivateDescs)
if (postActivateDescs == null || !postActivateDescs.hasNext())
return;
LifecycleCallbackNode subNode = new LifecycleCallbackNode();
for(; postActivateDescs.hasNext();) {
LifecycleCallbackDescriptor next =
(LifecycleCallbackDescriptor) postActivateDescs.next();
subNode.writeDescriptor(parentNode,
EjbTagNames.POST_ACTIVATE_METHOD, next);
}
|
protected void | writePostConstructDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator postConstructDescs)write a list of post-construct descriptors to a DOM Tree
if (postConstructDescs == null || !postConstructDescs.hasNext())
return;
LifecycleCallbackNode subNode = new LifecycleCallbackNode();
for (; postConstructDescs.hasNext();) {
LifecycleCallbackDescriptor next = postConstructDescs.next();
subNode.writeDescriptor(parentNode, TagNames.POST_CONSTRUCT,
next);
}
|
protected void | writePreDestroyDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator preDestroyDescs)write a list of pre-destroy descriptors to a DOM Tree
if (preDestroyDescs == null || !preDestroyDescs.hasNext())
return;
LifecycleCallbackNode subNode = new LifecycleCallbackNode();
for (; preDestroyDescs.hasNext();) {
LifecycleCallbackDescriptor next = preDestroyDescs.next();
subNode.writeDescriptor(parentNode, TagNames.PRE_DESTROY,
next);
}
|
protected void | writePrePassivateDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator prePassivateDescs)
if (prePassivateDescs == null || !prePassivateDescs.hasNext())
return;
LifecycleCallbackNode subNode = new LifecycleCallbackNode();
for(; prePassivateDescs.hasNext();) {
LifecycleCallbackDescriptor next =
(LifecycleCallbackDescriptor) prePassivateDescs.next();
subNode.writeDescriptor(parentNode,
EjbTagNames.PRE_PASSIVATE_METHOD, next);
}
|
protected void | writeResourceEnvRefDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator resRefs)write a list of resource env reference descriptors to a DOM Tree
if (resRefs==null || !resRefs.hasNext())
return;
ResourceEnvRefNode subNode = new ResourceEnvRefNode();
for (;resRefs.hasNext();) {
JmsDestinationReferenceDescriptor aResRef = (JmsDestinationReferenceDescriptor) resRefs.next();
subNode.writeDescriptor(parentNode, TagNames.RESOURCE_ENV_REFERENCE, aResRef);
}
|
protected void | writeResourceRefDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator resRefs)write a list of resource reference descriptors to a DOM Tree
if (resRefs==null || !resRefs.hasNext())
return;
ResourceRefNode subNode = new ResourceRefNode();
for (;resRefs.hasNext();) {
ResourceReferenceDescriptor aResRef = (ResourceReferenceDescriptor) resRefs.next();
subNode.writeDescriptor(parentNode, TagNames.RESOURCE_REFERENCE, aResRef);
}
|
protected void | writeServiceReferenceDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator refs)
if( ( refs == null ) || !refs.hasNext() ) {
return;
}
ServiceReferenceNode serviceRefNode = new ServiceReferenceNode();
while(refs.hasNext()) {
ServiceReferenceDescriptor next = (ServiceReferenceDescriptor)
refs.next();
serviceRefNode.writeDescriptor
(parentNode, WebServicesTagNames.SERVICE_REF, next);
}
|