public interface PostLookupSession extends OsidSession
This session defines methods for retrieving posts. A Post
is a scheduled payer listed in a business. A Post
is derived from a Payer and maps to an offering time and
registered students.
This lookup session defines several views:
Posts
with the PostAdminSession. The methods useFederatedBusinessView() and
useIsolatedBusinessView() behave as a radio group and one should
be selected before invoking any lookup methods.
Payers may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Payer.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupPosts()
Tests if this user can perform
Post lookups. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
Post |
getPost(Id postId)
Gets the
Post specified by its Id. |
PostList |
getPosts()
Gets all
Posts. |
PostList |
getPostsByDate(DateTime from,
DateTime to)
Gets a
PostList posted between the given date range
inclusive. |
PostList |
getPostsByFiscalPeriod(Id fiscalPeriodId)
Gets a
PostList for the given fiscal period. |
PostList |
getPostsByGenusType(Type postGenusType)
Gets a
PostList corresponding to the given post genus
Type which does not include posts of types derived from
the specified Type. |
PostList |
getPostsByIds(IdList postIds)
Gets a
PostList corresponding to the given
IdList. |
PostList |
getPostsByParentGenusType(Type postGenusType)
Gets a
PostList corresponding to the given payer genus
Type and include any additional posts with genus types
derived from the specified Type. |
PostList |
getPostsByRecordType(Type postRecordType)
Gets a
PostList containing the given post record
Type. |
void |
useComparativePostView()
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 |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
void |
usePlenaryPostView()
A complete view of the
Post returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBusinessId()
Business Id associated with
this session. Business Id associated with this sessionmandatory - This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupPosts()
Post 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 not offer lookup operations to unauthorized
users. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativePostView()
mandatory - This method is must be implemented. void usePlenaryPostView()
Post 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 useFederatedBusinessView()
mandatory - This method is must be implemented. void useIsolatedBusinessView()
mandatory - This method is must be implemented. Post getPost(Id postId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Post specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Post
may have a different Id than requested, such as the
case where a duplicate Id was assigned to a
Payer and retained for compatibility.postId - the Id of the Post to
retrieve Post NotFoundException - no Post found with
the given Id NullArgumentException - postId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPostsByIds(IdList postIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
PostList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
posts 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 Posts may be omitted from the list and may
present the elements in any order including returning a unique set.postIds - the list of Ids to retrieve Post listNotFoundException - an Id was not foundNullArgumentException - postIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPostsByGenusType(Type postGenusType) throws OperationFailedException, PermissionDeniedException
PostList corresponding to the given post genus
Type which does not include posts of types derived from
the specified Type. In plenary mode, the returned list
contains all known posts or an error results. Otherwise, the returned
list may contain only those posts that are accessible through this
session.postGenusType - a post genus type Post listNullArgumentException - postGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPostsByParentGenusType(Type postGenusType) throws OperationFailedException, PermissionDeniedException
PostList corresponding to the given payer genus
Type and include any additional posts with genus types
derived from the specified Type. In plenary mode, the
returned list contains all known posts or an error results. Otherwise,
the returned list may contain only those posts that are accessible
through this session.postGenusType - a post genus type Post listNullArgumentException - postGenusType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPostsByRecordType(Type postRecordType) throws OperationFailedException, PermissionDeniedException
PostList containing the given post record
Type. In plenary mode, the returned list contains all known
payers or an error results. Otherwise, the returned list may contain
only those posts that are accessible through this session.postRecordType - a post record type Post listNullArgumentException - postRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPostsByFiscalPeriod(Id fiscalPeriodId) throws OperationFailedException, PermissionDeniedException
PostList for the given fiscal period. In plenary
mode, the returned list contains all known payers or an error results.
Otherwise, the returned list may contain only those posts that are
accessible through this session.fiscalPeriodId - a post record type Post listNullArgumentException - fiscalPeriodId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPostsByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
PostList posted between the given date range
inclusive. In plenary mode, the returned list contains all known
payers or an error results. Otherwise, the returned list may contain
only those posts that are accessible through this session.from - start of date rangeto - end of date range Post listInvalidArgumentException - from is
greater than to NullArgumentException - from or
to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PostList getPosts() throws OperationFailedException, PermissionDeniedException
Posts. In plenary mode, the returned list
contains all known posts or an error results. Otherwise, the returned
list may contain only those payers that are accessible through this
session. Posts OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.