OSID Logo
OSID Specifications
voting rules package
Version 3.1.0
Interfaceosid.voting.rules.BallotConstrainerEnablerAdminSession
Implementsosid.OsidSession
Used Byosid.voting.rules.VotingRulesManager
osid.voting.rules.VotingRulesProxyManager
Description

This session creates and removes ballot constrainer enablers. The data for create and update is provided via the BallotConstrainerEnablerForm.

MethodgetPollsId
Description

Gets the Polls Id associated with this session.

Returnosid.id.Id the Polls Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Polls the polls
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateBallotConstrainerEnabler
Description

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 a BallotConstrainerEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if BallotConstrainerEnabler creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateBallotConstrainerEnablerWithRecordTypes
Description

Tests if this user can create a single BallotConstrainerEnabler using the desired record types. While VotingRulesManager.getBallotConstrainerEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific BallotConstrainerEnabler. Providing an empty array tests if a BallotConstrainerEnabler can be created with no records.

Parametersosid.type.Type[]ballotConstrainerEnablerRecordTypes array of ballot constrainer enabler record types
Returnboolean true if BallotConstrainerEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT ballotConstrainerEnablerRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetBallotConstrainerEnablerFormForCreate
Description

Gets the ballot constrainer enabler form for creating new ballot constrainer enablers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]ballotConstrainerEnablerRecordTypes array of ballot constrainer enabler record types
Returnosid.voting.rules.BallotConstrainerEnablerForm the ballot constrainer enabler form
ErrorsNULL_ARGUMENT ballotConstrainerEnablerRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateBallotConstrainerEnabler
Description

Creates a new BallotConstrainerEnabler.

Parametersosid.voting.rules.BallotConstrainerEnablerFormballotConstrainerEnablerForm the form for this BallotConstrainerEnabler
Returnosid.voting.rules.BallotConstrainerEnabler the new BallotConstrainerEnabler
ErrorsILLEGAL_STATE ballotConstrainerEnablerForm already used for a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT ballotConstrainerEnablerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED ballotConstrainerEnablerForm did not originate from getBallotConstrainerEnablerFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateBallotConstrainerEnablers
Description

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 a BallotConstrainerEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if BallotConstrainerEnabler modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetBallotConstrainerEnablerFormForUpdate
Description

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.

Parametersosid.id.IdballotConstrainerEnablerId the Id of the BallotConstrainerEnabler
Returnosid.voting.rules.BallotConstrainerEnablerForm the ballot constrainer enabler form
ErrorsNOT_FOUND ballotConstrainerEnablerId is not found
NULL_ARGUMENT ballotConstrainerEnablerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateBallotConstrainerEnabler
Description

Updates an existing ballot constrainer enabler.

Parametersosid.voting.rules.BallotConstrainerEnablerFormballotConstrainerEnablerForm the form containing the elements to be updated
ErrorsILLEGAL_STATE ballotConstrainerEnablerForm already used for an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT ballotConstrainerEnablerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED ballotConstrainerEnablerForm did not originate from getBallotConstrainerEnablerFormFoUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteBallotConstrainerEnablers
Description

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 a BallotConstrainerEnabler will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if BallotConstrainerEnabler deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteBallotConstrainerEnabler
Description

Deletes a BallotConstrainerEnabler.

Parametersosid.id.IdballotConstrainerEnablerId the Id of the BallotConstrainerEnabler to remove
ErrorsNOT_FOUND ballotConstrainerEnablerId not found
NULL_ARGUMENT ballotConstrainerEnablerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageBallotConstrainerEnablerAliases
Description

Tests if this user can manage Id aliases 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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if BallotConstrainerEnabler aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasBallotConstrainerEnabler
Description

Adds an Id to a BallotConstrainerEnabler for the purpose of creating compatibility. The primary Id of the BallotConstrainerEnabler is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another ballot constrainer enabler. it is reassigned to the given ballot constrainer enabler Id.

Parametersosid.id.IdballotConstrainerEnablerId the Id of a BallotConstrainerEnabler
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND ballotConstrainerEnablerId not found
NULL_ARGUMENT ballotConstrainerEnablerId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.