Source for file Authorization.php

Documentation is available at Authorization.php

  1. <?php
  2. /**
  3. * Authorization indicates what an agentId can do a Function in a Qualifier
  4. * context.
  5. *
  6. * <p>
  7. * OSID Version: 2.0
  8. * </p>
  9. *
  10. * <p>
  11. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  12. * O.K.I&#46; OSID Definition License}.
  13. * </p>
  14. *
  15. * @package org.osid.authorization
  16. */
  17. class Authorization
  18. {
  19. /**
  20. * Get the date when this Authorization starts being effective.
  21. *
  22. * @return int
  23. *
  24. * @throws object AuthorizationException An exception with
  25. * one of the following messages defined in
  26. * org.osid.authorization.AuthorizationException may be thrown:
  27. * {@link }
  28. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  29. * OPERATION_FAILED}, {@link }
  30. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  31. * PERMISSION_DENIED}, {@link }
  32. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  33. * CONFIGURATION_ERROR}, {@link }
  34. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  35. * UNIMPLEMENTED}
  36. *
  37. * @access public
  38. */
  39. function getEffectiveDate () {
  40. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  41. }
  42.  
  43. /**
  44. * Get the date when this Authorization stops being effective.
  45. *
  46. * @return int
  47. *
  48. * @throws object AuthorizationException An exception with
  49. * one of the following messages defined in
  50. * org.osid.authorization.AuthorizationException may be thrown:
  51. * {@link }
  52. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  53. * OPERATION_FAILED}, {@link }
  54. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  55. * PERMISSION_DENIED}, {@link }
  56. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  57. * CONFIGURATION_ERROR}, {@link }
  58. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  59. * UNIMPLEMENTED}
  60. *
  61. * @access public
  62. */
  63. function getExpirationDate () {
  64. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  65. }
  66.  
  67. /**
  68. * Get the Id of the agent that modified this Authorization.
  69. *
  70. * @return object Id
  71. *
  72. * @throws object AuthorizationException An exception with
  73. * one of the following messages defined in
  74. * org.osid.authorization.AuthorizationException may be thrown:
  75. * {@link }
  76. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  77. * OPERATION_FAILED}, {@link }
  78. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  79. * PERMISSION_DENIED}, {@link }
  80. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  81. * CONFIGURATION_ERROR}, {@link }
  82. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  83. * UNIMPLEMENTED}
  84. *
  85. * @access public
  86. */
  87. function getModifiedBy () {
  88. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  89. }
  90.  
  91. /**
  92. * Get the date when this Authorization was modified.
  93. *
  94. * @return int
  95. *
  96. * @throws object AuthorizationException An exception with
  97. * one of the following messages defined in
  98. * org.osid.authorization.AuthorizationException may be thrown:
  99. * {@link }
  100. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  101. * OPERATION_FAILED}, {@link }
  102. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  103. * PERMISSION_DENIED}, {@link }
  104. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  105. * CONFIGURATION_ERROR}, {@link }
  106. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  107. * UNIMPLEMENTED}
  108. *
  109. * @access public
  110. */
  111. function getModifiedDate () {
  112. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  113. }
  114.  
  115. /**
  116. *
  117. *
  118. * @return object Function
  119. *
  120. * @throws object AuthorizationException An exception with
  121. * one of the following messages defined in
  122. * org.osid.authorization.AuthorizationException may be thrown:
  123. * {@link }
  124. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  125. * OPERATION_FAILED}, {@link }
  126. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  127. * PERMISSION_DENIED}, {@link }
  128. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  129. * CONFIGURATION_ERROR}, {@link }
  130. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  131. * UNIMPLEMENTED}
  132. *
  133. * @access public
  134. */
  135. function getFunction () {
  136. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  137. }
  138.  
  139. /**
  140. *
  141. *
  142. * @return object Qualifier
  143. *
  144. * @throws object AuthorizationException An exception with
  145. * one of the following messages defined in
  146. * org.osid.authorization.AuthorizationException may be thrown:
  147. * {@link }
  148. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  149. * OPERATION_FAILED}, {@link }
  150. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  151. * PERMISSION_DENIED}, {@link }
  152. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  153. * CONFIGURATION_ERROR}, {@link }
  154. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  155. * UNIMPLEMENTED}
  156. *
  157. * @access public
  158. */
  159. function getQualifier () {
  160. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  161. }
  162.  
  163. /**
  164. * Get the agentid associated with this Authorization.
  165. *
  166. * @return object Id
  167. *
  168. * @throws object AuthorizationException An exception with
  169. * one of the following messages defined in
  170. * org.osid.authorization.AuthorizationException may be thrown:
  171. * {@link }
  172. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  173. * OPERATION_FAILED}, {@link }
  174. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  175. * PERMISSION_DENIED}, {@link }
  176. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  177. * CONFIGURATION_ERROR}, {@link }
  178. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  179. * UNIMPLEMENTED}
  180. *
  181. * @access public
  182. */
  183. function getAgentId () {
  184. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  185. }
  186.  
  187. /**
  188. * Return true if this Authorization is effective; false otherise;
  189. *
  190. * @return boolean
  191. *
  192. * @throws object AuthorizationException An exception with
  193. * one of the following messages defined in
  194. * org.osid.authorization.AuthorizationException may be thrown:
  195. * {@link }
  196. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  197. * OPERATION_FAILED}, {@link }
  198. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  199. * PERMISSION_DENIED}, {@link }
  200. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  201. * CONFIGURATION_ERROR}, {@link }
  202. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  203. * UNIMPLEMENTED}
  204. *
  205. * @access public
  206. */
  207. function isActiveNow () {
  208. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  209. }
  210.  
  211. /**
  212. * Some Authorizations are explicitly stored and others are implied, so use
  213. * this method to determine if the Authorization is explicit and can be
  214. * modified or deleted.
  215. *
  216. * @return boolean
  217. *
  218. * @throws object AuthorizationException An exception with
  219. * one of the following messages defined in
  220. * org.osid.authorization.AuthorizationException may be thrown:
  221. * {@link }
  222. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  223. * OPERATION_FAILED}, {@link }
  224. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  225. * PERMISSION_DENIED}, {@link }
  226. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  227. * CONFIGURATION_ERROR}, {@link }
  228. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  229. * UNIMPLEMENTED}
  230. *
  231. * @access public
  232. */
  233. function isExplicit () {
  234. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  235. }
  236.  
  237. /**
  238. * Modify the date when this Authorization starts being effective.
  239. *
  240. * @param int $expirationDate
  241. *
  242. * @throws object AuthorizationException An exception with
  243. * one of the following messages defined in
  244. * org.osid.authorization.AuthorizationException may be thrown:
  245. * {@link }
  246. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  247. * OPERATION_FAILED}, {@link }
  248. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  249. * PERMISSION_DENIED}, {@link }
  250. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  251. * CONFIGURATION_ERROR}, {@link }
  252. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  253. * UNIMPLEMENTED}, {@link }
  254. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  255. * NULL_ARGUMENT}, {@link }
  256. * org.osid.authorization.AuthorizationException#EFFECTIVE_PRECEDE_EXPIRATION}
  257. *
  258. * @access public
  259. */
  260. function updateExpirationDate ( $expirationDate ) {
  261. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  262. }
  263.  
  264. /**
  265. * the date when this Authorization stops being effective.
  266. *
  267. * @param int $effectiveDate
  268. *
  269. * @throws object AuthorizationException An exception with
  270. * one of the following messages defined in
  271. * org.osid.authorization.AuthorizationException may be thrown:
  272. * {@link }
  273. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  274. * OPERATION_FAILED}, {@link }
  275. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  276. * PERMISSION_DENIED}, {@link }
  277. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  278. * CONFIGURATION_ERROR}, {@link }
  279. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  280. * UNIMPLEMENTED}, {@link }
  281. * org.osid.authorization.AuthorizationException#NULL_ARGUMENT
  282. * NULL_ARGUMENT}, {@link }
  283. * org.osid.authorization.AuthorizationException#EFFECTIVE_PRECEDE_EXPIRATION}
  284. *
  285. * @access public
  286. */
  287. function updateEffectiveDate ( $effectiveDate ) {
  288. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  289. }
  290. }
  291.  
  292. ?>

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