public interface CompositionLookupSession extends 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.
CompositionAdminSession.
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupCompositions()
Tests if this user can perform
Composition lookups. |
Composition |
getComposition(Id compositionId)
Gets the
Composition specified by its Id. |
CompositionList |
getCompositions()
Gets all
Compositions. |
CompositionList |
getCompositionsByGenusType(Type compositionGenusType)
Gets a
CompositionList corresponding to the given
composition genus Type which does not include
compositions of types derived from the specified Type. |
CompositionList |
getCompositionsByIds(IdList compositionIds)
Gets a
CompositionList corresponding to the given
IdList. |
CompositionList |
getCompositionsByParentGenusType(Type compositionGenusType)
Gets a
CompositionList corresponding to the given
composition genus Type and include any additional
compositions with genus types derived from the specified Type. |
CompositionList |
getCompositionsByProvider(Id resourceId)
Gets a
CompositionList from the given provider . |
CompositionList |
getCompositionsByRecordType(Type compositionRecordType)
Gets a
CompositionList containing the given composition
record Type. |
Repository |
getRepository()
Gets the
Repository associated with this session. |
Id |
getRepositoryId()
Gets the
Repository Id associated with
this session. |
void |
useActiveCompositionView()
Only active compositions are returned by methods in this session.
|
void |
useAnyStatusCompositionView()
All active and inactive compositions are returned by methods in this
session.
|
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.
|
void |
useFederatedRepositoryView()
Federates the view for methods in this session.
|
void |
useIsolatedRepositoryView()
Isolates the view for methods in this session.
|
void |
usePlenaryCompositionView()
A complete view of the
Composition returns is desired. |
void |
useSequesteredCompositionView()
The methods in this session omit sequestered compositions.
|
void |
useUnsequesteredCompositionView()
The methods in this session return all compositions, including
sequestered compositions.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRepositoryId()
Repository
Id
associated with
this session. Repository Id
associated with this sessionmandatory
- This method must be implemented. Repository getRepository() throws OperationFailedException, PermissionDeniedException
Repository
associated with this session. Repository
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupCompositions()
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. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeCompositionView()
mandatory
- This method is must be implemented. void usePlenaryCompositionView()
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.mandatory
- This method is must be implemented. void useFederatedRepositoryView()
mandatory
- This method is must be implemented. void useIsolatedRepositoryView()
mandatory
- This method is must be implemented. void useActiveCompositionView()
mandatory
- This method is must be implemented. void useAnyStatusCompositionView()
mandatory
- This method is must be implemented. void useSequesteredCompositionView()
mandatory
- This method is must be implemented. void useUnsequesteredCompositionView()
mandatory
- This method is must be implemented. Composition getComposition(Id compositionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.compositionId
- Id
of the Composiiton
NotFoundException
- compositionId
not
foundNullArgumentException
- compositionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. CompositionList getCompositionsByIds(IdList compositionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.compositionIds
- the list of Ids
to retrieve Composition list
NotFoundException
- an Id
was not foundNullArgumentException
- compositionIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CompositionList getCompositionsByGenusType(Type compositionGenusType) throws OperationFailedException, PermissionDeniedException
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.compositionGenusType
- a composition genus type Composition list
NullArgumentException
- compositionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CompositionList getCompositionsByParentGenusType(Type compositionGenusType) throws OperationFailedException, PermissionDeniedException
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.compositionGenusType
- a composition genus type Composition list
NullArgumentException
- compositionGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CompositionList getCompositionsByRecordType(Type compositionRecordType) throws OperationFailedException, PermissionDeniedException
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.compositionRecordType
- a composition record type Composition list
NullArgumentException
- compositionRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CompositionList getCompositionsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
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.resourceId
- a resource Id
Composition list
NullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CompositionList getCompositions() throws OperationFailedException, PermissionDeniedException
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. Compositions
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.