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 |
complete: * |
|
public get |
complete: * Indicate if this request is completely handled |
|
public get |
Return the database connection used by Tsugi. |
|
public get |
context: Context: * 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 |
Get a URL to the 'static' folder within this servlet |
|
public get |
Get the Link associated with the launch. |
|
public get |
Return the database helper class used by Tsugi. |
|
public get |
Return the database prefix used by Tsugi. |
|
public |
req: * |
|
public get |
request: * Get the request associated with the launch. |
|
public |
res: * |
|
public get |
response: * Get the response associated with the launch. |
|
public get |
Get the Result associated with the launch. |
|
public get |
Get the Service associated with the launch. |
|
public |
sess: * |
|
public get |
session: * Get the session associated with the launch. |
|
public |
The current user |
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 |
getPostUrl(path: string): number Get a POST URL to the current servlet |
|
public |
postRedirect(path: string): number Redirect to a path - can be null |
Public Constructors
Public Members
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 user |
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 getStaticUrl: number 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 req: * source
public res: * source
public sess: * source
Public Methods
public fill(row: *) source
Fill the data structures from the row data
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
path | string |