Hemi JavaScript Framework

Hemi.data.stack

Description

The Data Stack is a class for storing and retrieving values that may or may not have unique identifiers, and which don't qualify for or need to be stored in the Hemi.registry service.

Class Index

static Hemi.data.stack.service

version

Static instance of TokenStackImpl.

Hemi.data.stack.serviceImpl

version

A class for storing stacks of variant values and filtering the stack by owner.

Index

Object Index

Property Index

Method Index

Objects

Token

Internal object used to store the references that comprise a token.

Properties

Properties

enable_overstack

Allows Token objects to be overstacked, meaning that names do not have to be unique. Defaults to false. Property is private and should not be directly referenced.

Syntax

= object.enable_overstack

object.enable_overstack =

object_id

Unique instance identifier.

Syntax

String = object.object_id

object_type

The type of this object.

Syntax

String = object.object_type

object_version

Version of the object class.

Syntax

String = object.object_version

ready_state

Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.

Syntax

int = object.ready_state

Methods

add

Adds a token with the specified name and value for the specified owner.

Syntax

r = add( o, n, v, b )

Parameters

Returns

r as boolean: Bit indicating whether the token was added.

clear

Removes all tokens for the specified owner.

Syntax

void clear( o )

Parameters

get

Returns the specified token.

Syntax

r = get( n, i )

Parameters

Returns

r as Token: The specified token object.

getAll

Returns an array of tokens that match the specified name.

Syntax

a = getAll( n )

Parameters

Returns

a as array: Array of tokens that match the specified name.

getAllByOwner

Returns all tokens for the specified owner.

Syntax

r = getAllByOwner( o )

Parameters

Returns

r as array: Array of tokens belonging to the specified owner.

getByOwner

Returns the specified token.

Syntax

r = getByOwner( o, n )

Parameters

Returns

r as Token: The specified token object belonging to the specified owner.

getObjectId

Returns the unique id of the object.

Syntax

i = getObjectId( )

Returns

i as String: The unique object instance id.

getObjectType

Returns the type of the object.

Syntax

t = getObjectType( )

Returns

t as String: The type of the object instance.

getObjectVersion

Returns the version of the object.

Syntax

v = getObjectVersion( )

Returns

v as String: The version of the object instance.

getReadyState

Returns the state of the object.

Syntax

s = getReadyState( )

Returns

s as int: The object ready state.

getTokenValue

Returns the value of the specified token.

Syntax

r = getTokenValue( n, i )

Parameters

Returns

r as variant: The value of the specified token.

remove

Removes all tokens for the specified owner.

Syntax

void remove( o, n )

Parameters