Package org.jboss.shrinkwrap.descriptor.spi

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


    }

    @Override
    public String getMessageInterpolator()
    {
        final Node messageInterpolator = model.getSingle("message-interpolator");
        return messageInterpolator == null ? null : messageInterpolator.text();
    }
View Full Code Here


    }

    @Override
    public String getTraversableResolver()
    {
        final Node traversableResolver = model.getSingle("traversable-resolver");
        return traversableResolver == null ? null : traversableResolver.text();
    }
View Full Code Here

    }

    @Override
    public String getConstraintValidatorFactory()
    {
        final Node constraintValidatorFactory = model.getSingle("constraint-validator-factory");
        return constraintValidatorFactory == null ? null : constraintValidatorFactory.text();
    }
View Full Code Here

   }

   @Override
   public ServletMappingDef mapping()
   {
      Node mappingNode = getRootNode().createChild("servlet-mapping");
      ServletMappingDef mapping = new ServletMappingDefImpl(getDescriptorName(), getRootNode(), servlet, mappingNode);
      mapping.servletName(getName());
      return mapping;
   }
View Full Code Here

    * @see org.jboss.shrinkwrap.descriptor.api.spec.web.FilterDef#initParam(java.lang.String, java.lang.Object)
    */
   @Override
   public InitParamDef initParam(String name, Object value)
   {
      Node init = child.createChild("init-param");
      init.createChild("param-name").text(name);
      init.createChild("param-value").text(String.valueOf(value));
      return this;
   }
View Full Code Here

   // 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

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.spi.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.