new Context( [Object])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
Object |
<optional> |
configs Configuration parameters |
- Source:
Extends
Methods
-
__copyState()
-
Override the Chain.__copyState method so that it utilizes a base method that we can override
on a per-class basis.- Inherited From:
- Source:
-
chainCopyState(otherObject)
-
Used internally during chain copy going forward or backward through the chain.
This is wired into the Chain.__copyState method and allows a convenient way to override
chain copy behavior on a per-object-type basis.Parameters:
Name Type Description otherObject
- Inherited From:
- Source:
-
chainCreate(chainable, object, uri, params)
-
Creates an object on the server (write + read).
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
object
uri
params
- Inherited From:
- Source:
-
chainCreateEx(chainable, object, createUri, readUri)
-
Creates an object on the server using one URL and then reads it back using another URL.
This exists because the security responses don't include _doc fields like other responses.Proceeds with the chain as bound to the chainable.
Parameters:
Name Type Description chainable
object
createUri
readUri
- Inherited From:
- Source:
-
chainGet(chainable, uri, params)
-
Performs a GET from the server and populates the chainable.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
- Inherited From:
- Source:
-
chainGetResponse(chainable, uri, params)
-
Performs a GET to the server and pushes the response into the chain.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
- Inherited From:
- Source:
-
chainGetResponseRows(chainable, uri, params)
-
Performs a GET to the server and pushes the "rows" response attribute into the chain.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
- Inherited From:
- Source:
-
chainGetResponseText(chainable, uri, params)
-
Performs a GET to the server and pushes the text response to the callback.
Parameters:
Name Type Description chainable
uri
params
- Inherited From:
- Source:
-
chainHasResponseRow(chainable, uri, value)
-
Performs a GET to the server and checks whether the "rows" array attribute of the response
has the given value.Proceeds with the chain as bound to the chainable.
Parameters:
Name Type Description chainable
uri
value
- Inherited From:
- Source:
-
chainPost(chainable, uri, params, payload, handleFn)
-
Performs a POST to the server and populates the chainable with results.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
payload
handleFn
- Inherited From:
- Source:
-
chainPostEmpty(chainable, uri, params, payload, contentType)
-
Performs a POST to the server. The response is not handled.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
payload
(optional)
contentType
(optional) - example "text/plain"
- Inherited From:
- Source:
-
chainPostResponse(chainable, uri, params)
-
Performs a POST to the server and pushes the response into the chain.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
- Inherited From:
- Source:
-
chainUpload(chainable, uri, params, contentType, payload)
-
Performs a POST to the server. The response is not handled.
Proceeds with the chain as bound to the chainable.Parameters:
Name Type Description chainable
uri
params
contentType
(optional) - example "text/plain"
payload
(optional)
- Inherited From:
- Source:
-
extractPrincipalDomainQualifiedId(principal)
-
Helper to gets the principal id for a principal object, json structure or principal id itself.
This returns something like "domainId/principalId"Parameters:
Name Type Description principal
- Inherited From:
- Source:
-
extractPrincipalIdentifiers(principal, defaultDomainId)
-
Helper to gets the principal id for a principal object, json structure or principal id itself.
This returns something like "domainId/principalId"Parameters:
Name Type Description principal
principal object or string (principal id or domain qualified principal id)
defaultDomainId
- Inherited From:
- Source:
-
init()
-
Hands back an initialized version of the Gitana Context object
- Source: