|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.jonas_lib.genbase.utils.XMLUtils
XML Utils Class. Holds methods for easier DOM parsing, XML modifications, ...
| Method Summary | |
static void |
addClient(org.w3c.dom.Document app,
Archive client)
Add a client module in an application Document |
static void |
addEjb(org.w3c.dom.Document app,
Archive ejbjar)
Add an ejb module in an application Document |
static void |
addWebApp(org.w3c.dom.Document app,
Archive webapp,
java.lang.String ctx)
Add an web module in an application Document |
static void |
cleanDummyApplication(org.w3c.dom.Document doc)
default application.xml contains a fake ejb module needed to be parsed without error but not needed for a normal application. |
static org.w3c.dom.Element |
getBeanElement(org.w3c.dom.Element base,
java.lang.String bName)
Returns the session/entity/
message-driven XML Element with given name. |
static org.w3c.dom.Element |
getJonasServiceRef(org.w3c.dom.Element base,
java.lang.String srName)
Returns the jonas-service-ref XML Element with given name. |
static org.w3c.dom.Element |
getServletElement(org.w3c.dom.Element base,
java.lang.String sName)
Returns the matching servlet XML Element with given name. |
static boolean |
isWebModuleAlreadyDeclared(org.w3c.dom.Document app,
java.lang.String name)
Check if the web module name is already declared in the application.xml Document |
static org.w3c.dom.Document |
newDocument(java.io.InputStream is,
java.lang.String name,
boolean isDTDsAllowed)
Creates a new Document from a given InputStream. |
static org.w3c.dom.Document |
newDocument(java.io.InputStream is,
java.lang.String name,
boolean isDTDsAllowed,
boolean validate)
Creates a new Document from a given InputStream. |
static org.w3c.dom.Document |
newJonasClient()
Creates a new XML Document for an empty jonas-client.xml. |
static org.w3c.dom.Document |
newJonasWeb()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static org.w3c.dom.Document newDocument(java.io.InputStream is,
java.lang.String name,
boolean isDTDsAllowed)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
NoJ2EEWebservicesException
is - the InputStream to be parsedname - filenameisDTDsAllowed - if false, throw exception on DTD Doctype
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException
NoJ2EEWebservicesException - NoJ2EEWebservicesException
public static org.w3c.dom.Document newDocument(java.io.InputStream is,
java.lang.String name,
boolean isDTDsAllowed,
boolean validate)
throws NoJ2EEWebservicesException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
is - the InputStream to be parsedname - filenameisDTDsAllowed - if false, throw exception on DTD Doctypevalidate - if the file is to be validated
javax.xml.parsers.ParserConfigurationException - ParserConfigurationException
org.xml.sax.SAXException - SAXException
java.io.IOException - IOException
NoJ2EEWebservicesException - NoJ2EEWebservicesException
public static org.w3c.dom.Element getBeanElement(org.w3c.dom.Element base,
java.lang.String bName)
session/entity/
message-driven XML Element with given name.
base - jonas-ejb-jar Element.bName - the bean name to be found.
session/entity/
message-driven XML Element.
public static org.w3c.dom.Element getServletElement(org.w3c.dom.Element base,
java.lang.String sName)
servlet XML Element with given name.
base - web-app Element.sName - the servlet name to be found.
servlet XML Element.
public static org.w3c.dom.Element getJonasServiceRef(org.w3c.dom.Element base,
java.lang.String srName)
jonas-service-ref XML Element with given name.
base - web-app/ bean Element containing
jonas-service-ref Element(s).srName - the service-ref name to be found.
jonas-service-ref XML Element.public static void cleanDummyApplication(org.w3c.dom.Document doc)
doc - application.xml document
public static void addEjb(org.w3c.dom.Document app,
Archive ejbjar)
app - application.xml Documentejbjar - EJBJar archive
public static void addClient(org.w3c.dom.Document app,
Archive client)
app - application.xml Documentclient - Client archive
public static void addWebApp(org.w3c.dom.Document app,
Archive webapp,
java.lang.String ctx)
app - application.xml Documentwebapp - WebApp archivectx - context-rootpublic static org.w3c.dom.Document newJonasClient()
public static org.w3c.dom.Document newJonasWeb()
public static boolean isWebModuleAlreadyDeclared(org.w3c.dom.Document app,
java.lang.String name)
app - the application.xml Docname - web application name
true if the module is already declared, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||