Repository¶
Repository¶
-
class
dlkit.services.repository.Repository(provider_manager, catalog, runtime, proxy, **kwargs)¶ Bases:
dlkit.osid.objects.OsidCatalog,dlkit.osid.sessions.OsidSessionA repository defines a collection of assets.
-
get_repository_record(repository_record_type)¶ Gets the record corresponding to the given
RepositoryrecordType.This method is used to retrieve an object implementing the requested record. The
repository_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(repository_record_type)istrue.Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the repository record Return type: osid.repository.records.RepositoryRecordRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(repository_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Asset Lookup Methods¶
Repository.repository_id¶Gets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repository¶Gets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_lookup_assets()¶Tests if this user can perform
Assetlookups.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_comparative_asset_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Repository.use_plenary_asset_view()¶A complete view of the
Assetreturns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Repository.use_federated_repository_view()¶Federates the view for methods in this session.
A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
compliance: mandatory – This method is must be implemented.
Repository.use_isolated_repository_view()¶Isolates the view for methods in this session.
An isolated view restricts lookups to this repository only.
compliance: mandatory – This method is must be implemented.
Repository.get_asset(asset_id)¶Gets the
Assetspecified by itsId.In plenary mode, the exact
Idis found or aNotFoundresults. Otherwise, the returnedAssetmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssetand retained for compatibility.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetto retrieveReturns: the returned AssetReturn type: osid.repository.AssetRaise: NotFound– noAssetfound with the givenIdRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_ids(asset_ids)¶Gets an
AssetListcorresponding to the givenIdList.In plenary mode, the returned list contains all of the assets specified in the
Idlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssetsmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: asset_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NotFound– anIdwas not foundRaise: NullArgument–asset_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_genus_type(asset_genus_type)¶Gets an
AssetListcorresponding to the given asset genusTypewhich does not include assets of types derived from the specifiedType.In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: asset_genus_type ( osid.type.Type) – an asset genus typeReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_parent_genus_type(asset_genus_type)¶Gets an
AssetListcorresponding to the given asset genusTypeand include any additional assets with genus types derived from the specifiedType.In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: asset_genus_type ( osid.type.Type) – an asset genus typeReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_record_type(asset_record_type)¶Gets an
AssetListcontaining the given asset recordType.In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: asset_record_type ( osid.type.Type) – an asset record typeReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–asset_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_provider(resource_id)¶Gets an
AssetListfrom the given provider.In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.assets¶Gets all
Assets.In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Returns: a list of AssetsReturn type: osid.repository.AssetListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Asset Query Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_search_assets()¶Tests if this user can perform
Assetsearches.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_federated_repository_view()Federates the view for methods in this session.
A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
compliance: mandatory – This method is must be implemented.
Repository.use_isolated_repository_view()Isolates the view for methods in this session.
An isolated view restricts lookups to this repository only.
compliance: mandatory – This method is must be implemented.
Repository.asset_query¶Gets an asset query.
Returns: the asset query Return type: osid.repository.AssetQuerycompliance: mandatory – This method must be implemented.
Repository.get_assets_by_query(asset_query)¶Gets a list of
Assetsmatching the given asset query.
Parameters: asset_query ( osid.repository.AssetQuery) – the asset queryReturns: the returned AssetListReturn type: osid.repository.AssetListRaise: NullArgument–asset_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– theasset_queryis not of this servicecompliance: mandatory – This method must be implemented.
Asset Search Methods¶
Repository.asset_search¶Gets an asset search.
Returns: the asset search Return type: osid.repository.AssetSearchcompliance: mandatory – This method must be implemented.
Repository.asset_search_order¶Gets an asset search order.
The
AssetSearchOrderis supplied to anAssetSearchto specify the ordering of results.
Returns: the asset search order Return type: osid.repository.AssetSearchOrdercompliance: mandatory – This method must be implemented.
Repository.get_assets_by_search(asset_query, asset_search)¶Gets the search results matching the given search query using the given search.
Parameters:
- asset_query (
osid.repository.AssetQuery) – the asset query- asset_search (
osid.repository.AssetSearch) – the asset searchReturns: the asset search results
Return type:
osid.repository.AssetSearchResultsRaise:
NullArgument–asset_queryorasset_searchisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported–asset_queryorasset_searchis not of this servicecompliance: mandatory – This method must be implemented.
Repository.get_asset_query_from_inspector(asset_query_inspector)¶Gets an asset query from an inspector.
The inspector is available from a
AssetSearchResults.
Parameters: asset_query_inspector ( osid.repository.AssetQueryInspector) – an asset query inspectorReturns: the asset query Return type: osid.repository.AssetQueryRaise: NullArgument–asset_query_inspectorisnullRaise: Unsupported–asset_query_inspectoris not of this servicecompliance: mandatory – This method must be implemented.
Asset Admin Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_create_assets()¶Tests if this user can create
Assets.A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an
Assetwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifAssetcreation is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.can_create_asset_with_record_types(asset_record_types)¶Tests if this user can create a single
Assetusing the desired record types.While
RepositoryManager.getAssetRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAsset. Providing an empty array tests if anAssetcan be created with no records.
Parameters: asset_record_types ( osid.type.Type[]) – array of asset record typesReturns: trueifAssetcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–asset_record_typesisnullcompliance: mandatory – This method must be implemented.
Repository.get_asset_form_for_create(asset_record_types)¶Gets the asset form for creating new assets.
A new form should be requested for each create transaction.
Parameters: asset_record_types ( osid.type.Type[]) – array of asset record typesReturns: the asset form Return type: osid.repository.AssetFormRaise: NullArgument–asset_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Repository.create_asset(asset_form)¶Creates a new
Asset.
Parameters: asset_form ( osid.repository.AssetForm) – the form for thisAssetReturns: the new AssetReturn type: osid.repository.AssetRaise: IllegalState–asset_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–asset_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_formdid not originate fromget_asset_form_for_create()compliance: mandatory – This method must be implemented.
Repository.can_update_assets()¶Tests if this user can update
Assets.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an
Assetwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseifAssetmodification is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.get_asset_form_for_update(asset_id)¶Gets the asset form for updating an existing asset.
A new asset form should be requested for each update transaction.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetReturns: the asset form Return type: osid.repository.AssetFormRaise: NotFound–asset_idis not foundRaise: NullArgument–asset_idis nullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.update_asset(asset_form)¶Updates an existing asset.
Parameters: asset_form ( osid.repository.AssetForm) – the form containing the elements to be updatedRaise: IllegalState–asset_formalready used in anupdate transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–asset_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_formdid not originate fromget_asset_form_for_update()compliance: mandatory – This method must be implemented.
Repository.can_delete_assets()¶Tests if this user can delete
Assets.A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an
Assetwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: falseifAssetdeletion is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.delete_asset(asset_id)¶Deletes an
Asset.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetto removeRaise: NotFound–asset_idnot foundRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_manage_asset_aliases()¶Tests if this user can manage
Idaliases forAssets.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: falseifAssetaliasing is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.alias_asset(asset_id, alias_id)¶Adds an
Idto anAssetfor the purpose of creating compatibility.The primary
Idof theAssetis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another asset, it is reassigned to the given assetId.
Parameters:
- asset_id (
osid.id.Id) – theIdof anAsset- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–asset_idnot foundRaise:
NullArgument–asset_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_create_asset_content()¶Tests if this user can create content for
Assets.A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an
AssetContentwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: falseifAssetcontent creation is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.can_create_asset_content_with_record_types(asset_content_record_types)¶Tests if this user can create an
AssetContentusing the desired record types.While
RepositoryManager.getAssetContentRecordTypes()can be used to test which records are supported, this method tests which records are required for creating a specificAssetContent. Providing an empty array tests if anAssetContentcan be created with no records.
Parameters: asset_content_record_types ( osid.type.Type[]) – array of asset content record typesReturns: trueifAssetContentcreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–asset_content_record_typesisnullcompliance: mandatory – This method must be implemented.
Repository.get_asset_content_form_for_create(asset_id, asset_content_record_types)¶Gets an asset content form for creating new assets.
Parameters:
- asset_id (
osid.id.Id) – theIdof anAsset- asset_content_record_types (
osid.type.Type[]) – array of asset content record typesReturns: the asset content form
Return type:
osid.repository.AssetContentFormRaise:
NotFound–asset_idis not foundRaise:
NullArgument–asset_idorasset_content_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Repository.create_asset_content(asset_content_form)¶Creates new
AssetContentfor a given asset.
Parameters: asset_content_form ( osid.repository.AssetContentForm) – the form for thisAssetContentReturns: the new AssetContentReturn type: osid.repository.AssetContentRaise: IllegalState–asset_content_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–asset_content_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_content_formdid not originate fromget_asset_content_form_for_create()compliance: mandatory – This method must be implemented.
Repository.can_update_asset_contents()¶Tests if this user can update
AssetContent.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an
AssetContentwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: falseifAssetContentmodification is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.get_asset_content_form_for_update(asset_content_id)¶Gets the asset content form for updating an existing asset content.
A new asset content form should be requested for each update transaction.
Parameters: asset_content_id ( osid.id.Id) – theIdof theAssetContentReturns: the asset content form Return type: osid.repository.AssetContentFormRaise: NotFound–asset_content_idis not foundRaise: NullArgument–asset_content_idisnullRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository.update_asset_content(asset_content_form)¶Updates an existing asset content.
Parameters: asset_content_form ( osid.repository.AssetContentForm) – the form containing the elements to be updatedRaise: IllegalState–asset_content_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–asset_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_content_formdid not originate fromget_asset_content_form_for_update()compliance: mandatory – This method must be implemented.
Repository.can_delete_asset_contents()¶Tests if this user can delete
AssetsContents.A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an
AssetContentwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: falseifAssetContentdeletion is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.delete_asset_content(asset_content_id)¶Deletes content from an
Asset.
Parameters: asset_content_id ( osid.id.Id) – theIdof theAssetContentRaise: NotFound–asset_content_idis not foundRaise: NullArgument–asset_content_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Asset Notification Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_register_for_asset_notifications()¶Tests if this user can register for
Assetnotifications.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer notification operations.
Returns: falseif notification methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_federated_repository_view()Federates the view for methods in this session.
A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
compliance: mandatory – This method is must be implemented.
Repository.use_isolated_repository_view()Isolates the view for methods in this session.
An isolated view restricts lookups to this repository only.
compliance: mandatory – This method is must be implemented.
Repository.register_for_new_assets()¶Register for notifications of new assets.
AssetReceiver.newAssets()is invoked when a newAssetappears in this repository.
Raise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_new_assets_by_genus_type(asset_genus_type)¶Registers for notification of new assets of the given asset genus type.
AssetReceiver.newAssets()is invoked when an asset is appears in this repository.
Parameters: asset_genus_type ( osid.type.Type) – the genus type of theAssetto monitorRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_changed_assets()¶Registers for notification of updated assets.
AssetReceiver.changedAssets()is invoked when an asset in this repository is changed.
Raise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_changed_assets_by_genus_type(asset_genus_type)¶Registers for notification of updated assets of the given asset genus type.
AssetReceiver.changedAssets()is invoked when an asset in this repository is changed.
Parameters: asset_genus_type ( osid.type.Type) – the genus type of theAssetto monitorRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_changed_asset(asset_id)¶Registers for notification of an updated asset.
AssetReceiver.changedAssets()is invoked when the specified asset in this repository is changed.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetto monitorRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_deleted_assets()¶Registers for notification of deleted assets.
AssetReceiver.deletedAssets()is invoked when an asset is deleted or removed from this repository.
Raise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_deleted_assets_by_genus_type(asset_genus_type)¶Registers for notification of deleted assets of the given asset genus type.
AssetReceiver.deletedAssets()is invoked when an asset is deleted or removed from this repository.
Parameters: asset_genus_type ( osid.type.Type) – the genus type of theAssetto monitorRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.register_for_deleted_asset(asset_id)¶Registers for notification of a deleted asset.
AssetReceiver.deletedAssets()is invoked when the specified asset is deleted or removed from this repository.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetto monitorRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.reliable_asset_notifications()¶Reliable notifications are desired.
In reliable mode, notifications are to be acknowledged using
acknowledge_item_notification().compliance: mandatory – This method is must be implemented.
Repository.unreliable_asset_notifications()¶Unreliable notifications are desired.
In unreliable mode, notifications do not need to be acknowledged.
compliance: mandatory – This method is must be implemented.
Repository.acknowledge_asset_notification(notification_id)¶Acknowledge an asset notification.
Parameters: notification_id ( osid.id.Id) – theIdof the notificationRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Asset Repository Methods¶
Repository.can_lookup_asset_repository_mappings()¶Tests if this user can perform lookups of asset/repository mappings.
A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif looking up mappings is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_comparative_repository_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Repository.use_plenary_repository_view()¶A complete view of the
AssetandRepositoryreturns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Repository.get_asset_ids_by_repository(repository_id)¶Gets the list of
AssetIdsassociated with aRepository.
Parameters: repository_id ( osid.id.Id) –Idof theRepositoryReturns: list of related asset IdsReturn type: osid.id.IdListRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_repository(repository_id)¶Gets the list of
Assetsassociated with aRepository.
Parameters: repository_id ( osid.id.Id) –Idof theRepositoryReturns: list of related assets Return type: osid.repository.AssetListRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_asset_ids_by_repositories(repository_ids)¶Gets the list of
Asset Idscorresponding to a list ofRepositoryobjects.
Parameters: repository_ids ( osid.id.IdList) – list of repositoryIdsReturns: list of asset IdsReturn type: osid.id.IdListRaise: NullArgument–repository_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_assets_by_repositories(repository_ids)¶Gets the list of
Assetscorresponding to a list ofRepositoryobjects.
Parameters: repository_ids ( osid.id.IdList) – list of repositoryIdsReturns: list of assets Return type: osid.repository.AssetListRaise: NullArgument–repository_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_repository_ids_by_asset(asset_id)¶Gets the list of
RepositoryIdsmapped to anAsset.
Parameters: asset_id ( osid.id.Id) –Idof anAssetReturns: list of repository IdsReturn type: osid.id.IdListRaise: NotFound–asset_idis not foundRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_repositories_by_asset(asset_id)¶Gets the list of
Repositoryobjects mapped to anAsset.
Parameters: asset_id ( osid.id.Id) –Idof anAssetReturns: list of repositories Return type: osid.repository.RepositoryListRaise: NotFound–asset_idis not foundRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Asset Repository Assignment Methods¶
Repository.can_assign_assets()¶Tests if this user can alter asset/repository mappings.
A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
Returns: falseif mapping is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.can_assign_assets_to_repository(repository_id)¶Tests if this user can alter asset/repository mappings.
A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryReturns: falseif mapping is not authorized,trueotherwiseReturn type: booleanRaise: NullArgument–repository_idisnullcompliance: mandatory – This method must be implemented.
Repository.get_assignable_repository_ids(repository_id)¶Gets a list of repositories including and under the given repository node in which any composition can be assigned.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryReturns: list of assignable repository IdsReturn type: osid.id.IdListRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository.get_assignable_repository_ids_for_asset(repository_id, asset_id)¶Gets a list of repositories including and under the given repository node in which a specific asset can be assigned.
Parameters:
- repository_id (
osid.id.Id) – theIdof theRepository- asset_id (
osid.id.Id) – theIdof theAssetReturns: list of assignable repository
IdsReturn type:
osid.id.IdListRaise:
NullArgument–repository_idorasset_idisnullRaise:
OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository.assign_asset_to_repository(asset_id, repository_id)¶Adds an existing
Assetto aRepository.
Parameters:
- asset_id (
osid.id.Id) – theIdof theAsset- repository_id (
osid.id.Id) – theIdof theRepositoryRaise:
AlreadyExists–asset_idalready assigned torepository_idRaise:
NotFound–asset_idorrepository_idnot foundRaise:
NullArgument–asset_idorrepository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.unassign_asset_from_repository(asset_id, repository_id)¶Removes an
Assetfrom aRepository.
Parameters:
- asset_id (
osid.id.Id) – theIdof theAsset- repository_id (
osid.id.Id) – theIdof theRepositoryRaise:
NotFound–asset_idorrepository_idnot found orasset_idnot assigned torepository_idRaise:
NullArgument–asset_idorrepository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Asset Composition Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_access_asset_compositions()¶Tests if this user can perform composition lookups.
A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_comparative_asset_composition_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Repository.use_plenary_asset_composition_view()¶A complete view of the returns is desired.
Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Repository.use_federated_repository_view()Federates the view for methods in this session.
A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
compliance: mandatory – This method is must be implemented.
Repository.use_isolated_repository_view()Isolates the view for methods in this session.
An isolated view restricts lookups to this repository only.
compliance: mandatory – This method is must be implemented.
Repository.get_composition_assets(composition_id)¶Gets the list of assets mapped to the given
Composition.
Parameters: composition_id ( osid.id.Id) –Idof theCompositionReturns: list of assets Return type: osid.repository.AssetListRaise: NotFound–composition_idnot foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method is must be implemented.
Repository.get_compositions_by_asset(asset_id)¶Gets a list of compositions including the given asset.
Parameters: asset_id ( osid.id.Id) –Idof theAssetReturns: the returned Composition listReturn type: osid.repository.CompositionListRaise: NotFound–asset_idis not foundRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Asset Composition Design Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_compose_assets()¶Tests if this user can manage mapping of
AssetstoCompositions.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as an application hint that may opt not to offer composition operations.
Returns: falseif asset composiion is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.add_asset(asset_id, composition_id)¶Appends an asset to a composition.
Parameters:
- asset_id (
osid.id.Id) –Idof theAsset- composition_id (
osid.id.Id) –Idof theCompositionRaise:
AlreadyExists–asset_idalready partcomposition_idRaise:
NotFound–asset_idorcomposition_idnot foundRaise:
NullArgument–asset_idorcomposition_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization fauilurecompliance: mandatory – This method must be implemented.
Repository.move_asset_ahead(asset_id, composition_id, reference_id)¶Reorders assets in a composition by moving the specified asset in front of a reference asset.
Parameters:
- asset_id (
osid.id.Id) –Idof theAsset- composition_id (
osid.id.Id) –Idof theComposition- reference_id (
osid.id.Id) –Idof the referenceAssetRaise:
NotFound–asset_idorreference_idnot found in composition_idRaise:
NullArgument–asset_id, reference_idorcomposition_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization fauilurecompliance: mandatory – This method must be implemented.
Repository.move_asset_behind(asset_id, composition_id, reference_id)¶Reorders assets in a composition by moving the specified asset behind of a reference asset.
Parameters:
- asset_id (
osid.id.Id) –Idof theAsset- composition_id (
osid.id.Id) –Idof theComposition- reference_id (
osid.id.Id) –Idof the referenceAssetRaise:
NotFound–asset_idorreference_idnot found in composition_idRaise:
NullArgument–asset_id, reference_idorcomposition_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization fauilurecompliance: mandatory – This method must be implemented.
Repository.order_assets(asset_ids, composition_id)¶Reorders a set of assets in a composition.
Parameters:
- asset_ids (
osid.id.Id[]) –Idsfor a set ofAssets- composition_id (
osid.id.Id) –Idof theCompositionRaise:
NotFound–composition_idnot found or, anasset_idnot related tocomposition_idRaise:
NullArgument–instruction_idsoragenda_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.remove_asset(asset_id, composition_id)¶Removes an
Assetfrom aComposition.
Parameters:
- asset_id (
osid.id.Id) –Idof theAsset- composition_id (
osid.id.Id) –Idof theCompositionRaise:
NotFound–asset_idnot found in composition_idRaise:
NullArgument–asset_idorcomposition_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization fauilurecompliance: mandatory – This method must be implemented.
Composition Lookup Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_lookup_compositions()¶Tests if this user can perform
Compositionlookups.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_comparative_composition_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Repository.use_plenary_composition_view()¶A complete view of the
Compositionreturns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Repository.use_federated_repository_view()Federates the view for methods in this session.
A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
compliance: mandatory – This method is must be implemented.
Repository.use_isolated_repository_view()Isolates the view for methods in this session.
An isolated view restricts lookups to this repository only.
compliance: mandatory – This method is must be implemented.
Repository.use_active_composition_view()¶Only active compositions are returned by methods in this session.
compliance: mandatory – This method is must be implemented.
Repository.use_any_status_composition_view()¶All active and inactive compositions are returned by methods in this session.
compliance: mandatory – This method is must be implemented.
Repository.use_sequestered_composition_view()¶The methods in this session omit sequestered compositions.
compliance: mandatory – This method is must be implemented.
Repository.use_unsequestered_composition_view()¶The methods in this session return all compositions, including sequestered compositions.
compliance: mandatory – This method is must be implemented.
Repository.get_composition(composition_id)¶Gets the
Compositionspecified by itsId.
Parameters: composition_id ( osid.id.Id) –Idof theComposiitonReturns: the composition Return type: osid.repository.CompositionRaise: NotFound–composition_idnot foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method is must be implemented.
Repository.get_compositions_by_ids(composition_ids)¶Gets a
CompositionListcorresponding to the givenIdList.
Parameters: composition_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned Composition listReturn type: osid.repository.CompositionListRaise: NotFound– anIdwas not foundRaise: NullArgument–composition_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_genus_type(composition_genus_type)¶Gets a
CompositionListcorresponding to the given composition genusTypewhich does not include compositions of types derived from the specifiedType.
Parameters: composition_genus_type ( osid.type.Type) – a composition genus typeReturns: the returned Composition listReturn type: osid.repository.CompositionListRaise: NullArgument–composition_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_parent_genus_type(composition_genus_type)¶Gets a
CompositionListcorresponding to the given composition genusTypeand include any additional compositions with genus types derived from the specifiedType.
Parameters: composition_genus_type ( osid.type.Type) – a composition genus typeReturns: the returned Composition listReturn type: osid.repository.CompositionListRaise: NullArgument–composition_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_record_type(composition_record_type)¶Gets a
CompositionListcontaining the given composition recordType.
Parameters: composition_record_type ( osid.type.Type) – a composition record typeReturns: the returned Composition listReturn type: osid.repository.CompositionListRaise: NullArgument–composition_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_provider(resource_id)¶Gets a
CompositionListfrom the given provider ````.In plenary mode, the returned list contains all known compositions or an error results. Otherwise, the returned list may contain only those compositions that are accessible through this session.
In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned Composition listReturn type: osid.repository.CompositionListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.compositions¶Gets all
Compositions.
Returns: a list of CompositionsReturn type: osid.repository.CompositionListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Composition Query Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_search_compositions()¶Tests if this user can perform
Compositionsearches.A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.use_federated_repository_view()Federates the view for methods in this session.
A federated view will include compositions in repositories which are children of this repository in the repository hierarchy.
compliance: mandatory – This method is must be implemented.
Repository.use_isolated_repository_view()Isolates the view for methods in this session.
An isolated view restricts lookups to this repository only.
compliance: mandatory – This method is must be implemented.
Repository.use_sequestered_composition_view()The methods in this session omit sequestered compositions.
compliance: mandatory – This method is must be implemented.
Repository.use_unsequestered_composition_view()The methods in this session return all compositions, including sequestered compositions.
compliance: mandatory – This method is must be implemented.
Repository.composition_query¶Gets a composition query.
Returns: the composition query Return type: osid.repository.CompositionQuerycompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_query(composition_query)¶Gets a list of
Compositionsmatching the given composition query.
Parameters: composition_query ( osid.repository.CompositionQuery) – the composition queryReturns: the returned CompositionListReturn type: osid.repository.CompositionListRaise: NullArgument–composition_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–composition_queryis not of this servicecompliance: mandatory – This method must be implemented.
Composition Search Methods¶
Repository.composition_search¶Gets a composition search.
Returns: the composition search Return type: osid.repository.CompositionSearchcompliance: mandatory – This method must be implemented.
Repository.composition_search_order¶Gets a composition search order.
The
CompositionSearchOrderis supplied to anCompositionSearchto specify the ordering of results.
Returns: the composition search order Return type: osid.repository.CompositionSearchOrdercompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_search(composition_query, composition_search)¶Gets the search results matching the given search query using the given search.
Parameters:
- composition_query (
osid.repository.CompositionQuery) – the composition query- composition_search (
osid.repository.CompositionSearch) – the composition searchReturns: the composition search results
Return type:
osid.repository.CompositionSearchResultsRaise:
NullArgument–composition_queryorcomposition_searchisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported–composition_queryorcomposition_searchis not of this servicecompliance: mandatory – This method must be implemented.
Repository.get_composition_query_from_inspector(composition_query_inspector)¶Gets a composition query from an inspector.
The inspector is available from a
CompositionSearchResults.
Parameters: composition_query_inspector ( osid.repository.CompositionQueryInspector) – a composition query inspectorReturns: the composition query Return type: osid.repository.CompositionQueryRaise: NullArgument–composition_query_inspectorisnullRaise: Unsupported–composition_query_inspectoris not of this servicecompliance: mandatory – This method must be implemented.
Composition Admin Methods¶
Repository.repository_idGets the
RepositoryIdassociated with this session.
Returns: the Repository Idassociated with this sessionReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Repository.repositoryGets the
Repositoryassociated with this session.
Returns: the Repositoryassociated with this sessionReturn type: osid.repository.RepositoryRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_create_compositions()¶Tests if this user can create
Compositions.A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a
Compositionwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifCompositioncreation is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.can_create_composition_with_record_types(composition_record_types)¶Tests if this user can create a single
Compositionusing the desired record types.While
RepositoryManager.getCompositionRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificComposition. Providing an empty array tests if aCompositioncan be created with no records.
Parameters: composition_record_types ( osid.type.Type[]) – array of composition record typesReturns: trueifCompositioncreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–composition_record_typesisnullcompliance: mandatory – This method must be implemented.
Repository.get_composition_form_for_create(composition_record_types)¶Gets the composition form for creating new compositions.
A new form should be requested for each create transaction.
Parameters: composition_record_types ( osid.type.Type[]) – array of composition record typesReturns: the composition form Return type: osid.repository.CompositionFormRaise: NullArgument–composition_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record typescompliance: mandatory – This method must be implemented.
Repository.create_composition(composiiton_form)¶Creates a new
Composition.
Parameters: composiiton_form ( osid.repository.CompositionForm) – the form for thisCompositionReturns: the new CompositionReturn type: osid.repository.CompositionRaise: IllegalState–composition_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–composition_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–composition_formdid not originate fromget_composition_form_for_create()compliance: mandatory – This method must be implemented.
Repository.can_update_compositions()¶Tests if this user can update
Compositions.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
Compositionwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifCompositionmodification is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.get_composition_form_for_update(composition_id)¶Gets the composition form for updating an existing composition.
A new composition form should be requested for each update transaction.
Parameters: composition_id ( osid.id.Id) – theIdof theCompositionReturns: the composition form Return type: osid.repository.CompositionFormRaise: NotFound–composition_idis not foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.update_composition(composiiton_form)¶Updates an existing composition.
Parameters: composiiton_form ( osid.repository.CompositionForm) – the form containing the elements to be updatedRaise: IllegalState–composition_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–composition_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–composition_formdid not originate fromget_composition_form_for_update()compliance: mandatory – This method must be implemented.
Repository.can_delete_compositions()¶Tests if this user can delete
Compositions.A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
Compositionwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifCompositiondeletion is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.delete_composition(composition_id)¶Deletes a
Composition.
Parameters: composition_id ( osid.id.Id) – theIdof theCompositionto removeRaise: NotFound–composition_idnot foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.delete_composition_node(composition_id)¶Deletes a
Compositionand all contained children.
Parameters: composition_id ( osid.id.Id) – theIdof theCompositionto removeRaise: NotFound–composition_idnot foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.add_composition_child(composition_id, child_composition_id)¶Adds a composition to a parent composition.
Parameters:
- composition_id (
osid.id.Id) – theIdof a parentComposition- child_composition_id (
osid.id.Id) – theIdof a childCompositionRaise:
AlreadyExists–child_composition_idis already a child ofcomposition_idRaise:
NotFound–composition_idorchild_composition_idis not foundRaise:
NullArgument–composition_idorchild_composition_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.remove_composition_child(composition_id, child_composition_id)¶Removes a composition from a parent composition.
Parameters:
- composition_id (
osid.id.Id) – theIdof a parentComposition- child_composition_id (
osid.id.Id) – theIdof a childCompositionRaise:
NotFound–composition_idorchild_composition_idis not found or not relatedRaise:
NullArgument–composition_idorchild_composition_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.can_manage_composition_aliases()¶Tests if this user can manage
Idaliases forCompositions.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: falseifCompositionaliasing is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.alias_composition(composition_id, alias_id)¶Adds an
Idto aCompositionfor the purpose of creating compatibility.The primary
Idof theCompositionis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another composition, it is reassigned to the given compositionId.
Parameters:
- composition_id (
osid.id.Id) – theIdof aComposition- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–composition_idnot foundRaise:
NullArgument–composition_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Composition Repository Methods¶
Repository.use_comparative_composition_repository_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at the expense of precision.
compliance: mandatory – This method is must be implemented.
Repository.use_plenary_composition_repository_view()¶A complete view of the
CompositionandRepositoryreturns is desired.Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
compliance: mandatory – This method is must be implemented.
Repository.can_lookup_composition_repository_mappings()¶Tests if this user can perform lookups of composition/repository mappings.
A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: falseif looking up mappings is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.get_composition_ids_by_repository(repository_id)¶Gets the list of
CompositionIdsassociated with aRepository.
Parameters: repository_id ( osid.id.Id) –Idof theRepositoryReturns: list of related composition IdsReturn type: osid.id.IdListRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_compositions_by_repository(repository_id)¶Gets the list of
Compositionsassociated with aRepository.
Parameters: repository_id ( osid.id.Id) –Idof theRepositoryReturns: list of related compositions Return type: osid.repository.CompositionListRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_composition_ids_by_repositories(repository_ids)¶Gets the list of
CompositionIdscorresponding to a list ofRepositoryobjects.
Parameters: repository_ids ( osid.id.IdList) – list of repositoryIdsReturns: list of composition IdsReturn type: osid.id.IdListRaise: NullArgument–repository_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_compoitions_by_repositories(repository_ids)¶Gets the list of
Compositionscorresponding to a list ofRepositoryobjects.
Parameters: repository_ids ( osid.id.IdList) – list of repositoryIdsReturns: list of Compositions Return type: osid.repository.CompositionListRaise: NullArgument–repository_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_repository_ids_by_composition(composition_id)¶Gets the
RepositoryIdsmapped to aComposition.
Parameters: composition_id ( osid.id.Id) –Idof aCompositionReturns: list of repository IdsReturn type: osid.id.IdListRaise: NotFound–composition_idis not foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.get_repositories_by_composition(composition_id)¶Gets the
Repositoryobjects mapped to aComposition.
Parameters: composition_id ( osid.id.Id) –Idof aCompositionReturns: list of repositories Return type: osid.repository.RepositoryListRaise: NotFound–composition_idis not foundRaise: NullArgument–composition_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Composition Repository Assignment Methods¶
Repository.can_assign_compositions()¶Tests if this user can alter composition/repository mappings.
A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
Returns: falseif mapping is not authorized,trueotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Repository.can_assign_compositions_to_repository(repository_id)¶Tests if this user can alter composition/repository mappings.
A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a
PermissionDenied. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryReturns: falseif mapping is not authorized,trueotherwiseReturn type: booleanRaise: NullArgument–repository_idisnullcompliance: mandatory – This method must be implemented.
Repository.get_assignable_repository_ids(repository_id)Gets a list of repositories including and under the given repository node in which any composition can be assigned.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryReturns: list of assignable repository IdsReturn type: osid.id.IdListRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository.get_assignable_repository_ids_for_composition(repository_id, composition_id)¶Gets a list of repositories including and under the given repository node in which a specific composition can be assigned.
Parameters:
- repository_id (
osid.id.Id) – theIdof theRepository- composition_id (
osid.id.Id) – theIdof theCompositionReturns: list of assignable repository
IdsReturn type:
osid.id.IdListRaise:
NullArgument–repository_idorcomposition_idisnullRaise:
OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Repository.assign_composition_to_repository(composition_id, repository_id)¶Adds an existing
Compositionto aRepository.
Parameters:
- composition_id (
osid.id.Id) – theIdof theComposition- repository_id (
osid.id.Id) – theIdof theRepositoryRaise:
AlreadyExists–composition_idalready assigned torepository_idRaise:
NotFound–composition_idorrepository_idnot foundRaise:
NullArgument–composition_idorrepository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.
Repository.unassign_composition_from_repository(composition_id, repository_id)¶Removes
Compositionfrom aRepository.
Parameters:
- composition_id (
osid.id.Id) – theIdof theComposition- repository_id (
osid.id.Id) – theIdof theRepositoryRaise:
NotFound–composition_idorrepository_idnot found orcomposition_idnot assigned torepository_idRaise:
NullArgument–composition_idorrepository_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failurecompliance: mandatory – This method must be implemented.