@Override public boolean equals(Object other ) { if (other instanceof XMLElement) { return qName.equals(((XMLElement) other).getQName()); } return false; }
/** * register this node as a root node capable of loading entire DD files * * @param publicIDToDTD is a mapping between xml Public-ID to DTD * @return the doctype tag name */ @Override public String registerBundle(Map publicIDToDTD) { publicIDToDTD.put(PUBLIC_DTD_ID, SYSTEM_ID); publicIDToDTD.put(PUBLIC_DTD_ID_12, SYSTEM_ID_12); return tag.getQName(); }
/** * register this node as a root node capable of loading entire DD files * * @param publicIDToDTD is a mapping between xml Public-ID to DTD * @return the doctype tag name */ public static String registerBundle(Map publicIDToDTD) { publicIDToDTD.put(PUBLIC_DTD_ID, SYSTEM_ID); publicIDToDTD.put(PUBLIC_DTD_ID_12, SYSTEM_ID_12); return tag.getQName(); }
/** * register this node as a root node capable of loading entire DD files * * @param publicIDToDTD is a mapping between xml Public-ID to DTD * @return the doctype tag name */ public static String registerBundle(Map publicIDToDTD) { publicIDToDTD.put(PUBLIC_DTD_ID, SYSTEM_ID); publicIDToDTD.put(PUBLIC_DTD_ID_12, SYSTEM_ID_12); return tag.getQName(); }
private Class getExtensionHandler(final XMLElement element) { DeploymentDescriptorNode extNode = (DeploymentDescriptorNode)habitat.getService(XMLNode.class, element.getQName()); if (extNode == null) { return null; } return (Class)extNode.getClass(); }
/** * SAX Parser API implementation, we don't really care for now. */ public void startElement(XMLElement element, Attributes attributes) { if (RuntimeTagNames.GROUP.equals(element.getQName())) { for (int i=0; i<attributes.getLength();i++) { if (RuntimeTagNames.NAME.equals(attributes.getQName(i))) { group = new Group(attributes.getValue(i)); } } } }
/** * register a new descriptor class handling a particular XPATH in the DTD. * * @param xmlPath absolute or relative XPath * @param clazz the descriptor class to use */ public static void register(XMLElement xmlPath, Class clazz) { if (DOLUtils.getDefaultLogger().isLoggable(Level.FINE)) { DOLUtils.getDefaultLogger().fine("Register " + clazz + " to handle " + xmlPath.getQName()); } descriptorClasses.put(xmlPath.getQName(), clazz); }
@Override public void setElementValue(XMLElement element, String value) { if (RuntimeTagNames.NAME.equals(element.getQName())) { DOLUtils.getDefaultLogger().finer("Ignoring runtime bundle name " + value); return; } if (RuntimeTagNames.UNIQUE_ID.equals(element.getQName())) { DOLUtils.getDefaultLogger().finer("Ignoring unique id"); return; } super.setElementValue(element, value); }
public void setElementValue(XMLElement element, String value) { if (inDependsOn && EjbTagNames.EJB_NAME.equals(element.getQName())) { dependsOn.add(value); } else if( EjbTagNames.CONCURRENCY_MANAGEMENT_TYPE.equals(element.getQName())) { descriptor.setConcurrencyManagementType(ConcurrencyManagementType.valueOf(value)); } else { super.setElementValue(element, value); } }
/** * receives notification of the end of an XML element by the Parser * * @param element the xml tag identification * @return true if this node is done processing the XML sub tree */ public boolean endElement(XMLElement element) { if (EjbTagNames.CASCADE_DELETE.equals(element.getQName())) { descriptor.setCascadeDelete(true); } return super.endElement(element); }
/** * SAX Parser API implementation, we don't really care for now. */ public void startElement(XMLElement element, Attributes attributes) { super.startElement(element, attributes); if (WebTagNames.OTHERS.equals(element.getQName())) { descriptor.addOthers(); } }
@Override public XMLNode getHandlerFor(XMLElement element) { if (WLWebServicesTagNames.WEBSERVICE_SECURITY.equals(element.getQName())) { throw new UnsupportedConfigurationException(element + " configuration in weblogic-webservices.xml is not supported."); } else { return super.getHandlerFor(element); } }
/** * receives notification of the value for a particular tag * * @param element the xml element * @param value it's associated value */ public void setElementValue(XMLElement element, String value) { if (RuntimeTagNames.NAME.equals(element.getQName())) { principal = new PrincipalImpl(value); } else super.setElementValue(element, value); }
/** * write the descriptor class to a DOM tree and return it * * @param parent node in the DOM tree * @param descriptor the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, T descriptor) { return writeDescriptor(parent, getXMLRootTag().getQName(), descriptor); }
@Override public boolean endElement(XMLElement element) { if(RuntimeTagNames.EJB.equals(element.getQName())) { descriptor.getIASEjbExtraDescriptors().parseCheckpointedMethods(descriptor); } return super.endElement(element); }
@Override protected boolean setAttributeValue(XMLElement elementName, XMLElement attributeName, String value) { if (attributeName.getQName().equals("href")) { getDescriptor().setJnlpDocument(value); return true; } else { return super.setAttributeValue(elementName, attributeName, value); } }
private void recordNodeMapping(String subElementName, Class handler) { XMLNode rootNode = getRootNode(); if (rootNode instanceof RuntimeBundleNode) { ((RuntimeBundleNode)rootNode).recordNodeMapping(getXMLRootTag().getQName(), subElementName, handler); } }
@Override public void setElementValue(XMLElement element, String value) { if (TagNames.MODULE_NAME.equals(element.getQName())) { getDescriptor().getModuleDescriptor().setModuleName(value); } else { super.setElementValue(element, value); } }
@Override public void startElement(XMLElement element, Attributes attributes) { if( EjbTagNames.USE_CALLER_IDENTITY.equals(element.getQName()) ) { ((EjbDescriptor) getParentNode().getDescriptor()). setUsesCallerIdentity(true); } else { super.startElement(element, attributes); } return; }