Source for file SchedulingManager.php

Documentation is available at SchedulingManager.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../OsidManager.php");
  3. /**
  4. * <p>
  5. * SchedulingManager creates, deletes, and gets ScheduleItems. Items include
  6. * Agent Commitments (e.g. Calendar events). The Manager also enumerates the
  7. * commitment Status Types supported by the implementation.
  8. * </p>
  9. *
  10. * <p>
  11. * All implementations of OsidManager (manager) provide methods for accessing
  12. * and manipulating the various objects defined in the OSID package. A manager
  13. * defines an implementation of an OSID. All other OSID objects come either
  14. * directly or indirectly from the manager. New instances of the OSID objects
  15. * are created either directly or indirectly by the manager. Because the OSID
  16. * objects are defined using interfaces, create methods must be used instead
  17. * of the new operator to create instances of the OSID objects. Create methods
  18. * are used both to instantiate and persist OSID objects. Using the
  19. * OsidManager class to define an OSID's implementation allows the application
  20. * to change OSID implementations by changing the OsidManager package name
  21. * used to load an implementation. Applications developed using managers
  22. * permit OSID implementation substitution without changing the application
  23. * source code. As with all managers, use the OsidLoader to load an
  24. * implementation of this interface.
  25. * </p>
  26. *
  27. * <p></p>
  28. *
  29. * <p>
  30. * OSID Version: 2.0
  31. * </p>
  32. *
  33. * <p>
  34. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  35. * O.K.I&#46; OSID Definition License}.
  36. * </p>
  37. *
  38. * @package org.osid.scheduling
  39. */
  40. class SchedulingManager
  41. extends OsidManager
  42. {
  43. /**
  44. * Create a ScheduleItem. The masterIdentifier argument is optional. A
  45. * Master Identifier is a key, rule, or function that can be used to
  46. * associated more than one ScheduleItem together. An example can be
  47. * recurring items where each recurring item has the same Master
  48. * Identifier. An unique Id is generated for this ScheduleItem by the
  49. * implementation.
  50. *
  51. * @param string $displayName
  52. * @param string $description
  53. * @param object Id[] $agents
  54. * @param int $start
  55. * @param int $end
  56. * @param string $masterIdentifier
  57. *
  58. * @return object ScheduleItem
  59. *
  60. * @throws object SchedulingException An exception with one of
  61. * the following messages defined in
  62. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  63. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  64. * OPERATION_FAILED}, {@link }
  65. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  66. * PERMISSION_DENIED}, {@link }
  67. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  68. * CONFIGURATION_ERROR}, {@link }
  69. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  70. * UNIMPLEMENTED}, {@link }
  71. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  72. * NULL_ARGUMENT}, {@link }
  73. * org.osid.scheduling.SchedulingException#UNKNOWN_ID UNKNOWN_ID},
  74. * {@link org.osid.scheduling.SchedulingException#END_BEFORE_START}
  75. * END_BEFORE_START}
  76. *
  77. * @access public
  78. */
  79. function createScheduleItem ( $displayName, $description, $agents, $start, $end, $masterIdentifier ) {
  80. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  81. }
  82.  
  83. /**
  84. * Delete a ScheduleItem by unique Id.
  85. *
  86. * @param object Id $scheduleItemId
  87. *
  88. * @throws object SchedulingException An exception with one of
  89. * the following messages defined in
  90. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  91. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  92. * OPERATION_FAILED}, {@link }
  93. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  94. * PERMISSION_DENIED}, {@link }
  95. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  96. * CONFIGURATION_ERROR}, {@link }
  97. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  98. * UNIMPLEMENTED}, {@link }
  99. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  100. * NULL_ARGUMENT}, {@link }
  101. * org.osid.scheduling.SchedulingException#UNKNOWN_ID UNKNOWN_ID}
  102. *
  103. * @access public
  104. */
  105. function deleteScheduleItem ( $scheduleItemId ) {
  106. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  107. }
  108.  
  109. /**
  110. * Get the Timespans during which all Agents are uncommitted.
  111. *
  112. * @param object Id[] $agents
  113. * @param int $start
  114. * @param int $end
  115. *
  116. * @return object TimespanIterator
  117. *
  118. * @throws object SchedulingException An exception with one of
  119. * the following messages defined in
  120. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  121. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  122. * OPERATION_FAILED}, {@link }
  123. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  124. * PERMISSION_DENIED}, {@link }
  125. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  126. * CONFIGURATION_ERROR}, {@link }
  127. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  128. * UNIMPLEMENTED}, {@link }
  129. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  130. * NULL_ARGUMENT}, {@link }
  131. * org.osid.scheduling.SchedulingException#UNKNOWN_ID UNKNOWN_ID},
  132. * {@link org.osid.scheduling.SchedulingException#END_BEFORE_START}
  133. * END_BEFORE_START}
  134. *
  135. * @access public
  136. */
  137. function getAvailableTimes ( $agents, $start, $end ) {
  138. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  139. }
  140.  
  141. /**
  142. * Get a ScheduleItem by unique Id.
  143. *
  144. * @param object Id $scheduleItemId
  145. *
  146. * @return object ScheduleItem
  147. *
  148. * @throws object SchedulingException An exception with one of
  149. * the following messages defined in
  150. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  151. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  152. * OPERATION_FAILED}, {@link }
  153. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  154. * PERMISSION_DENIED}, {@link }
  155. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  156. * CONFIGURATION_ERROR}, {@link }
  157. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  158. * UNIMPLEMENTED}, {@link }
  159. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  160. * NULL_ARGUMENT}, {@link }
  161. * org.osid.scheduling.SchedulingException#UNKNOWN_ID UNKNOWN_ID}
  162. *
  163. * @access public
  164. */
  165. function getScheduleItem ( $scheduleItemId ) {
  166. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  167. }
  168.  
  169. /**
  170. * Get all the ScheduleItems for any Agent, with the specified Item Status
  171. * and that start or end between the start and end specified, inclusive.
  172. *
  173. * @param int $start
  174. * @param int $end
  175. * @param object Type $status
  176. *
  177. * @return object ScheduleItemIterator
  178. *
  179. * @throws object SchedulingException An exception with one of
  180. * the following messages defined in
  181. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  182. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  183. * OPERATION_FAILED}, {@link }
  184. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  185. * PERMISSION_DENIED}, {@link }
  186. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  187. * CONFIGURATION_ERROR}, {@link }
  188. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  189. * UNIMPLEMENTED}, {@link }
  190. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  191. * NULL_ARGUMENT}, {@link }
  192. * org.osid.scheduling.SchedulingException#UNKNOWN_TYPE
  193. * UNKNOWN_TYPE}, {@link }
  194. * org.osid.scheduling.SchedulingException#END_BEFORE_START
  195. * END_BEFORE_START}
  196. *
  197. * @access public
  198. */
  199. function getScheduleItems ( $start, $end, $status ) {
  200. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  201. }
  202.  
  203. /**
  204. * Get all the ScheduleItems for the specified Agents, with the specified
  205. * Item Status and that start or end between the start and end specified,
  206. * inclusive.
  207. *
  208. * @param int $start
  209. * @param int $end
  210. * @param object Type $status
  211. * @param object Id[] $agents
  212. *
  213. * @return object ScheduleItemIterator
  214. *
  215. * @throws object SchedulingException An exception with one of
  216. * the following messages defined in
  217. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  218. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  219. * OPERATION_FAILED}, {@link }
  220. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  221. * PERMISSION_DENIED}, {@link }
  222. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  223. * CONFIGURATION_ERROR}, {@link }
  224. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  225. * UNIMPLEMENTED}, {@link }
  226. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  227. * NULL_ARGUMENT}, {@link }
  228. * org.osid.scheduling.SchedulingException#UNKNOWN_TYPE
  229. * UNKNOWN_TYPE}, {@link }
  230. * org.osid.scheduling.SchedulingException#END_BEFORE_START
  231. * END_BEFORE_START}, {@link }
  232. * org.osid.scheduling.SchedulingException#UNKNOWN_ID UNKNOWN_ID}
  233. *
  234. * @access public
  235. */
  236. function getScheduleItemsForAgents ( $start, $end, $status, $agents ) {
  237. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  238. }
  239.  
  240. /**
  241. * Get all ScheduleItems with the specified master identifier reference. A
  242. * Master Identifier is a key, rule, or function that can be used to
  243. * associated more than one ScheduleItem together. An example can be
  244. * recurring items where each recurring item has the same Master
  245. * Identifier.
  246. *
  247. * @param string $masterIdentifier
  248. *
  249. * @return object ScheduleItemIterator
  250. *
  251. * @throws object SchedulingException An exception with one of
  252. * the following messages defined in
  253. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  254. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  255. * OPERATION_FAILED}, {@link }
  256. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  257. * PERMISSION_DENIED}, {@link }
  258. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  259. * CONFIGURATION_ERROR}, {@link }
  260. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  261. * UNIMPLEMENTED}, {@link }
  262. * org.osid.scheduling.SchedulingException#NULL_ARGUMENT
  263. * NULL_ARGUMENT}
  264. *
  265. * @access public
  266. */
  267. function getScheduleItemsByMasterId ( $masterIdentifier ) {
  268. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  269. }
  270.  
  271. /**
  272. * Get the Status Types for ScheduleItem supported by the implementation.
  273. *
  274. * @return object TypeIterator
  275. *
  276. * @throws object SchedulingException An exception with one of
  277. * the following messages defined in
  278. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  279. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  280. * OPERATION_FAILED}, {@link }
  281. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  282. * PERMISSION_DENIED}, {@link }
  283. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  284. * CONFIGURATION_ERROR}, {@link }
  285. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  286. * UNIMPLEMENTED}
  287. *
  288. * @access public
  289. */
  290. function getItemStatusTypes () {
  291. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  292. }
  293.  
  294. /**
  295. * Get the Status Types for Agents' Commitment supported by the
  296. * implementation.
  297. *
  298. * @return object TypeIterator
  299. *
  300. * @throws object SchedulingException An exception with one of
  301. * the following messages defined in
  302. * org.osid.scheduling.SchedulingException may be thrown: {@link }
  303. * org.osid.scheduling.SchedulingException#OPERATION_FAILED
  304. * OPERATION_FAILED}, {@link }
  305. * org.osid.scheduling.SchedulingException#PERMISSION_DENIED
  306. * PERMISSION_DENIED}, {@link }
  307. * org.osid.scheduling.SchedulingException#CONFIGURATION_ERROR
  308. * CONFIGURATION_ERROR}, {@link }
  309. * org.osid.scheduling.SchedulingException#UNIMPLEMENTED
  310. * UNIMPLEMENTED}
  311. *
  312. * @access public
  313. */
  314. function getCommitmentStatusTypes () {
  315. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  316. }
  317. }
  318.  
  319. ?>

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