| Package | ch.capi.net.app |
| Interface | public interface IApplicationContext |
| Implementors | ApplicationContext |
ApplicationFile.
| Property | Defined By | ||
|---|---|---|---|
| name : String [read-only]
Defines the name of the ApplicationContext. | IApplicationContext | ||
| Method | Defined By | ||
|---|---|---|---|
addFile(file:ApplicationFile):void
Add the specified ApplicationFile to the current ApplicationContext. | IApplicationContext | ||
clear():void
Clear all the ApplicationFile of the ApplicationContext. | IApplicationContext | ||
enumerateAll(excludeGlobalFiles:Boolean = false):Array
Enumerates all the ApplicationFile contained in the ApplicationContext. | IApplicationContext | ||
enumerateGlobals():Array
Enumerates all the global ApplicationFile contained in the ApplicationContext. | IApplicationContext | ||
enumerateLeaves():Array
Enumerates all the ApplicationFile that doesn't have any dependency. | IApplicationContext | ||
enumerateRoots():Array
Enumerates all the ApplicationFile that are on the root of the tree. | IApplicationContext | ||
getFile(name:String):ApplicationFile
Get the ApplicationFile linked to the specified name. | IApplicationContext | ||
getFileByProps(props:Object, strict:Boolean = false):ApplicationFile
Retrieves the first ApplicationFile that matches the specified properties. | IApplicationContext | ||
getFilesByProps(props:Object, strict:Boolean = false):Array
Retrieves all the files that matche the specified properties. | IApplicationContext | ||
removeFile(file:ApplicationFile, recursiveRemoval:Boolean = false):void
Remove the specified ApplicationFile from the ApplicationContext. | IApplicationContext | ||
| name | property |
name:String [read-only]
Defines the name of the ApplicationContext.
public function get name():String| addFile | () | method |
public function addFile(file:ApplicationFile):void
Add the specified ApplicationFile to the current ApplicationContext. If
the context of the ApplicationFile is already specified, this method will throw an error.
This method will also check that all dependencies of the specified ApplicationFile are
already in the current ApplicationContext. If they are in no ApplicationContext
they will be added in the current one, otherwise an error will be thrown.
Parameters
file:ApplicationFile — The ApplicationFile.
|
ArgumentError If — the ApplicationContext of the file is not null.
| |
ArguemntError If — one of the dependencies is in another ApplicationContext.
| |
NameAlreadyExistsError If — the name of the ApplicationFile is already taken.
|
| clear | () | method |
public function clear():void
Clear all the ApplicationFile of the ApplicationContext. The context property of the
ApplicationFile instances are reset to null to let the Garbate Collector take care of
the ApplicationContext instance.
| enumerateAll | () | method |
public function enumerateAll(excludeGlobalFiles:Boolean = false):Array
Enumerates all the ApplicationFile contained in the ApplicationContext.
Parameters
excludeGlobalFiles:Boolean (default = false) — Defines if the global files must be excluded.
|
Array — An Array containing the enumerated ApplicationFile.
|
| enumerateGlobals | () | method |
public function enumerateGlobals():Array
Enumerates all the global ApplicationFile contained in the ApplicationContext.
Array — An Array containing the enumerated ApplicationFile.
|
| enumerateLeaves | () | method |
public function enumerateLeaves():Array
Enumerates all the ApplicationFile that doesn't have any dependency.
Array — An Array containing all the ApplicationFile that doesn't have any dependency.
|
See also
| enumerateRoots | () | method |
public function enumerateRoots():Array
Enumerates all the ApplicationFile that are on the root of the tree. That means that no
other ApplicationFile have it as dependency.
Array — An Array containing all the ApplicationFile that are not in any dependency.
|
See also
| getFile | () | method |
public function getFile(name:String):ApplicationFile
Get the ApplicationFile linked to the specified name.
Parameters
name:String — The name of the ApplicationFile.
|
ApplicationFile — The ApplicationFile or null if the file doesn't exist.
|
Error If — there is no ApplicationFile matching the specified name.
|
| getFileByProps | () | method |
public function getFileByProps(props:Object, strict:Boolean = false):ApplicationFile
Retrieves the first ApplicationFile that matches the specified properties.
Parameters
props:Object — An Object containing the properties to match.
| |
strict:Boolean (default = false) — Defines if the check must be strict or not.
|
ApplicationFile — The first ApplicationFile instance that matches the properties
or null.
|
See also
| getFilesByProps | () | method |
public function getFilesByProps(props:Object, strict:Boolean = false):ArrayRetrieves all the files that matche the specified properties.
Parameters
props:Object — An Object containing the properties to match.
| |
strict:Boolean (default = false) — Defines if the check must be strict or not.
|
Array — An Array of ILoadableFile that matche the
specified properties.
|
See also
| removeFile | () | method |
public function removeFile(file:ApplicationFile, recursiveRemoval:Boolean = false):void
Remove the specified ApplicationFile from the ApplicationContext. All the
ApplicationFile having the specified file as dependency, will have it removed.
If the recursiveRemoval argument is set to true, then all the dependencies of the specified
file will also be removed from the ApplicationContext. In the other case, all the dependencies
of the specified ApplicationFile are cleared.
Parameters
file:ApplicationFile — The ApplicationFile to remove.
| |
recursiveRemoval:Boolean (default = false) — If the removal must be applied on all the dependencies of the file.
|
flash.errors:IllegalOperationError If — the file is not in the ApplicationContext.
|