Class HarmoniGroup

Description

Implements interfaces:

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>

  • version: $Id: HarmoniGroup.class.php,v 1.23 2007/08/22 14:45:44 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright &copy; 2005, Middlebury College

Located in /harmoni/core/oki2/agent/HarmoniGroup.class.php (line 28)

HarmoniAgent
   |
   --HarmoniGroup
Direct descendents
Class Description
EveryoneGroup The Everyone Group contains all other Agents and Groups in the system, including the Anonymous Agent. Agents and Groups cannot be added or removed from this group as they are always in it.
UsersGroup The Everyone Group contains all other Agents and Groups in the system, including the Anonymous Agent. Agents and Groups cannot be added or removed from this group as they are always in it.
Method Summary
void add (mixed $memberOrGroup, object Agent $memberOrGroup )
boolean contains (object Agent $memberOrGroup, mixed $searchSubgroups, boolean $searchSubgroups )
string getDescription ()
object AgentIterator getGroups (mixed $includeSubgroups, boolean $includeSubgroups )
object AgentIterator getMembers (mixed $includeSubgroups, boolean $includeSubgroups )
boolean isGroup ()
void remove (mixed $memberOrGroup, object Agent $memberOrGroup )
void updateDescription (mixed $description, string $description )
Variables
Methods
add (line 102)

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 )
  • object Agent $memberOrGroup

Redefined in descendants as:
  • EveryoneGroup::add() : Add an Agent or a Group to this Group. The Agent or Group will not be added if it already exists in the group.
  • UsersGroup::add() : Add an Agent or a Group to this Group. The Agent or Group will not be added if it already exists in the group.
contains (line 257)

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 )
  • object Agent $memberOrGroup
  • boolean $searchSubgroups

Redefined in descendants as:
  • EveryoneGroup::contains() : Return
    1. true
    if the Member or Group is in the Group, optionally including subgroups,
    1. false
    otherwise.
  • UsersGroup::contains() : Return
    1. true
    if the Member or Group is in the Group, optionally including subgroups,
    1. false
    otherwise.
getDescription (line 52)

Get the Description of this 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
string getDescription ()

Redefined in descendants as:
getGroups (line 214)

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

Redefined in descendants as:
  • EveryoneGroup::getGroups() : 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.
  • UsersGroup::getGroups() : 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.
getMembers (line 173)

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

Redefined in descendants as:
  • EveryoneGroup::getMembers() : Get all the Members of this group and optionally all the Members from all subgroups. Duplicates are not returned.
  • UsersGroup::getMembers() : Get all the Members of this group and optionally all the Members from all subgroups. Duplicates are not returned.
isGroup (line 292)

Answer true if this Agent is an Group

WARNING: NOT IN OSID

  • since: 12/7/06
  • access: public
boolean isGroup ()

Redefinition of:
HarmoniAgent::isGroup()
Answer true if this Agent is an Group
remove (line 142)

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 )
  • object Agent $memberOrGroup

Redefined in descendants as:
  • EveryoneGroup::remove() : 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.
  • UsersGroup::remove() : 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.
updateDescription (line 76)

Update the Description of this 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, NULL_ARGUMENT
void updateDescription (mixed $description, string $description )
  • string $description

Redefined in descendants as:

Inherited Methods

Inherited From HarmoniAgent

HarmoniAgent::HarmoniAgent()
HarmoniAgent::getDisplayName()
HarmoniAgent::getId()
HarmoniAgent::getProperties()
HarmoniAgent::getPropertiesByType()
HarmoniAgent::getPropertyTypes()
HarmoniAgent::getType()
HarmoniAgent::isAgent()
HarmoniAgent::isGroup()

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