Interface V1Route
public interface V1Route
-
Method Summary
Modifier and TypeMethodDescriptionThe actual format string with "%s" in place of parameters that will be substitutedString[]
default String
getPathWithParameters
(String[] params) Similar togetPathWithParameters(Map)
but takes an ordered list of parameters for substitution.default String
getPathWithParameters
(Map<String, String> params) Generate path with specified parameters substituted into the path.Path formatted with colons prefixing each path parameter for use in defining the path in SparkJava ex /user/:idstatic String
Generates a path formatted with colons prefixing each path parameter for use in defining the path in SparkJava ex /user/:id
-
Method Details
-
getRawPath
String getRawPath()Path formatted with colons prefixing each path parameter for use in defining the path in SparkJava ex /user/:id- Returns:
-
getPathFormat
String getPathFormat()The actual format string with "%s" in place of parameters that will be substituted- Returns:
-
getPathParams
String[] getPathParams()- Returns:
- an array of key strings required for path resolution
- See Also:
-
rawPath
Generates a path formatted with colons prefixing each path parameter for use in defining the path in SparkJava ex /user/:id- Parameters:
pathFormat
- Format string for the path to this resourcepathParams
- list of parameter names to use in completing the path- Returns:
-
getPathWithParameters
Similar togetPathWithParameters(Map)
but takes an ordered list of parameters for substitution. It is recommended to use that method and specify parameters by name.- Parameters:
params
-- Returns:
- See Also:
-
getPathWithParameters
Generate path with specified parameters substituted into the path. This is the preferred way to generate the path to a resource. Example: A route may define the path /user/:id. To generate a path for id "123abc", pass into this method a Map that has key: "id" and value: "123abc". This will return the path /user/123abc ThegetPathParams()
method returns an array of key strings required.getPathParamsList()
returns keys as a list.- Parameters:
params
-- Returns:
-
getPathParamsList
-