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.
buildMediaComponents defines the algorithim for building the media components (the actual representation of an ContentElement within a LocalizedComponent and a MultilingualComponent!)
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
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():BooleanReturns
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.
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
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