Source for file OsidTransactionManager.php

Documentation is available at OsidTransactionManager.php

  1. <?php
  2. include_once(dirname(__FILE__)."/OsidManager.php");
  3. /**
  4. * OsidTransactionManager is the key binding for controlling persistent store
  5. * transactions from an application or an implementation of an OSID.
  6. * Operations involved with these methods have the following characteristics:
  7. *
  8. * <p>
  9. * either the entire set of actions occurs or nothing happens;
  10. * </p>
  11. *
  12. * <p>
  13. * actions occurring within a transaction are hidden from other concurrent
  14. * transactions;
  15. * </p>
  16. *
  17. * <p>
  18. * successfully committed transactions result in a consistent persisted data
  19. * store.
  20. * </p>
  21. *
  22. * <p>
  23. * mark() identifies a point in processing. After mark(), at any point up
  24. * until commit() is called, a call to rollback() causes all processing after
  25. * mark() to be ignored. The system is the same state it was at the time
  26. * mark() was called. If instead commit() is called after mark(), all
  27. * processing since mark() was called is made permanent. Once committed,
  28. * these actions cannot be rolled back.
  29. * </p>
  30. *
  31. * <p>
  32. * OSID Version: 2.0
  33. * </p>
  34. *
  35. * <p>
  36. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  37. * O.K.I&#46; OSID Definition License}.
  38. * </p>
  39. *
  40. * @package org.osid
  41. */
  42. class OsidTransactionManager
  43. extends OsidManager
  44. {
  45. /**
  46. * Marks the beginning of a transaction.
  47. *
  48. * @throws object OsidException An exception with one of the following
  49. * messages defined in org.osid.OsidException: {@link }
  50. * org.osid.OsidException#OPERATION_FAILED OPERATION_FAILED},
  51. * {@link org.osid.OsidException#PERMISSION_DENIED}
  52. * PERMISSION_DENIED}, {@link }
  53. * org.osid.OsidException#CONFIGURATION_ERROR
  54. * CONFIGURATION_ERROR}, {@link }
  55. * org.osid.OsidException#UNIMPLEMENTED UNIMPLEMENTED}, {@link }
  56. * org.osid.OsidException#ALREADY_MARKED ALREADY_MARKED}
  57. *
  58. * @access public
  59. */
  60. function mark () {
  61. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  62. }
  63.  
  64. /**
  65. * Commits a transaction, persisting its operations since a call to mark().
  66. *
  67. * @throws object OsidException An exception with one of the following
  68. * messages defined in org.osid.OsidException: {@link }
  69. * org.osid.OsidException#OPERATION_FAILED OPERATION_FAILED},
  70. * {@link org.osid.OsidException#PERMISSION_DENIED}
  71. * PERMISSION_DENIED}, {@link }
  72. * org.osid.OsidException#CONFIGURATION_ERROR
  73. * CONFIGURATION_ERROR}, {@link }
  74. * org.osid.OsidException#UNIMPLEMENTED UNIMPLEMENTED}, {@link }
  75. * org.osid.OsidException#NOTHING_MARKED NOTHING_MARKED}
  76. *
  77. * @access public
  78. */
  79. function commit () {
  80. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  81. }
  82.  
  83. /**
  84. * Rolls back a transaction's operations since a call to mark().
  85. *
  86. * @throws object OsidException An exception with one of the following
  87. * messages defined in org.osid.OsidException: {@link }
  88. * org.osid.OsidException#OPERATION_FAILED OPERATION_FAILED},
  89. * {@link org.osid.OsidException#PERMISSION_DENIED}
  90. * PERMISSION_DENIED}, {@link }
  91. * org.osid.OsidException#CONFIGURATION_ERROR
  92. * CONFIGURATION_ERROR}, {@link }
  93. * org.osid.OsidException#UNIMPLEMENTED UNIMPLEMENTED}, {@link }
  94. * org.osid.OsidException#NOTHING_MARKED NOTHING_MARKED}
  95. *
  96. * @access public
  97. */
  98. function rollback () {
  99. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  100. }
  101. }
  102.  
  103. ?>

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