Class ApplicationXml

    • Constructor Detail

      • ApplicationXml

        public ApplicationXml​(org.jdom2.Element rootElement,
                              DescriptorType type)
        Constructor.
        Parameters:
        rootElement - the root element for this descriptor
        type - the type of this descriptor
    • Method Detail

      • getWebModule

        public org.jdom2.Element getWebModule​(String webUri)
        Returns the element that contains the definition of a specific web module, or null if a web module with the specified web-uri is not defined.
        Parameters:
        webUri - The uri of the web module
        Returns:
        The DOM element representing the web module definition
      • getWebModuleContextRoot

        public String getWebModuleContextRoot​(String webUri)
        Returns the context root of the the specified web module.
        Parameters:
        webUri - The uri of the web module
        Returns:
        The context root of the web module
      • getWebModuleUris

        public List<String> getWebModuleUris()
        Returns a list of the URIs of the web modules defined in the descriptor.
        Returns:
        A list of the URIs of the web modules
      • getEjbModules

        public List<String> getEjbModules()
        Returns a list of the ejb modules defined in the descriptor.
        Returns:
        A list of Strings over the ejb modules
      • getElements

        public List<org.jdom2.Element> getElements​(ApplicationXmlTag tag)
        Returns a list of the elements that match the specified tag.
        Parameters:
        tag - The descriptor tag of which the elements should be returned
        Returns:
        A list of the elements matching the tag, in the order they occur in the descriptor
      • addWebModule

        public void addWebModule​(String uri,
                                 String context)
        Adds a web module to the deployment descriptor.
        Parameters:
        uri - the uri of the new module
        context - the context of the new module
      • addEjbModule

        public void addEjbModule​(String name)
        Adds a ejb module to the deployment descriptor.
        Parameters:
        name - the name of the new module
      • getVendorDescriptors

        public List<Descriptor> getVendorDescriptors()
        Returns all vendor descriptors associated with this J2EE deployment descriptor. For example for JBoss the vendor descriptor associated with web.xml is jboss-web.xml.
        Specified by:
        getVendorDescriptors in interface J2eeDescriptor
        Returns:
        List of Descriptor objects
      • getFileName

        public String getFileName()
        Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.
        Specified by:
        getFileName in interface Descriptor
        Returns:
        the file name