Packagecom.pblabs.engine.core
Classpublic class SchemaGenerator
InheritanceSchemaGenerator Inheritance Object

This class generates a schema file for the application so it can be edited by the PBEditor. Classes to generate schema data for are enumerated from the TypeReference class. By default, this is only run when launched from the PBEngineManager, which does so by adding '?generateSchema=1' to the url.



Public Properties
 PropertyDefined By
  instance : SchemaGenerator
[static] [read-only] The singleton instance.
SchemaGenerator
Public Methods
 MethodDefined By
  
SchemaGenerator
  
addClass(className:String, classObject:Class):void
Adds a class to be included in the schema.
SchemaGenerator
  
addClassName(className:String):void
Adds a class to be included in the schema.
SchemaGenerator
  
Generates the actual schema data by passing the describeType output over a LocalConnection.
SchemaGenerator
  
getRegisteredTypes():Dictionary
SchemaGenerator
Property Detail
instanceproperty
instance:SchemaGenerator  [read-only]

The singleton instance.


Implementation
    public static function get instance():SchemaGenerator
Constructor Detail
SchemaGenerator()Constructor
public function SchemaGenerator()



Method Detail
addClass()method
public function addClass(className:String, classObject:Class):void

Adds a class to be included in the schema. The TypeReference class automatically adds classes it is given.

Parameters

className:String
 
classObject:Class

addClassName()method 
public function addClassName(className:String):void

Adds a class to be included in the schema.

Parameters

className:String

generateSchema()method 
public function generateSchema():void

Generates the actual schema data by passing the describeType output over a LocalConnection. The connection is named _SchemaConnection and supplies data to the OnSchemaReceived method. This method should receive two parameters. The first contains the type of message being sent, and the second contains the data. Valid message types are:

getRegisteredTypes()method 
public function getRegisteredTypes():Dictionary

Returns
Dictionary — A dictionary of Registered types. With keys as class names and values as class definitions