Interface RaceProcessorAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RaceProcessorAdminSession extends OsidSession

This session creates and removes race processors. The data for create and update is provided via the RaceProcessorForm .

  • 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.
    • canCreateRaceProcessor

      boolean canCreateRaceProcessor()
      Tests if this user can create race processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a RaceProcessor 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 RaceProcessor creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateRaceProcessorWithRecordTypes

      boolean canCreateRaceProcessorWithRecordTypes(Type[] raceProcessorRecordTypes)
      Tests if this user can create a single RaceProcessor using the desired record types. While VotingRulesManager.getRaceProcessorRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific RaceProcessor . Providing an empty array tests if a RaceProcessor can be created with no records.
      Parameters:
      raceProcessorRecordTypes - array of race processor types
      Returns:
      true if RaceProcessor creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - raceProcessorRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getRaceProcessorFormForCreate

      RaceProcessorForm getRaceProcessorFormForCreate(Type[] raceProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the race processor form for creating new race processors. A new form should be requested for each create transaction.
      Parameters:
      raceProcessorRecordTypes - array of race processor types
      Returns:
      the race processor form
      Throws:
      NullArgumentException - raceProcessorRecordTypes 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.
    • createRaceProcessor

      Creates a new RaceProcessor .
      Parameters:
      raceProcessorForm - the form for this RaceProcessor
      Returns:
      the new RaceProcessor
      Throws:
      IllegalStateException - raceProcessorForm already used for a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - raceProcessorForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - raceProcessorForm did not originate from getRaceProcessorFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateRaceProcessors

      boolean canUpdateRaceProcessors()
      Tests if this user can update race processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a RaceProcessor 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 RaceProcessor modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRaceProcessorFormForUpdate

      RaceProcessorForm getRaceProcessorFormForUpdate(Id raceProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the race processor form for updating an existing race processor. A new race processor form should be requested for each update transaction.
      Parameters:
      raceProcessorId - the Id of the RaceProcessor
      Returns:
      the race processor form
      Throws:
      NotFoundException - raceProcessorId is not found
      NullArgumentException - raceProcessorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateRaceProcessor

      void updateRaceProcessor(RaceProcessorForm raceProcessorForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing race processor.
      Parameters:
      raceProcessorForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - raceProcessorForm already used for an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - raceProcessorForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - raceProcessorForm did not originate from getRaceProcessorFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteRaceProcessors

      boolean canDeleteRaceProcessors()
      Tests if this user can delete race processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a RaceProcessor 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 RaceProcessor deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteRaceProcessor

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

      boolean canManageRaceProcessorAliases()
      Tests if this user can manage Id aliases for race processors. 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 RaceProcessor aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasRaceProcessor

      void aliasRaceProcessor(Id raceProcessorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds a Id to a RaceProcessor for the purpose of creating compatibility. The primary Id of the RaceProcessor is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another race processor. it is reassigned to the given race processor Id .
      Parameters:
      raceProcessorId - the Id of a RaceProcessor
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - raceProcessorId not found
      NullArgumentException - raceProcessorId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.