jquery.js

Summary
jquery.js
bbop.golr.manager.jqueryjQuery BBOP manager for dealing with actual ajax calls.
Functions
jqueryContructor for the GOlr query manager
safetyGetter/setter for the trigger safety.
updateSee the documentation in <golr_manager.js> on update to get more of the story.
run_batchA distant cousin of update.
fetchA cousin of update, but is made to avoid all of the usual callback functions (except error) and just run the single function from the argument.
bbop.golr.faux_ajax
Functions
faux_ajaxContructor for a fake and inactive Ajax.
ajaxFake call to jQuery’s ajax.
parseJSONFake call to jQuery’s parseJSON.

bbop.golr.manager.jquery

jQuery BBOP manager for dealing with actual ajax calls.  Remember, this is actually a “subclass” of bbop.golr.manager.

This should still be able to limp along (no ajax and no error parsing) even outside of a jQuery environment.

Summary
Functions
jqueryContructor for the GOlr query manager
safetyGetter/setter for the trigger safety.
updateSee the documentation in <golr_manager.js> on update to get more of the story.
run_batchA distant cousin of update.
fetchA cousin of update, but is made to avoid all of the usual callback functions (except error) and just run the single function from the argument.

Functions

jquery

bbop.golr.manager.jquery = function (golr_loc,
golr_conf_obj)

Contructor for the GOlr query manager

Arguments

golr_locstring url to GOlr server;
golr_conf_obja bbop.golr.conf object

Returns

golr manager object

See also

bbop.golr.manager

safety

this.safety = function(safety_on_p)

Getter/setter for the trigger safety.

If the safety is on, ajax events controlled by the manager will not occur.  The default if off (false).

Parameters

safety_on_pboolean

Returns

boolean

update

bbop.golr.manager.jquery.prototype.update = function(callback_type,
rows,
start)

See the documentation in <golr_manager.js> on update to get more of the story.  This override function adds functionality for jQuery.

You can prevent the triggering of ajax with the safety method.

Parameters

callback_typecallback type string
rows[serially optional] integer; the number of rows to return
start[serially optional] integer; the offset of the returned rows

Returns

the query url (with the jQuery callback specific parameters)

Also see

get_query_url

run_batch

bbop.golr.manager.jquery.prototype.run_batch = function(accumulator_func,
final_func)

A distant cousin of update.  Designed to “serially” get data from a server for certain types of data crunching routines.

Why would you want this?  Lets say there are ten distinct things that you want from the server.  Coordinating and collating them all without annoying the server or going insane is hard in an asynchronous environment.

Parameters

accumulator_functhe function that collects
final_functhe function to run on completion

Returns

the number of batch items run

fetch

bbop.golr.manager.jquery.prototype.fetch = function(run_func)

A cousin of update, but is made to avoid all of the usual callback functions (except error) and just run the single function from the argument.

Why would you want this?  Sometimes you need just a little data without updating the whole interface or whatever.

Parameters

run_functhe function to run on completion

Returns

n/a

bbop.golr.faux_ajax

Summary
Functions
faux_ajaxContructor for a fake and inactive Ajax.
ajaxFake call to jQuery’s ajax.
parseJSONFake call to jQuery’s parseJSON.

Functions

faux_ajax

bbop.golr.faux_ajax = function ()

Contructor for a fake and inactive Ajax.  Used by bbop.golr.manager.jquery in (testing) environments where jQuery is not available.

Returns

faux_ajax object

ajax

this.ajax = function(args)

Fake call to jQuery’s ajax.

Parameters

argswhatever

Returns

null

parseJSON

this.parseJSON = function(args)

Fake call to jQuery’s parseJSON.

Parameters

argswhatever--they are ignored

Returns

””

bbop.golr.manager.jquery = function (golr_loc,
golr_conf_obj)
Contructor for the GOlr query manager
this.safety = function(safety_on_p)
Getter/setter for the trigger safety.
bbop.golr.manager.jquery.prototype.update = function(callback_type,
rows,
start)
See the documentation in golr_manager.js on update to get more of the story.
bbop.golr.manager.jquery.prototype.run_batch = function(accumulator_func,
final_func)
A distant cousin of update.
bbop.golr.manager.jquery.prototype.fetch = function(run_func)
A cousin of update, but is made to avoid all of the usual callback functions (except error) and just run the single function from the argument.
bbop.golr.faux_ajax = function ()
Contructor for a fake and inactive Ajax.
this.ajax = function(args)
Fake call to jQuery’s ajax.
this.parseJSON = function(args)
Fake call to jQuery’s parseJSON.
Generic BBOP manager for dealing with gross GOlr configuration and management.
this.get_query_url = function()
Get the current invariant state of the manager returned as a URL string.
Close