Class AgentManager

Description

<p> AgentManager handles creating, deleting, and getting Agents and Groups.

Group is a subclass of Agent. Groups contain members. Group members are Agents or other Groups. </p>

<p> All implementations of OsidManager (manager) provide methods for accessing and manipulating the various objects defined in the OSID package. A manager defines an implementation of an OSID. All other OSID objects come either directly or indirectly from the manager. New instances of the OSID objects are created either directly or indirectly by the manager. Because the OSID objects are defined using interfaces, create methods must be used instead of the new operator to create instances of the OSID objects. Create methods are used both to instantiate and persist OSID objects. Using the OsidManager class to define an OSID's implementation allows the application to change OSID implementations by changing the OsidManager package name used to load an implementation. Applications developed using managers permit OSID implementation substitution without changing the application source code. As with all managers, use the OsidLoader to load an implementation of this interface. </p>

<p></p>

<p> OSID Version: 2.0 </p>

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

Located in /harmoni/oki2/osid/agent/AgentManager.php (line 41)

OsidManager
   |
   --AgentManager
Direct descendents
Class Description
HarmoniAgentManager <p> AgentManager handles creating, deleting, and getting Agents and Groups.
JavaPOCAgentManager <p> AgentManager handles creating, deleting, and getting Agents and Groups.
Method Summary
object Agent createAgent (string $displayName, object Type $agentType, mixed $properties, object Properties $properties )
object Group createGroup (string $displayName, object Type $groupType, string $description, mixed $properties, object Properties $properties )
void deleteAgent (mixed $id, object Id $id )
void deleteGroup (mixed $id, object Id $id )
object Agent getAgent (mixed $id, object Id $id )
object AgentIterator getAgentsBySearch (object mixed $searchCriteria, mixed $agentSearchType, object Type $agentSearchType )
object AgentIterator getAgentsByType (mixed $agentType, object Type $agentType )
object Group getGroup (mixed $id, object Id $id )
object AgentIterator getGroupsBySearch (object mixed $searchCriteria, mixed $groupSearchType, object Type $groupSearchType )
object AgentIterator getGroupsByType (mixed $groupType, object Type $groupType )
Methods
createAgent (line 70)

Create an Agent with the display name, Type, and Properties specified.

All are immutable.

  • 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, UNKNOWN_TYPE
object Agent createAgent (string $displayName, object Type $agentType, mixed $properties, object Properties $properties )

Redefined in descendants as:
createGroup (line 230)

Create a Group with the display name, Type, description, and Properties specified. All but description are immutable.

  • 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, UNKNOWN_TYPE
object Group createGroup (string $displayName, object Type $groupType, string $description, mixed $properties, object Properties $properties )

Redefined in descendants as:
deleteAgent (line 95)

Delete the Agent with the specified unique Id.

  • 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, UNKNOWN_ID
void deleteAgent (mixed $id, object Id $id )

Redefined in descendants as:
deleteGroup (line 255)

Delete the Group with the specified unique Id.

  • 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, UNKNOWN_ID
void deleteGroup (mixed $id, object Id $id )

Redefined in descendants as:
getAgent (line 123)

Get the Agent with the specified unique Id. Getting an Agent by name is not supported since names are not guaranteed to be unique.

  • 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, UNKNOWN_ID
object Agent getAgent (mixed $id, object Id $id )

Redefined in descendants as:
  • HarmoniAgentManager::getAgent() : Get the Agent with the specified unique Id. Getting an Agent by name is not supported since names are not guaranteed to be unique.
  • JavaPOCAgentManager::getAgent() : Get the Agent with the specified unique Id. Getting an Agent by name is not supported since names are not guaranteed to be unique.
getAgents (line 148)

Get all the Agents. The returned iterator provides access to the Agents one at a time. Iterators have a method hasNextAgent() which returns

  1. true
if there is an Agent available and a method nextAgent() which returns the next Agent.

  • 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 getAgents ()

Redefined in descendants as:
  • HarmoniAgentManager::getAgents() : Get all the Agents. The returned iterator provides access to the Agents one at a time. Iterators have a method hasNextAgent() which returns
    1. true
    if there is an Agent available and a method nextAgent() which returns the next Agent.
  • JavaPOCAgentManager::getAgents() : Get all the Agents. The returned iterator provides access to the Agents one at a time. Iterators have a method hasNextAgent() which returns
    1. true
    if there is an Agent available and a method nextAgent() which returns the next Agent.
