Source for file Qualifier.php

Documentation is available at Qualifier.php

  1. <?php
  2. /**
  3. * Qualifier is the context in which an Authorization is valid and consists of
  4. * an Id, a description and a QualifierType. Ids in Authorization are
  5. * externally defined and their uniqueness is enforced by the implementation.
  6. *
  7. * <p>
  8. * OSID Version: 2.0
  9. * </p>
  10. *
  11. * <p>
  12. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  13. * O.K.I&#46; OSID Definition License}.
  14. * </p>
  15. *
  16. * @package org.osid.authorization
  17. */
  18. class Qualifier
  19. {
  20. /**
  21. * Get the unique Id for this Qualifier.
  22. *
  23. * @return object Id
  24. *
  25. * @throws object AuthorizationException An exception with
  26. * one of the following messages defined in
  27. * org.osid.authorization.AuthorizationException may be thrown:
  28. * {@link }
  29. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  30. * OPERATION_FAILED}, {@link }
  31. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  32. * PERMISSION_DENIED}, {@link }
  33. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  34. * CONFIGURATION_ERROR}, {@link }
  35. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  36. * UNIMPLEMENTED}
  37. *
  38. * @access public
  39. */
  40. function getId () {
  41. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  42. }
  43.  
  44. /**
  45. * Get the permanent reference name for this Qualifier.
  46. *
  47. * @return string
  48. *
  49. * @throws object AuthorizationException An exception with
  50. * one of the following messages defined in
  51. * org.osid.authorization.AuthorizationException may be thrown:
  52. * {@link }
  53. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  54. * OPERATION_FAILED}, {@link }
  55. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  56. * PERMISSION_DENIED}, {@link }
  57. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  58. * CONFIGURATION_ERROR}, {@link }
  59. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  60. * UNIMPLEMENTED}
  61. *
  62. * @access public
  63. */
  64. function getReferenceName () {
  65. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  66. }
  67.  
  68. /**
  69. * Get the description for this Qualifier.
  70. *
  71. * @return string
  72. *
  73. * @throws object AuthorizationException An exception with
  74. * one of the following messages defined in
  75. * org.osid.authorization.AuthorizationException may be thrown:
  76. * {@link }
  77. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  78. * OPERATION_FAILED}, {@link }
  79. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  80. * PERMISSION_DENIED}, {@link }
  81. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  82. * CONFIGURATION_ERROR}, {@link }
  83. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  84. * UNIMPLEMENTED}
  85. *
  86. * @access public
  87. */
  88. function getDescription () {
  89. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  90. }
  91.  
  92. /**
  93. * Return true if this Qualifier has any children; false otherwise
  94. *
  95. * @return boolean
  96. *
  97. * @throws object AuthorizationException An exception with
  98. * one of the following messages defined in
  99. * org.osid.authorization.AuthorizationException may be thrown:
  100. * {@link }
  101. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  102. * OPERATION_FAILED}, {@link }
  103. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  104. * PERMISSION_DENIED}, {@link }
  105. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  106. * CONFIGURATION_ERROR}, {@link }
  107. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  108. * UNIMPLEMENTED}
  109. *
  110. * @access public
  111. */
  112. function isParent () {
  113. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  114. }
  115.  
  116. /**
  117. * Get the QualifierType for this Qualifier.
  118. *
  119. * @return object Type
  120. *
  121. * @throws object AuthorizationException An exception with
  122. * one of the following messages defined in
  123. * org.osid.authorization.AuthorizationException may be thrown:
  124. * {@link }
  125. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  126. * OPERATION_FAILED}, {@link }
  127. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  128. * PERMISSION_DENIED}, {@link }
  129. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  130. * CONFIGURATION_ERROR}, {@link }
  131. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  132. * UNIMPLEMENTED}
  133. *
  134. * @access public
  135. */
  136. function getQualifierType () {
  137. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  138. }
  139.  
  140. /**
  141. * Update the description for this Qualifier.
  142. *
  143. * @param string $description
  144. *
  145. * @throws object AuthorizationException An exception with
  146. * one of the following messages defined in
  147. * org.osid.authorization.AuthorizationException may be thrown:
  148. * {@link }
  149. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  150. * OPERATION_FAILED}, {@link }
  151. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  152. * PERMISSION_DENIED}, {@link }
  153. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  154. * CONFIGURATION_ERROR}, {@link }
  155. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  156. * UNIMPLEMENTED}, {@link }
  157. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  158. * NULL_ARGUMENT}
  159. *
  160. * @access public
  161. */
  162. function updateDescription ( $description ) {
  163. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  164. }
  165.  
  166. /**
  167. * Adds a parent to this Qualifier supported by the Authorization
  168. * implementation.
  169. *
  170. * @param object Id $parentQualifierId
  171. *
  172. * @throws object AuthorizationException An exception with
  173. * one of the following messages defined in
  174. * org.osid.authorization.AuthorizationException may be thrown:
  175. * {@link }
  176. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  177. * OPERATION_FAILED}, {@link }
  178. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  179. * PERMISSION_DENIED}, {@link }
  180. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  181. * CONFIGURATION_ERROR}, {@link }
  182. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  183. * UNIMPLEMENTED}, {@link }
  184. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  185. * NULL_ARGUMENT}, {@link }
  186. * org.osid.authorization.AuthorizationException#UNKNOWN_ID
  187. * UNKNOWN_ID}
  188. *
  189. * @access public
  190. */
  191. function addParent ( $parentQualifierId ) {
  192. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  193. }
  194.  
  195. /**
  196. * Removes a parent from this Qualifier. If this is the last parent the
  197. * delete will fail and an AuthorizationException will be thrown. For a
  198. * non-Root Qualifier there must always be a parent.
  199. *
  200. * @param object Id $parentQualifierId
  201. *
  202. * @throws object AuthorizationException An exception with
  203. * one of the following messages defined in
  204. * org.osid.authorization.AuthorizationException may be thrown:
  205. * {@link }
  206. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  207. * OPERATION_FAILED}, {@link }
  208. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  209. * PERMISSION_DENIED}, {@link }
  210. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  211. * CONFIGURATION_ERROR}, {@link }
  212. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  213. * UNIMPLEMENTED}, {@link }
  214. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  215. * NULL_ARGUMENT}, {@link }
  216. * org.osid.authorization.AuthorizationException#UNKNOWN_ID
  217. * UNKNOWN_ID}
  218. *
  219. * @access public
  220. */
  221. function removeParent ( $parentQualifierId ) {
  222. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  223. }
  224.  
  225. /**
  226. * Changes the parent of this Qualifier by adding a new parent and removing
  227. * the old parent.
  228. *
  229. * @param object Id $oldParentId
  230. * @param object Id $newParentId
  231. *
  232. * @throws object AuthorizationException An exception with
  233. * one of the following messages defined in
  234. * org.osid.authorization.AuthorizationException may be thrown:
  235. * {@link }
  236. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  237. * OPERATION_FAILED}, {@link }
  238. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  239. * PERMISSION_DENIED}, {@link }
  240. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  241. * CONFIGURATION_ERROR}, {@link }
  242. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  243. * UNIMPLEMENTED}, {@link }
  244. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  245. * NULL_ARGUMENT}, {@link }
  246. * org.osid.authorization.AuthorizationException#UNKNOWN_ID
  247. * UNKNOWN_ID}
  248. *
  249. * @access public
  250. */
  251. function changeParent ( $oldParentId, $newParentId ) {
  252. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  253. }
  254.  
  255. /**
  256. * Determines if this Qualifier is the child a given parent
  257. *
  258. * @param object Id $parentId
  259. *
  260. * @return boolean
  261. *
  262. * @throws object AuthorizationException An exception with
  263. * one of the following messages defined in
  264. * org.osid.authorization.AuthorizationException may be thrown:
  265. * {@link }
  266. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  267. * OPERATION_FAILED}, {@link }
  268. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  269. * PERMISSION_DENIED}, {@link }
  270. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  271. * CONFIGURATION_ERROR}, {@link }
  272. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  273. * UNIMPLEMENTED}, {@link }
  274. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  275. * NULL_ARGUMENT}, {@link }
  276. * org.osid.authorization.AuthorizationException#UNKNOWN_ID
  277. * UNKNOWN_ID}
  278. *
  279. * @access public
  280. */
  281. function isChildOf ( $parentId ) {
  282. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  283. }
  284.  
  285. /**
  286. * Determines if this Qualifier is a descendant of the given qualifierId.
  287. *
  288. * @param object Id $ancestorId
  289. *
  290. * @return boolean
  291. *
  292. * @throws object AuthorizationException An exception with
  293. * one of the following messages defined in
  294. * org.osid.authorization.AuthorizationException may be thrown:
  295. * {@link }
  296. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  297. * OPERATION_FAILED}, {@link }
  298. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  299. * PERMISSION_DENIED}, {@link }
  300. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  301. * CONFIGURATION_ERROR}, {@link }
  302. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  303. * UNIMPLEMENTED}, {@link }
  304. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  305. * NULL_ARGUMENT}, {@link }
  306. * org.osid.authorization.AuthorizationException#UNKNOWN_ID
  307. * UNKNOWN_ID}
  308. *
  309. * @access public
  310. */
  311. function isDescendantOf ( $ancestorId ) {
  312. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  313. }
  314.  
  315. /**
  316. * Gets the children of this Qualifier.
  317. *
  318. * @return object QualifierIterator
  319. *
  320. * @throws object AuthorizationException An exception with
  321. * one of the following messages defined in
  322. * org.osid.authorization.AuthorizationException may be thrown:
  323. * {@link }
  324. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  325. * OPERATION_FAILED}, {@link }
  326. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  327. * PERMISSION_DENIED}, {@link }
  328. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  329. * CONFIGURATION_ERROR}, {@link }
  330. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  331. * UNIMPLEMENTED}
  332. *
  333. * @access public
  334. */
  335. function getChildren () {
  336. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  337. }
  338.  
  339. /**
  340. * Gets the parents of this Qualifier.
  341. *
  342. * @return object QualifierIterator
  343. *
  344. * @throws object AuthorizationException An exception with
  345. * one of the following messages defined in
  346. * org.osid.authorization.AuthorizationException may be thrown:
  347. * {@link }
  348. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  349. * OPERATION_FAILED}, {@link }
  350. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  351. * PERMISSION_DENIED}, {@link }
  352. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  353. * CONFIGURATION_ERROR}, {@link }
  354. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  355. * UNIMPLEMENTED}
  356. *
  357. * @access public
  358. */
  359. function getParents () {
  360. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  361. }
  362. }
  363.  
  364. ?>

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