| Package | ch.capi.net.app |
| Class | public class ApplicationFileParser |
| Inheritance | ApplicationFileParser Object |
ApplicationFile objects. The XMLSchema and a XML validator can be found
here.
See also
| Property | Defined By | ||
|---|---|---|---|
| applicationContext : IApplicationContext
Defines the IApplicationContext. | ApplicationFileParser | ||
| initializeFile : Function = null
Defines a callback method that is called when an ApplicationFile is created. | ApplicationFileParser | ||
| loadableFileFactory : LoadableFileFactory
Defines the LoadableFileFactory to use to create the ILoadableFile objects. | ApplicationFileParser | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new ApplicationFileParser object. | ApplicationFileParser | ||
createWithNewContext(contextName:String, loadableFileFactory:LoadableFileFactory = null):ApplicationFileParser [static]
Creates a new ApplicationFileParser using a new empty ApplicationContext. | ApplicationFileParser | ||
parse(source:String, contextName:String = null, loadableFileFactory:LoadableFileFactory = null):IApplicationContext [static]
Parses the specified source String, using the specified LoadableFileFactory in
a new ApplicationContext. | ApplicationFileParser | ||
parseDependencies(node:XMLNode):void
Parses the ApplicationFile dependencies of the specified XMLNode. | ApplicationFileParser | ||
parseFiles(node:XMLNode):void
Parses the ApplicationFile of the specified XMLNode. | ApplicationFileParser | ||
parseNode(node:XMLNode):void
Parse the specified XMLNode. | ApplicationFileParser | ||
parseVariables(node:XMLNode):void
Parses the variables of the specified XMLNode. | ApplicationFileParser | ||
| Method | Defined By | ||
|---|---|---|---|
createApplicationFile(node:XMLNode, folderPath:String):ApplicationFile
Creates a ApplicationFile from the XMLNode. | ApplicationFileParser | ||
createLoadableFile(url:String, type:String = null, appDomainPolicy:String = null, secDomainPolicy:String = null):ILoadableFile
Creates a ILoadableFile object. | ApplicationFileParser | ||
initializeApplicationFile(appFile:ApplicationFile):void
Initialize the ApplicationFile. | ApplicationFileParser | ||
putVariable(name:String, value:String):void
Put the specified variable and its value in the LoadableFileFactory. | ApplicationFileParser | ||
| applicationContext | property |
applicationContext:IApplicationContext [read-write]
Defines the IApplicationContext.
public function get applicationContext():IApplicationContext public function set applicationContext(value:IApplicationContext):void| initializeFile | property |
public var initializeFile:Function = null
Defines a callback method that is called when an ApplicationFile is created. If this property is
not null it will be called after the properties have initialized, but before the dependencies have been added.
The signature of the method should be the following : function(appFile:ApplicationFile, fileNode:XMLNode):void.
| loadableFileFactory | property |
loadableFileFactory:LoadableFileFactory [read-write]
Defines the LoadableFileFactory to use to create the ILoadableFile objects.
public function get loadableFileFactory():LoadableFileFactory public function set loadableFileFactory(value:LoadableFileFactory):void| ApplicationFileParser | () | Constructor |
public function ApplicationFileParser(context:IApplicationContext, loadableFileFactory:LoadableFileFactory = null)
Creates a new ApplicationFileParser object.
context:IApplicationContext — The ApplicationContext.
| |
loadableFileFactory:LoadableFileFactory (default = null) — The LoadableFileFactory. If not defined, then the
LoadableFileFactory.defaultLoadableFileFactory will be used.
|
| createApplicationFile | () | method |
protected function createApplicationFile(node:XMLNode, folderPath:String):ApplicationFile
Creates a ApplicationFile from the XMLNode.
Parameters
node:XMLNode — The XMLNode to parse.
| |
folderPath:String — The path to be added as prefix for the file URL.
|
ApplicationFile — The created ApplicationFile.
|
ch.capi.errors:ParseError If — the url attribute is not defined.
|
| createLoadableFile | () | method |
protected function createLoadableFile(url:String, type:String = null, appDomainPolicy:String = null, secDomainPolicy:String = null):ILoadableFile
Creates a ILoadableFile object.
Parameters
url:String — The url.
| |
type:String (default = null) — The type issued from the LoadableFileFactory constants.
| |
appDomainPolicy:String (default = null) — The ApplicationDomain policy.
| |
secDomainPolicy:String (default = null) — The SecurityDomain policy.
|
ILoadableFile — The ILoadableFile created.
|
See also
| createWithNewContext | () | method |
public static function createWithNewContext(contextName:String, loadableFileFactory:LoadableFileFactory = null):ApplicationFileParser
Creates a new ApplicationFileParser using a new empty ApplicationContext.
Parameters
contextName:String — The name of the new ApplicationContext.
| |
loadableFileFactory:LoadableFileFactory (default = null) — The LoadableFileFactory. If not defined, then the
LoadableFileFactory.defaultLoadableFileFactory will be used.
|
ApplicationFileParser — The created ApplicationFileParser.
|
| initializeApplicationFile | () | method |
protected function initializeApplicationFile(appFile:ApplicationFile):void
Initialize the ApplicationFile. This method initialize the main properties of the
specified ApplicationFile and its ILoadableFile.
Parameters
appFile:ApplicationFile — The ApplicationFile to initialize.
|
ch.capi.errors:ParseError If — there is a parse error.
|
| parse | () | method |
public static function parse(source:String, contextName:String = null, loadableFileFactory:LoadableFileFactory = null):IApplicationContext
Parses the specified source String, using the specified LoadableFileFactory in
a new ApplicationContext.
Parameters
source:String — The source String in XML format that matches the XMLSchema.
| |
contextName:String (default = null) — Defines the name of the ApplicationContext. If no context name is specified, then
the global ApplicationContext will be used.
| |
loadableFileFactory:LoadableFileFactory (default = null) — The LoadableFileFactory. If not defined, then the
LoadableFileFactory.defaultLoadableFileFactory will be used.
|
IApplicationContext — The new ApplicationContext that contains all the parsed ApplicationFile instances.
|
ch.capi.errors:DataError If — the contextName and the context attribute is null.
|
| parseDependencies | () | method |
public function parseDependencies(node:XMLNode):void
Parses the ApplicationFile dependencies of the specified XMLNode.
Parameters
node:XMLNode — The XMLNode.
|
| parseFiles | () | method |
public function parseFiles(node:XMLNode):void
Parses the ApplicationFile of the specified XMLNode.
Parameters
node:XMLNode — The XMLNode.
|
| parseNode | () | method |
public function parseNode(node:XMLNode):void
Parse the specified XMLNode. The specified node must contains at least one subnode with all
the files declaration. The second subnode will contains the dependencies.
Parameters
node:XMLNode — The XMLNode to parse.
|
| parseVariables | () | method |
public function parseVariables(node:XMLNode):void
Parses the variables of the specified XMLNode.
Parameters
node:XMLNode — The XMLNode.
|
| putVariable | () | method |
protected function putVariable(name:String, value:String):void
Put the specified variable and its value in the LoadableFileFactory.
Parameters
name:String — The variable name.
| |
value:String — The variable value.
|