Engine for Web Applications

org.cote.js.util.config

Class Index

static org.cote.js.util.config

version 2.0.0

Static initializer for new Config objects.

This class participates in the engine library.

Index

Method Index

Methods

newInstance

Creates and returns a new Config instance.

Syntax

c = newInstance( s, h, a )

Parameters

Returns

c as Config: Returns a new Wire instance.

org.cote.js.util.Config

version 2.0.0

Service for sending messages, and sending and receiving publication broadcasts.

This class participates in the engine library.

Index

Object Index

Property Index

Method Index

Objects

ConfigObject

Properties

Properties

object_config

Object API structure for storing sub structures: object_config.pointers and object_config.status.

Syntax

object = object.object_config

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

clearConfig

Clears internal hashmaps of config data.

Syntax

void clearConfig( )

destroy

Clears internal pointers and data, preparing the object for destruction.

Syntax

void destroy( )

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.

getParam

Returns the value of the specified ConfigObject.

Syntax

v = getParam( x )

Parameters

Returns

v as String: Value of the specified ConfigObject.

getParams

Returns an array of ConfigObjects.

Syntax

a = getParams( )

Returns

a as array: Array of ConfigObjects

getPointers

Returns the object_config.pointers sub structure.

Syntax

o = getPointers( )

Returns

o as object: The object_config.pointers substructure.

getReadyState

Returns the state of the object.

Syntax

s = getReadyState( )

Returns

s as int: The object ready state.

getStatus

Returns the object_config.status sub structure.

Syntax

o = getStatus( )

Returns

o as object: The object_config.status substructure.

init

Initializes an empty configuration.

Syntax

void init( )

load

Loads the specified configuration file.

Syntax

void load( p, h, a )

Parameters

parseConfig

Parses the specified XML document for config data.

Syntax

void parseConfig( o )

Parameters

reload

Clears internal hashmaps and reloads config data from original source.

Syntax

void reload( )

serialize

Serializes the current configuration into an XML document.

Syntax

xml = serialize( XMLDocument )

Parameters

Returns

xml as XMLDocument: XMLDocument representing the parameters.

setAttrNameName

Specifies the attribute used to identify the config data name.

Syntax

void setAttrNameName( n )

Parameters

setAttrValueName

Specifies the attribute used to identify the config data value.

Syntax

void setAttrValueName( n )

Parameters

setElementName

Specifies the element that holds a single config item.

Syntax

void setElementName( n )

Parameters

setElementParentName

Specifies the root element that holds the config data.

Syntax

void setElementParentName( n )

Parameters

setParam

Sets a parameter value.

Syntax

b = setParam( name, value )

Parameters

Returns

b as boolean: Bit indicating whether the operation succeeded

sigterm

Sends a termination signal to this object, causing it to be destroyed.

Syntax

void sigterm( )

writeParam

Sets a parameter value.

Syntax

b = writeParam( XMLDocument, name, value )

Parameters

Returns

b as boolean: Bit indicating whether the operation succeeded