Class TemplatePathPattern

  • All Implemented Interfaces:
    com.hexagonkt.http.patterns.PathPattern

    
    public final class TemplatePathPattern
     implements PathPattern
                        

    A path definition. It parses path patterns and extract values for parameters.

    No splat support (you can use named parameters though).

    Delimiter is {var} to conform with RFC 6570.

    It supports the {var:regex} format to match only parameters with a specific pattern.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final List<String> parameters
      private final String pattern
      private final Boolean prefix
    • Constructor Summary

      Constructors 
      Constructor Description
      TemplatePathPattern(String pattern, Boolean prefix)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<String> getParameters()
      String getPattern()
      Boolean getPrefix()
      String insertParameters(Map<String, Object> parameters)
      • Methods inherited from class com.hexagonkt.http.patterns.PathPattern

        addPrefix, describe, extractParameters, matches
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TemplatePathPattern

        TemplatePathPattern(String pattern, Boolean prefix)