Packageat.fhjoanneum.dmt.umj.core.content.core
Classpublic class GenericAppContent
InheritanceGenericAppContent Inheritance flash.events.EventDispatcher
Subclasses AppContent, AppContentBundle, AppPresentationContent

This is the powerful GenericAppContent SUPERCLASS that provides the basic behaviour for ALL AppContent classes (AppContent, AppContentBundle and AppPresentationContent!) It extends EventDispatcher for basic event handling to update the parsing information of xmls and defines the algorithm for PARSING the ContentElements within a xml and setting default values for optional attributes.



Public Properties
 PropertyDefined By
  contentElementCollection : ContentElementCollection
[read-only]
GenericAppContent
  currentSelectedLanguage : String
[read-only]
GenericAppContent
Protected Properties
 PropertyDefined By
  _contentElementCollection : ContentElementCollection
GenericAppContent
  _currentSelectedLanguage : String = DE
GenericAppContent
  mediaContentFactory : MediaComponentFactory
GenericAppContent
Public Methods
 MethodDefined By
  
GenericAppContent(PLEASE_USE_GET_INSTANCE:String = singleton AND generic - don't directly use this constructor)
Singleton and Generic superclass - don't use this anyway!
GenericAppContent
  
buildMediaComponents defines the algorithim for building the media components (the actual representation of an ContentElement within a LocalizedComponent and a MultilingualComponent!)
GenericAppContent
  
changeLanguage(language:String):void
changes the language of ALL MultilingualComponents to the new language - default language is defined in AppConfig.GLOBAL_STARTUP_LANGUAGE;
GenericAppContent
  
GenericAppContent
  
getContentElement returns the first contentElement found that matches the overgiven id.
GenericAppContent
  
getLocalizedComponent(elementID:String, language:String):GenericMediaComponent
getLocalizedComponent is the SECOND MOST IMPORTANT METHOD! - get a visual representation of an ContentElement as LocalizedComponent! This MUST be a language specific representation! - language is usually DE or EN
GenericAppContent
  
getMultiLingualComponent is ONE OF THE MOST IMPORTANT METHODS - gets a visual representation of an ContentElement within an MultilingualComponent.
GenericAppContent
  
getXMLRepresentation(appendLastTimeSaved:LastTimeSavedChecker = null):String
GenericAppContent
  
parseXML(linkedXML:XML):void
GenericAppContent
Protected Methods
 MethodDefined By
  
dealloc():void
GenericAppContent
  
getGenericUniqueElementID(prefix:String = generic):String
GenericAppContent
  
init():void
GenericAppContent
  
parseAllContentElements(util:XMLUtil, linkedXML:XML):void
parseAllContentElements defines the algorithm for parsing ALL ContentElements within a loop
GenericAppContent
  
parseAndReturnOneContentElement defines the algorithm for parsing ONE ContentElement during the loop
GenericAppContent
Property Detail
_contentElementCollectionproperty
protected var _contentElementCollection:ContentElementCollection

_currentSelectedLanguageproperty 
protected var _currentSelectedLanguage:String = DE

contentElementCollectionproperty 
contentElementCollection:ContentElementCollection  [read-only]


Implementation
    public function get contentElementCollection():ContentElementCollection
currentSelectedLanguageproperty 
currentSelectedLanguage:String  [read-only]


Implementation
    public function get currentSelectedLanguage():String
mediaContentFactoryproperty 
protected var mediaContentFactory:MediaComponentFactory

Constructor Detail
GenericAppContent()Constructor
public function GenericAppContent(PLEASE_USE_GET_INSTANCE:String = singleton AND generic - don't directly use this constructor)

Singleton and Generic superclass - don't use this anyway!

Parameters
PLEASE_USE_GET_INSTANCE:String (default = singleton AND generic - don't directly use this constructor)
Method Detail
buildMediaComponents()method
public function buildMediaComponents():void

buildMediaComponents defines the algorithim for building the media components (the actual representation of an ContentElement within a LocalizedComponent and a MultilingualComponent!)

changeLanguage()method 
public function changeLanguage(language:String):void

changes the language of ALL MultilingualComponents to the new language - default language is defined in AppConfig.GLOBAL_STARTUP_LANGUAGE;

Parameters

language:String

checkIfContentElementsExist()method 
public function checkIfContentElementsExist():Boolean

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

getContentElement()method 
public function getContentElement(id:String):ContentElement

getContentElement returns the first contentElement found that matches the overgiven id. So make sure all IDs in the structure are unique. Don't use this if you have multiple contentElements with the same id! returns null if nothing was found.

Parameters

id:String

Returns
ContentElement
getGenericUniqueElementID()method 
protected function getGenericUniqueElementID(prefix:String = generic):String

Parameters

prefix:String (default = generic)

Returns
String
getLocalizedComponent()method 
public function getLocalizedComponent(elementID:String, language:String):GenericMediaComponent

getLocalizedComponent is the SECOND MOST IMPORTANT METHOD! - get a visual representation of an ContentElement as LocalizedComponent! This MUST be a language specific representation! - language is usually DE or EN

Parameters

elementID:String
 
language:String

Returns
GenericMediaComponent
getMultiLingualComponent()method 
public function getMultiLingualComponent(elementID:String):MultiLingualComponent

getMultiLingualComponent is ONE OF THE MOST IMPORTANT METHODS - gets a visual representation of an ContentElement within an MultilingualComponent. Based on current selected language, the actual localized vizualizaition is automatically shown

Parameters

elementID:String

Returns
MultiLingualComponent
getXMLRepresentation()method 
public function getXMLRepresentation(appendLastTimeSaved:LastTimeSavedChecker = null):String

Parameters

appendLastTimeSaved:LastTimeSavedChecker (default = null)

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

parseAllContentElements()method 
protected function parseAllContentElements(util:XMLUtil, linkedXML:XML):void

parseAllContentElements defines the algorithm for parsing ALL ContentElements within a loop

Parameters

util:XMLUtil
 
linkedXML:XML

parseAndReturnOneContentElement()method 
protected function parseAndReturnOneContentElement(util:XMLUtil, linkedXML:XML):ContentElement

parseAndReturnOneContentElement defines the algorithm for parsing ONE ContentElement during the loop

Parameters

util:XMLUtil
 
linkedXML:XML

Returns
ContentElement
parseXML()method 
public function parseXML(linkedXML:XML):void

Parameters

linkedXML:XML