Class HarmoniHierarchyManager

Description

<p> HierarchyManager handles creating, deleting, and getting Hierarchies.

</p>

<p> All implementations of OsidManager (manager) provide methods for accessing and manipulating the various objects defined in the OSID package. A manager defines an implementation of an OSID. All other OSID objects come either directly or indirectly from the manager. New instances of the OSID objects are created either directly or indirectly by the manager. Because the OSID objects are defined using interfaces, create methods must be used instead of the new operator to create instances of the OSID objects. Create methods are used both to instantiate and persist OSID objects. Using the OsidManager class to define an OSID's implementation allows the application to change OSID implementations by changing the OsidManager package name used to load an implementation. Applications developed using managers permit OSID implementation substitution without changing the application source code. As with all managers, use the OsidLoader to load an implementation of this interface. </p>

<p></p>

<p> OSID Version: 2.0 </p>

  • version: $Id: HarmoniHierarchyManager.class.php,v 1.28 2007/09/13 16:04:20 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright &copy; 2005, Middlebury College

Located in /harmoni/core/oki2/hierarchy/HarmoniHierarchyManager.class.php (line 49)

OsidManager
   |
   --HierarchyManager
      |
      --HarmoniHierarchyManager
Variable Summary
Method Summary
HarmoniHierarchyManager HarmoniHierarchyManager (integer 0, string 1)
void assignConfiguration (object Properties $configuration)
void assignOsidContext (mixed $context, object OsidContext $context )
object Hierarchy createHierarchy (string $displayName, object Type[] $nodeTypes, string $description, boolean $allowsMultipleParents, boolean $allowsRecursion, [optional $id = NULL])
void deleteHierarchy (mixed $hierarchyId, object Id $hierarchyId )
object HierarchyIterator getHierarchies ()
object Hierarchy getHierarchy (mixed $hierarchyId, object Id $hierarchyId )
ref getHierarchyForNode (mixed $node)
ref getNode (ref $id)
object OsidContext getOsidContext ()
boolean nodeExists (mixed $nodeId, object Id $nodeId )
boolean supportsMaintenance ()
Variables
array $_allHierarchiesCached (line 74)

TRUE if all hiearchies are cached.

  • var: _hierarchies
  • access: private
integer $_dbIndex (line 58)

The database connection as returned by the DBHandler.

  • var: _dbIndex
  • access: protected
array $_hierarchies (line 67)

An array that will store all hierarchies and fulfil the function of a cache.

  • var: _hierarchies
  • access: private
Methods
Constructor HarmoniHierarchyManager (line 84)

Constructor

  • access: public
HarmoniHierarchyManager HarmoniHierarchyManager (integer 0, string 1)
  • integer 0: dbIndex The database connection as returned by the DBHandler.
  • string 1: hyDB The name of the hierarchy database. manager.
assignConfiguration (line 109)

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

follows: database_index integer database_name string

  • 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:
OsidManager::assignConfiguration()
Assign the configuration of this OsidManager.
assignOsidContext (line 147)

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:
OsidManager::assignOsidContext()
Assign the context of this OsidManager.
createHierarchy (line 181)

Create a Hierarchy.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNSUPPORTED_CREATION
object Hierarchy createHierarchy (string $displayName, object Type[] $nodeTypes, string $description, boolean $allowsMultipleParents, boolean $allowsRecursion, [optional $id = NULL])
  • string $displayName
  • object Type[] $nodeTypes
  • string $description
  • boolean $allowsMultipleParents
  • boolean $allowsRecursion
  • optional $id: object Id $id WARNING: NOT IN OSID

Redefinition of:
HierarchyManager::createHierarchy()
Create a Hierarchy.
deleteHierarchy (line 397)

Delete a Hierarchy by unique Id. All Nodes must be removed from the Hierarchy before this method is called.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, NODE_TYPE_NOT_FOUND, HIERARCHY_NOT_EMPTY
void deleteHierarchy (mixed $hierarchyId, object Id $hierarchyId )
  • object Id $hierarchyId

Redefinition of:
HierarchyManager::deleteHierarchy()
Delete a Hierarchy by unique Id. All Nodes must be removed from the Hierarchy before this method is called.
getHierarchies (line 326)

Get all Hierarchies.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object HierarchyIterator getHierarchies ()

Redefinition of:
HierarchyManager::getHierarchies()
Get all Hierarchies.
getHierarchy (line 261)

Get a Hierarchy by unique Id.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, NODE_TYPE_NOT_FOUND
object Hierarchy getHierarchy (mixed $hierarchyId, object Id $hierarchyId )
  • object Id $hierarchyId

Redefinition of:
HierarchyManager::getHierarchy()
Get a Hierarchy by unique Id.
getHierarchyForNode (line 552)

Returns the hierarchy to which the given Node belongs.

WARNING: NOT IN OSID - This method is not part of the OKI interface as of 07/06/04 but has been scheduled for addition.

Note: As of version 2.0, the getNode() method has been removed from the OSID, removing the need for this method.

  • return: object The Hierarchy to which the Node belongs.
  • access: public
ref getHierarchyForNode (mixed $node)
getNode (line 474)

Returns the hierarchy Node with the specified Id.

WARNING: NOT IN OSID - As of Version 2.0, this method has been removed from the OSID.

  • return: object The Node with the given Id.
  • access: public
ref getNode (ref $id)
  • ref $id: object id The Id object.
getOsidContext (line 132)

Return context of this OsidManager.

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

Redefinition of:
OsidManager::getOsidContext()
Return context of this OsidManager.
nodeExists (line 526)

Answer TRUE if the a node exists with the given Id

WARNING: NOT in OSID

  • access: public
boolean nodeExists (mixed $nodeId, object Id $nodeId )
  • object Id $nodeId
supportsMaintenance (line 459)

This method indicates whether this implementation supports

HierarchyManager methods: createHierarchy, deleteHierarchy, updateName, updateDescription, createRootNode, createNode, deleteNode, addNodeType, removeNodeType. Note methods: nodeUpdateDescription, noteUpdateDisplayName, addParent, removeParent, changeParent.

  • access: public
  • throws: object HierarchyException An exception with one of the following messages defined in org.osid.hierarchy.HierarchyException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
boolean supportsMaintenance ()

Redefinition of:
HierarchyManager::supportsMaintenance()
This method indicates whether this implementation supports

Inherited Methods

Inherited From HierarchyManager

HierarchyManager::createHierarchy()
HierarchyManager::deleteHierarchy()
HierarchyManager::getHierarchies()
HierarchyManager::getHierarchy()
HierarchyManager::supportsMaintenance()

Inherited From OsidManager

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

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