OSID Logo
OSID Specifications
repository package
Version 3.0.0
Release Candidate Preview
Interfaceosid.repository.CompositionLookupSession
Implementsosid.OsidSession
Description

This session provides methods for retrieving Composition objects. The Composition represents a collection of Assets.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete and ordered result set or is an error condition
  • isolated repository view: All lookup methods in this session operate, retrieve and pertain to compositions defined explicitly in the current repository. Using an isolated view is useful for managing compositions with the CompositionAdminSession.
  • federated repository view: All composition methods in this session operate, retrieve and pertain to all compositions defined in this repository and any other compositions implicitly available in this repository through repository inheritence.
  • active composition view: All composition lookup methods return active compositions.
  • any status composition view: Compositions of any active or inactive status are returned from methods.
  • sequestered composition viiew: All composition methods suppress sequestered compositions.
  • unsequestered composition view: All composition methods return all compositions.

Generally, the comparative view should be used for most applications as it permits operation even if there is data that cannot be accessed. For example, a browsing application may only need to examine the Composition it can access, without breaking execution. However, an administrative application may require a complete set of Composition objects to be returned.

Compositions may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Composition.

MethodgetRepositoryId
Description

Gets the Repository Id associated with this session.

Returnosid.id.Idthe Repository Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetRepository
Description

Gets the Repository associated with this session.

Returnosid.repository.Repositorythe Repository associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupCompositions
Description

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 PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeCompositionView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryCompositionView
Description

A complete view of the Composition 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedRepositoryView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedRepositoryView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this repository only.

CompliancemandatoryThis method is must be implemented.
MethoduseActiveCompositionView
Description

Only active compositions are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyStatusCompositionView
Description

All active and inactive compositions are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseSequesteredCompositionView
Description

The methods in this session omit sequestered compositions.

CompliancemandatoryThis method is must be implemented.
MethoduseUnsequesteredCompositionView
Description

The methods in this session return all compositions, including sequestered compositions.

CompliancemandatoryThis method is must be implemented.
MethodgetComposition
Description

Gets the Composition specified by its Id.

In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Composition may have a different Id than requested, such as the case where a duplicate Id was assigned to a Composition and retained for compatility.

In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Parametersosid.id.IdcompositionId Id of the Composiiton
Returnosid.repository.Compositionthe composition
ErrorsNOT_FOUND compositionId not found
NULL_ARGUMENT compositionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetCompositionsByIds
Description

Gets a CompositionList corresponding to the given IdList.

In plenary mode, the returned list contains all of the compositions specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Compositions may be omitted from the list and may present the elements in any order including returning a unique set.

In active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Parametersosid.id.IdListcompositionIdsthe list of Ids to retrieve
Returnosid.repository.CompositionListthe returned Composition list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT compositionIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCompositionsByGenusType
Description

Gets a CompositionList corresponding to the given composition genus Type which does not include compositions of types derived from the specified Type.

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 active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Parametersosid.type.TypecompositionGenusTypea composition genus type
Returnosid.repository.CompositionListthe returned Composition list
ErrorsNULL_ARGUMENT compositionGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCompositionsByParentGenusType
Description

Gets a CompositionList corresponding to the given composition genus Type and include any additional compositions with genus types derived from the specified Type.

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 active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Parametersosid.type.TypecompositionGenusTypea composition genus type
Returnosid.repository.CompositionListthe returned Composition list
ErrorsNULL_ARGUMENT compositionGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCompositionsByRecordType
Description

Gets a CompositionList containing the given composition record Type.

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 active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Parametersosid.type.TypecompositionRecordTypea composition record type
Returnosid.repository.CompositionListthe returned Composition list
ErrorsNULL_ARGUMENT compositionRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCompositionsByProvider
Description

Gets a CompositionList from 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.

Parametersosid.id.IdresourceIda resource Id
Returnosid.repository.CompositionListthe returned Composition list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCompositions
Description

Gets all Compositions.

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 active mode, compositions are returned that are currently active. In any effective mode, active and inactive compositions are returned.

In sequestered mode, no sequestered compositions are returned. In unsequestered mode, all compositions are returned.

Returnosid.repository.CompositionLista list of Compositions
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.