Source for file LoggingManager.php

Documentation is available at LoggingManager.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../OsidManager.php");
  3. /**
  4. * <p>
  5. * LoggingManager handles creating, deleting, and getting logs for reading or
  6. * writing. All log Entries have a formatType, a priorityType, and a
  7. * timestamp.
  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.logging
  39. */
  40. class LoggingManager
  41. extends OsidManager
  42. {
  43. /**
  44. * Return the format types available with this implementation.
  45. *
  46. * @return object TypeIterator
  47. *
  48. * @throws object LoggingException An exception with one of the
  49. * following messages defined in org.osid.logging.LoggingException
  50. * may be thrown: {@link }
  51. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  52. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  53. * OPERATION_FAILED}, {@link }
  54. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  55. * CONFIGURATION_ERROR}, {@link }
  56. * org.osid.logging.LoggingException#PERMISSION_DENIED
  57. * PERMISSION_DENIED}
  58. *
  59. * @access public
  60. */
  61. function getFormatTypes () {
  62. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  63. }
  64.  
  65. /**
  66. * Return the priority types available with this implementation.
  67. *
  68. * @return object TypeIterator
  69. *
  70. * @throws object LoggingException An exception with one of the
  71. * following messages defined in org.osid.logging.LoggingException
  72. * may be thrown: {@link }
  73. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  74. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  75. * OPERATION_FAILED}, {@link }
  76. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  77. * CONFIGURATION_ERROR}, {@link }
  78. * org.osid.logging.LoggingException#PERMISSION_DENIED
  79. * PERMISSION_DENIED}
  80. *
  81. * @access public
  82. */
  83. function getPriorityTypes () {
  84. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  85. }
  86.  
  87. /**
  88. * Return the names of writable Logs.
  89. *
  90. * @return object StringIterator
  91. *
  92. * @throws object LoggingException An exception with one of the
  93. * following messages defined in org.osid.logging.LoggingException
  94. * may be thrown: {@link }
  95. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  96. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  97. * OPERATION_FAILED}, {@link }
  98. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  99. * CONFIGURATION_ERROR}, {@link }
  100. * org.osid.logging.LoggingException#PERMISSION_DENIED
  101. * PERMISSION_DENIED}
  102. *
  103. * @access public
  104. */
  105. function getLogNamesForWriting () {
  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 an existing log for writing.
  111. *
  112. * @param string $logName
  113. *
  114. * @return object WritableLog
  115. *
  116. * @throws object LoggingException An exception with one of the
  117. * following messages defined in org.osid.logging.LoggingException
  118. * may be thrown: {@link }
  119. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  120. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  121. * OPERATION_FAILED}, {@link }
  122. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  123. * CONFIGURATION_ERROR}, {@link }
  124. * org.osid.logging.LoggingException#PERMISSION_DENIED
  125. * PERMISSION_DENIED}, {@link }
  126. * org.osid.logging.LoggingException#UNKNOWN_NAME UNKNOWN_NAME}
  127. *
  128. * @access public
  129. */
  130. function getLogForWriting ( $logName ) {
  131. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  132. }
  133.  
  134. /**
  135. * Return the names of readable Logs.
  136. *
  137. * @return object StringIterator
  138. *
  139. * @throws object LoggingException An exception with one of the
  140. * following messages defined in org.osid.logging.LoggingException
  141. * may be thrown: {@link }
  142. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  143. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  144. * OPERATION_FAILED}, {@link }
  145. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  146. * CONFIGURATION_ERROR}, {@link }
  147. * org.osid.logging.LoggingException#PERMISSION_DENIED
  148. * PERMISSION_DENIED}
  149. *
  150. * @access public
  151. */
  152. function getLogNamesForReading () {
  153. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  154. }
  155.  
  156. /**
  157. * Get an existing log for reading.
  158. *
  159. * @param string $logName
  160. *
  161. * @return object ReadableLog
  162. *
  163. * @throws object LoggingException An exception with one of the
  164. * following messages defined in org.osid.logging.LoggingException
  165. * may be thrown: {@link }
  166. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  167. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  168. * OPERATION_FAILED}, {@link }
  169. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  170. * CONFIGURATION_ERROR}, {@link }
  171. * org.osid.logging.LoggingException#PERMISSION_DENIED
  172. * PERMISSION_DENIED}, {@link }
  173. * org.osid.logging.LoggingException#UNKNOWN_NAME UNKNOWN_NAME}
  174. *
  175. * @access public
  176. */
  177. function getLogForReading ( $logName ) {
  178. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  179. }
  180.  
  181. /**
  182. * Create a Writable Log.
  183. *
  184. * @param string $logName
  185. *
  186. * @return object WritableLog
  187. *
  188. * @throws object LoggingException An exception with one of the
  189. * following messages defined in org.osid.logging.LoggingException
  190. * may be thrown: {@link }
  191. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  192. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  193. * OPERATION_FAILED}, {@link }
  194. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  195. * CONFIGURATION_ERROR}, {@link }
  196. * org.osid.logging.LoggingException#PERMISSION_DENIED
  197. * PERMISSION_DENIED}, {@link }
  198. * org.osid.logging.LoggingException#DUPLICATE_NAME
  199. * DUPLICATE_NAME}
  200. *
  201. * @access public
  202. */
  203. function createLog ( $logName ) {
  204. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  205. }
  206.  
  207. /**
  208. * Delete the log with the specified name.
  209. *
  210. * @param string $logName
  211. *
  212. * @throws object LoggingException An exception with one of the
  213. * following messages defined in org.osid.logging.LoggingException
  214. * may be thrown: {@link }
  215. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  216. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  217. * OPERATION_FAILED}, {@link }
  218. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  219. * CONFIGURATION_ERROR}, {@link }
  220. * org.osid.logging.LoggingException#PERMISSION_DENIED
  221. * PERMISSION_DENIED}, {@link }
  222. * org.osid.logging.LoggingException#UNKNOWN_NAME UNKNOWN_NAME}
  223. *
  224. * @access public
  225. */
  226. function deleteLog ( $logName ) {
  227. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  228. }
  229.  
  230. /**
  231. * This method indicates whether this implementation supports the
  232. * ReadableLog interface and the LoggingManager methods: getLogForReading
  233. * and getLogNamesForReading.
  234. *
  235. * @return boolean
  236. *
  237. * @throws object LoggingException An exception with one of the
  238. * following messages defined in org.osid.logging.LoggingException
  239. * may be thrown: {@link }
  240. * org.osid.logging.LoggingException#UNIMPLEMENTED UNIMPLEMENTED},
  241. * {@link org.osid.logging.LoggingException#OPERATION_FAILED}
  242. * OPERATION_FAILED}, {@link }
  243. * org.osid.logging.LoggingException#CONFIGURATION_ERROR
  244. * CONFIGURATION_ERROR}, {@link }
  245. * org.osid.logging.LoggingException#PERMISSION_DENIED
  246. * PERMISSION_DENIED}
  247. *
  248. * @access public
  249. */
  250. function supportsReading () {
  251. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  252. }
  253. }
  254.  
  255. ?>

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