Packagech.capi.net.app
Classpublic class ApplicationConfigLoader
InheritanceApplicationConfigLoader Inheritance flash.net.URLLoader

Utility class to load and parse an xml designed to be used by an ApplicationMassLoader.

See also

ApplicationFile
ApplicationMassLoader
ApplicationFileParser


Public Properties
 PropertyDefined By
  applicationContext : IApplicationContext
[read-only] Defines the IApplicationContext in which the ApplicationFiles have been created.
ApplicationConfigLoader
  applicationFileParser : ApplicationFileParser
[read-only] Defines the ApplicationFileParser that will be used when the file is loaded.
ApplicationConfigLoader
  configuration : XMLDocument
[read-only] Defines the XMLDocument that is given to the fileParser.
ApplicationConfigLoader
  loadableFileFactory : LoadableFileFactory
[read-only] Defines the LoadableFileFactory.
ApplicationConfigLoader
Public Methods
 MethodDefined By
  
Creates a new ApplicationConfigLoader.
ApplicationConfigLoader
  
create(contextName:String):ApplicationConfigLoader
[static] Creates a new ApplicationConfigLoader and a new ApplicationContext with the specified name.
ApplicationConfigLoader
  
loadAll(xmlRequest:URLRequest, appMassLoader:ApplicationMassLoader = null):ApplicationMassLoader
Initializes the loading of the specified XML configuration (from the URLRequest) and once loaded, put all the files in the specified ApplicationMassLoader and start it.
ApplicationConfigLoader
  
loadFile(xmlRequest:URLRequest, fileName:String, appMassLoader:ApplicationMassLoader = null):ApplicationMassLoader
Initializes the loading of the specified XML configuration (from the URLRequest) and once loaded, put the specified file in the ApplicationMassLoader and start it.
ApplicationConfigLoader
Protected Methods
 MethodDefined By
  
Once the loading and the parsing of the XML configuration is finished, this method will be called if the loadAll method has intialized the loading.
ApplicationConfigLoader
  
Once the loading and the parsing of the XML configuration is finished, this method will be called if the loadFile method has intialized the loading.
ApplicationConfigLoader
  
onFileLoaded(evt:Event):void
This method is called when the file is loaded.
ApplicationConfigLoader
Property Detail
applicationContextproperty
applicationContext:IApplicationContext  [read-only]

Defines the IApplicationContext in which the ApplicationFiles have been created. This is a direct method to retrieve the ApplicationContext of the ApplicationFileParser.


Implementation
    public function get applicationContext():IApplicationContext
applicationFileParserproperty 
applicationFileParser:ApplicationFileParser  [read-only]

Defines the ApplicationFileParser that will be used when the file is loaded.


Implementation
    public function get applicationFileParser():ApplicationFileParser
configurationproperty 
configuration:XMLDocument  [read-only]

Defines the XMLDocument that is given to the fileParser. This value is available only once the file is loaded.


Implementation
    public function get configuration():XMLDocument
loadableFileFactoryproperty 
loadableFileFactory:LoadableFileFactory  [read-only]

Defines the LoadableFileFactory. This is a direct method to retrieve the LoadableFileFactory of the ApplicationFileParser.


Implementation
    public function get loadableFileFactory():LoadableFileFactory
Constructor Detail
ApplicationConfigLoader()Constructor
public function ApplicationConfigLoader(parser:ApplicationFileParser)

Creates a new ApplicationConfigLoader.

Parameters
parser:ApplicationFileParser — The ApplicationFileParser to use.
Method Detail
create()method
public static function create(contextName:String):ApplicationConfigLoader

Creates a new ApplicationConfigLoader and a new ApplicationContext with the specified name.

Parameters

contextName:String — The name of the ApplicationContext. The context must be inexistent.

Returns
ApplicationConfigLoader — The created ApplicationConfigLoader.
loadAll()method 
public function loadAll(xmlRequest:URLRequest, appMassLoader:ApplicationMassLoader = null):ApplicationMassLoader

Initializes the loading of the specified XML configuration (from the URLRequest) and once loaded, put all the files in the specified ApplicationMassLoader and start it. If no ApplicationMassLoader is specified, then a new one will be created.

Parameters

xmlRequest:URLRequest — The url of the XML configuration.
 
appMassLoader:ApplicationMassLoader (default = null) — The ApplicationMassLoader to use.

Returns
ApplicationMassLoader — The ApplicationMassLoaded used.
loadAllFiles()method 
protected function loadAllFiles(appMassLoader:ApplicationMassLoader):void

Once the loading and the parsing of the XML configuration is finished, this method will be called if the loadAll method has intialized the loading.

Parameters

appMassLoader:ApplicationMassLoader — The ApplicationMassLoader to put the files in and start.

See also

loadFile()method 
public function loadFile(xmlRequest:URLRequest, fileName:String, appMassLoader:ApplicationMassLoader = null):ApplicationMassLoader

Initializes the loading of the specified XML configuration (from the URLRequest) and once loaded, put the specified file in the ApplicationMassLoader and start it. If no ApplicationMassLoader is specified, then a new one will be created.

Parameters

xmlRequest:URLRequest — The url of the XML configuration.
 
fileName:String — The file to load.
 
appMassLoader:ApplicationMassLoader (default = null) — The ApplicationMassLoader to use.

Returns
ApplicationMassLoader — The ApplicationMassLoaded used.
loadOneFile()method 
protected function loadOneFile(appMassLoader:ApplicationMassLoader, file:ApplicationFile):void

Once the loading and the parsing of the XML configuration is finished, this method will be called if the loadFile method has intialized the loading.

Parameters

appMassLoader:ApplicationMassLoader — The ApplicationMassLoader to put the files in and start.
 
file:ApplicationFile — The ApplicationFile to load.

onFileLoaded()method 
protected function onFileLoaded(evt:Event):void

This method is called when the file is loaded.

Parameters

evt:Event — The Event object.