Interface CompositionLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
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 .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performCompositionlookups.getComposition(Id compositionId) Gets theCompositionspecified by itsId.Gets allCompositions.getCompositionsByGenusType(Type compositionGenusType) Gets aCompositionListcorresponding to the given composition genusTypewhich does not include compositions of types derived from the specifiedType.getCompositionsByIds(IdList compositionIds) Gets aCompositionListcorresponding to the givenIdList.getCompositionsByParentGenusType(Type compositionGenusType) Gets aCompositionListcorresponding to the given composition genusTypeand include any additional compositions with genus types derived from the specifiedType.getCompositionsByProvider(Id resourceId) Gets aCompositionListfrom the given provider.getCompositionsByRecordType(Type compositionRecordType) Gets aCompositionListcontaining the given composition recordType.Gets theRepositoryassociated with this session.Gets theRepositoryIdassociated with this session.voidOnly active compositions are returned by methods in this session.voidAll active and inactive compositions are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theCompositionreturns is desired.voidThe methods in this session omit sequestered compositions.voidThe methods in this session return all compositions, including sequestered compositions.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getRepositoryId
Id getRepositoryId()Gets theRepositoryIdassociated with this session.- Returns:
- the
Repository Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getRepository
Gets theRepositoryassociated with this session.- Returns:
- the
Repositoryassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupCompositions
boolean canLookupCompositions()Tests if this user can performCompositionlookups. 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 aPERMISSION_DENIED. 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,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeCompositionView
void useComparativeCompositionView()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.
-
usePlenaryCompositionView
void usePlenaryCompositionView()A complete view of theCompositionreturns 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.
-
useFederatedRepositoryView
void useFederatedRepositoryView()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.
-
useIsolatedRepositoryView
void useIsolatedRepositoryView()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.
-
useActiveCompositionView
void useActiveCompositionView()Only active compositions are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyStatusCompositionView
void useAnyStatusCompositionView()All active and inactive compositions are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useSequesteredCompositionView
void useSequesteredCompositionView()The methods in this session omit sequestered compositions.- Compliance:
mandatory- This method is must be implemented.
-
useUnsequesteredCompositionView
void useUnsequesteredCompositionView()The methods in this session return all compositions, including sequestered compositions.- Compliance:
mandatory- This method is must be implemented.
-
getComposition
Composition getComposition(Id compositionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theCompositionspecified by itsId. In plenary mode, the exact Id is found or aNOT_FOUNDresults. Otherwise, the returnedCompositionmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aCompositionand 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.- Parameters:
compositionId-Idof theCompositoon- Returns:
- the composition
- Throws:
NotFoundException-compositionIdnot foundNullArgumentException-compositionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCompositionsByIds
CompositionList getCompositionsByIds(IdList compositionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCompositionListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the compositions specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleCompositionsmay 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.- Parameters:
compositionIds- the list ofIdsto retrieve- Returns:
- the returned
Composition list - Throws:
NotFoundException- anIdwas not foundNullArgumentException-compositionIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCompositionsByGenusType
CompositionList getCompositionsByGenusType(Type compositionGenusType) throws OperationFailedException, PermissionDeniedException Gets aCompositionListcorresponding to the given composition genusTypewhich does not include compositions of types derived from the specifiedType. 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.- Parameters:
compositionGenusType- a composition genus type- Returns:
- the returned
Composition list - Throws:
NullArgumentException-compositionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCompositionsByParentGenusType
CompositionList getCompositionsByParentGenusType(Type compositionGenusType) throws OperationFailedException, PermissionDeniedException Gets aCompositionListcorresponding to the given composition genusTypeand include any additional compositions with genus types derived from the specifiedType. 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.- Parameters:
compositionGenusType- a composition genus type- Returns:
- the returned
Composition list - Throws:
NullArgumentException-compositionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCompositionsByRecordType
CompositionList getCompositionsByRecordType(Type compositionRecordType) throws OperationFailedException, PermissionDeniedException Gets aCompositionListcontaining the given composition recordType. 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.- Parameters:
compositionRecordType- a composition record type- Returns:
- the returned
Composition list - Throws:
NullArgumentException-compositionRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCompositionsByProvider
CompositionList getCompositionsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aCompositionListfrom 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:
resourceId- a resourceId- Returns:
- the returned
Composition list - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCompositions
Gets allCompositions. 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.- Returns:
- a list of
Compositions - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-