OverviewSingleDeprecated

jsx3.app

class Properties

Object
->jsx3.lang.Object
  ->jsx3.app.Properties

Direct Known Subclasses:

jsx3.app.PropsBundle

class Properties
extends jsx3.lang.Object
Represents a repository of dynamic properties. Dynamic properties are simply name-value pairs. Dynamic properties can be loaded from an XML file in the CDF dynamic property format.

Since:

3.2

Constructor Summary
void
The instance initializer.
Method Summary
void
Adds a parent property repository to this repository.
boolean
containsKey(strKey : String)
Returns whether this property repository contains a particular property.
Object | undefined
get(strKey : String)
Returns the value of a property for a particular key.
Array<String>
Returns a list of all the property keys contained in this repository.
Array<jsx3.app.Properties>
Returns the list of parent repositories of this repository.
void
loadXML(objXML : jsx3.xml.Document, strId : String)
Loads a set of dynamic properties from an XML document into this repository.
void
remove(strKey : String)
Removes a property from this repository.
void
Removes all parent property repositories.
void
Removes a property repository from the set of parent repositories.
void
set(strKey : String, strValue : Object)
Sets a property in this repository in the global space.
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Constructor Detail

init

void init()
The instance initializer.
Method Detail

addParent

void addParent(objParent : jsx3.app.Properties)
Adds a parent property repository to this repository. get() consults all parents before returning undefined.

Parameters:

objParent

See Also:

get()

containsKey

boolean containsKey(strKey : String)
Returns whether this property repository contains a particular property. Parent repositories are not consulted.

Parameters:

strKeythe property key to query for.

Returns:

true if this repository contains a property with the given key.  

get

Object | undefined get(strKey : String)
Returns the value of a property for a particular key. This method consults the parent repositories as necessary until a property is found. If no property is found, undefined is returned.

Parameters:

strKeythe property key to query for.

Returns:

 

getKeys

Array<String> getKeys()
Returns a list of all the property keys contained in this repository. Parent repositories are not consulted.

Returns:

 

getParents

Array<jsx3.app.Properties> getParents()
Returns the list of parent repositories of this repository.

Returns:

 

loadXML

void loadXML(objXML : jsx3.xml.Document, strId : String)
Loads a set of dynamic properties from an XML document into this repository. The document should be a shallow CDF document with any number of record elements defined under the root data element.

The following CDF attributes are supported:

Parameters:

objXML
strIdspecifies the id to store the document under. If none is provided, the default space is used.

remove

void remove(strKey : String)
Removes a property from this repository. The property is removed from all spaces.

Parameters:

strKeythe key of the property to remove.

removeAllParents

void removeAllParents()
Removes all parent property repositories.

removeParent

void removeParent(objParent : jsx3.app.Properties)
Removes a property repository from the set of parent repositories.

Parameters:

objParentthe parent repository to remove.

set

void set(strKey : String, strValue : Object)
Sets a property in this repository in the global space.

Parameters:

strKeythe key of the property to set.
strValuethe value of the property. This value may be null, in which case null will be stored as the property value. This value may not be undefined; use remove() to remove a property value.

See Also:

remove()