Package org.springframework.hateoas.TemplateVariable

Examples of org.springframework.hateoas.TemplateVariable.VariableType


    if (queryParameters.containsKey(sortParameter)) {
      return TemplateVariables.NONE;
    }

    String description = String.format("pagination.%s.description", sortParameter);
    VariableType type = append ? REQUEST_PARAM_CONTINUED : REQUEST_PARAM;
    return new TemplateVariables(new TemplateVariable(sortParameter, type, description));
  }
View Full Code Here


    if (queryParameters.containsKey(sortParameter)) {
      return TemplateVariables.NONE;
    }

    String description = String.format("pagination.%s.description", sortParameter);
    VariableType type = append ? REQUEST_PARAM_CONTINUED : REQUEST_PARAM;
    return new TemplateVariables(new TemplateVariable(sortParameter, type, description));
  }
View Full Code Here

    for (String propertyName : Arrays.asList(pagePropertyName, sizePropertyName)) {

      if (!queryParameters.containsKey(propertyName)) {

        VariableType type = append ? REQUEST_PARAM_CONTINUED : REQUEST_PARAM;
        String description = String.format("pagination.%s.description", propertyName);
        names.add(new TemplateVariable(propertyName, type, description));
      }
    }
View Full Code Here

    for (String propertyName : Arrays.asList(pagePropertyName, sizePropertyName)) {

      if (!queryParameters.containsKey(propertyName)) {

        VariableType type = append ? REQUEST_PARAM_CONTINUED : REQUEST_PARAM;
        String description = String.format("pagination.%s.description", propertyName);
        names.add(new TemplateVariable(propertyName, type, description));
      }
    }
View Full Code Here

    while (matcher.find()) {

      int start = matcher.start(0);

      VariableType type = VariableType.from(matcher.group(1));
      String[] names = matcher.group(2).split(",");

      for (String name : names) {
        TemplateVariable variable = new TemplateVariable(name, type);
View Full Code Here

    StringBuilder builder = new StringBuilder();
    TemplateVariable previous = null;

    for (TemplateVariable variable : variables) {

      VariableType type = variable.getType();
      type = appended && type.equals(REQUEST_PARAM) ? REQUEST_PARAM_CONTINUED : type;

      if (previous == null) {
        builder.append("{").append(type.toString());
      } else if (!previous.isCombinable(variable)) {
        builder.append("}{").append(type.toString());
      } else {
        builder.append(",");
      }

      previous = variable;
View Full Code Here

    StringBuilder builder = new StringBuilder();
    TemplateVariable previous = null;

    for (TemplateVariable variable : variables) {

      VariableType type = variable.getType();
      type = appended && type.equals(REQUEST_PARAM) ? REQUEST_PARAM_CONTINUED : type;

      if (previous == null) {
        builder.append("{").append(type.toString());
      } else if (!previous.isCombinable(variable)) {
        builder.append("}{").append(type.toString());
      } else {
        builder.append(",");
      }

      previous = variable;
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.TemplateVariable.VariableType

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.