Package org.jboss.forge.addon.parser.xml.resources

Examples of org.jboss.forge.addon.parser.xml.resources.XMLResource


      facet.setConfigurationStrategy(config);
      Assert.assertTrue(project.hasFacet(ServletFacet_3_0.class));
      Assert.assertSame(config, facet.getConfigurationStrategy());
      Assert.assertEquals("/rest", facet.getApplicationPath());

      XMLResource webConfig = project.getFacet(ServletFacet_3_0.class).getConfigFile().reify(XMLResource.class);
      Assert.assertNotNull(webConfig);
      Node xmlSource = webConfig.getXmlSource();
      Assert.assertNotNull(xmlSource);
      Node servletClass = xmlSource.getSingle("servlet/servlet-name=" + RestWebXmlConfigurationStrategy.JAXRS_SERVLET);
      Node servletMapping = xmlSource.getSingle("servlet-mapping/servlet-name="
               + RestWebXmlConfigurationStrategy.JAXRS_SERVLET);
      Assert.assertNotNull(servletClass);
View Full Code Here


   {
      boolean installed = super.isInstalled();
      // CDI 1.0 doesn't have a version attribute
      if (installed)
      {
         XMLResource xmlResource = (XMLResource) getConfigFile();
         try
         {
            installed = xmlResource.getXmlSource().getAttribute("version") == null;
         }
         catch (FileNotFoundException e)
         {
            installed = true;
         }
View Full Code Here

      boolean installed = super.isInstalled();
      if (installed)
      {
         try
         {
            XMLResource xmlResource = (XMLResource) getConfigFile();
            installed = "1.1".equals(xmlResource.getXmlSource().getAttribute("version"));
         }
         catch (FileNotFoundException e)
         {
            installed = false;
         }
View Full Code Here

   {
      boolean installed = super.isInstalled();
      // CDI 1.0 doesn't have a version attribute
      if (installed)
      {
         XMLResource xmlResource = (XMLResource) getConfigFile();
         try
         {
            installed = xmlResource.getXmlSource().getAttribute("version") == null;
         }
         catch (FileNotFoundException e)
         {
            installed = true;
         }
View Full Code Here

      boolean installed = super.isInstalled();
      if (installed)
      {
         try
         {
            XMLResource xmlResource = (XMLResource) getConfigFile();
            installed = "1.1".equals(xmlResource.getXmlSource().getAttribute("version"));
         }
         catch (FileNotFoundException e)
         {
            installed = false;
         }
View Full Code Here

   {
      boolean installed = super.isInstalled();
      // CDI 1.0 doesn't have a version attribute
      if (installed)
      {
         XMLResource xmlResource = (XMLResource) getConfigFile();
         try
         {
            installed = xmlResource.getXmlSource().getAttribute("version") == null;
         }
         catch (FileNotFoundException e)
         {
            installed = true;
         }
View Full Code Here

      boolean installed = super.isInstalled();
      if (installed)
      {
         try
         {
            XMLResource xmlResource = (XMLResource) getConfigFile();
            installed = "1.1".equals(xmlResource.getXmlSource().getAttribute("version"));
         }
         catch (FileNotFoundException e)
         {
            installed = false;
         }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.parser.xml.resources.XMLResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.