Class HarmoniRepositoryManager

Description

<p> The RepositoryManager supports creating and deleting Repositories and Assets as well as getting the various Types used.

</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>

  • version: $Id: HarmoniRepositoryManager.class.php,v 1.39 2007/09/13 16:04:20 adamfranco Exp $
  • license: GNU General Public License
  • copyright: Copyright &copy;2005, Middlebury College

Located in /harmoni/core/oki2/repository/HarmoniRepositoryManager.class.php (line 42)

OsidManager
   |
   --RepositoryManager
      |
      --HarmoniRepositoryManager
Variable Summary
Method Summary
HarmoniRepositoryManager HarmoniRepositoryManager ([array $configuration = NULL])
void assignConfiguration (object Properties $configuration)
void assignOsidContext (mixed $context, object OsidContext $context )
object Id copyAsset (object Repository $repository, mixed $assetId, object Id $assetId )
object Repository createRepository (string $displayName, string $description, mixed $repositoryType, [mixed $id = NULL], object Type $repositoryType )
void deleteRepository (mixed $repositoryId, object Id $repositoryId )
object Asset getAsset (mixed $assetId, object Id $assetId )
object Asset getAssetByDate (object assetId $assetId, object date $date)
object LongValueIterator getAssetDates (mixed $assetId, object Id $assetId )
object AssetIterator getAssets (object repositories $repositories, mixed $searchCriteria, object searchType $searchType, mixed $searchProperties)
object AssetIterator getAssetsBySearch (object Repository[] $repositories, object mixed $searchCriteria, object Type $searchType, mixed $searchProperties, object Properties $searchProperties )
object OsidContext getOsidContext ()
object RepositoryIterator getRepositories ()
object RepositoryIterator getRepositoriesByType (mixed $repositoryType, object Type $repositoryType )
object Repository getRepository (mixed $repositoryId, object Id $repositoryId )
object TypeIterator getRepositoryTypes ()
void _getAssetRepository (mixed $assetId)
Variables
mixed $_configuration (line 46)
mixed $_createdRepositories (line 49)
mixed $_hierarchy (line 48)
mixed $_repositoryValidFlags (line 47)
Methods
Constructor HarmoniRepositoryManager (line 60)

Constructor

  • access: public
HarmoniRepositoryManager HarmoniRepositoryManager ([array $configuration = NULL])
  • array $configuration: An array of the configuration options nessisary to load this manager. To use the a specific manager store, a store data source must be configured as noted in the class of said manager store. manager.
assignConfiguration (line 123)

Assign the configuration of this Manager. Valid configuration options are as

follows: database_index integer database_name string

  • 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)
  • object Properties $configuration: (original type: java.util.Properties)

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

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 )
  • object OsidContext $context

Redefinition of:
OsidManager::assignOsidContext()
Assign the context of this OsidManager.
copyAsset (line 740)

Create in a Repository a copy of an Asset. The Id, AssetType, and Repository for the new Asset is set by the implementation. All Records are similarly copied.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
object Id copyAsset (object Repository $repository, mixed $assetId, object Id $assetId )
  • object Repository $repository
  • object Id $assetId

Redefinition of:
RepositoryManager::copyAsset()
Create in a Repository a copy of an Asset. The Id, AssetType, and Repository for the new Asset is set by the implementation. All Records are similarly copied.
createRepository (line 208)

Create a new Repository of the specified Type. The implementation of this method sets the Id for the new object.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE
object Repository createRepository (string $displayName, string $description, mixed $repositoryType, [mixed $id = NULL], object Type $repositoryType )
  • string $displayName
  • string $description
  • object Type $repositoryType

Redefinition of:
RepositoryManager::createRepository()
Create a new Repository of the specified Type. The implementation of this method sets the Id for the new object.
deleteRepository (line 314)

Delete a Repository.

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

Redefinition of:
RepositoryManager::deleteRepository()
Delete a Repository.
getAsset (line 551)

Get the Asset with the specified unique Id.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
object Asset getAsset (mixed $assetId, object Id $assetId )
  • object Id $assetId

Redefinition of:
RepositoryManager::getAsset()
Get the Asset with the specified unique Id.
getAssetByDate (line 587)

Get the Asset with the specified Unique Id and appropriate for the date

specified. The date permits

  • throws: osid.dr.DigitalRepositoryException An exception with one of the following messages defined in osid.dr.DigitalRepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, NO_OBJECT_WITH_THIS_DATE
object Asset getAssetByDate (object assetId $assetId, object date $date)
  • object assetId $assetId
  • object date $date

