Package org.jboss.shrinkwrap.descriptor.spi.node

Examples of org.jboss.shrinkwrap.descriptor.spi.node.Node


   // Constructor ------------------------------------------------------------------------||
   // -------------------------------------------------------------------------------------||

   public WebAppDescriptorImpl(String descriptorName)
   {
      this(descriptorName, new Node("web-app")
            .attribute("xmlns", "http://java.sun.com/xml/ns/javaee")
            .attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance")
            .attribute("xsi:schemaLocation",
                  "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"));
      version("3.0");
View Full Code Here


   }

   @Override
   public ServletDef servlet(String name, String clazz, String[] urlPatterns)
   {
      Node servletNode = model.createChild("servlet");
      servletNode.createChild("servlet-name").text(name);
      servletNode.createChild("servlet-class").text(clazz);
      ServletDef servlet = new ServletDefImpl(getDescriptorName(), model, servletNode);

      servlet.mapping().urlPatterns(urlPatterns);
      return servlet;
   }
View Full Code Here

   // Constructor ------------------------------------------------------------------------||
   // -------------------------------------------------------------------------------------||

   public ApplicationDescriptorImpl(String descriptorName)
   {
      this(descriptorName, new Node("application")
               .attribute("xmlns", "http://java.sun.com/xml/ns/javaee")
               .attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"));

      version("6");
   }
View Full Code Here

    * java.lang.String)
    */
   @Override
   public ApplicationDescriptor webModule(String uri, String contextRoot)
   {
      Node web = model.createChild("module").createChild("web");
      web.createChild("web-uri").text(uri);
      web.createChild("context-root").text(contextRoot);
      return this;
   }
View Full Code Here

    * java.lang.String)
    */
   @Override
   public ApplicationDescriptor securityRole(String roleName, String description)
   {
      Node security = model.createChild("security-role");
      if (roleName != null)
      {
         security.createChild("role-name").text(roleName);
      }
      if (description != null)
      {
         security.createChild("description").text(description);
      }
      return this;
   }
View Full Code Here

      WebResourcesFacet web = this.origin.getFacet(WebResourcesFacet.class);
      ServletFacet servlet = this.origin.getFacet(ServletFacet.class);
      if (servlet instanceof ServletFacet_3_0)
      {
         WebAppDescriptor servletConfig = (WebAppDescriptor) servlet.getConfig();
         Node root = ((NodeDescriptor) servletConfig).getRootNode();
         removeConflictingErrorPages(root);

         // (prefer /faces/error.xhtml)

         String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource(ERROR_XHTML)).get(1);
View Full Code Here

        addEnvEntry(descriptor, "totalQuantity", "java.lang.Byte", "5");
        addEnvEntry(descriptor, "optionDefault", "java.lang.Character", "X");
        addEnvEntry(descriptor, "auditWriter", "java.lang.Class", "java.lang.String");
        addEnvEntry(descriptor, "defaultCode", Code.class.getName(), "OK");

        Node appNode = ((NodeDescriptor) descriptor).getRootNode();
        appNode.createChild("/env-entry")
                .createChild("env-entry-name").text("name").getParent()
                .createChild("lookup-name").text("java:module/ModuleName");


        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
View Full Code Here

        return archive;
    }

    private static void addEnvEntry(WebAppDescriptor descriptor, String name, String type, String value) {
        Node appNode = ((NodeDescriptor) descriptor).getRootNode();
        appNode.createChild("/env-entry")
                .createChild("env-entry-name").text(name).getParent()
                .createChild("env-entry-type").text(type).getParent()
                .createChild("env-entry-value").text(value)
        ;
View Full Code Here

        return archive;
    }

    private static void addEnvEntry(WebAppDescriptor descriptor, String name, String type, String value) {
        Node appNode = ((NodeDescriptor) descriptor).getRootNode();
        appNode.createChild("/env-entry")
                .createChild("env-entry-name").text(name).getParent()
                .createChild("env-entry-type").text(type).getParent()
                .createChild("env-entry-value").text(value)
/*
                .parent()
View Full Code Here

        return archive;
    }

    private static void addEnvEntry(WebAppDescriptor descriptor, String name, String type, String value) {
        Node appNode = ((NodeDescriptor) descriptor).getRootNode();
        appNode.createChild("/env-entry")
                .createChild("env-entry-name").text(name).getParent()
                .createChild("env-entry-type").text(type).getParent()
                .createChild("env-entry-value").text(value)
/*
                .parent()
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.spi.node.Node

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.