The ObjectManager class is the basic class of all the files in Raddish, if the object you have created has the method getObject it extends from this class.


Methods

_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

The abstract initialize method sets the config, and when behaviors are added it will allocate them.

Parameters

Name Type Description
config Object the config for this object

Returned Value

Promise: A promise containing the initialized 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.


get (identifier, config)

static

The get method on the ObjectManager class will load an object. This is a static alias of the getObject method.

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.


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.