Packageorg.samchon.library.filetree
Classpublic class FTFactory
InheritanceFTFactory Inheritance Object
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.



Protected Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
Default Constructor.
FTFactory
  
createFile(parent:FTFolder, xml:XML):FTFile
Factory method of a file
FTFactory
  
getFile(uid:int):IFTFile
FTFactory
  
hasFile(uid:int):Boolean
FTFactory
  
Register file instance to map
FTFactory
Property Detail
fileMapproperty
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.

topFolderproperty 
protected var topFolder:FTFolder

The root folder of file instances.

The default value is FTFolder having user's own id.

Constructor Detail
FTFactory()Constructor
public function FTFactory()

Default Constructor.

Method Detail
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.

Returns
FTFile
getFile()method 
public function getFile(uid:int):IFTFile

Parameters

uid:int

Returns
IFTFile
hasFile()method 
public function hasFile(uid:int):Boolean

Parameters

uid:int

Returns
Boolean
registerFile()method 
public function registerFile(file:IFTFile):void

Register file instance to map

Parameters

file:IFTFile