manager.js

Summary
manager.js
bbop.rest.managerGeneric BBOP manager for dealing with basic generic REST calls.
Functions
managerContructor for the REST manager
debugTurn on or off the verbose messages.
resourceThe base target URL for our operations.
payloadThe information to deliver to the resource.
methodThe method to use to get the resource, as a string.
actionThis method is the most fundamental operation.
to_stringOutput writer for this object/class.
assembleAssemble the resource and arguments into a URL string.
updateThe user code to select the type of update (and thus the type of callbacks to be called on data return).

bbop.rest.manager

Generic BBOP manager for dealing with basic generic REST calls.  This specific one is designed to be overridden by its subclasses.  This one pretty much just uses its incoming resource string as the data.  Mostly for testing purposes.

Both a bbop.rest.response (or clean error data) and the manager itself (this as anchor) should be passed to the callbacks.

Summary
Functions
managerContructor for the REST manager
debugTurn on or off the verbose messages.
resourceThe base target URL for our operations.
payloadThe information to deliver to the resource.
methodThe method to use to get the resource, as a string.
actionThis method is the most fundamental operation.
to_stringOutput writer for this object/class.
assembleAssemble the resource and arguments into a URL string.
updateThe user code to select the type of update (and thus the type of callbacks to be called on data return).

Functions

manager

bbop.rest.manager = function(response_handler)

Contructor for the REST manager

Arguments

response_parserthe response handler class to use for each call

Returns

rest manager object

See also

bbop.registry

debug

this.debug = function(p)

Turn on or off the verbose messages.  Uses bbop.logger, so they should come out everywhere.

Parameters

p[optional] true or false for debugging

Returns

boolean; the current state of debugging

resource

this.resource = function(url)

The base target URL for our operations.

Parameters

url[optional] update resource target with string

Returns

the url as string (or null)

payload

this.payload = function(payload)

The information to deliver to the resource.

Parameters

payload[optional] update payload information

Returns

a copy of the current payload

method

this.method = function(method)

The method to use to get the resource, as a string.

Parameters

method[optional] update aquisition method with string

Returns

the string or null

action

this.action = function(url,
payload,
method)

This method is the most fundamental operation.  It should combine the URL, payload, and method in the ways appropriate to the subclass engine.  This one merely combines the string.

The method argument is naturally ignored in this dummy class.

Parameters

url[optional] update resource target with string
payload[serially optional] object to represent arguments
method[serially optional] (GET, POST, etc.)

Returns

the combined URL argument as string

See also

update

to_string

bbop.rest.manager.prototype.to_string = function ()

Output writer for this object/class.  See the documentation in core.js on <dump> and to_string.

Parameters

n/a

Returns

string

assemble

bbop.rest.manager.prototype.assemble = function()

Assemble the resource and arguments into a URL string.

May not be appropriate for all subclasses.  Often used as a helper, etc.

Parameters

n/a

Returns

url string

Also see

<get_query_url>

update

bbop.rest.manager.prototype.update = function(callback_type)

The user code to select the type of update (and thus the type of callbacks to be called on data return).

Parameters

callback_typecallback type string; ‘success’ and ‘error’ (see subclasses)

Returns

the query url

Also see

<get_query_url>

bbop.rest.manager = function(response_handler)
Contructor for the REST manager
this.debug = function(p)
Turn on or off the verbose messages.
this.resource = function(url)
The base target URL for our operations.
this.payload = function(payload)
The information to deliver to the resource.
this.method = function(method)
The method to use to get the resource, as a string.
this.action = function(url,
payload,
method)
This method is the most fundamental operation.
bbop.rest.manager.prototype.to_string = function ()
Output writer for this object/class.
bbop.rest.manager.prototype.assemble = function()
Assemble the resource and arguments into a URL string.
bbop.rest.manager.prototype.update = function(callback_type)
The user code to select the type of update (and thus the type of callbacks to be called on data return).
Generic BBOP handler for dealing with the gross parsing of responses from a REST server.
BBOP generic lightweight listener/callback registry system.
BBOP JS logger object.
Close