Interface BallotConstrainerEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BallotConstrainerEnablerAdminSession extends OsidSession

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

  • Method Details

    • getPollsId

      Id getPollsId()
      Gets the Polls Id associated with this session.
      Returns:
      the Polls Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPolls

      Gets the Polls associated with this session.
      Returns:
      the polls
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 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.
      Returns:
      false if BallotConstrainerEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateBallotConstrainerEnablerWithRecordTypes

      boolean canCreateBallotConstrainerEnablerWithRecordTypes(Type[] ballotConstrainerEnablerRecordTypes)
      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.
      Parameters:
      ballotConstrainerEnablerRecordTypes - array of ballot constrainer enabler record types
      Returns:
      true if BallotConstrainerEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - ballotConstrainerEnablerRecordTypes is null
      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 - ballotConstrainerEnablerRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - 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 new BallotConstrainerEnabler .
      Parameters:
      ballotConstrainerEnablerForm - the form for this BallotConstrainerEnabler
      Returns:
      the new BallotConstrainerEnabler
      Throws:
      IllegalStateException - ballotConstrainerEnablerForm already used for a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - ballotConstrainerEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - ballotConstrainerEnablerForm did not originate from getBallotConstrainerEnablerFormForCreate()
      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 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.
      Returns:
      false if BallotConstrainerEnabler modification is not authorized, true otherwise
      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 - the Id of the BallotConstrainerEnabler
      Returns:
      the ballot constrainer enabler form
      Throws:
      NotFoundException - ballotConstrainerEnablerId is not found
      NullArgumentException - ballotConstrainerEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - ballotConstrainerEnablerForm already used for an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - ballotConstrainerEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - ballotConstrainerEnablerForm did not originate from getBallotConstrainerEnablerFormFoUpdate()
      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 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.
      Returns:
      false if BallotConstrainerEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteBallotConstrainerEnabler

      void deleteBallotConstrainerEnabler(Id ballotConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a BallotConstrainerEnabler .
      Parameters:
      ballotConstrainerEnablerId - the Id of the BallotConstrainerEnabler to remove
      Throws:
      NotFoundException - ballotConstrainerEnablerId not found
      NullArgumentException - ballotConstrainerEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageBallotConstrainerEnablerAliases

      boolean canManageBallotConstrainerEnablerAliases()
      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.
      Returns:
      false if BallotConstrainerEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasBallotConstrainerEnabler

      void aliasBallotConstrainerEnabler(Id ballotConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      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 .
      Parameters:
      ballotConstrainerEnablerId - the Id of a BallotConstrainerEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - ballotConstrainerEnablerId not found
      NullArgumentException - ballotConstrainerEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.