Examples of PathParameter


Examples of com.iggroup.oss.restdoclet.doclet.type.PathParameter

      LOG.debug(method.getName());
      ArrayList<PathParameter> pathParams = new ArrayList<PathParameter>();
      for (Parameter param : params) {
         if (isAnnotated(param, PathVariable.class)) {
            pathParams.add(new PathParameterBuilder().build(
               new PathParameter(), param, tags));
         }
      }
      method.setPathParams(pathParams);
   }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

      preProcessors = Collections.unmodifiableList(temp);
   }

   public static PathParameter process(final String expression)
   {
      PathParameter result = new PathParameter();
      result.setExpression(new ConstantExpression(expression));

      for (PathParameterProcessor p : preProcessors)
      {
         result = p.process(result);
      }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

   private static final String REGEX = "\\#\\{\\s*(\\w+)\\s*:\\s*([\\w\\.]{1,})\\s*\\}";
   public static final Pattern pattern = Pattern.compile(REGEX);

   public PathParameter process(final PathParameter param)
   {
      PathParameter result = param.copy();

      Matcher matcher = pattern.matcher(param.getExpression().getELExpression());
      if (matcher.matches())
      {
         String name = matcher.group(1);
         String el = matcher.group(2);

         result.setExpression(new ConstantExpression("#{" + el + "}"));
         result.setName(name);
         result.setExpressionIsPlainText(false);
      }
      return result;
   }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

   private static final String REGEX = "\\#\\{\\s*:?\\s*([\\w\\.]+)\\s*\\}";
   public static final Pattern pattern = Pattern.compile(REGEX);

   public PathParameter process(final PathParameter param)
   {
      PathParameter result = param.copy();

      Matcher matcher = pattern.matcher(param.getExpression().getELExpression());
      if (matcher.matches())
      {
         String el = matcher.group(1);
         result.setExpression(new ConstantExpression("#{" + el + "}"));
         result.setExpressionIsPlainText(false);
      }
      return result;
   }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

   private static final String REGEX = "\\#\\{\\s*(\\w+)\\s*\\}";
   public static final Pattern pattern = Pattern.compile(REGEX);

   public PathParameter process(final PathParameter param)
   {
      PathParameter result = param.copy();

      Matcher matcher = pattern.matcher(param.getExpression().getELExpression());
      if (matcher.matches())
      {
         String name = matcher.group(1);
         result.setName(name);
         result.setExpressionIsPlainText(false);
      }
      return result;
   }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

public class PlainText implements PathParameterProcessor
{

   public PathParameter process(final PathParameter param)
   {
      PathParameter result = param.copy();
      if (result.expressionIsPlainText())
      {
         result.setRegex(result.getExpression().getELExpression());
      }
      return result;
   }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

public class PathParameterTest
{
    @Test
    public void testIsNamedFalseWhenNameNull()
    {
        PathParameter parameter = new PathParameter();
        assertFalse(parameter.isNamed());
    }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

    }

    @Test
    public void testIsNamedFalseWhenNameEmpty()
    {
        PathParameter parameter = new PathParameter();
        parameter.setName("");
        assertFalse(parameter.isNamed());
    }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

    }

    @Test
    public void testIsNamedTrueWhenNameSet()
    {
        PathParameter parameter = new PathParameter();
        parameter.setName("name");
        assertTrue(parameter.isNamed());
    }
View Full Code Here

Examples of com.ocpsoft.pretty.faces.config.mapping.PathParameter

   @Test
   public void testSpacing1() throws Exception
   {
      String expression = "#{/test/name}";
      PathParameter param = new PathParameter();
      param.setExpression(expression);
      param = p.process(param);

      assertEquals("#{name}", param.getExpression().getELExpression());
      assertEquals("test", param.getRegex());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.