Class HarmoniSchedulingManager

Description

<p> SchedulingManager creates, deletes, and gets ScheduleItems. Items include Agent Commitments (e.g. Calendar events). The Manager also enumerates the commitment Status Types supported by the implementation.

</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/core/oki2/scheduling/HarmoniSchedulingManager.class.php (line 48)

OsidManager
   |
   --SchedulingManager
      |
      --HarmoniSchedulingManager
Variable Summary
Method Summary
HarmoniSchedulingManager HarmoniSchedulingManager ()
void assignConfiguration (object Properties $configuration)
void assignOsidContext (mixed $context, object OsidContext $context )
object ScheduleItem createScheduleItem (string $displayName, string $description, mixed $scheduleItemStatusType, int $start, int $end, [mixed $masterIdentifier = null], object Id[] $agents, string $masterIdentifier )
void deleteScheduleItem (mixed $scheduleItemId, object Id $scheduleItemId )
object TimespanIterator getAvailableTimes (object Id[] $agents, int $start, mixed $end, int $end )
object ScheduleItem getScheduleItem (mixed $scheduleItemId, object Id $scheduleItemId )
object ScheduleItemIterator getScheduleItems (int $start, int $end, mixed $status, object Type $status )
object ScheduleItemIterator getScheduleItemsByMasterId (mixed $masterIdentifier, string $masterIdentifier )
object ScheduleItemIterator getScheduleItemsForAgents (int $start, int $end, object Type $status, mixed $agents, object Id[] $agents )
string _getField (object Id $id, string $table, string $key)
object Type _getType (object Id $id, string $table, string $typename)
object HarmoniTypeIterator _getTypes (string $typename)
object Type _indexToType (string $index, string $typename)
void _restrict (mixed $scheduleItem, mixed $mister11)
void _setField (object Id $id, string $table, string $key, mixed $value)
object Type _typeToIndex (string $typename, object Type $type)
Variables
mixed $_defaultAuthority (line 63)
mixed $_osidContext (line 62)
  • access: private
Methods
Constructor HarmoniSchedulingManager (line 68)
HarmoniSchedulingManager HarmoniSchedulingManager ()
assignConfiguration (line 93)

Assign the configuration of this Manager. There are no valid configuration options for this manager.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
void assignConfiguration (object Properties $configuration)

Redefinition of:
OsidManager::assignConfiguration()
Assign the configuration of this OsidManager.
assignOsidContext (line 128)

Assign the context of this OsidManager.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: NULL_ARGUMENT
void assignOsidContext (mixed $context, object OsidContext $context )

Redefinition of:
OsidManager::assignOsidContext()
Assign the context of this OsidManager.
createScheduleItem (line 177)

WARNING: NOT IN OSID -- This method is designed to comply with V3 of the OSIDs, at least How Tom suggested they were headed <a href="http://okicommunity.mit.edu/forum/viewtopic.php?forum=1&showtopic=67&show=10&page=2"> here </a>. Leave out the agent parameter, and add a statusType instead.

Create a ScheduleItem. The masterIdentifier argument is optional--it can be set to null. If master identifier is passed in as null, then the id string will be used. Master Identifier is a key, rule, or function that can be used to associated more than one ScheduleItem together. An example can be recurring items where each recurring item has the same Master Identifier. An unique Id is generated for this ScheduleItem by the implementation.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID, END_BEFORE_START
object ScheduleItem createScheduleItem (string $displayName, string $description, mixed $scheduleItemStatusType, int $start, int $end, [mixed $masterIdentifier = null], object Id[] $agents, string $masterIdentifier )
  • string $displayName
  • string $description
  • object Id[] $agents
  • int $start
  • int $end
  • string $masterIdentifier

Redefinition of:
SchedulingManager::createScheduleItem()
Create a ScheduleItem. The masterIdentifier argument is optional. A
deleteScheduleItem (line 255)

Delete a ScheduleItem by unique Id.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
void deleteScheduleItem (mixed $scheduleItemId, object Id $scheduleItemId )

Redefinition of:
SchedulingManager::deleteScheduleItem()
Delete a ScheduleItem by unique Id.
getAvailableTimes (line 296)

Get the Timespans during which all Agents are uncommitted.

The time complexity may not be great on this one.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID, END_BEFORE_START
object TimespanIterator getAvailableTimes (object Id[] $agents, int $start, mixed $end, int $end )
  • object Id[] $agents
  • int $start
  • int $end

Redefinition of:
SchedulingManager::getAvailableTimes()
Get the Timespans during which all Agents are uncommitted.
getCommitmentStatusTypes (line 778)

Get the Status Types for Agents' Commitment supported by the implementation.

Warning: not in OSID

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object TypeIterator getCommitmentStatusTypes ()

Redefinition of:
SchedulingManager::getCommitmentStatusTypes()
Get the Status Types for Agents' Commitment supported by the implementation.
getItemCommitmentStatusTypes (line 752)

