Zimlet JavaScript API Reference - ZmCsfeCommand

Class ZmCsfeCommand


This class represents a command.

Defined in: ZmCsfeCommand.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a command.
Method Summary
Method Attributes Method Name and Description
 
Cancels this request (which must be async).
<static>  
ZmCsfeCommand.clearAuthToken()
Clears the auth token cookie.
<static>  
ZmCsfeCommand.extractSessionId(session)
Isolates the parsing of the various forms of session types that we might have to handle.
<static>  
ZmCsfeCommand.faultToEx(fault, params)
Converts a fault to an exception.
<static>  
ZmCsfeCommand.getAuthToken()
Gets the auth token cookie.
<static>  
ZmCsfeCommand.getMethodName(request)
Gets the method name of the given request or response.
<static>  
ZmCsfeCommand.getRequestStr(params)
Gets the request string.
<static>  
ZmCsfeCommand.getSessionId()
Gets the session id.
 
invoke(params, soapDoc, jsonObj, noAuthToken, authToken, serverUri, targetServer, useXml, noSession, changeToken, highestNotifySeen, asyncMode, callback, logRequest, accountId, accountName, skipAuthCheck, resend, useStringify1, emptyResponseOkay)
Sends a SOAP request to the server and processes the response.
 
invokeRest(params)
Sends a REST request to the server via GET and returns the response.
<static>  
ZmCsfeCommand.setAuthToken(authToken, lifetimeMs, sessionId, secure)
Sets the auth token.
<static>  
ZmCsfeCommand.setCookieName(cookieName)
Sets the auth token cookie name.
<static>  
ZmCsfeCommand.setServerUri(uri)
Sets the server URI.
<static>  
ZmCsfeCommand.setSessionId(sessionId)
Sets the session id and, if the session id is new, designates the previous session id as stale.
Class Detail
ZmCsfeCommand()
Creates a command.
Method Detail
cancel()
Cancels this request (which must be async).

<static> ZmCsfeCommand.clearAuthToken()
Clears the auth token cookie.

<static> {Number|Null} ZmCsfeCommand.extractSessionId(session)
Isolates the parsing of the various forms of session types that we might have to handle.
Parameters:
{mixed} session
Any valid session object: string, number, object, or array.
Returns:
{Number|Null} If the input contained a valid session object, the session number will be returned. If the input is not valid, null will be returned.

<static> {ZmCsfeException} ZmCsfeCommand.faultToEx(fault, params)
Converts a fault to an exception.
Parameters:
{Hash} fault
the fault
{Hash} params
a hash of parameters
Returns:
{ZmCsfeException} the exception

<static> {String} ZmCsfeCommand.getAuthToken()
Gets the auth token cookie.
Returns:
{String} the auth token

<static> {String} ZmCsfeCommand.getMethodName(request)
Gets the method name of the given request or response.
Parameters:
{AjxSoapDoc|Object} request
the request
Returns:
{String} the method name or "[unknown]"

<static> {String} ZmCsfeCommand.getRequestStr(params)
Gets the request string.
Parameters:
{Hash} params
a hash of parameters
Returns:
{String} the request string

<static> {String} ZmCsfeCommand.getSessionId()
Gets the session id.
Returns:
{String} the session id

invoke(params, soapDoc, jsonObj, noAuthToken, authToken, serverUri, targetServer, useXml, noSession, changeToken, highestNotifySeen, asyncMode, callback, logRequest, accountId, accountName, skipAuthCheck, resend, useStringify1, emptyResponseOkay)
Sends a SOAP request to the server and processes the response. The request can be in the form of a SOAP document, or a JSON object.
Parameters:
{Hash} params
a hash of parameters:
{AjxSoapDoc} soapDoc
the SOAP document that represents the request
{Object} jsonObj
the JSON object that represents the request (alternative to soapDoc)
{Boolean} noAuthToken
if true, the check for an auth token is skipped
{Boolean} authToken
authToken to use instead of the local one
{String} serverUri
the URI to send the request to
{String} targetServer
the host that services the request
{Boolean} useXml
if true, an XML response is requested
{Boolean} noSession
if true, no session info is included
{String} changeToken
the current change token
{int} highestNotifySeen
the sequence # of the highest notification we have processed
{Boolean} asyncMode
if true, request sent asynchronously
{AjxCallback} callback
the callback to run when response is received (async mode)
{Boolean} logRequest
if true, SOAP command name is appended to server URL
{String} accountId
the ID of account to execute on behalf of
{String} accountName
the name of account to execute on behalf of
{Boolean} skipAuthCheck
if true to skip auth check (i.e. do not check if auth token has changed)
{constant} resend
the reason for resending request
{boolean} useStringify1
use JSON.stringify1 (gets around IE child win issue with Array)
{boolean} emptyResponseOkay
if true, empty or no response from server is not an erro

invokeRest(params)
Sends a REST request to the server via GET and returns the response.
Parameters:
{Hash} params
a hash of parameters
{String} params.restUri
the REST URI to send the request to
{Boolean} params.asyncMode
if true request sent asynchronously
{AjxCallback} params.callback
the callback to run when response is received (async mode)

<static> ZmCsfeCommand.setAuthToken(authToken, lifetimeMs, sessionId, secure)
Sets the auth token.
Parameters:
{String} authToken
the auth token
{int} lifetimeMs
the token lifetime in milliseconds
{String} sessionId
the session id
{Boolean} secure
true for secure

<static> ZmCsfeCommand.setCookieName(cookieName)
Sets the auth token cookie name.
Parameters:
{String} cookieName
the cookie name to user

<static> ZmCsfeCommand.setServerUri(uri)
Sets the server URI.
Parameters:
{String} uri
the URI

<static> ZmCsfeCommand.setSessionId(sessionId)
Sets the session id and, if the session id is new, designates the previous session id as stale.
Parameters:
{String} sessionId
the session id

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:30 GMT-0400 (EDT)