=RESTful Annotations=
A List of This section lists all implemented available annotations. As sample namespace for REST annotations <code>rest</code> is usedas namespace prefix.
==Constraints==
Constraining annotations restrict the access to functions if specific properties are fulfilled:
===Path Annotation===
==Path Annotation (constraint)==
<code>%rest:path("/a/path/{$with}/some/{$variable}")</code>
if url matches the given pattern, variables (in curly brackets) will be assigned. The variables serve as input arguments for the function. The type will be converted, as defined by the function.
A function is allowed to have <strong>at least one</strong> path annotation.
===HTTP Method Annotations (constraints)===
* Simple Method Annotations
<!-- TODO add some descripton -->
===Media Type Annotations (constraint)===
* HTTP Content Type<br/><code>%rest:consumes()</code> one or more media-types as string. e.g.<code>%rest:consumes("application/xml", "text/xml")
* HTTP Accept<br/><code>%rest:produces()</code> one media-type as string. e.g. <code>%rest:produces("application/atom+xml")</code>
These default to <code>*/*</code>, if no media-type annotations are given.
==Parameters== Parameters are optional annotations that can be used to bind additional values to function arguments: ===Query String Annotations (Parameter)===
<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 Annotations===
==HTML Form field Annotations (Parameter)==
<code>%rest:form-param()</code>
same usage as [[#Query String Annotations (Parameter)]], but extracted from POST or GET.
<!-- TODO remark on file submission -->
===HTTP Header Annotations (Parameter)===
<code>%rest:header-param()</code>
same usage as [[#Query String Annotations (Parameter)]], but extracted from HTTP Header.
Examples
* <code>%rest:header-param("Referer","{$referer}", "none")</code>
===Cookie Annotations (Parameter)===
<code>%rest:cookie-param()</code>
same usage as [[#Query String Annotations (Parameter)]], but extracted from Cookie.
Examples