Class: Discoverer

Discoverer

The Discoverer handles requests for components and attributes.

new Discoverer()

Constructor: All known components given in the associated functions will be registered as startup.

Requires

  • module:easejs
  • module:AttributeTypeList

Methods

Returns the aggregator for the specified id.
Name Type Description
_id string id of the component that should be returned

getAggregatorDescriptions(){Array}

Returns the description of all registered aggregators.
Returns the instance (widget, aggregator or interpreter) for the specified id.
Name Type Description
_id string id of the component that should be returned

getComponentsByAttributes(_attributeTypeList, _all, _componentTypes){Array}

Returns all components that have the specified attribute as outAttribute. It can be chosen between the verification of all attributes or at least one attribute.
Name Type Description
_attributeTypeList AttributeTypeList list of searched attributes
_all boolean choise of the verification mode
_componentTypes Array Components types to search for

getDescriptions(_componentTypes){Array}

Returns the description of all registered components (widget, aggregator and interpreter).
Name Type Description
_componentTypes Array Component types to get descriptions for. Defaults to Widget, Interpreter and Aggregator.
Returns the interpreter for the specified id.
Name Type Description
_id string id of the component that should be returned

getInterpreterDescriptions(){Array}

Returns the description of all registered interpreter.

getType(){string}

Returns the type of this class, in this case "Discoverer".
Returns the widget for the specified id.
Name Type Description
_id string id of the component that should be returned

getWidgetDescriptions(){Array}

Returns the description of all registered widgets.

registerNewComponent(_component)

Registers the specified component.
Name Type Description
_component Widget | Aggregator | Interpreter the component that should be registered

unregisterComponent(_id)

Deletes a component from the Discoverer.
Name Type Description
_id string id of the component that should be registered