Package rife.engine

Class PathInfoMapping

java.lang.Object
rife.engine.PathInfoMapping

public class PathInfoMapping extends Object
Micro DSL to describe the format of how a pathinfo should be structure and mapped to parameters.
Since:
1.0
  • Constructor Details

    • PathInfoMapping

      public PathInfoMapping()
  • Method Details

    • s

      public PathInfoMapping s()
      Indicates that a slash is expected.
      Returns:
      the instance of the DSL
      Since:
      1.0
    • t

      public PathInfoMapping t(String literal)
      Indicates that a text literal is expected
      Parameters:
      literal - the expected text literal
      Returns:
      the instance of the DSL
      Since:
      1.0
    • p

      public PathInfoMapping p(String name)
      Indicates that a match for regex [\w-._~]+ is expected and will be mapped to a named parameter.
      Parameters:
      name - the parameter name the pathinfo segment will be mapped to
      Returns:
      the instance of the DSL
      Since:
      1.0
    • p

      public PathInfoMapping p(String name, String regex)
      Indicates that a match for a provided regex is expected and will be mapped to a named parameter.
      Parameters:
      name - the parameter name the pathinfo segment will be mapped to
      regex - the regex that will be matched
      Returns:
      the instance of the DSL
      Since:
      1.0