Class Repository

Description

Repository manages Assets of various Types and information about the Assets.

Assets are created, persisted, and validated by the Repository. When initially created, an Asset has an immutable Type and unique Id and its validation status is false. In this state, all methods can be called, but integrity checks are not enforced. When the Asset and its Records are ready to be validated, the validateAsset method checks the Asset and sets the validation status. When working with a valid Asset, all methods include integrity checks and an exception is thrown if the activity would result in an inappropriate state. Optionally, the invalidateAsset method can be called to release the requirement for integrity checks, but the Asset will not become valid again, until validateAsset is called and the entire Asset is checked.

<p> OSID Version: 2.0 </p>

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

Located in /harmoni/oki2/osid/repository/Repository.php (line 28)


	
			
Direct descendents
Class Description
HarmoniRepositoryInterface The HarmoniDigitalRepositoryInterface provides all of the methods of
Method Summary
object Id copyAsset (mixed $asset, object Asset $asset )
object Asset createAsset (string $displayName, string $description, mixed $assetType, object Type $assetType )
void deleteAsset (mixed $assetId, object Id $assetId )
object Asset getAsset (mixed $assetId, object Id $assetId )
object Asset getAssetByDate (object Id $assetId, mixed $date, int $date )
object LongValueIterator getAssetDates (mixed $assetId, object Id $assetId )
object AssetIterator getAssetsBySearch (object mixed $searchCriteria, object Type $searchType, mixed $searchProperties, object Properties $searchProperties )
object AssetIterator getAssetsByType (mixed $assetType, object Type $assetType )
string getDescription ()
string getDisplayName ()
object Properties getPropertiesByType (mixed $propertiesType, object Type $propertiesType )
object RecordStructureIterator getRecordStructuresByType (mixed $recordStructureType, object Type $recordStructureType )
object Type getStatus (mixed $assetId, object Id $assetId )
void invalidateAsset (mixed $assetId, object Id $assetId )
boolean supportsUpdate ()
boolean supportsVersioning ()
void updateDescription (mixed $description, string $description )
void updateDisplayName (mixed $displayName, string $displayName )
boolean validateAsset (mixed $assetId, object Id $assetId )
Methods
copyAsset (line 746)

Create 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 (mixed $asset, object Asset $asset )

Redefined in descendants as:
  • HarmoniRepository::copyAsset() : Create a copy of an Asset. The Id, AssetType, and Repository for the new Asset is set by the implementation. All Records are similarly copied.
createAsset (line 200)

Create a new Asset of this AssetType in this Repository. 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 Asset createAsset (string $displayName, string $description, mixed $assetType, object Type $assetType )
  • string $displayName
  • string $description
  • object Type $assetType

Redefined in descendants as:
deleteAsset (line 226)

Delete an Asset from this 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 deleteAsset (mixed $assetId, object Id $assetId )

Redefined in descendants as:
getAsset (line 624)

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 )

Redefined in descendants as:
getAssetByDate (line 656)

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.

  • 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, NO_OBJECT_WITH_THIS_DATE
object Asset getAssetByDate (object Id $assetId, mixed $date, int $date )

Redefined in descendants as:
  • HarmoniRepository::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 684)

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 )

Redefined in descendants as:
  • HarmoniRepository::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 250)

Get all the Assets in this Repository. 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 AssetIterator getAssets ()

Redefined in descendants as:
getAssetsBySearch (line 716)

Perform a search of the specified Type and get all the Assets that satisfy the SearchCriteria. 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 AssetIterator getAssetsBySearch (object mixed $searchCriteria, object Type $searchType, mixed $searchProperties, object Properties $searchProperties )

Redefined in descendants as:
getAssetsByType (line 280)

Get all the Assets of the specified AssetType in this Asset. 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 AssetIterator getAssetsByType (mixed $assetType, object Type $assetType )

Redefined in descendants as:
getAssetTypes (line 304)

Get all the AssetTypes in this Repository. AssetTypes are used to categorize Assets. 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 getAssetTypes ()

Redefined in descendants as:
getDescription (line 143)

Get the description for this 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
string getDescription ()

