Interface RaceConstrainerEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RaceConstrainerEnablerAdminSession extends OsidSession

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

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

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

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

      RaceConstrainerEnablerForm getRaceConstrainerEnablerFormForCreate(Type[] raceConstrainerEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the race constrainer enabler form for creating new race constrainer enablers. A new form should be requested for each create transaction.
      Parameters:
      raceConstrainerEnablerRecordTypes - array of race constrainer enabler record types
      Returns:
      the race constrainer enabler form
      Throws:
      NullArgumentException - raceConstrainerEnablerRecordTypes 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.
    • createRaceConstrainerEnabler

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

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

      RaceConstrainerEnablerForm getRaceConstrainerEnablerFormForUpdate(Id raceConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the race constrainer enabler form for updating an existing race constrainer enabler. A new race constrainer enabler form should be requested for each update transaction.
      Parameters:
      raceConstrainerEnablerId - the Id of the RaceConstrainerEnabler
      Returns:
      the race constrainer enabler form
      Throws:
      NotFoundException - raceConstrainerEnablerId is not found
      NullArgumentException - raceConstrainerEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateRaceConstrainerEnabler

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

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

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

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

      void aliasRaceConstrainerEnabler(Id raceConstrainerEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds a Id to a RaceConstrainerEnabler for the purpose of creating compatibility. The primary Id of the RaceConstrainerEnabler 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 constrainer enabler. it is reassigned to the given race constrainer enabler Id .
      Parameters:
      raceConstrainerEnablerId - the Id of a RaceConstrainerEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - raceConstrainerEnablerId not found
      NullArgumentException - raceConstrainerEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.