new AbstractProviderBySyncDirectory(directory, options)
Provides an item by loading all of the files in a directory
Items are loaded synchronously. This object should only be used to load files that must be processed immediately as it
will block execution until all the files in the directory have been processed.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
directory |
String | The directory to read from | ||||||||||||||||||||
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
Properties
|
- Implements:
- Source:
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
(abstract) processItem(items, itemId, fileName, 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 |
fileName |
String | The name of the file being processed |
options |
Object | Any options that are being passed to the ItemProcessor (can be null) |
- Implements:
- Source:
(abstract) processItems(items, fileName, options)
Processes multiple items at once
Parameters:
Name | Type | Description |
---|---|---|
items |
Map | Map of the items being processed |
fileName |
String | The name of the file being processed |
options |
Object | Any options that are being passed to the ItemProcessor (can be null) |
- Implements:
- Source: