Class GUIManager

Description

An implmentation of the GUIManagerInterface. This implementation

is pretty straightforward and does not maintain any sort of caching data structures. Theme states are dealt with on the fly whenever one of the load/replace/save/delete methods is called.

This class provides methods for theme management: saving/loading of theme state, obtaining information about supported GUI components, etc.

  • version: $Id: GUIManager.class.php,v 1.29 2007/09/04 20:25:21 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/GUIManager/GUIManager.class.php (line 26)

OsidManager
   |
   --OutputHandler
      |
      --GUIManagerAbstract
         |
         --GUIManager
Variable Summary
integer $_dbIndex
integer $_dbName
array $_themeList
Method Summary
GUIManager GUIManager ()
void assignConfiguration (object Properties $configuration)
void assignOsidContext (mixed $context, object OsidContext $context )
ref createTheme (string $displayName, string $description)
string getCollectionClass ()
string getComponentPath ()
ref getGlobalFont ()
string getLayoutPath ()
object OsidContext getOsidContext ()
string getSCPath ()
string getSPPath ()
array getSupportedSCs ()
array getSupportedSPs ()
ref getThemeById (ref $themeId)
void loadTheme (object HarmoniId $themeId)
void saveTheme ()
Variables
integer $_dbIndex (line 39)

The database connection as returned by the DBHandler.

  • var: _dbIndex
  • access: protected
integer $_dbName (line 46)

The database connection as returned by the DBHandler.

  • var: _dbIndex
  • access: protected
array $_themeList (line 56)

A list of default themes anyone can access. The array should contain several arrays with two parameters. The first is a display name.

The second is the name of the Theme's class

  • var: _themeList
  • access: protected

Inherited Variables

Inherited from OutputHandler

OutputHandler::$_head
Methods
Constructor GUIManager (line 62)

Constructor

  • access: public
GUIManager GUIManager ()
assignConfiguration (line 86)

Assign the configuration of this Manager. Valid configuration options are as

follows: database_index integer database_name string default_theme object Theme

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
void assignConfiguration (object Properties $configuration)
  • object Properties $configuration: (original type: java.util.Properties)

Redefinition of:
OutputHandler::assignConfiguration()
Assign the configuration of this Manager. Valid configuration options are as
assignOsidContext (line 138)

Assign the context of this OsidManager.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: NULL_ARGUMENT
void assignOsidContext (mixed $context, object OsidContext $context )
  • object OsidContext $context

Redefinition of:
OutputHandler::assignOsidContext()
Assign the context of this OsidManager.
createTheme (line 409)

Creates a new theme object with an Id

  • return: object Theme
ref createTheme (string $displayName, string $description)
  • string $displayName
  • string $description
deleteCollectionsForTheme (line 823)

Deletes the style collections from the database

  • since: 4/26/06
  • access: public
void deleteCollectionsForTheme (object Theme $theme)
deleteComponentsForProperty (line 874)

Deletes the components for the property from the db

  • since: 4/26/06
  • access: public
void deleteComponentsForProperty (object StyleProperty $sp)
deletePropertiesForCollection (line 849)

Deletes the style properties from the database

  • since: 4/26/06
  • access: public
void deletePropertiesForCollection (object StyleCollection $styleCollection)
deleteTheme (line 798)

Deletes the theme from the database

  • since: 4/26/06
  • access: public
void deleteTheme (object HarmoniId $id)

Redefinition of:
GUIManagerAbstract::deleteTheme()
Deletes the theme state with the given id from the database. Notice that
getCollectionClass (line 995)

Answers the class of the style collections being used by this theme

  • return: the class for the collections
  • since: 5/30/06
  • access: public
string getCollectionClass ()
getComponentPath (line 300)

Returns the path that contains all the supported components.

  • return: The relative path to the Component directory.
  • access: public
string getComponentPath ()

Redefinition of:
GUIManagerAbstract::getComponentPath()
Returns the path that contains all the supported components.
getGlobalBGColor (line 946)

Answers the style property containing the Global Background Color for the theme

  • return: object StyleProperty
  • since: 5/30/06
  • access: public
ref getGlobalBGColor ()
getGlobalFont (line 973)

Answers the style property containing the Global Font for the theme

  • return: object StyleProperty
  • since: 5/30/06
  • access: public
ref getGlobalFont ()
getLayoutPath (line 338)

Returns the path that contains all the supported layouts.

  • return: The relative path to the Layout directory.
  • access: public
string getLayoutPath ()

Redefinition of:
GUIManagerAbstract::getLayoutPath()
Returns the path that contains all the supported layouts.
getOsidContext (line 123)

Return context of this OsidManager.

  • access: public
  • throws: object OsidException
object OsidContext getOsidContext ()

Redefinition of:
OutputHandler::getOsidContext()
Return context of this OsidManager.
getSCPath (line 262)

Returns the path that contains all the supported style component.

  • return: The relative path to the style component directory.
  • access: public
string getSCPath ()

Redefinition of:
GUIManagerAbstract::getSCPath()
Returns the path that contains all the supported style component.
getSPPath (line 224)

Returns the path that contains all the supported style properties.

  • return: The relative path to the style property directory.
  • access: public
string getSPPath ()

Redefinition of:
GUIManagerAbstract::getSPPath()
Returns the path that contains all the supported style properties.
getStyleCollectionPath (line 185)

Returns the path that contains all the supported themes.

  • return: The relative path to the Theme directory.
  • access: public
string getStyleCollectionPath ()
getSupportedComponents (line 271)

Returns a list of components supported by the GUIManager.

  • return: An array of strings; each element is the class name of a component.
  • access: public
array getSupportedComponents ()

Redefinition of:
GUIManagerAbstract::getSupportedComponents()
Returns a list of components supported by the GUIManager.
getSupportedLayouts (line 309)

Returns a list of layouts supported by the GUIManager.

  • return: An array of strings; each element is the class name of a layout.
  • access: public
array getSupportedLayouts ()

Redefinition of:
GUIManagerAbstract::getSupportedLayouts()
Returns a list of layouts supported by the GUIManager.
getSupportedSCs (line 233)

Returns a list of style components supported by the GUIManager.

  • return: An array of strings; each element is the class name of a style components.
  • access: public
array getSupportedSCs ()

Redefinition of:
GUIManagerAbstract::getSupportedSCs()
Returns a list of style components supported by the GUIManager.
getSupportedSPs (line 194)

Returns a list of style properties supported by the GUIManager.

  • return: An array of strings; each element is the class name of a style property.
  • access: public
array getSupportedSPs ()

Redefinition of:
GUIManagerAbstract::getSupportedSPs()
Returns a list of style properties supported by the GUIManager.
getSupportedStyleCollections (line 156)

Returns a list of styleCollections supported by the GUIManager.

  • return: An array of strings; each element is the class name of a theme.
  • access: public
array getSupportedStyleCollections ()
getThemeById (line 359)

Loads the theme stored earlier with

  1. saveTheme()
. This method reverses the steps of
  1. saveTheme()
. It first obtains the database-stored theme, then instantiates a Theme object with the data.

  • return: object Theme
  • access: public
ref getThemeById (ref $themeId)
  • ref $themeId: object HarmoniId $themeId The id of the theme that will be loaded.
getThemeListForUser (line 898)

Answers a list of themes that the User has access to edit

  • return: keyed on id's and valued to DisplayName
  • since: 5/30/06
  • access: public
array getThemeListForUser ()
getThemeTemplates (line 563)

Answers the set of templates stored in the Database Display name is 'Template'

  • return: array The array of theme objects that are templates
  • since: 5/3/06
  • access: public
ref getThemeTemplates ()
loadStyleCollectionsForTheme (line 427)

Loads the Style Collections for the given theme_id from the database and adds them to the current theme

  • since: 4/25/06
  • access: public
void loadStyleCollectionsForTheme (object Theme $theme)
  • object Theme $theme: The theme for which we are loading Collections
loadStyleComponentsForProperty (line 528)

Loads the Style Components for the given property_id from the database and adds them to the style property

  • since: 4/25/06
  • access: public
void loadStyleComponentsForProperty (object StyleProperty $property)
loadStylePropertiesForCollection (line 489)

Loads the Style Properties for the given collection_id from the database and adds them to the style collection.

  • since: 4/25/06
  • access: public
void loadStylePropertiesForCollection (object StyleCollection $collection)
loadTheme (line 398)

Load theme

  • since: 4/26/06
  • access: public
void loadTheme (object HarmoniId $themeId)

Redefinition of:
GUIManagerAbstract::loadTheme()
Loads the theme state stored priorly with
  1. saveThemeState()
. This method reverses the steps of
  1. saveThemeState()
. It first obtains the database-stored theme state, unserializes it, and finally imports it into the theme.
saveStyleCollections (line 654)

Saves the Style Collections associated with the current theme

  • since: 4/26/06
  • access: public
void saveStyleCollections ()
saveStyleComponentsForProperty (line 752)

Saves the style components of a style property

  • since: 4/26/06
  • access: public
void saveStyleComponentsForProperty (object StyleCollection $property)
saveStylePropertiesForCollection (line 708)

Saves the style properties of a style collection with id $id

  • since: 4/26/06
  • access: public
void saveStylePropertiesForCollection (object StyleCollection $collection)
saveTheme (line 595)

Saves the current theme by updating the theme settings in the database

  • since: 4/26/06
  • access: public
void saveTheme ()

Redefinition of:
GUIManagerAbstract::saveTheme()
Saves the theme state to the database. The theme state is saved by exporting the theme's style properties, and then serializing the output and storing it into the database. If the Theme already exists, it is merely replaced.

Inherited Methods

Inherited From GUIManagerAbstract

GUIManagerAbstract::deleteTheme()
GUIManagerAbstract::getComponentPath()
GUIManagerAbstract::getLayoutPath()
GUIManagerAbstract::getSCPath()
GUIManagerAbstract::getSPPath()
GUIManagerAbstract::getSupportedComponents()
GUIManagerAbstract::getSupportedLayouts()
GUIManagerAbstract::getSupportedSCs()
GUIManagerAbstract::getSupportedSPs()
GUIManagerAbstract::getSupportedThemes()
GUIManagerAbstract::getTheme()
GUIManagerAbstract::getThemePath()
GUIManagerAbstract::loadTheme()
GUIManagerAbstract::output()
GUIManagerAbstract::saveTheme()
GUIManagerAbstract::setTheme()

Inherited From OutputHandler

OutputHandler::assignConfiguration()
OutputHandler::assignOsidContext()
OutputHandler::attachToHarmoni()
OutputHandler::getHead()
OutputHandler::getOsidContext()
OutputHandler::output()
OutputHandler::setHead()

Inherited From OsidManager

OsidManager::assignConfiguration()
OsidManager::assignOsidContext()
OsidManager::getOsidContext()
OsidManager::osidVersion_2_0()

Documentation generated on Wed, 19 Sep 2007 10:23:32 -0400 by phpDocumentor 1.3.0RC3