public interface EntryLookupSession extends OsidSession
This session defines methods for retrieving entries.
This lookup session defines several views:
Entries
with the EntryAdminSession. The methods useFederatedBlogView() and
useIsolatedBlogView() behave as a radio group and one should be
selected before invoking any lookup methods.
Entries may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Entry.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupEntries()
Tests if this user can perform
Entry lookups. |
Blog |
getBlog()
Gets the
Blog associated with this session. |
Id |
getBlogId()
Gets the
Blog Id associated with this
session. |
EntryList |
getEntries()
Gets all
Entries. |
EntryList |
getEntriesByDate(DateTime from,
DateTime to)
Gets an
EntryList posted within the specified range
inclusive. |
EntryList |
getEntriesByDateForPoster(Id resourceId,
DateTime from,
DateTime to)
Gets an
EntryList for a poster resource Id
posted within the specified range inclusive. |
EntryList |
getEntriesByGenusType(Type entryGenusType)
Gets an
EntryList corresponding to the given entry
genus Type which does not include entries of types
derived from the specified Type. |
EntryList |
getEntriesByIds(IdList entryIds)
Gets an
EntryList corresponding to the given
IdList. |
EntryList |
getEntriesByParentGenusType(Type entryGenusType)
Gets an
EntryList corresponding to the given entry
genus Type and include any additional entries with
genus types derived from the specified Type. |
EntryList |
getEntriesByProvider(Id resourceId)
Gets an
EntryList for the given provider. |
EntryList |
getEntriesByRecordType(Type entryRecordType)
Gets an
EntryList containing the given entry record
Type. |
EntryList |
getEntriesForPoster(Id resourceId)
Gets an
EntryList for the given poster resource
Id. |
Entry |
getEntry(Id entryId)
Gets the
Entry specified by its Id. |
void |
useComparativeEntryView()
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 |
useFederatedBlogView()
Federates the view for methods in this session.
|
void |
useIsolatedBlogView()
Isolates the view for methods in this session.
|
void |
usePlenaryEntryView()
A complete view of the
Entry returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBlogId()
Blog Id associated with this
session. Blog Id associated with this sessionmandatory - This method must be implemented. Blog getBlog() throws OperationFailedException, PermissionDeniedException
Blog associated with this session. Blog associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupEntries()
Entry 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. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeEntryView()
mandatory - This method is must be implemented. void usePlenaryEntryView()
Entry 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 useFederatedBlogView()
mandatory - This method is must be implemented. void useIsolatedBlogView()
mandatory - This method is must be implemented. Entry getEntry(Id entryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Entry specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Entry
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
Entry and retained for compatibility.entryId - the Id of the Entry to
retrieve Entry NotFoundException - no Entry found with
the given Id NullArgumentException - entryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByIds(IdList entryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
EntryList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
entries 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 Entries may be omitted from the list and
may present the elements in any order including returning a unique
set.entryIds - the list of Ids to retrieve Entry list NotFoundException - an Id was not foundNullArgumentException - entryIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByGenusType(Type entryGenusType) throws OperationFailedException, PermissionDeniedException
EntryList corresponding to the given entry
genus Type which does not include entries of types
derived from the specified Type. In plenary mode, the
returned list contains all known entries or an error results.
Otherwise, the returned list may contain only those entries that are
accessible through this session.entryGenusType - an entry genus type Entry listNullArgumentException - entryGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByParentGenusType(Type entryGenusType) throws OperationFailedException, PermissionDeniedException
EntryList corresponding to the given entry
genus Type and include any additional entries with
genus types derived from the specified Type. In plenary
mode, the returned list contains all known entries or an error
results. Otherwise, the returned list may contain only those entries
that are accessible through this session.entryGenusType - an entry genus type Entry listNullArgumentException - entryGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByRecordType(Type entryRecordType) throws OperationFailedException, PermissionDeniedException
EntryList containing the given entry record
Type. In plenary mode, the returned list contains all
known entries or an error results. Otherwise, the returned list may
contain only those entries that are accessible through this session.entryRecordType - an entry record type Entry listNullArgumentException - entryRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
EntryList posted within the specified range
inclusive. In plenary mode, the returned list contains all known
entries or an error results. Otherwise, the returned list may contain
only those entries that are accessible through this session.from - starting dateto - ending date Entry listInvalidArgumentException - to is less
than from NullArgumentException - from or
to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
EntryList for the given poster resource
Id. In plenary mode, the returned list contains all known
entries or an error results. Otherwise, the returned list may contain
only those entries that are accessible through this session.resourceId - a poster Id Entry listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByDateForPoster(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
EntryList for a poster resource Id
posted within the specified range inclusive. In plenary mode,
the returned list contains all known entries or an error results.
Otherwise, the returned list may contain only those entries that are
accessible through this session.resourceId - a poster Id from - starting dateto - ending date Entry listInvalidArgumentException - to is less
than from NullArgumentException - resourceId, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntriesByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
EntryList for the given provider. In plenary
mode, the returned list contains all known entries or an error
results. Otherwise, the returned list may contain only those entries
that are accessible through this session.resourceId - a resource Id Entry listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. EntryList getEntries() throws OperationFailedException, PermissionDeniedException
Entries. In plenary mode, the returned list
contains all known entries or an error results. Otherwise, the
returned list may contain only those entries that are accessible
through this session. Entries OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.