@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface Param
Route parameters can be annotated to provide constrain the value of a parameter, for instance:
public class MyController {
@View
@Route
("/myview/{id}")
public Response.Content
myView(@Param
(pattern = "[0-9]+") String id) { ... }
}
Modifier and Type | Optional Element and Description |
---|---|
boolean |
captureGroup |
String |
name
The parameter name, when set overrides the introspected name.
|
String |
pattern
The parameter pattern as a valid regular expression.
|
boolean |
preservePath |
public abstract String name
public abstract String pattern
public abstract boolean preservePath
public abstract boolean captureGroup
Copyright © 2015 eXo Platform SAS. All rights reserved.