The HttpDispatcher will only check a single post variable.


Methods

_actionDispatch (context)

private

Inherited from AbstractDispatcher but overwritten in lib/dispatcher/http.js:12

The _actionDispatch method will set the method of the request to the context. It is possible to override the default by sending the _action post variable (corresponding with the method name in the controller).

eg: sending _action test in a request will call the _actionTest in the controller.

Parameters

Name Type Description
context Object The object holding the complete context.

Returned Value

Promise: A promise containing the closed request object.


_getComponentConfig (identifier, config)

private

The _getComponentConfig is an internal method to combine all the config object together. Usually you don't have to call this method manually.

Parameters

Name Type Description
identifier Identifier The identifier object of the object to load.
config Object The config object for the object to load.

Returned Value

Object: The complete and combined config object.


_initialize (config)

private

Inherited from ObjectManager but overwritten in lib/dispatcher/abstract.js:20

The _initialize method initializes the dispatcher, this method will set the default controller which is being requested.

Parameters

Name Type Description
config Object

Returned Value

Promise: A promise contianing the initialised object.


clone ()

The clone method will return a clone of the current object. The clone is going exactly 4 levels deep.

Returned Value

Object: The cloned object.


execute (method, context)

The execute method executes a method against the command chain.

Parameters

Name Type Description
method Object The method to execute
context Object A simple object to act as the basic context.

Returned Value

Promise: A promise containing the context with the result of the call.


getAuthenticator ()

This method will return the authenticator related to your dispatcher.

Returned Value

Promise: A promise containing your authenticator.


getCommandChain ()

The getCommandChain will return the command chain for the current object.

Returned Value

CommandChain: The command chain object.


getIdentifier ()

The getIdentifier method will return the identifier for the current object.

Returned Value

Identifier: The identifier object from Raddish-Loader


getObject (identifier, config)

The getObject method will try to load the specified identifier. An optional config can be given for the identifier to load.

Parameters

Name Type Description
identifier String|Identifier An identifier string/ object.
config Object An optional config object.

Returned Value

Promise: A promise containing the initialized object.


getView (view, format)

This method returns the controller that is related to the dispatcher and the view you have requested.

Parameters

Name Type Description
view String The requested view.
format String The requested format.

Returned Value

Promise: A promise containing the requested controller.