Class Index | File Index


Class orion.URITemplate

A URITemplate describes a range of Uniform Resource Identifiers through variable expansion, and allows for particular URIs to be generated by expanding variables to actual values.

Because the syntax and encoding rules of URIs can be complex, URITemplates are recommended over manual construction of URIs through string concatenation or other means.

A URITemplate is created by invoking the constructor, passing a template string:

new URITemplate(template)

The template string is an expression following a well-defined syntax (see here for an introduction). Most notably, the template may include variables.

Once created, a URITemplate's #expand method can be invoked to generate a URI. Arguments to #expand give the values to be substituted for the template variables.

Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js>.

Class Summary
Constructor Attributes Constructor Name and Description
Creates a new URITemplate.
Method Summary
Method Attributes Method Name and Description
Expands this URITemplate to a URI.
Class Detail
Creates a new URITemplate.
{String} template
The template string. Refer to RFC 6570 for details of the template syntax.
Method Detail
{String} expand(params)
Expands this URITemplate to a URI.
{Object} params
The parameters to use for expansion. This object is a map of keys (variable names) to values (the variable's value in the expansion algorithm).
{String} The resulting URI.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Apr 01 2014 22:58:24 GMT-0400 (EDT)