Interface BallotConstrainerEnablerPollsAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId, Id pollsId) Adds an existingBallotConstrainerEnablerto aPolls.booleanTests if this user can alter ballot constrainer enabler/polls mappings.booleanTests if this user can alter ballot constrainer enabler/polls mappings.getAssignablePollsIds(Id pollsId) Gets a list of polls including and under the given polls node in which any ballot constrainer enabler can be assigned.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.voidreassignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId, Id fromPollsId, Id toPollsId) Moves aBallotConstrainerEnablerfrom onePollsto another.voidunassignBallotConstrainerEnablerFromPolls(Id ballotConstrainerEnablerId, Id pollsId) Removes aBallotConstrainerEnablerfrom aPolls.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignBallotConstrainerEnablers
boolean canAssignBallotConstrainerEnablers()Tests if this user can alter ballot constrainer enabler/polls mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignBallotConstrainerEnablersToPolls
Tests if this user can alter ballot constrainer enabler/polls mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
pollsId- theIdof thePolls- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-pollsIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignablePollsIds
Gets a list of polls including and under the given polls node in which any ballot constrainer enabler can be assigned.- Parameters:
pollsId- theIdof thePolls- Returns:
- list of assignable polls
Ids - Throws:
NullArgumentException-pollsIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignablePollsIdsForBallotConstrainerEnabler
IdList getAssignablePollsIdsForBallotConstrainerEnabler(Id pollsId, Id ballotConstrainerEnablerId) throws OperationFailedException Gets a list of polls including and under the given polls node in which a specific ballot constrainer enabler can be assigned.- Parameters:
pollsId- theIdof thePollsballotConstrainerEnablerId- theIdof theBallotConstrainerEnabler- Returns:
- list of assignable polls
Ids - Throws:
NullArgumentException-pollsIdorballotConstrainerEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignBallotConstrainerEnablerToPolls
void assignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId, Id pollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingBallotConstrainerEnablerto aPolls.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnablerpollsId- theIdof thePolls- Throws:
AlreadyExistsException-ballotConstrainerEnablerIdis already assigned topollsIdNotFoundException-ballotConstrainerEnablerIdorpollsIdnot foundNullArgumentException-ballotConstrainerEnablerIdorpollsIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignBallotConstrainerEnablerFromPolls
void unassignBallotConstrainerEnablerFromPolls(Id ballotConstrainerEnablerId, Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aBallotConstrainerEnablerfrom aPolls.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnablerpollsId- theIdof thePolls- Throws:
NotFoundException-ballotConstrainerEnablerIdorpollsIdnot found orballotConstrainerEnablerIdnot assigned topollsIdNullArgumentException-ballotConstrainerEnablerIdorpollsIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignBallotConstrainerEnablerToPolls
void reassignBallotConstrainerEnablerToPolls(Id ballotConstrainerEnablerId, Id fromPollsId, Id toPollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aBallotConstrainerEnablerfrom onePollsto another. Mappings to otherPollsare unaffected.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnablerfromPollsId- theIdof the currentPollstoPollsId- theIdof the destinationPolls- Throws:
AlreadyExistsException-ballotConstrainerEnablerIdalready assigned totoPollsIdNotFoundException-ballotConstrainerEnablerId, fromPollsId, ortoPollsIdnot found orballotConstrainerEnablerIdnot mapped tofromPollsIdNullArgumentException-BallotConstrainerEnablerId, fromPollsId, ortoPollsIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-