Source for file Group.php

Documentation is available at Group.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../agent/Agent.php");
  3. /**
  4. * Group contains members that are either Agents or other Groups. There are
  5. * management methods for adding, removing, and getting members and Groups.
  6. * There are also methods for testing if a Group or member is contained in a
  7. * Group, and returning all members in a Group, all Groups in a Group, or all
  8. * Groups containing a specific member. Many methods include an argument that
  9. * specifies whether to include all subgroups or not. This allows for more
  10. * flexible maintenance and interrogation of the structure. Note that there is
  11. * no specification for persisting the Group or its content -- this detail is
  12. * left to the implementation.
  13. *
  14. * <p>
  15. * OSID Version: 2.0
  16. * </p>
  17. *
  18. * <p>
  19. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  20. * O.K.I&#46; OSID Definition License}.
  21. * </p>
  22. *
  23. * @package org.osid.agent
  24. */
  25. interface Group
  26. extends Agent
  27. {
  28. /**
  29. * Add an Agent or a Group to this Group. The Agent or Group will not be
  30. * added if it already exists in the group.
  31. *
  32. * @param object Agent $memberOrGroup
  33. *
  34. * @throws object AgentException An exception with one of the
  35. * following messages defined in org.osid.agent.AgentException may
  36. * be thrown: {@link }
  37. * org.osid.agent.AgentException#OPERATION_FAILED
  38. * OPERATION_FAILED}, {@link }
  39. * org.osid.agent.AgentException#PERMISSION_DENIED
  40. * PERMISSION_DENIED}, {@link }
  41. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  42. * CONFIGURATION_ERROR}, {@link }
  43. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED},
  44. * {@link org.osid.agent.AgentException#ALREADY_ADDED}
  45. * ALREADY_ADDED}, {@link }
  46. * org.osid.agent.AgentException#NULL_ARGUMENT NULL_ARGUMENT}
  47. *
  48. * @access public
  49. */
  50. function add ( $memberOrGroup );
  51.  
  52. /**
  53. /**
  54. * Remove an Agent member or a Group from this Group. If the Agent or Group
  55. * is not in this group no action is taken and no exception is thrown.
  56. *
  57. * @param object Agent $memberOrGroup
  58. *
  59. * @throws object AgentException An exception with one of the
  60. * following messages defined in org.osid.agent.AgentException may
  61. * be thrown: {@link }
  62. * org.osid.agent.AgentException#OPERATION_FAILED
  63. * OPERATION_FAILED}, {@link }
  64. * org.osid.agent.AgentException#PERMISSION_DENIED
  65. * PERMISSION_DENIED}, {@link }
  66. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  67. * CONFIGURATION_ERROR}, {@link }
  68. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED},
  69. * {@link org.osid.agent.AgentException#UNKNOWN_ID UNKNOWN_ID},
  70. * {@link org.osid.agent.AgentException#NULL_ARGUMENT}
  71. * NULL_ARGUMENT}
  72. *
  73. * @access public
  74. */
  75. function remove ( $memberOrGroup );
  76.  
  77. /**
  78. /**
  79. * Get all the Members of this group and optionally all the Members from
  80. * all subgroups. Duplicates are not returned.
  81. *
  82. * @param boolean $includeSubgroups
  83. *
  84. * @return object AgentIterator
  85. *
  86. * @throws object AgentException An exception with one of the
  87. * following messages defined in org.osid.agent.AgentException may
  88. * be thrown: {@link }
  89. * org.osid.agent.AgentException#OPERATION_FAILED
  90. * OPERATION_FAILED}, {@link }
  91. * org.osid.agent.AgentException#PERMISSION_DENIED
  92. * PERMISSION_DENIED}, {@link }
  93. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  94. * CONFIGURATION_ERROR}, {@link }
  95. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED}
  96. *
  97. * @access public
  98. */
  99. function getMembers ( $includeSubgroups );
  100.  
  101. /**
  102. /**
  103. * Get all the Groups in this group and optionally all the subgroups in
  104. * this group. Note since Groups subclass Agents, we are returning an
  105. * AgentIterator and there is no GroupIterator.
  106. *
  107. * @param boolean $includeSubgroups
  108. *
  109. * @return object AgentIterator
  110. *
  111. * @throws object AgentException An exception with one of the
  112. * following messages defined in org.osid.agent.AgentException may
  113. * be thrown: {@link }
  114. * org.osid.agent.AgentException#OPERATION_FAILED
  115. * OPERATION_FAILED}, {@link }
  116. * org.osid.agent.AgentException#PERMISSION_DENIED
  117. * PERMISSION_DENIED}, {@link }
  118. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  119. * CONFIGURATION_ERROR}, {@link }
  120. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED}
  121. *
  122. * @access public
  123. */
  124. function getGroups ( $includeSubgroups );
  125.  
  126. /**
  127. /**
  128. * Return <code>true</code> if the Member or Group is in the Group,
  129. * optionally including subgroups, <code>false</code> otherwise.
  130. *
  131. * @param object Agent $memberOrGroup
  132. * @param boolean $searchSubgroups
  133. *
  134. * @return boolean
  135. *
  136. * @throws object AgentException An exception with one of the
  137. * following messages defined in org.osid.agent.AgentException may
  138. * be thrown: {@link }
  139. * org.osid.agent.AgentException#OPERATION_FAILED
  140. * OPERATION_FAILED}, {@link }
  141. * org.osid.agent.AgentException#PERMISSION_DENIED
  142. * PERMISSION_DENIED}, {@link }
  143. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  144. * CONFIGURATION_ERROR}, {@link }
  145. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED},
  146. * {@link org.osid.agent.AgentException#NULL_ARGUMENT}
  147. * NULL_ARGUMENT}
  148. *
  149. * @access public
  150. */
  151. function contains ( $memberOrGroup, $searchSubgroups );
  152.  
  153.  
  154.  
  155. ?>

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