Interface BallotConstrainerEnablerRuleApplicationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to apply
BallotConstrainerEnablers to BallotConstrainers. A
BallotConstrainer with multiple BallotConstrainerEnablers means
any positive rule evaluation across the enablers result in an effective
BallotConstrainer.
Like all OsidSessions,
BallotConstrainerEnablerRuleApplicationSessions are dedicated to single
processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignBallotConstrainerEnablerToBallotConstrainer(Id ballotConstrainerEnablerId, Id ballotConstrainerId) Adds an existingBallotConstrainerEnablerto aBallotConstrainer.booleanTests if this user can alter ballot constrainer enabler/ballot constrainer mappings.booleanTests if this user can orderBallotConstrainerEnablers.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.voidmoveBallotConstrainerEnablerAhead(Id ballotConstrainerEnablerId, Id ballotConstrainerId, Id referenceId) Reorders ballot constrainer enablers for a ballot constrainer by moving the specified ballot constrainer enabler in front of a reference ballot constrainer enabler.voidmoveBallotConstrainerEnablerBehind(Id ballotConstrainerEnablerId, Id ballotConstrainerId, Id referenceId) Reorders ballot constrainer enablers for a ballot constrainer by moving the specified ballot constrainer enabler behind a reference ballot constrainer enabler.voidorderBallotConstrainerEnablers(Id[] ballotConstrainerEnablerIds, Id ballotConstrainerId) Reorders a set of ballot constrainer enablers for a ballot constrainer.voidunassignBallotConstrainerEnablerFromBallotConstrainer(Id ballotConstrainerEnablerId, Id ballotConstrainerId) Removes aBallotConstrainerEnablerfrom aBallotConstrainer.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
getPollsId
Id getPollsId()Gets thePollsIdassociated with this session.- Returns:
- the
Polls Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPolls
Gets thePollsassociated with this session.- Returns:
- the polls
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canAssignBallotConstrainerEnablers
boolean canAssignBallotConstrainerEnablers()Tests if this user can alter ballot constrainer enabler/ballot constrainer 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.
-
assignBallotConstrainerEnablerToBallotConstrainer
void assignBallotConstrainerEnablerToBallotConstrainer(Id ballotConstrainerEnablerId, Id ballotConstrainerId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingBallotConstrainerEnablerto aBallotConstrainer.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnablerballotConstrainerId- theIdof theBallotConstrainer- Throws:
AlreadyExistsException-ballotConstrainerEnablerIdis already applied toballotConstrainerIdNotFoundException-ballotConstrainerEnablerIdorballotConstrainerIdnot foundNullArgumentException-ballotConstrainerEnablerIdorballotConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignBallotConstrainerEnablerFromBallotConstrainer
void unassignBallotConstrainerEnablerFromBallotConstrainer(Id ballotConstrainerEnablerId, Id ballotConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aBallotConstrainerEnablerfrom aBallotConstrainer.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnablerballotConstrainerId- theIdof theBallotConstrainer- Throws:
NotFoundException-ballotConstrainerEnablerIdorballotConstrainerIdnot found orballotConstrainerEnablerIdnot applied toballotConstrainerIdNullArgumentException-ballotConstrainerEnablerIdorballotConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSequenceBallotConstrainerEnablers
boolean canSequenceBallotConstrainerEnablers()Tests if this user can orderBallotConstrainerEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.- Returns:
falseifBallotConstrainerEnablerordering is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
moveBallotConstrainerEnablerAhead
void moveBallotConstrainerEnablerAhead(Id ballotConstrainerEnablerId, Id ballotConstrainerId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders ballot constrainer enablers for a ballot constrainer by moving the specified ballot constrainer enabler in front of a reference ballot constrainer enabler.- Parameters:
ballotConstrainerEnablerId- theIdof aBallotConstrainerEnablerballotConstrainerId- theIdof aBallotConstrainerreferenceId- the reference ballot constrainer enablerId- Throws:
NotFoundException-ballotConstrainerEnablerId, ballotConstrainerId, orreferenceIdnot found or,ballotConstrainerIdorreferenceIdnot related toballotConstrainerIdNullArgumentException-ballotConstrainerEnablerId, ballotConstrainerId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
moveBallotConstrainerEnablerBehind
void moveBallotConstrainerEnablerBehind(Id ballotConstrainerEnablerId, Id ballotConstrainerId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders ballot constrainer enablers for a ballot constrainer by moving the specified ballot constrainer enabler behind a reference ballot constrainer enabler.- Parameters:
ballotConstrainerEnablerId- theIdof aBallotConstrainerEnablerballotConstrainerId- theIdof aBallotConstrainerreferenceId- the reference ballot constrainer enablerId- Throws:
NotFoundException-ballotConstrainerEnablerId, ballotConstrainerId, orreferenceIdnot found or,ballotConstrainerIdorreferenceIdnot related toballotConstrainerIdNullArgumentException-ballotConstrainerEnablerId, ballotConstrainerId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
orderBallotConstrainerEnablers
void orderBallotConstrainerEnablers(Id[] ballotConstrainerEnablerIds, Id ballotConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders a set of ballot constrainer enablers for a ballot constrainer.- Parameters:
ballotConstrainerEnablerIds- theIdsfor a set ofBallotConstrainerEnablersballotConstrainerId- theIdof aBallotConstrainer- Throws:
NotFoundException-ballotConstrainerIdnot found or, aballotConstrainerEnablerIdnot related toballotConstrainerIdNullArgumentException-ballotConstrainerEnablerIdsorballotConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-