public interface BallotConstrainerRuleApplicationSession extends OsidSession
This session provides methods to apply BallotConstrainers
to Ballots.
A Ballot
with multiple
BallotConstrainers
means any positive rule evaluation
across the constrainers result in an accessible Ballot.
Modifier and Type | Method and Description |
---|---|
void |
assignBallotConstrainerToBallot(Id ballotConstrainerId,
Id ballotId)
Adds an existing
BallotConstrainer to a Ballot. |
boolean |
canAssignBallotConstrainers()
Tests if this user can alter ballot constrainer/ballot mappings.
|
boolean |
canSequenceBallotConstrainers()
Tests if this user can order
BallotConstrainers. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
void |
moveBallotConstrainerAhead(Id ballotConstrainerId,
Id ballotId,
Id referenceId)
Reorders ballot constrainer for a ballot by moving the specified
ballot constrainer in front of a reference ballot constrainer.
|
void |
moveBallotConstrainerBehind(Id ballotConstrainerId,
Id ballotId,
Id referenceId)
Reorders ballot constrainer for a ballot by moving the specified
ballot constrainer behind a reference ballot constrainer.
|
void |
orderBallotConstrainers(Id[] ballotConstrainerIds,
Id ballotId)
Reorders a set of ballot constrainers for a ballot
|
void |
unassignBallotConstrainerFromBallot(Id ballotConstrainerId,
Id ballotId)
Removes a
BallotConstrainer from a Ballot. |
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 canAssignBallotConstrainers()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. void assignBallotConstrainerToBallot(Id ballotConstrainerId, Id ballotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainer
to a Ballot.
ballotConstrainerId
- the Id
of the
BallotConstrainer
ballotId
- the Id
of the Ballot
AlreadyExistsException
- ballotConstrainerId
is already applied to ballotId
NotFoundException
- ballotConstrainerId
or ballotId
not foundNullArgumentException
- ballotConstrainerId
or ballotId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignBallotConstrainerFromBallot(Id ballotConstrainerId, Id ballotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainer
from a Ballot.
ballotConstrainerId
- the Id
of the
BallotConstrainer
ballotId
- the Id
of the Ballot
NotFoundException
- ballotConstrainerId
or ballotId
not found or
ballotConstrainerId
not applied to ballotId
NullArgumentException
- ballotConstrainerId
or ballotId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canSequenceBallotConstrainers()
BallotConstrainers.
A
return of true does not guarantee successful authorization. A return
of false indicates that it is known sequencing operations will result
in a PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer sequencing operations to an
unauthorized user. false
if BallotConstrainer
ordering is not authorized, true
otherwisemandatory
- This method must be implemented. void moveBallotConstrainerAhead(Id ballotConstrainerId, Id ballotId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ballotConstrainerId
- the Id
of a
BallotConstrainer
ballotId
- the Id
of a Ballot
referenceId
- the reference ballot constrainer Id
NotFoundException
- ballotConstrainerId,
ballotId,
or referenceId
not found or,
ballotConstrainerId
or referenceId
not related to ballotId
NullArgumentException
- ballotConstrainerId,
ballotId,
or referenceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void moveBallotConstrainerBehind(Id ballotConstrainerId, Id ballotId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ballotConstrainerId
- the Id
of a
BallotConstrainer
ballotId
- the Id
of a Ballot
referenceId
- the reference ballot constrainer Id
NotFoundException
- ballotConstrainerId,
ballotId,
or referenceId
not found or,
ballotConstrainerId
or referenceId
not related to ballotId
NullArgumentException
- ballotConstrainerId,
ballotId,
or referenceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void orderBallotConstrainers(Id[] ballotConstrainerIds, Id ballotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ballotConstrainerIds
- the Ids
for a set of
BallotConstrainer
ballotId
- the Id
of a Ballot
NotFoundException
- ballotId
not found
or, a ballotConstrainerId
not related to
ballotId
NullArgumentException
- ballotConstrainerIds
or ballotId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.