Interface Group

Description

Group contains members that are either Agents or other Groups. There are management methods for adding, removing, and getting members and Groups.

There are also methods for testing if a Group or member is contained in a Group, and returning all members in a Group, all Groups in a Group, or all Groups containing a specific member. Many methods include an argument that specifies whether to include all subgroups or not. This allows for more flexible maintenance and interrogation of the structure. Note that there is no specification for persisting the Group or its content -- this detail is left to the implementation.

<p> OSID Version: 2.0 </p>

<p> Licensed under the org.osid.SidImplementationLicenseMIT. </p>

Located in /harmoni/oki2/osid/agent/Group.php (line 26)

Agent
   |
   --Group
Method Summary
void add (mixed $memberOrGroup, object Agent $memberOrGroup )
boolean contains (object Agent $memberOrGroup, mixed $searchSubgroups, boolean $searchSubgroups )
object AgentIterator getGroups (mixed $includeSubgroups, boolean $includeSubgroups )
object AgentIterator getMembers (mixed $includeSubgroups, boolean $includeSubgroups )
void remove (mixed $memberOrGroup, object Agent $memberOrGroup )
Methods
add (line 51)

Add an Agent or a Group to this Group. The Agent or Group will not be added if it already exists in the group.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, ALREADY_ADDED, NULL_ARGUMENT
void add (mixed $memberOrGroup, object Agent $memberOrGroup )
contains (line 148)

Return

  1. true
if the Member or Group is in the Group, optionally including subgroups,
  1. false
otherwise.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
boolean contains (object Agent $memberOrGroup, mixed $searchSubgroups, boolean $searchSubgroups )
getGroups (line 122)

Get all the Groups in this group and optionally all the subgroups in this group. Note since Groups subclass Agents, we are returning an AgentIterator and there is no GroupIterator.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object AgentIterator getGroups (mixed $includeSubgroups, boolean $includeSubgroups )
  • boolean $includeSubgroups
getMembers (line 98)

Get all the Members of this group and optionally all the Members from all subgroups. Duplicates are not returned.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object AgentIterator getMembers (mixed $includeSubgroups, boolean $includeSubgroups )
  • boolean $includeSubgroups
remove (line 75)

Remove an Agent member or a Group from this Group. If the Agent or Group is not in this group no action is taken and no exception is thrown.

  • access: public
  • throws: object AgentException An exception with one of the following messages defined in org.osid.agent.AgentException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, UNKNOWN_ID, NULL_ARGUMENT
void remove (mixed $memberOrGroup, object Agent $memberOrGroup )

Inherited Methods

Inherited From Agent

Agent::getDisplayName()
Agent::getId()
Agent::getProperties()
Agent::getPropertiesByType()
Agent::getPropertyTypes()
Agent::getType()

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