Package | ch.capi.core |
Class | public final class ApplicationFile |
See also
Property | Defined by | ||
---|---|---|---|
applicationContext : ApplicationContext
[read-only]
Defines the
ApplicationContext of the ApplicationFile . | ApplicationFile | ||
dependencies : Array [read-only]
Defines the dependencies.
| ApplicationFile | ||
global : Boolean
Defines if the
ApplicationFile is global or not. | ApplicationFile | ||
loadableFile : ILoadableFile
Defines the
ILoadableFile . | ApplicationFile | ||
name : String [read-only]
Defines the name.
| ApplicationFile |
Method | Defined by | ||
---|---|---|---|
Creates a new
ApplicationFile object. | ApplicationFile | ||
addDependency(file:ApplicationFile):void
Add an
ApplicationFile as dependency for this file. | ApplicationFile | ||
clearDependencies():void
Removes all the dependencies of the
ApplicationFile . | ApplicationFile | ||
getData(asClass:String = null, appDomain:ApplicationDomain = null):*
Retrieves the data of the
ILoadableFile linked to the ApplicationFile . | ApplicationFile | ||
[static]
Retrieves the specified
ApplicationFile . | ApplicationFile | ||
getParents():Array
Get all the
ApplicationFile that have this file as directed dependency. | ApplicationFile | ||
isDependencyOf(file:ApplicationFile):Boolean
Retrieves if the
ApplicationFile is a direct dependency of the specified
ApplicationFile . | ApplicationFile | ||
removeDependency(file:ApplicationFile, recursiveSearch:Boolean = false):void
Removes a dependency from the
ApplicationFile . | ApplicationFile | ||
setContext(value:ApplicationContext):void
| ApplicationFile |
Method | Defined by | ||
---|---|---|---|
isDependencySafe(file:ApplicationFile):Boolean
Check if the dependency is safe for a
ApplicationFile . | ApplicationFile |
applicationContext | property |
applicationContext:ApplicationContext
[read-only]
Defines the ApplicationContext
of the ApplicationFile
.
public function get applicationContext():ApplicationContext
dependencies | property |
dependencies:Array
[read-only]
Defines the dependencies. This is an Array
of ApplicationFile
that
is duplicated from the original Array
.
public function get dependencies():Array
global | property |
global:Boolean
[read-write]
Defines if the ApplicationFile
is global or not.
public function get global():Boolean
public function set global(value:Boolean):void
loadableFile | property |
loadableFile:ILoadableFile
[read-write]
Defines the ILoadableFile
.
public function get loadableFile():ILoadableFile
public function set loadableFile(value:ILoadableFile):void
name | property |
name:String
[read-only]
Defines the name. The name is unique trough all the ApplicationFile
objects.
public function get name():String
ApplicationFile | () | constructor |
public function ApplicationFile(name:String, loadableFile:ILoadableFile = null, context:ApplicationContext = null)
Creates a new ApplicationFile
object.
name:String — The name. It must be unique !
|
|
loadableFile:ILoadableFile (default = null ) — The linked ILoadableFile .
|
|
context:ApplicationContext (default = null ) — The ApplicationContext . If not specified, then the global context will be used.
|
NameAlreadyExistsError — If the specified name already exists into the specified ApplicationContext .
|
addDependency | () | method |
public function addDependency(file:ApplicationFile):void
Add an ApplicationFile
as dependency for this file. It means that the specified
file
is necessary to be loaded before the current ApplicationFile
can
be executed.
The ApplicationFile
added as dependency must be into the same ApplicationContext
.
file:ApplicationFile — The ApplicationFile to add.
|
— If the ApplicationContext is not the same.
|
|
DependencyNotSafeError — If the dependency is not safe.
|
clearDependencies | () | method |
public function clearDependencies():void
Removes all the dependencies of the ApplicationFile
.
getData | () | method |
public function getData(asClass:String = null, appDomain:ApplicationDomain = null):*
Retrieves the data of the ILoadableFile
linked to the ApplicationFile
. If
the loadManagerObject
is a URLLoader
, then the data are returned else the
loadManagerObject
itself is returned.
asClass:String (default = null ) — The class that should be returned by the method (cf ILoadableFile implementation).
|
|
appDomain:ApplicationDomain (default = null ) — The ApplicationDomain of the class.
|
* — The data of the ILoadableFile .
|
See also
getFile | () | method |
public static function getFile(name:String, context:ApplicationContext = null):ApplicationFile
Retrieves the specified ApplicationFile
. This method is just an encapsulation to retrieve
the file throught the ApplicationContext
.
name:String — The name of the file to retrieve.
|
|
context:ApplicationContext (default = null ) — The ApplicationContext . If not specified, the global context will be used.
|
ApplicationFile —
The ApplicationFile or null .
|
getParents | () | method |
public function getParents():Array
Get all the ApplicationFile
that have this file as directed dependency.
Array — The parents.
|
isDependencyOf | () | method |
public function isDependencyOf(file:ApplicationFile):Boolean
Retrieves if the ApplicationFile
is a direct dependency of the specified
ApplicationFile
.
file:ApplicationFile — The parent ApplicationFile .
|
Boolean |
isDependencySafe | () | method |
protected function isDependencySafe(file:ApplicationFile):Boolean
Check if the dependency is safe for a ApplicationFile
.
file:ApplicationFile — The file to add as a dependency.
|
Boolean — true is the dependency is safe.
|
removeDependency | () | method |
public function removeDependency(file:ApplicationFile, recursiveSearch:Boolean = false):void
Removes a dependency from the ApplicationFile
.
file:ApplicationFile — The dependency to remove.
|
|
recursiveSearch:Boolean (default = false ) — Defines if the search of the dependency must recursive trought the dependency tree.
The removal will be stopped after the first instance of the dependency has been found.
|
setContext | () | method |