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 .
-
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, 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
-
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.
-