Packagecom.soma.model
Classpublic class ContentManager
InheritanceContentManager Inheritance flash.events.EventDispatcher

Author: Romuald Quantin - www.soundstep.com

Information:
Blog page - SomaUI
How does it work - Soma Protest
Project Host - Google Code
Documentation - Soma ASDOC
Class version: 2.0
Actionscript version: 3.0

Copyright:

The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied.
See the License for the specific language governing rights and
limitations under the License.

The Original Code is Soma.
The Initial Developer of the Original Code is Romuald Quantin.
Initial Developer are Copyright (C) 2008-2009 Soundstep. All Rights Reserved.

Usage:
The ContentManager class is loading (and reloading) the XML Site Definition and give access to it to the user. The first time the XML is loaded, Soma will afterwards start the second step of its initialization process. Some methods are available to easily retrieve XML nodes commonly used, such as the backgrounds children nodes, the base children nodes, the XML of a page and the content node of a page.

The global content manager instance is accessible using:

Soma.getInstance().content
The XML Site Definition is accessible using (the XML returned is not a copy but the one that is used by all the framework, be careful with changes):
Soma.getInstance().content.data
The ContentManager is using two internal commands that are not meant to be used by the user but you can listen to them.

     Soma.getInstance().addEventListener(ContentEvent.LOADED, eventHandler);
     Soma.getInstance().addEventListener(ContentEvent.UPDATED, eventHandler);
     

See also

Soma
ContentEvent


Public Properties
 PropertyDefined by
  data : XML
ContentManager
  isLoaded : Boolean
ContentManager
  KILL_CACHE : Boolean
[static]
ContentManager
Public Methods
 MethodDefined by
  
ContentManager
  
getBackgrounds():XMLList
ContentManager
  
getBase():XMLList
ContentManager
  
getPage(id:String):XML
ContentManager
  
getPageContent(id:String):XML
ContentManager
  
reload(xmlFile:String):void
ContentManager
  
start(xmlFile:String):void
ContentManager
Property detail
dataproperty
data:XML  [read-write]Implementation
    public function get data():XML
    public function set data(value:XML):void
isLoadedproperty 
public var isLoaded:Boolean
KILL_CACHEproperty 
public static var KILL_CACHE:Boolean
Constructor detail
ContentManager()constructor
public function ContentManager()
Method detail
getBackgrounds()method
public function getBackgrounds():XMLList

Returns
XMLList
getBase()method 
public function getBase():XMLList

Returns
XMLList
getPage()method 
public function getPage(id:String):XMLParameters
id:String

Returns
XML
getPageContent()method 
public function getPageContent(id:String):XMLParameters
id:String

Returns
XML
reload()method 
public function reload(xmlFile:String):voidParameters
xmlFile:String
start()method 
public function start(xmlFile:String):voidParameters
xmlFile:String