| java.lang.Object org.objectweb.jonas_lib.genbase.utils.XMLUtils
XMLUtils | public class XMLUtils (Code) | | XML Utils Class. Holds methods for easier DOM parsing, XML modifications, ...
author: Guillaume Sauthier |
Method Summary | |
public static void | addClient(Document app, Archive client) | public static void | addEjb(Document app, Archive ejbjar) | public static void | addWebApp(Document app, Archive webapp, String ctx) | public static void | cleanDummyApplication(Document doc) default application.xml contains a fake ejb module needed to be parsed
without error but not needed for a normal application. | public static Element | getBeanElement(Element base, String bName) Returns the session /entity /
message-driven XML Element with given name.
Parameters: base - jonas-ejb-jar Element. Parameters: bName - the bean name to be found. | public static Element | getJonasServiceRef(Element base, String srName) Returns the jonas-service-ref XML Element with given name.
Parameters: base - web-app / bean Element containingjonas-service-ref Element(s). Parameters: srName - the service-ref name to be found. | public static Element | getServletElement(Element base, String sName) Returns the matching servlet XML Element with given name.
Parameters: base - web-app Element. Parameters: sName - the servlet name to be found. | public static boolean | isWebModuleAlreadyDeclared(Document app, String name) | public static Document | newDocument(InputStream is, String name, boolean isDTDsAllowed) Creates a new Document from a given InputStream. | public static Document | newDocument(InputStream is, String name, boolean isDTDsAllowed, boolean validate) Creates a new Document from a given InputStream. | public static Document | newJonasClient() Creates a new XML Document for an empty jonas-client.xml. | public static Document | newJonasWeb() |
addClient | public static void addClient(Document app, Archive client)(Code) | | Add a client module in an application Document
Parameters: app - application.xml Document Parameters: client - Client archive |
addEjb | public static void addEjb(Document app, Archive ejbjar)(Code) | | Add an ejb module in an application Document
Parameters: app - application.xml Document Parameters: ejbjar - EJBJar archive |
addWebApp | public static void addWebApp(Document app, Archive webapp, String ctx)(Code) | | Add an web module in an application Document
Parameters: app - application.xml Document Parameters: webapp - WebApp archive Parameters: ctx - context-root |
cleanDummyApplication | public static void cleanDummyApplication(Document doc)(Code) | | default application.xml contains a fake ejb module needed to be parsed
without error but not needed for a normal application. Than we remove it.
Parameters: doc - application.xml document |
getBeanElement | public static Element getBeanElement(Element base, String bName)(Code) | | Returns the session /entity /
message-driven XML Element with given name.
Parameters: base - jonas-ejb-jar Element. Parameters: bName - the bean name to be found. the session /entity /message-driven XML Element. |
getJonasServiceRef | public static Element getJonasServiceRef(Element base, String srName)(Code) | | Returns the jonas-service-ref XML Element with given name.
Parameters: base - web-app / bean Element containingjonas-service-ref Element(s). Parameters: srName - the service-ref name to be found. the jonas-service-ref XML Element. |
getServletElement | public static Element getServletElement(Element base, String sName)(Code) | | Returns the matching servlet XML Element with given name.
Parameters: base - web-app Element. Parameters: sName - the servlet name to be found. the matching servlet XML Element. |
isWebModuleAlreadyDeclared | public static boolean isWebModuleAlreadyDeclared(Document app, String name)(Code) | | Check if the web module name is already declared in the application.xml Document
Parameters: app - the application.xml Doc Parameters: name - web application name Returns true if the module is already declared, false otherwise. |
newJonasClient | public static Document newJonasClient()(Code) | | Creates a new XML Document for an empty jonas-client.xml.
Returns a new XML Document for an empty jonas-client.xml. |
newJonasWeb | public static Document newJonasWeb()(Code) | | Returns an empty jonas-web-app Document |
|
|