public interface BallotPollsAssignmentSession extends OsidSession
This session provides methods to re-assign Ballots
to
Polls.
A Ballot
may map to multiple
Polls
objects and removing the last reference to a Ballot
is the equivalent of deleting it. Each Polls
may
have its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Ballot
to another
Polls
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignBallotToPolls(Id ballotId,
Id pollsId)
Adds an existing
Ballot to a Polls. |
boolean |
canAssignBallots()
Tests if this user can alter ballot/polls mappings.
|
boolean |
canAssignBallotsToPolls(Id pollsId)
Tests if this user can alter ballot/polls mappings.
|
IdList |
getAssignablePollsIds(Id pollsId)
Gets a list of polls including and under the given polls node in which
any ballot can be assigned.
|
IdList |
getAssignablePollsIdsForBallot(Id pollsId,
Id ballotId)
Gets a list of polls including and under the given polls node in which
a specific ballot can be assigned.
|
void |
unassignBallotFromPolls(Id ballotId,
Id pollsId)
Removes a
Ballot from a Polls. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignBallots()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignBallotsToPolls(Id pollsId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.pollsId
- the Id
of the Polls
false
if mapping is not authorized, true
otherwiseNullArgumentException
- pollsId
is
null
mandatory
- This method must be implemented. IdList getAssignablePollsIds(Id pollsId) throws OperationFailedException
pollsId
- the Id
of the Polls
Ids
NullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignablePollsIdsForBallot(Id pollsId, Id ballotId) throws OperationFailedException
pollsId
- the Id
of the Polls
ballotId
- the Id
of the Ballot
Ids
NullArgumentException
- pollsId
or
ballotId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignBallotToPolls(Id ballotId, Id pollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Ballot
to a Polls.
ballotId
- the Id
of the Ballot
pollsId
- the Id
of the Polls
AlreadyExistsException
- ballotId
is
already assigned to pollsId
NotFoundException
- ballotId
or
pollsId
not foundNullArgumentException
- ballotId
or
pollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignBallotFromPolls(Id ballotId, Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ballot
from a Polls.
ballotId
- the Id
of the Ballot
pollsId
- the Id
of the Polls
NotFoundException
- ballotId
or
pollsId
not found or ballotId
not
assigned to pollsId
NullArgumentException
- ballotId
or
pollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.