Interface BallotConstrainerEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes ballot constrainer enablers. The data
for create and update is provided via the
BallotConstrainerEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasBallotConstrainerEnabler(Id ballotConstrainerEnablerId, Id aliasId) Adds anIdto aBallotConstrainerEnablerfor the purpose of creating compatibility.booleanTests if this user can create ballot constrainer enablers.booleancanCreateBallotConstrainerEnablerWithRecordTypes(Type[] ballotConstrainerEnablerRecordTypes) Tests if this user can create a singleBallotConstrainerEnablerusing the desired record types.booleanTests if this user can delete ballot constrainer enablers.booleanTests if this user can manageIdaliases for ballot constrainer enablers.booleanTests if this user can update ballot constrainer enablers.createBallotConstrainerEnabler(BallotConstrainerEnablerForm ballotConstrainerEnablerForm) Creates a newBallotConstrainerEnabler.voiddeleteBallotConstrainerEnabler(Id ballotConstrainerEnablerId) Deletes aBallotConstrainerEnabler.getBallotConstrainerEnablerFormForCreate(Type[] ballotConstrainerEnablerRecordTypes) Gets the ballot constrainer enabler form for creating new ballot constrainer enablers.getBallotConstrainerEnablerFormForUpdate(Id ballotConstrainerEnablerId) Gets the ballot constrainer enabler form for updating a existing ballot constrainer enabler.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.voidupdateBallotConstrainerEnabler(BallotConstrainerEnablerForm ballotConstrainerEnablerForm) Updates an existing ballot constrainer enabler.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.
-
canCreateBallotConstrainerEnabler
boolean canCreateBallotConstrainerEnabler()Tests if this user can create ballot constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aBallotConstrainerEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifBallotConstrainerEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateBallotConstrainerEnablerWithRecordTypes
boolean canCreateBallotConstrainerEnablerWithRecordTypes(Type[] ballotConstrainerEnablerRecordTypes) Tests if this user can create a singleBallotConstrainerEnablerusing the desired record types. WhileVotingRulesManager.getBallotConstrainerEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificBallotConstrainerEnabler. Providing an empty array tests if aBallotConstrainerEnablercan be created with no records.- Parameters:
ballotConstrainerEnablerRecordTypes- array of ballot constrainer enabler record types- Returns:
trueifBallotConstrainerEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-ballotConstrainerEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getBallotConstrainerEnablerFormForCreate
BallotConstrainerEnablerForm getBallotConstrainerEnablerFormForCreate(Type[] ballotConstrainerEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the ballot constrainer enabler form for creating new ballot constrainer enablers. A new form should be requested for each create transaction.- Parameters:
ballotConstrainerEnablerRecordTypes- array of ballot constrainer enabler record types- Returns:
- the ballot constrainer enabler form
- Throws:
NullArgumentException-ballotConstrainerEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createBallotConstrainerEnabler
BallotConstrainerEnabler createBallotConstrainerEnabler(BallotConstrainerEnablerForm ballotConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newBallotConstrainerEnabler.- Parameters:
ballotConstrainerEnablerForm- the form for thisBallotConstrainerEnabler- Returns:
- the new
BallotConstrainerEnabler - Throws:
IllegalStateException-ballotConstrainerEnablerFormalready used for a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-ballotConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-ballotConstrainerEnablerFormdid not originate fromgetBallotConstrainerEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateBallotConstrainerEnablers
boolean canUpdateBallotConstrainerEnablers()Tests if this user can update ballot constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aBallotConstrainerEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifBallotConstrainerEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getBallotConstrainerEnablerFormForUpdate
BallotConstrainerEnablerForm getBallotConstrainerEnablerFormForUpdate(Id ballotConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the ballot constrainer enabler form for updating a existing ballot constrainer enabler. A new ballot constrainer enabler form should be requested for each update transaction.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnabler- Returns:
- the ballot constrainer enabler form
- Throws:
NotFoundException-ballotConstrainerEnablerIdis not foundNullArgumentException-ballotConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateBallotConstrainerEnabler
void updateBallotConstrainerEnabler(BallotConstrainerEnablerForm ballotConstrainerEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing ballot constrainer enabler.- Parameters:
ballotConstrainerEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-ballotConstrainerEnablerFormalready used for an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-ballotConstrainerEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-ballotConstrainerEnablerFormdid not originate fromgetBallotConstrainerEnablerFormFoUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteBallotConstrainerEnablers
boolean canDeleteBallotConstrainerEnablers()Tests if this user can delete ballot constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aBallotConstrainerEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifBallotConstrainerEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteBallotConstrainerEnabler
void deleteBallotConstrainerEnabler(Id ballotConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aBallotConstrainerEnabler.- Parameters:
ballotConstrainerEnablerId- theIdof theBallotConstrainerEnablerto remove- Throws:
NotFoundException-ballotConstrainerEnablerIdnot foundNullArgumentException-ballotConstrainerEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageBallotConstrainerEnablerAliases
boolean canManageBallotConstrainerEnablerAliases()Tests if this user can manageIdaliases for ballot constrainer enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifBallotConstrainerEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasBallotConstrainerEnabler
void aliasBallotConstrainerEnabler(Id ballotConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aBallotConstrainerEnablerfor the purpose of creating compatibility. The primaryIdof theBallotConstrainerEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another ballot constrainer enabler. it is reassigned to the given ballot constrainer enablerId.- Parameters:
ballotConstrainerEnablerId- theIdof aBallotConstrainerEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-ballotConstrainerEnablerIdnot foundNullArgumentException-ballotConstrainerEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-