Redefinition of:
RepositoryManager::getAssetByDate()
Get the Asset with the specified unique Id that is appropriate for the date specified. The specified date allows a Repository implementation to support Asset versioning.
getAssetDates (line 623)

Get all the dates for the Asset with the specified unique Id. These dates allows a Repository implementation to support Asset versioning.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
object LongValueIterator getAssetDates (mixed $assetId, object Id $assetId )
  • object Id $assetId

Redefinition of:
RepositoryManager::getAssetDates()
Get all the dates for the Asset with the specified unique Id. These dates allows a Repository implementation to support Asset versioning.
getAssets (line 694)

Perform a search of the specified Type and get all the Assets that

satisfy the SearchCriteria. The search is performed for all specified DigitalRepositories. Iterators return a group of items, one item at a time. The Iterator's hasNext method returns

  1. true
if there are additional objects available;
  1. false
otherwise. The Iterator's next method returns the next object.

  • return: The order of the objects returned by the Iterator is not guaranteed.
  • throws: osid.dr.DigitalRepositoryException An exception with one of the following messages defined in osid.dr.DigitalRepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE, UNKNOWN_DR
object AssetIterator getAssets (object repositories $repositories, mixed $searchCriteria, object searchType $searchType, mixed $searchProperties)
  • object repositories $repositories
  • mixed $searchCriteria: searchCriteria
  • object searchType $searchType
getAssetsBySearch (line 666)

Perform a search of the specified Type and get all the Assets that satisfy the SearchCriteria. The search is performed for all specified Repositories. Iterators return a set, one at a time.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE, UNKNOWN_REPOSITORY
object AssetIterator getAssetsBySearch (object Repository[] $repositories, object mixed $searchCriteria, object Type $searchType, mixed $searchProperties, object Properties $searchProperties )
  • object Repository[] $repositories
  • object mixed $searchCriteria: (original type: java.io.Serializable)
  • object Type $searchType
  • object Properties $searchProperties

Redefinition of:
RepositoryManager::getAssetsBySearch()
Perform a search of the specified Type and get all the Assets that satisfy the SearchCriteria. The search is performed for all specified Repositories. Iterators return a set, one at a time.
getOsidContext (line 161)

Return context of this OsidManager.

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

Redefinition of:
OsidManager::getOsidContext()
Return context of this OsidManager.
getRepositories (line 407)

Get all the Repositories. Iterators return a set, one at a time.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, CONFIGURATION_ERROR, UNIMPLEMENTED
object RepositoryIterator getRepositories ()

Redefinition of:
RepositoryManager::getRepositories()
Get all the Repositories. Iterators return a set, one at a time.
getRepositoriesByType (line 449)

Get all the Repositories of the specified Type. Iterators return a set, one at a time.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE
object RepositoryIterator getRepositoriesByType (mixed $repositoryType, object Type $repositoryType )
  • object Type $repositoryType

Redefinition of:
RepositoryManager::getRepositoriesByType()
Get all the Repositories of the specified Type. Iterators return a set, one at a time.
getRepository (line 508)

Get the Repository with the specified unique Id.

  • access: public
  • throws: object RepositoryException An exception with one of the following messages defined in org.osid.repository.RepositoryException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_ID
object Repository getRepository (mixed $repositoryId, object Id $repositoryId )
  • object Id $repositoryId

Redefinition of:
RepositoryManager::getRepository()
Get the Repository with the specified unique Id.
getRepositoryTypes (line 766)

Get all the RepositoryTypes in this RepositoryManager. RepositoryTypes are used to categorize Repositories. Iterators return a set, one at a time.

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

Redefinition of:
RepositoryManager::getRepositoryTypes()
Get all the RepositoryTypes in this RepositoryManager. RepositoryTypes are used to categorize Repositories. Iterators return a set, one at a time.
_getAssetRepository (line 799)

****************************************************************************

Private Functions: ****************************************************************************

void _getAssetRepository (mixed $assetId)

Inherited Methods

Inherited From RepositoryManager

RepositoryManager::copyAsset()
RepositoryManager::createRepository()
RepositoryManager::deleteRepository()
RepositoryManager::getAsset()
RepositoryManager::getAssetByDate()
RepositoryManager::getAssetDates()
RepositoryManager::getAssetsBySearch()
RepositoryManager::getRepositories()
RepositoryManager::getRepositoriesByType()
RepositoryManager::getRepository()
RepositoryManager::getRepositoryTypes()

Inherited From OsidManager

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

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