Home Reference Source Repository
import Launch from 'tsugi-node/src/core/Launch.js'
public class | source

Launch

This captures all of the data associated with the LTI Launch.

Constructor Summary

Public Constructor
public

constructor(Configuration: Config)

Member Summary

Public Members
public

The current conficuration

public set
public get

Indicate if this request is completely handled

public get

Get the Context associated with the launch.

public get

Get any needed hidden form fields

public get

Get a URL to a system-wide spinner image

public get

link: *

Get the Link associated with the launch.

public get

output: *

Return the Output helper class used by Tsugi.

public

req: *

public get

request: *

Get the request associated with the launch.

public

res: *

public get

Get the response associated with the launch.

public get

result: *

Get the Result associated with the launch.

public get

service: *

Get the Service associated with the launch.

public

sess: *

public get

session: *

Get the session associated with the launch.

public get

Get a URL to the 'static' folder within this servlet

public get

user: *

Get the User associated with the launch.

Method Summary

Public Methods
public

fill(row: *)

Fill the data structures from the row data

public

Get a GET URL to the current servlet

public

Get a POST URL to the current servlet

public

Redirect to a path - can be null

Public Constructors

public constructor(Configuration: Config) source

Params:

NameTypeAttributeDescription
Configuration Config

settings

Public Members

public CFG: Config source

The current conficuration

public set complete: * source

public get complete: * source

Indicate if this request is completely handled

This is used as follows:


     get void doPost (...)
     Launch launch = tsugi.getLaunch(req, res);
     if ( launch.isComplete() ) return;

This allows the Tsugi framework to do things like redirect back to itself.

public get context: Context: * source

Get the Context associated with the launch.

Return:

Context

the context

public get getHidden: string: number source

Get any needed hidden form fields

This will be properly formatted HTML - most likely one or more input type="hidden" fields - the framework may use this to help it maintain context across request / response cycles.

Return:

string

Text to include in a form. May be the empty string if nothing is needed by the framework.

public get getSpinnerUrl: number source

Get a URL to a system-wide spinner image

Get the Link associated with the launch.

public get output: * source

Return the Output helper class used by Tsugi.

public req: * source

public get request: * source

Get the request associated with the launch.

public res: * source

public get response: * source

Get the response associated with the launch.

public get result: * source

Get the Result associated with the launch.

public get service: * source

Get the Service associated with the launch.

public sess: * source

public get session: * source

Get the session associated with the launch.

public get staticUrl: * source

Get a URL to the 'static' folder within this servlet

We abstract this because this might be stored in a CDN for this application. TODO: Define the property for this

public get user: * source

Get the User associated with the launch.

Public Methods

public fill(row: *) source

Fill the data structures from the row data

Params:

NameTypeAttributeDescription
row *

public getGetUrl(path: string): number source

Get a GET URL to the current servlet

We abstract this in case the framework needs to point to a URL other than the URL in the request object. This URL should be used for AJAX calls to dynamic data in JavaScript.

Params:

NameTypeAttributeDescription
path string

Return:

number

public getPostUrl(path: string): number source

Get a POST URL to the current servlet

We abstract this in case the framework needs to point to a URL other than the URL in the request object.

Params:

NameTypeAttributeDescription
path string

Return:

number

public postRedirect(path: string): number source

Redirect to a path - can be null

Params:

NameTypeAttributeDescription
path string

Return:

number