Get the Status Types for Agents' Commitment supported by the implementation.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object TypeIterator getItemCommitmentStatusTypes ()
getItemStatusTypes (line 728)

Get the Status Types for ScheduleItem supported by the implementation.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object TypeIterator getItemStatusTypes ()

Redefinition of:
SchedulingManager::getItemStatusTypes()
Get the Status Types for ScheduleItem supported by the implementation.
getOsidContext (line 113)

Return context of this OsidManager.

  • access: public
  • throws: object OsidException
object OsidContext getOsidContext ()

Redefinition of:
OsidManager::getOsidContext()
Return context of this OsidManager.
getScheduleItem (line 430)

Get a ScheduleItem by unique Id.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
object ScheduleItem getScheduleItem (mixed $scheduleItemId, object Id $scheduleItemId )

Redefinition of:
SchedulingManager::getScheduleItem()
Get a ScheduleItem by unique Id.
getScheduleItems (line 467)

Get all the ScheduleItems for any Agent, with the specified Item Status and that start or end between the start and end specified, inclusive.

Null will select all types of ScheduleItems

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE, END_BEFORE_START
object ScheduleItemIterator getScheduleItems (int $start, int $end, mixed $status, object Type $status )

Redefinition of:
SchedulingManager::getScheduleItems()
Get all the ScheduleItems for any Agent, with the specified Item Status and that start or end between the start and end specified, inclusive.
getScheduleItemsByMasterId (line 683)

Get all ScheduleItems with the specified master identifier reference. A

Master Identifier is a key, rule, or function that can be used to associated more than one ScheduleItem together. An example can be recurring items where each recurring item has the same Master Identifier.

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
object ScheduleItemIterator getScheduleItemsByMasterId (mixed $masterIdentifier, string $masterIdentifier )
  • string $masterIdentifier

Redefinition of:
SchedulingManager::getScheduleItemsByMasterId()
Get all ScheduleItems with the specified master identifier reference. A
getScheduleItemsForAgents (line 547)

Get all the ScheduleItems for the specified Agents, with the specified Item Status and that start or end between the start and end specified, inclusive.

Null will select all types of ScheduleItems

  • access: public
  • throws: object SchedulingException An exception with one of the following messages defined in org.osid.scheduling.SchedulingException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE, END_BEFORE_START, UNKNOWN_ID
object ScheduleItemIterator getScheduleItemsForAgents (int $start, int $end, object Type $status, mixed $agents, object Id[] $agents )
  • int $start
  • int $end
  • object Type $status
  • object Id[] $agents

Redefinition of:
SchedulingManager::getScheduleItemsForAgents()
Get all the ScheduleItems for the specified Agents, with the specified Item Status and that start or end between the start and end specified, inclusive.
_getField (line 999)

Given the object in table $table with id $id, get the field with name $key

  • access: private
string _getField (object Id $id, string $table, string $key)
  • object Id $id: The Id of the object in question
  • string $table: The table that our object resides in
  • string $key: The name of the field
_getType (line 835)

For object in table $table with id $id, get the Type with type $typename

  • access: private
object Type _getType (object Id $id, string $table, string $typename)
  • object Id $id: the Id of the object in question
  • string $table: the table our object resides in
  • string $typename: the type of Type to get
_getTypes (line 794)

Get all the Types from the table specified

  • access: private
object HarmoniTypeIterator _getTypes (string $typename)
  • string $typename: the type of Types to get
_indexToType (line 857)

For get the Type with type $typename with id $index

  • access: private
object Type _indexToType (string $index, string $typename)
  • string $index: the index of the type
  • string $typename: the type of Type to get
_restrict (line 368)

This helper function takes a ScheduleItem and and array of timespans and returns the array of timespans that donot conflict with the event, but which contain as much of the original time as possible.

void _restrict (mixed $scheduleItem, mixed $mister11)
_setField (line 974)

Given the object in table $table with id $id, change the field with name $key to $value

  • access: private
void _setField (object Id $id, string $table, string $key, mixed $value)
  • object Id $id: The Id of the object in question
  • string $table: The table that our object resides in
  • string $key: The name of the field
  • mixed $value: The value to pass in
_typeToIndex (line 901)

Find the index for our Type of type $type in its table. If it is not there, put it into the table and return the index.

  • access: private
object Type _typeToIndex (string $typename, object Type $type)
  • string $typename: the type of Type that is passed in.
  • object Type $type: the Type itself

Inherited Methods

Inherited From SchedulingManager

SchedulingManager::createScheduleItem()
SchedulingManager::deleteScheduleItem()
SchedulingManager::getAvailableTimes()
SchedulingManager::getCommitmentStatusTypes()
SchedulingManager::getItemStatusTypes()
SchedulingManager::getScheduleItem()
SchedulingManager::getScheduleItems()
SchedulingManager::getScheduleItemsByMasterId()
SchedulingManager::getScheduleItemsForAgents()

Inherited From OsidManager

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

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