public interface BlockLookupSession extends OsidSession
This session provides methods for retrieving Block
objects.
This session defines views that offer differing behaviors when retrieving multiple objects.
Blocks
with the BlockAdminSession.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedOublietteView()
and
useIsolatedOublietteView()
behave as a radio group and one should
be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupBlocks()
Tests if this user can perform
Block lookups. |
Block |
getBlock(Id blockId)
Gets the
Block specified by its Id. |
BlockList |
getBlocks()
Gets all
Blocks. |
BlockList |
getBlocksByGenusType(Type blockGenusType)
Gets a
BlockList corresponding to the given block genus
Type which does not include blocks of genus types
derived from the specified Type. |
BlockList |
getBlocksByIds(IdList blockIds)
Gets a
BlockList corresponding to the given
IdList. |
BlockList |
getBlocksByParentGenusType(Type blockGenusType)
Gets a
BlockList corresponding to the given block genus
Type and include any additional blocks with genus types
derived from the specified Type. |
BlockList |
getBlocksByRecordType(Type blockRecordType)
Gets a
BlockList containing the given block record
Type. |
BlockList |
getBlocksForIssue(Id issueId)
Gets a
BlockList mapped to the given Issue
In plenary mode, the returned list contains all known blocks
or an error results. |
Oubliette |
getOubliette()
Gets the
Oubliette associated with this session. |
Id |
getOublietteId()
Gets the
Oubliette Id associated with
this session. |
void |
useComparativeBlockView()
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 |
useFederatedOublietteView()
Federates the view for methods in this session.
|
void |
useIsolatedOublietteView()
Isolates the view for methods in this session.
|
void |
usePlenaryBlockView()
A complete view of the
Block returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getOublietteId()
Oubliette
Id
associated with
this session. Oubliette Id
associated with this sessionmandatory
- This method must be implemented. Oubliette getOubliette() throws OperationFailedException, PermissionDeniedException
Oubliette
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupBlocks()
Block
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 useComparativeBlockView()
mandatory
- This method is must be implemented. void usePlenaryBlockView()
Block
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 useFederatedOublietteView()
mandatory
- This method is must be implemented. void useIsolatedOublietteView()
mandatory
- This method is must be implemented. Block getBlock(Id blockId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Block
specified by its Id.
In
plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned Block
may have a different Id
than requested, such as
the case where a duplicate Id
was assigned to a
Block
and retained for compatibility.blockId
- Id
of the Block
NotFoundException
- blockId
not foundNullArgumentException
- blockId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. BlockList getBlocksByIds(IdList blockIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
BlockList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
blocks 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 Blocks
may be omitted from the list and
may present the elements in any order including returning a unique
set.blockIds
- the list of Ids
to retrieve Block
listNotFoundException
- an Id was
not foundNullArgumentException
- blockIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BlockList getBlocksByGenusType(Type blockGenusType) throws OperationFailedException, PermissionDeniedException
BlockList
corresponding to the given block genus
Type
which does not include blocks of genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known blocks or an error results.
Otherwise, the returned list may contain only those blocks that are
accessible through this session.blockGenusType
- a block genus type Block
listNullArgumentException
- blockGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BlockList getBlocksByParentGenusType(Type blockGenusType) throws OperationFailedException, PermissionDeniedException
BlockList
corresponding to the given block genus
Type
and include any additional blocks with genus types
derived from the specified Type.
In plenary mode, the
returned list contains all known blocks or an error results.
Otherwise, the returned list may contain only those blocks that are
accessible through this session.blockGenusType
- a block genus type Block
listNullArgumentException
- blockGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BlockList getBlocksByRecordType(Type blockRecordType) throws OperationFailedException, PermissionDeniedException
BlockList
containing the given block record
Type.
In plenary mode, the returned list contains all
known blocks or an error results. Otherwise, the returned list may
contain only those blocks that are accessible through this session.blockRecordType
- a block record type Block
listNullArgumentException
- blockRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BlockList getBlocksForIssue(Id issueId) throws OperationFailedException, PermissionDeniedException
BlockList
mapped to the given Issue
In plenary mode, the returned list contains all known blocks
or an error results. Otherwise, the returned list may contain only
those blocks that are accessible through this session.issueId
- an issue Id
Block
listNullArgumentException
- issueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BlockList getBlocks() throws OperationFailedException, PermissionDeniedException
Blocks.
In plenary mode, the returned list
contains all known blocks or an error results. Otherwise, the returned
list may contain only those blocks that are accessible through this
session. Blocks
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.