Class Index | File Index

Classes


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: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
orion.URITemplate(template)
Creates a new URITemplate.
Method Summary
Method Attributes Method Name and Description
 
expand(params)
Expands this URITemplate to a URI.
Class Detail
orion.URITemplate(template)
Creates a new URITemplate.
Parameters:
{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.
Parameters:
{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).
Returns:
{String} The resulting URI.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 29 2017 14:37:22 GMT-0400 (EDT)