Packageat.fhjoanneum.dmt.umj.core.util
Classpublic class XMLUtil
InheritanceXMLUtil Inheritance flash.events.EventDispatcher

HELPER: XMLUtil is a singleton that holds the functionality to work with all various XML files and dispatches events. During Startup-phases it hands the xmls to their needed destination class (AppConfig, AppContent, usw.)



Public Methods
 MethodDefined By
  
XMLUtil(enforcer:SingletonEnforcer)
XMLUtil
  
checkXMLAndApplyIntention(input:String):String
XMLUtil
  
genericFindAndReturnXMLFile(filepath:String, completeFunction:Function, ioErrorFunction:Function = null, progressFunction:Function = null):void
XMLUtil
  
[static]
XMLUtil
  
loadConfig(filepath:String, linkedAppConfig:AppConfig):void
XMLUtil
  
loadContent(filepath:String, linkedAppContent:GenericAppContent):void
XMLUtil
  
parseAttributeBoolean(xmlAttribute:String, defaultvalue:Boolean):Boolean
XMLUtil
  
parseAttributeString(xmlAttribute:String, defaultvalue:String):String
XMLUtil
  
parsePropertyBoolean(xmlproperty:XMLList, defaultvalue:Boolean):Boolean
XMLUtil
  
parsePropertyInteger(xmlproperty:XMLList, defaultvalue:int):int
XMLUtil
  
parsePropertyNumber(xmlproperty:XMLList, defaultvalue:Number):Number
XMLUtil
  
parsePropertyString(xmlproperty:XMLList, defaultvalue:String):String
XMLUtil
  
parsePropertyUint(xmlproperty:XMLList, defaultvalue:uint):uint
XMLUtil
  
propertyExists(xmlproperty:XMLList):Boolean
XMLUtil
  
saveXML(localpath:String, xmlString:String):void
XMLUtil
Protected Methods
 MethodDefined By
  
dealloc():void
XMLUtil
  
init():void
XMLUtil
  
ioErrorEventAppConfig(event:IOErrorEvent):void
XMLUtil
  
ioErrorEventAppContent(event:IOErrorEvent):void
XMLUtil
  
loadAppConfig(event:Event):void
XMLUtil
  
loadAppContent(event:Event):void
XMLUtil
  
updateProgress(event:ProgressEvent):void
XMLUtil
Events
 Event Summary Defined By
  XMLUtil
  XMLUtil
Constructor Detail
XMLUtil()Constructor
public function XMLUtil(enforcer:SingletonEnforcer)



Parameters
enforcer:SingletonEnforcer
Method Detail
checkXMLAndApplyIntention()method
public function checkXMLAndApplyIntention(input:String):String

Parameters

input:String

Returns
String
dealloc()method 
protected function dealloc():void

genericFindAndReturnXMLFile()method 
public function genericFindAndReturnXMLFile(filepath:String, completeFunction:Function, ioErrorFunction:Function = null, progressFunction:Function = null):void

Parameters

filepath:String
 
completeFunction:Function
 
ioErrorFunction:Function (default = null)
 
progressFunction:Function (default = null)

getInstance()method 
public static function getInstance():XMLUtil

Returns
XMLUtil
init()method 
protected function init():void

ioErrorEventAppConfig()method 
protected function ioErrorEventAppConfig(event:IOErrorEvent):void

Parameters

event:IOErrorEvent

ioErrorEventAppContent()method 
protected function ioErrorEventAppContent(event:IOErrorEvent):void

Parameters

event:IOErrorEvent

loadAppConfig()method 
protected function loadAppConfig(event:Event):void

Parameters

event:Event

loadAppContent()method 
protected function loadAppContent(event:Event):void

Parameters

event:Event

loadConfig()method 
public function loadConfig(filepath:String, linkedAppConfig:AppConfig):void

Parameters

filepath:String
 
linkedAppConfig:AppConfig

loadContent()method 
public function loadContent(filepath:String, linkedAppContent:GenericAppContent):void

Parameters

filepath:String
 
linkedAppContent:GenericAppContent

parseAttributeBoolean()method 
public function parseAttributeBoolean(xmlAttribute:String, defaultvalue:Boolean):Boolean

Parameters

xmlAttribute:String
 
defaultvalue:Boolean

Returns
Boolean
parseAttributeString()method 
public function parseAttributeString(xmlAttribute:String, defaultvalue:String):String

Parameters

xmlAttribute:String
 
defaultvalue:String

Returns
String
parsePropertyBoolean()method 
public function parsePropertyBoolean(xmlproperty:XMLList, defaultvalue:Boolean):Boolean

Parameters

xmlproperty:XMLList
 
defaultvalue:Boolean

Returns
Boolean
parsePropertyInteger()method 
public function parsePropertyInteger(xmlproperty:XMLList, defaultvalue:int):int

Parameters

xmlproperty:XMLList
 
defaultvalue:int

Returns
int
parsePropertyNumber()method 
public function parsePropertyNumber(xmlproperty:XMLList, defaultvalue:Number):Number

Parameters

xmlproperty:XMLList
 
defaultvalue:Number

Returns
Number
parsePropertyString()method 
public function parsePropertyString(xmlproperty:XMLList, defaultvalue:String):String

Parameters

xmlproperty:XMLList
 
defaultvalue:String

Returns
String
parsePropertyUint()method 
public function parsePropertyUint(xmlproperty:XMLList, defaultvalue:uint):uint

Parameters

xmlproperty:XMLList
 
defaultvalue:uint

Returns
uint
propertyExists()method 
public function propertyExists(xmlproperty:XMLList):Boolean

Parameters

xmlproperty:XMLList

Returns
Boolean
saveXML()method 
public function saveXML(localpath:String, xmlString:String):void

Parameters

localpath:String
 
xmlString:String

updateProgress()method 
protected function updateProgress(event:ProgressEvent):void

Parameters

event:ProgressEvent

Event Detail
FILE_NOT_FOUND_ERROR Event
Event Object Type: at.fhjoanneum.dmt.umj.core.events.AppContentEvent

FILE_NOT_FOUND_ERROR Event  
Event Object Type: at.fhjoanneum.dmt.umj.core.events.AppConfigEvent