Source for file HierarchyManager.php

Documentation is available at HierarchyManager.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../OsidManager.php");
  3. /**
  4. * <p>
  5. * HierarchyManager handles creating, deleting, and getting Hierarchies.
  6. * </p>
  7. *
  8. * <p>
  9. * All implementations of OsidManager (manager) provide methods for accessing
  10. * and manipulating the various objects defined in the OSID package. A manager
  11. * defines an implementation of an OSID. All other OSID objects come either
  12. * directly or indirectly from the manager. New instances of the OSID objects
  13. * are created either directly or indirectly by the manager. Because the OSID
  14. * objects are defined using interfaces, create methods must be used instead
  15. * of the new operator to create instances of the OSID objects. Create methods
  16. * are used both to instantiate and persist OSID objects. Using the
  17. * OsidManager class to define an OSID's implementation allows the application
  18. * to change OSID implementations by changing the OsidManager package name
  19. * used to load an implementation. Applications developed using managers
  20. * permit OSID implementation substitution without changing the application
  21. * source code. As with all managers, use the OsidLoader to load an
  22. * implementation of this interface.
  23. * </p>
  24. *
  25. * <p></p>
  26. *
  27. * <p>
  28. * OSID Version: 2.0
  29. * </p>
  30. *
  31. * <p>
  32. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  33. * O.K.I&#46; OSID Definition License}.
  34. * </p>
  35. *
  36. * @package org.osid.hierarchy
  37. */
  38. class HierarchyManager
  39. extends OsidManager
  40. {
  41. /**
  42. * Create a Hierarchy.
  43. *
  44. * @param string $displayName
  45. * @param object Type[] $nodeTypes
  46. * @param string $description
  47. * @param boolean $allowsMultipleParents
  48. * @param boolean $allowsRecursion
  49. *
  50. * @return object Hierarchy
  51. *
  52. * @throws object HierarchyException An exception with one of
  53. * the following messages defined in
  54. * org.osid.hierarchy.HierarchyException may be thrown: {@link }
  55. * org.osid.hierarchy.HierarchyException#OPERATION_FAILED
  56. * OPERATION_FAILED}, {@link }
  57. * org.osid.hierarchy.HierarchyException#PERMISSION_DENIED
  58. * PERMISSION_DENIED}, {@link }
  59. * org.osid.hierarchy.HierarchyException#CONFIGURATION_ERROR
  60. * CONFIGURATION_ERROR}, {@link }
  61. * org.osid.hierarchy.HierarchyException#UNIMPLEMENTED
  62. * UNIMPLEMENTED}, {@link }
  63. * org.osid.hierarchy.HierarchyException#NULL_ARGUMENT
  64. * NULL_ARGUMENT}, {@link }
  65. * org.osid.hierarchy.HierarchyException#UNSUPPORTED_CREATION
  66. * UNSUPPORTED_CREATION}
  67. *
  68. * @access public
  69. */
  70. function createHierarchy ( $displayName, $nodeTypes, $description, $allowsMultipleParents, $allowsRecursion ) {
  71. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  72. }
  73.  
  74. /**
  75. * Get a Hierarchy by unique Id.
  76. *
  77. * @param object Id $hierarchyId
  78. *
  79. * @return object Hierarchy
  80. *
  81. * @throws object HierarchyException An exception with one of
  82. * the following messages defined in
  83. * org.osid.hierarchy.HierarchyException may be thrown: {@link }
  84. * org.osid.hierarchy.HierarchyException#OPERATION_FAILED
  85. * OPERATION_FAILED}, {@link }
  86. * org.osid.hierarchy.HierarchyException#PERMISSION_DENIED
  87. * PERMISSION_DENIED}, {@link }
  88. * org.osid.hierarchy.HierarchyException#CONFIGURATION_ERROR
  89. * CONFIGURATION_ERROR}, {@link }
  90. * org.osid.hierarchy.HierarchyException#UNIMPLEMENTED
  91. * UNIMPLEMENTED}, {@link }
  92. * org.osid.hierarchy.HierarchyException#NULL_ARGUMENT
  93. * NULL_ARGUMENT}, {@link }
  94. * org.osid.hierarchy.HierarchyException#NODE_TYPE_NOT_FOUND
  95. * NODE_TYPE_NOT_FOUND}
  96. *
  97. * @access public
  98. */
  99. function getHierarchy ( $hierarchyId ) {
  100. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  101. }
  102.  
  103. /**
  104. * Get all Hierarchies.
  105. *
  106. * @return object HierarchyIterator
  107. *
  108. * @throws object HierarchyException An exception with one of
  109. * the following messages defined in
  110. * org.osid.hierarchy.HierarchyException may be thrown: {@link }
  111. * org.osid.hierarchy.HierarchyException#OPERATION_FAILED
  112. * OPERATION_FAILED}, {@link }
  113. * org.osid.hierarchy.HierarchyException#PERMISSION_DENIED
  114. * PERMISSION_DENIED}, {@link }
  115. * org.osid.hierarchy.HierarchyException#CONFIGURATION_ERROR
  116. * CONFIGURATION_ERROR}, {@link }
  117. * org.osid.hierarchy.HierarchyException#UNIMPLEMENTED
  118. * UNIMPLEMENTED}
  119. *
  120. * @access public
  121. */
  122. function getHierarchies () {
  123. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  124. }
  125.  
  126. /**
  127. * Delete a Hierarchy by unique Id. All Nodes must be removed from the
  128. * Hierarchy before this method is called.
  129. *
  130. * @param object Id $hierarchyId
  131. *
  132. * @throws object HierarchyException An exception with one of
  133. * the following messages defined in
  134. * org.osid.hierarchy.HierarchyException may be thrown: {@link }
  135. * org.osid.hierarchy.HierarchyException#OPERATION_FAILED
  136. * OPERATION_FAILED}, {@link }
  137. * org.osid.hierarchy.HierarchyException#PERMISSION_DENIED
  138. * PERMISSION_DENIED}, {@link }
  139. * org.osid.hierarchy.HierarchyException#CONFIGURATION_ERROR
  140. * CONFIGURATION_ERROR}, {@link }
  141. * org.osid.hierarchy.HierarchyException#UNIMPLEMENTED
  142. * UNIMPLEMENTED}, {@link }
  143. * org.osid.hierarchy.HierarchyException#NULL_ARGUMENT
  144. * NULL_ARGUMENT}, {@link }
  145. * org.osid.hierarchy.HierarchyException#NODE_TYPE_NOT_FOUND
  146. * NODE_TYPE_NOT_FOUND}, {@link }
  147. * org.osid.hierarchy.HierarchyException#HIERARCHY_NOT_EMPTY
  148. * HIERARCHY_NOT_EMPTY}
  149. *
  150. * @access public
  151. */
  152. function deleteHierarchy ( $hierarchyId ) {
  153. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  154. }
  155.  
  156. /**
  157. * This method indicates whether this implementation supports
  158. * HierarchyManager methods: createHierarchy, deleteHierarchy, updateName,
  159. * updateDescription, createRootNode, createNode, deleteNode, addNodeType,
  160. * removeNodeType. Note methods: nodeUpdateDescription,
  161. * noteUpdateDisplayName, addParent, removeParent, changeParent.
  162. *
  163. * @return boolean
  164. *
  165. * @throws object HierarchyException An exception with one of
  166. * the following messages defined in
  167. * org.osid.hierarchy.HierarchyException may be thrown: {@link }
  168. * org.osid.hierarchy.HierarchyException#OPERATION_FAILED
  169. * OPERATION_FAILED}, {@link }
  170. * org.osid.hierarchy.HierarchyException#PERMISSION_DENIED
  171. * PERMISSION_DENIED}, {@link }
  172. * org.osid.hierarchy.HierarchyException#CONFIGURATION_ERROR
  173. * CONFIGURATION_ERROR}, {@link }
  174. * org.osid.hierarchy.HierarchyException#UNIMPLEMENTED
  175. * UNIMPLEMENTED}
  176. *
  177. * @access public
  178. */
  179. function supportsMaintenance () {
  180. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  181. }
  182. }
  183.  
  184. ?>

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