BaseEnvironment Class
The Base Juju environment.
This class is intended to be subclassed by real environment implementations.
Item Index
Methods
_firePermissionDenied
-
op
Fire a "permissionDenied" event passing the attempted operation.
Parameters:
-
opObjectThe attempted operation (with an "op" attr).
Returns:
dispatch_result
-
data
Dispatch the results returned by the API backend. Take care of calling attached callbacks and firing events. Subclasses must implement the "dispatchrpcresult" and "dispatch_event" methods or override this method directly.
Parameters:
-
dataObjectThe JSON contents returned by the API backend.
Returns:
get
()
Boolean
Returns whether or not credentials are populated.
Returns:
getCredentials
()
Object
Retrieve the stored user credentials.
Returns:
logout
()
Undefined
Clear login information.
Returns:
on_message
-
evt
Fire a "msg" event when a message is received from the WebSocket.
Parameters:
-
evtObjectThe event triggered by the WebSocket.
Returns:
setCredentials
-
The
Store the user's credentials in session storage.
Parameters:
-
TheObjectcredentials to store, with a 'user' and a 'password' attribute included.
