Interface RaceConstrainerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes race constrainers. The data for create
and update is provided via the RaceConstrainerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasRaceConstrainer(Id raceConstrainerId, Id aliasId) Adds aIdto aRaceConstrainerfor the purpose of creating compatibility.booleanTests if this user can create race constrainers.booleancanCreateRaceConstrainerWithRecordTypes(Type[] raceConstrainerRecordTypes) Tests if this user can create a singleRaceConstrainerusing the desired record types.booleanTests if this user can delete race constrainers.booleanTests if this user can manageIdaliases for race constrainers.booleanTests if this user can update race constrainers.createRaceConstrainer(RaceConstrainerForm raceConstrainerForm) Creates a newRaceConstrainer.voiddeleteRaceConstrainer(Id raceConstrainerId) Deletes aRaceConstrainer.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.getRaceConstrainerFormForCreate(Type[] raceConstrainerRecordTypes) Gets the race constrainer form for creating new race constrainers.getRaceConstrainerFormForUpdate(Id raceConstrainerId) Gets the race constrainer form for updating an existing race constrainer.voidupdateRaceConstrainer(RaceConstrainerForm raceConstrainerForm) Updates an existing race constrainer.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.
-
canCreateRaceConstrainer
boolean canCreateRaceConstrainer()Tests if this user can create race constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aRaceConstrainerwill 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:
falseifRaceConstrainercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateRaceConstrainerWithRecordTypes
Tests if this user can create a singleRaceConstrainerusing the desired record types. WhileVotingRulesManager.getRaceConstrainerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRaceConstrainer. Providing an empty array tests if aRaceConstrainercan be created with no records.- Parameters:
raceConstrainerRecordTypes- array of race constrainer record types- Returns:
trueifRaceConstrainercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-raceConstrainerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getRaceConstrainerFormForCreate
RaceConstrainerForm getRaceConstrainerFormForCreate(Type[] raceConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the race constrainer form for creating new race constrainers. A new form should be requested for each create transaction.- Parameters:
raceConstrainerRecordTypes- array of race constrainer record types- Returns:
- the race constrainer form
- Throws:
NullArgumentException-raceConstrainerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createRaceConstrainer
RaceConstrainer createRaceConstrainer(RaceConstrainerForm raceConstrainerForm) throws OperationFailedException, PermissionDeniedException Creates a newRaceConstrainer.- Parameters:
raceConstrainerForm- the form for thisRaceConstrainer- Returns:
- the new
RaceConstrainer - Throws:
IllegalStateException-raceConstrainerFormalready used for a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-raceConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-raceConstrainerForm did not originate from getRaceConstrainerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateRaceConstrainers
boolean canUpdateRaceConstrainers()Tests if this user can update race constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aRaceConstrainerwill 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:
falseifRaceConstrainermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getRaceConstrainerFormForUpdate
RaceConstrainerForm getRaceConstrainerFormForUpdate(Id raceConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the race constrainer form for updating an existing race constrainer. A new race constrainer form should be requested for each update transaction.- Parameters:
raceConstrainerId- theIdof theRaceConstrainer- Returns:
- the race constrainer form
- Throws:
NotFoundException-raceConstrainerIdis not foundNullArgumentException-raceConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRaceConstrainer
void updateRaceConstrainer(RaceConstrainerForm raceConstrainerForm) throws OperationFailedException, PermissionDeniedException Updates an existing race constrainer.- Parameters:
raceConstrainerForm- the form containing the elements to be updated- Throws:
IllegalStateException-raceConstrainerFormalready used for an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-raceConstrainerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-raceConstrainerForm did not originate from getRaceConstrainerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteRaceConstrainers
boolean canDeleteRaceConstrainers()Tests if this user can delete race constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aRaceConstrainerwill 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:
falseifRaceConstrainerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteRaceConstrainer
void deleteRaceConstrainer(Id raceConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aRaceConstrainer.- Parameters:
raceConstrainerId- theIdof theRaceConstrainerto remove- Throws:
NotFoundException-raceConstrainerIdnot foundNullArgumentException-raceConstrainerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageRaceConstrainerAliases
boolean canManageRaceConstrainerAliases()Tests if this user can manageIdaliases for race constrainers. 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:
falseifRaceConstraineraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasRaceConstrainer
void aliasRaceConstrainer(Id raceConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds aIdto aRaceConstrainerfor the purpose of creating compatibility. The primaryIdof theRaceConstraineris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another race constrainer. it is reassigned to the given race constrainerId.- Parameters:
raceConstrainerId- theIdof aRaceConstraineraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-raceConstrainerIdnot foundNullArgumentException-raceConstrainerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-