Hemi JavaScript Framework

Hemi.data.io

Description

The Data IO service is used to broker data requests with configured data providers. The built-in interchange format is loosely modelled on the Account Manager 4 Data and Group object model, but the implementation is open for any object type.

Class Index

static Hemi.data.io.service

version 3.1.9

Static implementation of the hemi.data.io.proxy.serviceImpl class.

Hemi.data.io.serviceImpl

version 3.1.9

The Data IO proxy service marshals custom protocol requests through Data IO providers.

Index

Method Index

Methods

_handle_change_bus

Update the proxied bus type from the "iobus" transaction. Method is virtual and can be overridden.

Syntax

void _handle_change_bus( oService, oPacket )

Parameters

buildMatcher

Builds the expression matcher for custom protocols.

Syntax

void buildMatcher( )

isProxied

Tests whether a URI pattern may be proxied based on a custom protocol.

Syntax

bProxied = isProxied( sUri, iBusType )

Parameters

Returns

bProxied as bit: Bit indicating the provided URI pattern matches a registered protocol proxy.

isProxyProtocol

Tests whether a URI pattern matches a registered protocol proxy.

Syntax

bProxied = isProxyProtocol( sUri )

Parameters

Returns

bProxied as bit: Bit indicating the provided URI pattern matches a registered protocol proxy.

proxyXml

Proxies an XML URI Request to the registered provider for the matching protocol. TODO: Instrument async handling to proxy async Data IO response through XML Async Response.

Syntax

oXml = proxyXml( sPath, h, bAsync, sId, bPost, vData, c, t )

Parameters

Returns

oXml as HemiXML: Returns an internal XML construct.

register

Links a provider to a custom protocol proxy.

Syntax

bUnregistered = register( oProvider )

Parameters

Returns

bUnregistered as bit: Bit indicating the provider was registered as providing a custom protocol proxy.

setAutoChangeBus

Specify whether the proxy service should change the current bus based on the "iobus" transaction.

Syntax

void setAutoChangeBus( bAuto )

Parameters

setBusType

Specify the current bus the proxy service should use.

Syntax

void setBusType( iType )

Parameters

stripProxyProtocol

Specify the current bus the proxy service should use.

Syntax

void stripProxyProtocol( sUri )

Parameters

unregister

Delinks a provider from a custom protocol proxy.

Syntax

bUnregistered = unregister( oProvider )

Parameters

Returns

bUnregistered as bit: Bit indicating the provider was unregistered as providing a proxy.