Class: ResourceHandlersFactory

x2node-ws-resources~ ResourceHandlersFactory

Resource handlers factory.

new ResourceHandlersFactory(ds, dboFactory [, defaultOptions])

Note: The constructor is not accessible from the client code. Instances are created using module's createResourceHandlersFactory() function.
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.

Methods


collectionResource(rsrcPath [, handlerExt])

Create collection resource handler.
Parameters:
Name Type Argument Description
rsrcPath string Resource path.
handlerExt Object <optional>
Handler extension.
Returns:
The handler.
Type
module:x2node-ws-resources.CollectionResourceHandler

individualResource(rsrcPath [, handlerExt])

Create individual resource handler.
Parameters:
Name Type Argument Description
rsrcPath string Resource path.
handlerExt Object <optional>
Handler extension.
Returns:
The handler.
Type
module:x2node-ws-resources.IndividualResourceHandler