Class Index | File Index

Classes


Class AjaxSolr.AbstractManager

AbstractManager
Defined in: AbstractManager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
The Manager acts as the controller in a Model-View-Controller framework.
Field Summary
Field Attributes Field Name and Description
<private>  
Whether init() has been called yet.
 
If we want to proxy queries through a script, rather than send queries to Solr directly, set this field to the fully-qualified URL of the script.
<private>  
The most recent response from Solr.
 
The default Solr servlet.
 
The fully-qualified URL of the Solr application.
<private>  
The parameter store for the manager and its widgets.
<private>  
A collection of all registered widgets.
Method Summary
Method Attributes Method Name and Description
 
addWidget(widget)
Adds a widget to the manager.
 
doRequest(start, servlet)
Stores the Solr parameters to be sent to Solr and sends a request to Solr.
 
executeRequest(servlet)
An abstract hook for child implementations.
 
This method is executed after the Solr response data arrives.
 
init()
An abstract hook for child implementations.
 
setStore(store)
Set the manager's parameter store.
Class Detail
AjaxSolr.AbstractManager(properties)
The Manager acts as the controller in a Model-View-Controller framework. All public calls should be performed on the manager object.
Parameters:
properties
A map of fields to set. Refer to the list of public fields.
Field Detail
<private> {Boolean} initialized
Whether init() has been called yet. For internal use only.
Default Value:
false

{String} proxyUrl
If we want to proxy queries through a script, rather than send queries to Solr directly, set this field to the fully-qualified URL of the script.

<private> {Object} response
The most recent response from Solr.

{String} servlet
The default Solr servlet. You may prepend the servlet with a core if using multiple cores.
Default Value:
"select"

{String} solrUrl
The fully-qualified URL of the Solr application. You must include the trailing slash. Do not include the path to any Solr servlet.
Default Value:
"http://localhost:8983/solr/"

<private> {Object} store
The parameter store for the manager and its widgets. For internal use only.

<private> {Object} widgets
A collection of all registered widgets. For internal use only.
Method Detail
addWidget(widget)
Adds a widget to the manager.
Parameters:
{AjaxSolr.AbstractWidget} widget

doRequest(start, servlet)
Stores the Solr parameters to be sent to Solr and sends a request to Solr.
Parameters:
{Boolean} start Optional
The Solr start offset parameter.
{String} servlet Optional
The Solr servlet to send the request to.

executeRequest(servlet)
An abstract hook for child implementations.

Sends the request to Solr, i.e. to this.solrUrl or this.proxyUrl, and receives Solr's response. It should send this.store.string() as the Solr query, and it should pass Solr's response to handleResponse() for handling.

See managers/Manager.jquery.js for a jQuery implementation.

Parameters:
{String} servlet
The Solr servlet to send the request to.
Throws:
If not defined in child implementation.

handleResponse(data)
This method is executed after the Solr response data arrives. Allows each widget to handle Solr's response separately.
Parameters:
{Object} data
The Solr response.

init()
An abstract hook for child implementations.

This method should be called after the store and the widgets have been added. It should initialize the widgets and the store, and do any other one-time initializations, e.g., perform the first request to Solr.

If no store has been set, it sets the store to the basic AjaxSolr.ParameterStore.


setStore(store)
Set the manager's parameter store.
Parameters:
{AjaxSolr.ParameterStore} store

Documentation generated by JsDoc Toolkit 2.3.0 on Wed Sep 07 2011 22:31:36 GMT-0400 (EDT)