getAgentsBySearch (line 441)

Get all the Agents with the specified search criteria and search Type.

  • 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, UNKNOWN_TYPE
object AgentIterator getAgentsBySearch (object mixed $searchCriteria, mixed $agentSearchType, object Type $agentSearchType )
  • object mixed $searchCriteria: (original type: java.io.Serializable)
  • object Type $agentSearchType

Redefined in descendants as:
getAgentsByType (line 361)

Get all the Agents of the specified Type.

  • 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, UNKNOWN_TYPE
object AgentIterator getAgentsByType (mixed $agentType, object Type $agentType )

Redefined in descendants as:
getAgentSearchTypes (line 413)

Get all the agent search Types supported by this implementation.

  • 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, UNKNOWN_TYPE
object TypeIterator getAgentSearchTypes ()

Redefined in descendants as:
getAgentTypes (line 173)

Get all the agent Types. The returned iterator provides access to the agent Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is an agent Type available and a method next() which returns the next agent Type.

  • 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 TypeIterator getAgentTypes ()

Redefined in descendants as:
  • HarmoniAgentManager::getAgentTypes() : Get all the agent Types. The returned iterator provides access to the agent Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is an agent Type available and a method next() which returns the next agent Type.
  • JavaPOCAgentManager::getAgentTypes() : Get all the agent Types. The returned iterator provides access to the agent Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is an agent Type available and a method next() which returns the next agent Type.
getGroup (line 283)

Gets the Group with the specified unique Id. Getting a Group by name is not supported since names are not guaranteed to be unique.

  • 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, UNKNOWN_ID
object Group getGroup (mixed $id, object Id $id )

Redefined in descendants as:
  • HarmoniAgentManager::getGroup() : Gets the Group with the specified unique Id. Getting a Group by name is not supported since names are not guaranteed to be unique.
  • JavaPOCAgentManager::getGroup() : Gets the Group with the specified unique Id. Getting a Group by name is not supported since names are not guaranteed to be unique.
getGroups (line 309)

Get all the Groups. Note since Groups subclass Agents, we are returning

an AgentIterator and there is no GroupIterator. the returned iterator provides access to the Groups one at a time. Iterators have a method hasNextAgent() which returns true if there is a Group available and a method nextAgent() which returns the next 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
object AgentIterator getGroups ()

Redefined in descendants as:
getGroupsBySearch (line 494)

Get all the groups with the specified search criteria and search Type.

  • 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, UNKNOWN_TYPE
object AgentIterator getGroupsBySearch (object mixed $searchCriteria, mixed $groupSearchType, object Type $groupSearchType )
  • object mixed $searchCriteria: (original type: java.io.Serializable)
  • object Type $groupSearchType

Redefined in descendants as:
getGroupsByType (line 388)

Get all the Groups of the specified Type.

  • 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, UNKNOWN_TYPE
object AgentIterator getGroupsByType (mixed $groupType, object Type $groupType )

Redefined in descendants as:
getGroupSearchTypes (line 466)

Get all the group search types supported by this implementation.

  • 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, UNKNOWN_TYPE
object TypeIterator getGroupSearchTypes ()

Redefined in descendants as:
getGroupTypes (line 334)

Get all the group Types. The returned iterator provides access to the group Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is a group Type available and a method next() which returns the next group Type.

  • 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 TypeIterator getGroupTypes ()

Redefined in descendants as:
  • HarmoniAgentManager::getGroupTypes() : Get all the group Types. The returned iterator provides access to the group Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is a group Type available and a method next() which returns the next group Type.
  • JavaPOCAgentManager::getGroupTypes() : Get all the group Types. The returned iterator provides access to the group Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is a group Type available and a method next() which returns the next group Type.
getPropertyTypes (line 199)

Get all the property Types. The returned iterator provides access to

the property Types from this implementation one at a time. Iterators have a method hasNext() which returns true if there is another property Type available and a method next() which returns the next property Type.

  • 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 TypeIterator getPropertyTypes ()

Redefined in descendants as:

Inherited Methods

Inherited From OsidManager

OsidManager::assignConfiguration()
OsidManager::assignOsidContext()
OsidManager::getOsidContext()
OsidManager::osidVersion_2_0()

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