Class: AbstractProviderByMap

AbstractProviderByMap

(abstract) new AbstractProviderByMap(map, options)

Uses the passed in map to provide items. This allows the most felxability as the map can be anything the itemProcessor can handle, but it requires the most knowledge of the SkillVC system to ensure everything is configured correctly in the Map This provider will still use the itemBuilder to build the item from the passed in JSON
Parameters:
Name Type Description
map Map The object structure of the raw items to use.
options Object.<String, Object> Options for configuration. This can also be used as a map to pass to the itemProcessor if the implementing class wants to pass information into the itemProcessor method
Implements:
Source:

Methods

getItem(itemId) → {Object}

Returns the item based on the itemId
Parameters:
Name Type Description
itemId String The id of the item to retrieve.
Source:
Returns:
The item. Null if no item is found
Type
Object

getItems() → {Object}

Returns all of the items stored. May be null
Source:
Returns:
All the items being managed by they provider
Type
Object

(abstract) processItem(items, itemId, map, options)

Processes the specific item and returns the result
Parameters:
Name Type Description
items Map Map of the items being processed
itemId String The Id of the item to process
map Object The map being processed
options Object Any options that are being passed to the ItemProcessor (can be null)
Implements:
Source:

(abstract) processItems(items, map, options)

Processes multiple items at once
Parameters:
Name Type Description
items Map Map of the items being processed
map Object The map being processed
options Object Any options that are being passed to the ItemProcessor (can be null)
Implements:
Source: