new DefaultProviderByScanning(files, options)
Loads filters, intentHandlers, sessionHandlers, and responses by scanning all of the passed in files
for the method signatures that define each of the types. This model allows one object to
handle all types (except responses). As responses are pure JSON, they cannot be detected by function
signatures and have to be detected by filename signature.
The internal data structure that is made available via getItem() is:
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
files |
String | The files to scan | |||||||||||||||||||||||||
options |
Object.<String, Object> | Options for scanning
Properties
|
- Implements:
- Source:
- See:
Example
{
sessionHandlers : {
start : [],
end : []
},
filters : {
pre : [],
post : []
},
intentHandlers : {},
responses : {}
};
Methods
getItem(itemId) → {Object}
Returns the item stored under the itemId. May be null
Parameters:
Name | Type | Description |
---|---|---|
itemId |
String | The Id of the item to return |
- Implements:
- Source:
Returns:
The item corresponding to the itemId
- Type
- Object
getItems() → {Object}
Returns all of the items stored. May be null
- Implements:
- Source:
Returns:
All the items being managed by they provider
- Type
- Object