Package | org.samchon.library.filetree |
Class | public class FTFactory |
Inheritance | FTFactory ![]() |
Subclasses | NTFactory |
A Factory and manager for file-tree.
FTFactory is a class taking a role of creating FTFile instances and managing them by having their direct pointers. FTFactory also has a role of archiving and loading from DB.
Property | Defined By | ||
---|---|---|---|
fileMap : Dictionary
Some IFTFile(s) can't be referenced directly, because IFTFile(s) are composed hierarchically.
fileMap is made up to solve the problem. | FTFactory | ||
topFolder : FTFolder
The root folder of file instances.
| FTFactory |
Method | Defined By | ||
---|---|---|---|
Default Constructor. | FTFactory | ||
Factory method of a file
| FTFactory | ||
FTFactory | |||
hasFile(uid:int):Boolean | FTFactory | ||
registerFile(file:IFTFile):void
Register file instance to map
| FTFactory |
fileMap | property |
protected var fileMap:Dictionary
Some IFTFile(s) can't be referenced directly, because IFTFile(s) are composed hierarchically.
fileMap is made up to solve the problem. fileMap stores all the IFTFile(s)' key and pointer have created.
The default value is Dictionary
.
topFolder | property |
protected var topFolder:FTFolder
The root folder of file instances.
The default value is FTFolder having user's own id
.
FTFactory | () | Constructor |
public function FTFactory()
Default Constructor.
createFile | () | method |
public function createFile(parent:FTFolder, xml:XML):FTFile
Factory method of a file
Parameters
parent:FTFolder — A parent folder to contain the new file
| |
xml:XML — An xml object for discriminating sub-type.
|
FTFile |
getFile | () | method |
hasFile | () | method |
public function hasFile(uid:int):Boolean
Parameters
uid:int |
Boolean |
registerFile | () | method |
public function registerFile(file:IFTFile):void
Register file instance to map
Parameters
file:IFTFile |