public interface BallotConstrainerLookupSession extends OsidSession
This session provides methods for retrieving BallotConstrainers.
This session defines views that offer differing behaviors when retrieving multiple objects.
BallotConstrainers
with the
BallotConstrainerAdminSession.
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 useFederatedPollsView()
and
useIsolatedPollsView()
behave as a radio group and one should be
selected before invoking the methods in this session.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupBallotConstrainers()
Tests if this user can perform
BallotConstrainers
lookups. |
BallotConstrainer |
getBallotConstrainer(Id ballotConstrainerId)
Gets the
BallotConstrainer specified by its Id. |
BallotConstrainerList |
getBallotConstrainers()
Gets all
BallotConstrainers. |
BallotConstrainerList |
getBallotConstrainersByGenusType(Type ballotConstrainerGenusType)
Gets a
BallotConstrainerList corresponding to the given
ballot constrainer genus Type which does not include
ballot constrainer of genus types derived from the specified
Type. |
BallotConstrainerList |
getBallotConstrainersByIds(IdList ballotConstrainerIds)
Gets a
BallotConstrainerList corresponding to the given
IdList. |
BallotConstrainerList |
getBallotConstrainersByParentGenusType(Type ballotConstrainerGenusType)
Gets a
BallotConstrainerList corresponding to the given
ballot constrainer genus Type and include any
additional ballot constrainer with genus types derived from the
specified Type. |
BallotConstrainerList |
getBallotConstrainersByRecordType(Type ballotConstrainerRecordType)
Gets a
BallotConstrainerList containing the given
ballot constrainer record Type. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
void |
useActiveBallotConstrainerView()
Only active ballot constrainers are returned by methods in this
session.
|
void |
useAnyStatusBallotConstrainerView()
All active and inactive ballot constrainers are returned by methods in
this session.
|
void |
useComparativeBallotConstrainerView()
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 |
useFederatedPollsView()
Federates the view for methods in this session.
|
void |
useIsolatedPollsView()
Isolates the view for methods in this session.
|
void |
usePlenaryBallotConstrainerView()
A complete view of the
BallotConstrainer returns is
desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPollsId()
Polls
Id
associated with this
session. Polls Id
associated with this sessionmandatory
- This method must be implemented. Polls getPolls() throws OperationFailedException, PermissionDeniedException
Polls
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupBallotConstrainers()
BallotConstrainers
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 useComparativeBallotConstrainerView()
mandatory
- This method is must be implemented. void usePlenaryBallotConstrainerView()
BallotConstrainer
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 useFederatedPollsView()
mandatory
- This method is must be implemented. void useIsolatedPollsView()
mandatory
- This method is must be implemented. void useActiveBallotConstrainerView()
mandatory
- This method is must be implemented. void useAnyStatusBallotConstrainerView()
mandatory
- This method is must be implemented. BallotConstrainer getBallotConstrainer(Id ballotConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainer
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
BallotConstrainer
may have a different Id
than
requested, such as the case where a duplicate Id
was
assigned to a BallotConstrainer
and retained for
compatibility.
In active mode, ballot constrainers are returned that are currently
active. In any status mode, active and inactive ballot constrainers
are returned.ballotConstrainerId
- Id
of the
BallotConstrainer
NotFoundException
- ballotConstrainerId
not foundNullArgumentException
- ballotConstrainerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. BallotConstrainerList getBallotConstrainersByIds(IdList ballotConstrainerIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainerList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
ballot constrainer 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 BallotConstrainers
may be
omitted from the list and may present the elements in any order
including returning a unique set.
In active mode, ballot constrainers are returned that are currently
active. In any status mode, active and inactive ballot constrainers
are returned.ballotConstrainerIds
- the list of Ids
to
retrieve BallotConstrainer
listNotFoundException
- an Id
was not foundNullArgumentException
- ballotConstrainerIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BallotConstrainerList getBallotConstrainersByGenusType(Type ballotConstrainerGenusType) throws OperationFailedException, PermissionDeniedException
BallotConstrainerList
corresponding to the given
ballot constrainer genus Type
which does not include
ballot constrainer of genus types derived from the specified
Type.
In plenary mode, the returned list contains all known
ballot constrainer or an error results. Otherwise, the returned list
may contain only those ballot constrainer that are accessible through
this session.
In active mode, ballot constrainers are returned that are currently
active. In any status mode, active and inactive ballot constrainers
are returned.ballotConstrainerGenusType
- a ballot constrainer genus type BallotConstrainer
listNullArgumentException
-
ballotConstrainerGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BallotConstrainerList getBallotConstrainersByParentGenusType(Type ballotConstrainerGenusType) throws OperationFailedException, PermissionDeniedException
BallotConstrainerList
corresponding to the given
ballot constrainer genus Type
and include any
additional ballot constrainer with genus types derived from the
specified Type.
In plenary mode, the returned list contains all known
ballot constrainer or an error results. Otherwise, the returned list
may contain only those ballot constrainer that are accessible through
this session.
In active mode, ballot constrainers are returned that are currently
active. In any status mode, active and inactive ballot constrainers
are returned.ballotConstrainerGenusType
- a ballot constrainer genus type BallotConstrainer
listNullArgumentException
-
ballotConstrainerGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BallotConstrainerList getBallotConstrainersByRecordType(Type ballotConstrainerRecordType) throws OperationFailedException, PermissionDeniedException
BallotConstrainerList
containing the given
ballot constrainer record Type.
In plenary mode, the returned list contains all known
ballot constrainer or an error results. Otherwise, the returned list
may contain only those ballot constrainer that are accessible through
this session.
In active mode, ballot constrainers are returned that are currently
active. In any status mode, active and inactive ballot constrainers
are returned.ballotConstrainerRecordType
- a ballot constrainer record type BallotConstrainer
listNullArgumentException
-
ballotConstrainerRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BallotConstrainerList getBallotConstrainers() throws OperationFailedException, PermissionDeniedException
BallotConstrainers.
In plenary mode, the returned list contains all known ballot
constrainer or an error results. Otherwise, the returned list may
contain only those ballot constrainer that are accessible through this
session.
In active mode, ballot constrainers are returned that are currently
active. In any status mode, active and inactive ballot constrainers
are returned. BallotConstrainer
listOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.