The Carapace Hub uses a WebEnvironment
object to hold information about an individual HTTP sessions. This information
is available for access by scripts processed within
the HTML Templates.
When evaluating Carapace script expressions
within a template, the local variable env
holds the appropriate web environment for that
session.
This object can then be accessed using its properties and methods.
| property name | property type | description |
|---|---|---|
user |
String | name of the user who owns this session |
resources |
List | list of resources which this user may access |
cleanupExpressions |
List | list of expressions to be evaluated when this environment is cleaned up |
The WebEnvironment object supports the following methods:
| method name | description |
|---|---|
get |
get a value from the environment |
set |
set a value in the environment |
getGet a value from the environment .
Arguments:
| attributeName | String |
Return type: Object
setSet a value in the environment .
Arguments:
| attributeName | String |
| attributeValue | Object |
Return type: the empty List ()
| Contents | Index | Current topic: Carapace Hub | Related topics: web environments |