public interface BallotConstrainerEnablerPollsAssignmentSession extends OsidSession
This session provides methods to re-assign
BallotConstrainerEnabler
to Polls
mappings. A
BallotConstrainerEnabler
may appear in multiple
Polls
objects and removing the last reference to a
BallotConstrainerEnabler
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 BallotConstrainerEnabler
to
another Polls
is not a copy operation (eg: does not change
its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId,
Id pollsId)
Adds an existing
BallotConstrainerEnabler to a
Polls. |
boolean |
canAssignBallotConstrainerEnablers()
Tests if this user can alter ballot constrainer enabler/polls
mappings.
|
boolean |
canAssignBallotConstrainerEnablersToPolls(Id pollsId)
Tests if this user can alter ballot constrainer enabler/polls
mappings.
|
IdList |
getAssignablePollsIds(Id pollsId)
Gets a list of polls including and under the given polls node in which
any ballot constrainer enabler can be assigned.
|
IdList |
getAssignablePollsIdsForBallotConstrainerEnabler(Id pollsId,
Id ballotConstrainerEnablerId)
Gets a list of polls including and under the given polls node in which
a specific ballot constrainer enabler can be assigned.
|
void |
reassignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId,
Id fromPollsId,
Id toPollsId)
Moves a
BallotConstrainerEnabler from one Polls
to another. |
void |
unassignBallotConstrainerEnablerFromPolls(Id ballotConstrainerEnablerId,
Id pollsId)
Removes a
BallotConstrainerEnabler from a Polls. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignBallotConstrainerEnablers()
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 canAssignBallotConstrainerEnablersToPolls(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 getAssignablePollsIdsForBallotConstrainerEnabler(Id pollsId, Id ballotConstrainerEnablerId) throws OperationFailedException
pollsId
- the Id
of the Polls
ballotConstrainerEnablerId
- the Id
of the
BallotConstrainerEnabler
Ids
NullArgumentException
- pollsId
or
ballotConstrainerEnablerId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId, Id pollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainerEnabler
to a
Polls.
ballotConstrainerEnablerId
- the Id
of the
BallotConstrainerEnabler
pollsId
- the Id
of the Polls
AlreadyExistsException
-
ballotConstrainerEnablerId
is already assigned to
pollsId
NotFoundException
- ballotConstrainerEnablerId
or pollsId
not foundNullArgumentException
-
ballotConstrainerEnablerId
or pollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignBallotConstrainerEnablerFromPolls(Id ballotConstrainerEnablerId, Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainerEnabler
from a Polls.
ballotConstrainerEnablerId
- the Id
of the
BallotConstrainerEnabler
pollsId
- the Id
of the Polls
NotFoundException
- ballotConstrainerEnablerId
or pollsId
not found or
ballotConstrainerEnablerId
not assigned to
pollsId
NullArgumentException
-
ballotConstrainerEnablerId
or pollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId, Id fromPollsId, Id toPollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
BallotConstrainerEnabler
from one Polls
to another. Mappings to other Polls
are
unaffected.ballotConstrainerEnablerId
- the Id
of the
BallotConstrainerEnabler
fromPollsId
- the Id
of the current Polls
toPollsId
- the Id
of the destination
Polls
NotFoundException
- ballotConstrainerEnablerId,
fromPollsId,
or toPollsId
not found or
ballotConstrainerEnablerId
not mapped to
fromPollsId
NullArgumentException
-
BallotConstrainerEnablerId, fromPollsId,
or
toPollsId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.