public interface BallotConstrainerPollsAssignmentSession extends OsidSession
This session provides methods to re-assign BallotConstrainer
to Polls
mappings. A BallotConstrainer
may appear in multiple Polls
objects and removing
the last reference to a BallotConstrainer
is the equivalent
of deleting it. Each Polls
may have its own authorizations
governing who is allowed to operate on it.
Adding a reference of a BallotConstrainer
to another
Polls
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignBallotConstrainerToPolls(Id ballotConstrainerId,
Id pollsId)
Adds an existing
BallotConstrainer to a Polls. |
boolean |
canAssignBallotConstrainers()
Tests if this user can alter ballot constrainer/polls mappings.
|
boolean |
canAssignBallotConstrainersToPolls(Id pollsId)
Tests if this user can alter ballot constrainer/polls mappings.
|
IdList |
getAssignablePollsIds(Id pollsId)
Gets a list of polls including and under the given polls node in which
any ballot constrainer can be assigned.
|
IdList |
getAssignablePollsIdsForBallotConstrainer(Id pollsId,
Id ballotConstrainerId)
Gets a list of polls including and under the given polls node in which
a specific ballot constrainer can be assigned.
|
void |
reassignBallotConstrainerToPolls(Id ballotConstrainerId,
Id fromPollsId,
Id toPollsId)
Moves a
BallotConstrainer from one Polls
to another. |
void |
unassignBallotConstrainerFromPolls(Id ballotConstrainerId,
Id pollsId)
Removes a
BallotConstrainer from a Polls. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
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. boolean canAssignBallotConstrainersToPolls(Id pollsId)
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup 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 getAssignablePollsIdsForBallotConstrainer(Id pollsId, Id ballotConstrainerId) throws OperationFailedException
pollsId
- the Id
of the Polls
ballotConstrainerId
- the Id
of the
BallotConstrainer
Ids
NullArgumentException
- pollsId
or
ballotConstrainerId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignBallotConstrainerToPolls(Id ballotConstrainerId, Id pollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainer
to a Polls.
ballotConstrainerId
- the Id
of the
BallotConstrainer
pollsId
- the Id
of the Polls
AlreadyExistsException
- ballotConstrainerId
is already assigned to pollsId
NotFoundException
- ballotConstrainerId
or pollsId
not foundNullArgumentException
- ballotConstrainerId
or pollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignBallotConstrainerFromPolls(Id ballotConstrainerId, Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainer
from a Polls.
ballotConstrainerId
- the Id
of the
BallotConstrainer
pollsId
- the Id
of the Polls
NotFoundException
- ballotConstrainerId
or pollsId
not found or
ballotConstrainerId
not assigned to pollsId
NullArgumentException
- ballotConstrainerId
or pollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignBallotConstrainerToPolls(Id ballotConstrainerId, Id fromPollsId, Id toPollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainer
from one Polls
to another. Mappings to other Polls
are unaffected.ballotConstrainerId
- the Id
of the
BallotConstrainer
fromPollsId
- the Id
of the current Polls
toPollsId
- the Id
of the destination
Polls
NotFoundException
- ballotConstrainerId,
fromPollsId,
or toPollsId
not found or
ballotConstrainerId
not mapped to
fromPollsId
NullArgumentException
- ballotConstrainerId,
fromPollsId,
or toPollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.