new DocumentFactory()
Represents document schemas mapped to contructor claasses which extend IDocument
- Source
Extends
- EventEmitter
Methods
(static) addFactory(type, factory)
Parameters:
Name | Type | Description |
---|---|---|
type | * | |
factory | * |
- Source
(static) getDocument(type, id, data) → {module:Party.IDocument}
Parameters:
Name | Type | Description |
---|---|---|
type | string | |
id | string | |
data | Object |
Returns:
- Type:
- module:Party.
IDocument
(static) getFactories()
- Source
(static) getFactory(type)
Parameters:
Name | Type | Description |
---|---|---|
type | * |
- Source
(static) getTypes()
- Source
(static) getValidators()
- Source
(async, static) hydrate(found)
Parameters:
Name | Type | Description |
---|---|---|
found | * |
- Source
(async, static) validate(type, data)
Parameters:
Name | Type | Description |
---|---|---|
type | * | |
data | * |