Constraining annotations restrict the access to functions if specific properties are fulfilled:
===Path AnnotationPaths===
<code>%rest:path("/a/path/{$with}/some/{$variable}")</code>
A function is allowed to have <strong>at least one</strong> path annotation.
===HTTP Method AnnotationsMethods===
* Simple Method Annotations
%rest:HEAD
%rest:DELETE
<!-- TODO add some descripton -->
%rest:PUT
%rest:PUT("{$put-body}")
<!-- TODO add some descripton -->
===Media Type AnnotationsTypes===
* HTTP Content Type<br/><code>%rest:consumes()</code> one or more media-types as string. e.g.<code>%rest:consumes("application/xml", "text/xml")
Parameters are optional annotations that can be used to bind additional values to function arguments:
===Query String AnnotationsStrings===
<code>%rest:query-param()</code>
Assigns <em>first parameter</em> to the variable in <em>second parameter</em> if found in the [http://en.wikipedia.org/wiki/Query_string Query String]. As optional <em>third parameter</em> a default value may be given. Is no default set and the parameter not contained in the Query-String, the REST annotation will be ignored.
* <code>%rest:query-param("search", "{$search-param}")</code>
===HTML Form field AnnotationsFields===
<code>%rest:form-param()</code>
same usage as [[#Query String AnnotationsStrings]], but extracted from POST or GET.
<!-- TODO remark on file submission -->
===HTTP Header AnnotationsHeaders===
<code>%rest:header-param()</code>
same usage as [[#Query String AnnotationsStrings]], but extracted from HTTP Header.
Examples
* <code>%rest:header-param("Referer","{$referer}", "none")</code>
===Cookie AnnotationsCookies===
<code>%rest:cookie-param()</code>
same usage as [[#Query String AnnotationsStrings]], but extracted from Cookie.
Examples