Packagenet.user1.reactor
Classpublic class AttributeCollection
InheritanceAttributeCollection Inheritance flash.events.EventDispatcher

Since : Reactor 1.0.0

An collection of attributes for a client, user account, or room.

See also

net.user1.reactor.snapshot.RoomSnapshot.getObserver()
net.user1.reactor.snapshot.RoomSnapshot.getOccupant()
ClientManifest.persistentAttributes
ClientManifest.transientAttributes


Public Methods
 MethodDefined By
  
Constructor
AttributeCollection
  
contains(name:String, scope:String):Boolean
Returns true if this AttributeCollection contains the specified attribute; false otherwise.
AttributeCollection
  
getAll():Object
Returns an object containing all attributes in this collection.
AttributeCollection
  
getAttribute(attrName:String, attrScope:String = null):String
Returns the value of the specified attribute.
AttributeCollection
  
getAttributesNamesForScope(scope:String):Array
Returns the names of the attributes with the specified scope.
AttributeCollection
  
getByScope(scope:String = null):Object
Returns an object containing all attributes for the specified scope.
AttributeCollection
  
getScopes():Array
Returns a list of the scopes defined by attributes in this AttributeCollection.
AttributeCollection
Constructor Description
AttributeCollection()Constructor
public function AttributeCollection()

Constructor

Method Descriptions
contains()method
public function contains(name:String, scope:String):Boolean

Since : Reactor 1.0.0

Returns true if this AttributeCollection contains the specified attribute; false otherwise.

Parameters

name:String
 
scope:String

Returns
Boolean
getAll()method 
public function getAll():Object

Since : Reactor 1.0.0

Returns an object containing all attributes in this collection. Each attribute is represented by a dynamic variable name/value pair.

Returns
Object
getAttribute()method 
public function getAttribute(attrName:String, attrScope:String = null):String

Since : Reactor 1.0.0

Returns the value of the specified attribute.

Parameters

attrName:String
 
attrScope:String (default = null)

Returns
String
getAttributesNamesForScope()method 
public function getAttributesNamesForScope(scope:String):Array

Since : Reactor 1.0.0

Returns the names of the attributes with the specified scope.

Parameters

scope:String

Returns
Array
getByScope()method 
public function getByScope(scope:String = null):Object

Since : Reactor 1.0.0

Returns an object containing all attributes for the specified scope. When scope is specified, the object returned has the following format:

     {name1:value1, name2:value2,...namen:valuen}
     
When scope is not specified, the object returned has the following format:
     {scope1: {name1:value1, name2:value2,...namen:valuen},
      scope2: {name1:value1, name2:value2,...namen:valuen},
      scopen: {name1:value1, name2:value2,...namen:valuen}}
     

Parameters

scope:String (default = null)

Returns
Object
getScopes()method 
public function getScopes():Array

Since : Reactor 1.0.0

Returns a list of the scopes defined by attributes in this AttributeCollection.

Returns
Array