Interface RaceProcessorAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes race processors. The data for create
and update is provided via the RaceProcessorForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasRaceProcessor(Id raceProcessorId, Id aliasId) Adds aIdto aRaceProcessorfor the purpose of creating compatibility.booleanTests if this user can create race processors.booleancanCreateRaceProcessorWithRecordTypes(Type[] raceProcessorRecordTypes) Tests if this user can create a singleRaceProcessorusing the desired record types.booleanTests if this user can delete race processors.booleanTests if this user can manageIdaliases for race processors.booleanTests if this user can update race processors.createRaceProcessor(RaceProcessorForm raceProcessorForm) Creates a newRaceProcessor.voiddeleteRaceProcessor(Id raceProcessorId) Deletes aRaceProcessor.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.getRaceProcessorFormForCreate(Type[] raceProcessorRecordTypes) Gets the race processor form for creating new race processors.getRaceProcessorFormForUpdate(Id raceProcessorId) Gets the race processor form for updating an existing race processor.voidupdateRaceProcessor(RaceProcessorForm raceProcessorForm) Updates an existing race processor.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.
-
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 aRaceProcessorwill 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:
falseifRaceProcessorcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateRaceProcessorWithRecordTypes
Tests if this user can create a singleRaceProcessorusing the desired record types. WhileVotingRulesManager.getRaceProcessorRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRaceProcessor. Providing an empty array tests if aRaceProcessorcan be created with no records.- Parameters:
raceProcessorRecordTypes- array of race processor types- Returns:
trueifRaceProcessorcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-raceProcessorRecordTypesisnull- 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-raceProcessorRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createRaceProcessor
RaceProcessor createRaceProcessor(RaceProcessorForm raceProcessorForm) throws OperationFailedException, PermissionDeniedException Creates a newRaceProcessor.- Parameters:
raceProcessorForm- the form for thisRaceProcessor- Returns:
- the new
RaceProcessor - Throws:
IllegalStateException-raceProcessorFormalready used for a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-raceProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-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 aRaceProcessorwill 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:
falseifRaceProcessormodification is not authorized,trueotherwise- 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- theIdof theRaceProcessor- Returns:
- the race processor form
- Throws:
NotFoundException-raceProcessorIdis not foundNullArgumentException-raceProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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-raceProcessorFormalready used for an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-raceProcessorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-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 aRaceProcessorwill 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:
falseifRaceProcessordeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteRaceProcessor
void deleteRaceProcessor(Id raceProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aRaceProcessor.- Parameters:
raceProcessorId- theIdof theRaceProcessorto remove- Throws:
NotFoundException-raceProcessorIdnot foundNullArgumentException-raceProcessorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageRaceProcessorAliases
boolean canManageRaceProcessorAliases()Tests if this user can manageIdaliases 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifRaceProcessoraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasRaceProcessor
void aliasRaceProcessor(Id raceProcessorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds aIdto aRaceProcessorfor the purpose of creating compatibility. The primaryIdof theRaceProcessoris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another race processor. it is reassigned to the given race processorId.- Parameters:
raceProcessorId- theIdof aRaceProcessoraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-raceProcessorIdnot foundNullArgumentException-raceProcessorIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-