Redefined in descendants as:
getDisplayName (line 74)

Get the display name for this 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
string getDisplayName ()

Redefined in descendants as:
getId (line 97)

Get the unique Id for this 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
object Id getId ()

Redefined in descendants as:
getMandatoryRecordStructures (line 462)

Get the RecordStructures that this AssetType must support.

RecordStructures are used to categorize information about Assets. 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 RecordStructureIterator getMandatoryRecordStructures (mixed $assetType, object Type $assetType )
getProperties (line 379)

Get the Properties associated with this 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
object PropertiesIterator getProperties ()

Redefined in descendants as:
getPropertiesByType (line 333)

Get the Properties of this Type associated with this 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_TYPE
object Properties getPropertiesByType (mixed $propertiesType, object Type $propertiesType )

Redefined in descendants as:
getPropertyTypes (line 356)

Get all the Property Types for 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
object TypeIterator getPropertyTypes ()

Redefined in descendants as:
getRecordStructures (line 404)

Get all the RecordStructures in this Repository. RecordStructures are used to categorize information about Assets. 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 RecordStructureIterator getRecordStructures ()

Redefined in descendants as:
getRecordStructuresByType (line 431)

Get all the RecordStructures with the specified RecordStructureType in this Repository. RecordStructures are used to categorize information about Assets. 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 RecordStructureIterator getRecordStructuresByType (mixed $recordStructureType, object Type $recordStructureType )

Redefined in descendants as:
  • HarmoniRepository::getRecordStructuresByType() : Get all the RecordStructures with the specified RecordStructureType in this Repository. RecordStructures are used to categorize information about Assets. Iterators return a set, one at a time.
getSearchTypes (line 486)

Get all the SearchTypes supported by this Repository. 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 getSearchTypes ()

Redefined in descendants as:
getStatus (line 538)

Get the StatusType of 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 Type getStatus (mixed $assetId, object Id $assetId )

Redefined in descendants as:
getStatusTypes (line 510)

Get all the StatusTypes supported by this Repository. 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 getStatusTypes ()

Redefined in descendants as:
getType (line 120)

Get the RepositoryType of this 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
object Type getType ()

Redefined in descendants as:
invalidateAsset (line 596)

Set the Asset's status Type accordingly and relax validation checking when creating Records and Parts or updating Parts' values.

  • 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 invalidateAsset (mixed $assetId, object Id $assetId )

Redefined in descendants as:
supportsUpdate (line 802)

This method indicates whether this implementation supports Repository

methods: copyAsset, deleteAsset, invalidateAsset, updateDescription, updateDisplayName. Asset methods: addAsset, copyRecordStructure, createRecord, deleteRecord, inheritRecordStructure, removeAsset, updateContent, updateDescription, updateDisplayName, updateEffectiveDate, updateExpirationDate. Part methods: createPart, deletePart, updateDisplayName, updateValue. PartStructure methods: updateDisplayName, validatePart. Record methods: createPart, deletePart, updateDisplayName. RecordStructure methods: updateDisplayName, validateRecord.

  • 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
boolean supportsUpdate ()

Redefined in descendants as:
supportsVersioning (line 770)

This method indicates whether this implementation supports Repository methods getAssetsDates() and getAssetByDate()

  • 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
boolean supportsVersioning ()

Redefined in descendants as:
updateDescription (line 168)

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

Redefined in descendants as:
updateDisplayName (line 51)

Update the display name for this 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
void updateDisplayName (mixed $displayName, string $displayName )
  • string $displayName

Redefined in descendants as:
validateAsset (line 569)

Validate all the Records for an Asset and set its status Type accordingly. If the Asset is valid, return true; otherwise return false. The implementation may throw an Exception for any validation failures and use the Exception's message to identify specific causes.

  • 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
boolean validateAsset (mixed $assetId, object Id $assetId )

Redefined in descendants as:
  • HarmoniRepository::validateAsset() : Validate all the Records for an Asset and set its status Type accordingly. If the Asset is valid, return true; otherwise return false. The implementation may throw an Exception for any validation failures and use the Exception's message to identify specific causes.

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