Module: x2node-ws-resources

Persistent resources for the web services module.

Requires

Classes

CollectionResourceHandler
IndividualResourceHandler
AbstractResourceHandler
ResourceHandlersFactory
TransactionContext

Mixins

HandlerExtension

Members


<static> AUTOASSIGNED

Validators to use on auto-assigned required properties in the record types library definition. When a new record is created, requires the property to be empty. When the record is being updated, requires the property to have value.

<static> OPTIONALLY_AUTOASSIGNED

Validators to use on optionally auto-assigned required properties in the record types library definition. When a new record is created, the property is allowed to be empty or not. When the record is being updated, requires the property to have value.

Methods


<static> createResourceHandlersFactory(ds, dboFactory [, defaultOptions])

Create resource handlers factory.
Parameters:
Name Type Argument Description
ds module:x2node-dbos.DataSource Data source.
dboFactory module:x2node-dbos~DBOFactory DBO factory.
defaultOptions Object <optional>
Default options for handlers.

Type Definitions


CreateTransactionContext

Context object for a new record creation operation.
Type:
Properties:
Name Type Argument Description
recordTmpl Object
parentQuerySpec Object <optional>
parentQueryParams Object <optional>
parentRecord Object <optional>

DeleteTransactionContext

Context object for a record deletion operation.
Type:
Properties:
Name Type Argument Description
selectionFilter Object
queryParams Object.<string, *>
fetchProps Array.<string> <optional>
record Object <optional>
referredRecords Object <optional>
deleteResult module:x2node-dbos~DeleteDBO~Result

ReadTransactionContext

Context object for a single record read operation.
Type:
Properties:
Name Type Argument Description
querySpec Object
queryParams Object.<string, *>
referredRecords Object <optional>

SearchTransactionContext

Context object for a record search operation.
Type:
Properties:
Name Type Description
querySpec Object Query specification built from the search parameters. Can be modified by the hook.
queryParams Object.<string, *>

UpdateTransactionContext

Context object for a record update operation.
Type:
Properties:
Name Type Description
patchSpec Object
patch module:x2node-patches~RecordPatch
selectionFilter Object
queryParams Object.<string, *>
updateResult module:x2node-dbos~UpdateDBO~Result