Source for file HierarchyException.php

Documentation is available at HierarchyException.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../shared/SharedException.php");
  3. /**
  4. * OsidException or one of its subclasses is thrown by all methods of all
  5. * interfaces of an Open Service Interface Definition (OSID). This requires
  6. * the caller of an OSID package method handle the OsidException. Since the
  7. * application using an OSID can not determine where an implementation method
  8. * will ultimately execute, it must assume a worst case scenerio and protect
  9. * itself. OSID Implementations should throw their own subclasses of
  10. * OsidException and limit exception messages to those predefined by their own
  11. * OsidException or its superclasses. This approach to exception messages
  12. * allows Applications and OSID implementations using an OsidException's
  13. * predefined messages to handle exceptions in an interoperable way.
  14. *
  15. * <p>
  16. * OSID Version: 2.0
  17. * </p>
  18. *
  19. * <p>
  20. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  21. * O.K.I&#46; OSID Definition License}.
  22. * </p>
  23. *
  24. * @package org.osid.hierarchy
  25. */
  26. class HierarchyException
  27. extends SharedException
  28. {
  29. /**
  30. * Cannot create Node without unknown parent
  31. * Note: This method is PHP's equivalent of a static field.
  32. *
  33. * @return string
  34. * @access public
  35. * @static
  36. */
  37. function UNKNOWN_PARENT_NODE () {
  38. return "Cannot create Node with unknown parent ";
  39. }
  40.  
  41. /**
  42. * Cannot delete a Hierarchy containing Nodes
  43. * Note: This method is PHP's equivalent of a static field.
  44. *
  45. * @return string
  46. * @access public
  47. * @static
  48. */
  49. function HIERARCHY_NOT_EMPTY () {
  50. return "Cannot delete a Hierarchy containing Nodes ";
  51. }
  52.  
  53. /**
  54. * Hierarchy does not support allowsMultipleParents is false and
  55. * allowsRecursion is true
  56. * Note: This method is PHP's equivalent of a static field.
  57. *
  58. * @return string
  59. * @access public
  60. * @static
  61. */
  62. function UNSUPPORTED_CREATION () {
  63. return "Hierarchy does not support allowsMultipleParents is false and allowsRecursion is true ";
  64. }
  65.  
  66. /**
  67. * Hierarchy does not allow recursion
  68. * Note: This method is PHP's equivalent of a static field.
  69. *
  70. * @return string
  71. * @access public
  72. * @static
  73. */
  74. function ATTEMPTED_RECURSION () {
  75. return "Hierarchy does not allow recursion ";
  76. }
  77.  
  78. /**
  79. * Hierarchy does not allow multiple parents
  80. * Note: This method is PHP's equivalent of a static field.
  81. *
  82. * @return string
  83. * @access public
  84. * @static
  85. */
  86. function SINGLE_PARENT_HIERARCHY () {
  87. return "Hierarchy does not allow multiple parents ";
  88. }
  89.  
  90. /**
  91. * Removing parent will result in an inconsistent state
  92. * Note: This method is PHP's equivalent of a static field.
  93. *
  94. * @return string
  95. * @access public
  96. * @static
  97. */
  98. function INCONSISTENT_STATE () {
  99. return "Removing node will result in an inconsistent state ";
  100. }
  101.  
  102. /**
  103. * Unknown traversal mode
  104. * Note: This method is PHP's equivalent of a static field.
  105. *
  106. * @return string
  107. * @access public
  108. * @static
  109. */
  110. function UNKNOWN_TRAVERSAL_MODE () {
  111. return "Unknown traversal mode ";
  112. }
  113.  
  114. /**
  115. * Unknown traversal direction
  116. * Note: This method is PHP's equivalent of a static field.
  117. *
  118. * @return string
  119. * @access public
  120. * @static
  121. */
  122. function UNKNOWN_TRAVERSAL_DIRECTION () {
  123. return "Unknown traversal direction ";
  124. }
  125.  
  126. /**
  127. * NodeType has never been added
  128. * Note: This method is PHP's equivalent of a static field.
  129. *
  130. * @return string
  131. * @access public
  132. * @static
  133. */
  134. function NODE_TYPE_NOT_FOUND () {
  135. return "NodeType has never been added ";
  136. }
  137.  
  138. /**
  139. * Cannot remove NodeType referenced by a Node
  140. * Note: This method is PHP's equivalent of a static field.
  141. *
  142. * @return string
  143. * @access public
  144. * @static
  145. */
  146. function NODE_TYPE_IN_USE () {
  147. return "Cannot remove NodeType referenced by a Node ";
  148. }
  149.  
  150.  
  151. function HierarchyException ( $message ) {
  152. die($message);
  153. }
  154.  
  155. }
  156.  
  157. ?>

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