Party. DocumentFactory

new DocumentFactory()

Represents document schemas mapped to contructor claasses which extend IDocument

Extends

  • EventEmitter

Methods

(static) addFactory(type, factory)

Parameters:
NameTypeDescription
type*
factory*

(static) getDocument(type, id, data) → {module:Party.IDocument}

Parameters:
NameTypeDescription
typestring
idstring
dataObject
Returns:
Type: 
module:Party.IDocument

(static) getFactories()

(static) getFactory(type)

Parameters:
NameTypeDescription
type*

(static) getTypes()

(static) getValidators()

(async, static) hydrate(found)

Parameters:
NameTypeDescription
found*

(async, static) validate(type, data)

Parameters:
NameTypeDescription
type*
data*