public interface RaceConstrainerAdminSession extends OsidSession
This session creates and removes race constrainers. The data for create
and update is provided via the RaceConstrainerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasRaceConstrainer(Id raceConstrainerId,
Id aliasId)
Adds a
Id to a RaceConstrainer for the
purpose of creating compatibility. |
boolean |
canCreateRaceConstrainer()
Tests if this user can create race constrainers.
|
boolean |
canCreateRaceConstrainerWithRecordTypes(Type[] raceConstrainerRecordTypes)
Tests if this user can create a single
RaceConstrainer
using the desired record types. |
boolean |
canDeleteRaceConstrainers()
Tests if this user can delete race constrainers.
|
boolean |
canManageRaceConstrainerAliases()
Tests if this user can manage
Id aliases for race
constrainers. |
boolean |
canUpdateRaceConstrainers()
Tests if this user can update race constrainers.
|
RaceConstrainer |
createRaceConstrainer(RaceConstrainerForm raceConstrainerForm)
Creates a new
RaceConstrainer. |
void |
deleteRaceConstrainer(Id raceConstrainerId)
Deletes a
RaceConstrainer. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
RaceConstrainerForm |
getRaceConstrainerFormForCreate(Type[] raceConstrainerRecordTypes)
Gets the race constrainer form for creating new race constrainers.
|
RaceConstrainerForm |
getRaceConstrainerFormForUpdate(Id raceConstrainerId)
Gets the race constrainer form for updating an existing race
constrainer.
|
void |
updateRaceConstrainer(RaceConstrainerForm raceConstrainerForm)
Updates an existing race constrainer.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPollsId()
Polls
Id
associated with this
session. Polls Id
associated with this sessionmandatory
- This method must be implemented. Polls getPolls() throws OperationFailedException, PermissionDeniedException
Polls
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateRaceConstrainer()
RaceConstrainer
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. false
if RaceConstrainer
creation is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateRaceConstrainerWithRecordTypes(Type[] raceConstrainerRecordTypes)
RaceConstrainer
using the desired record types. While
VotingRulesManager.getRaceConstrainerRecordTypes()
can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific RaceConstrainer.
Providing an empty array tests if a RaceConstrainer
can be created with no records.raceConstrainerRecordTypes
- array of race constrainer record
types true
if RaceConstrainer
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
-
raceConstrainerRecordTypes
is null
mandatory
- This method must be implemented. RaceConstrainerForm getRaceConstrainerFormForCreate(Type[] raceConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException
raceConstrainerRecordTypes
- array of race constrainer record
typesNullArgumentException
-
raceConstrainerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. RaceConstrainer createRaceConstrainer(RaceConstrainerForm raceConstrainerForm) throws OperationFailedException, PermissionDeniedException
RaceConstrainer.
raceConstrainerForm
- the form for this RaceConstrainer
RaceConstrainer
IllegalStateException
- raceConstrainerForm
already used for a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- raceConstrainerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- raceConstrainerForm did
not originate from getRaceConstrainerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateRaceConstrainers()
RaceConstrainer
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. false
if RaceConstrainer
modification is not authorized, true
otherwisemandatory
- This method must be implemented. RaceConstrainerForm getRaceConstrainerFormForUpdate(Id raceConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
raceConstrainerId
- the Id
of the
RaceConstrainer
NotFoundException
- raceConstrainerId
is
not foundNullArgumentException
- raceConstrainerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateRaceConstrainer(RaceConstrainerForm raceConstrainerForm) throws OperationFailedException, PermissionDeniedException
raceConstrainerForm
- the form containing the elements to be
updatedIllegalStateException
- raceConstrainerForm
already used for an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- raceConstrainerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- raceConstrainerForm did
not originate from getRaceConstrainerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteRaceConstrainers()
RaceConstrainer
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. false
if RaceConstrainer
deletion is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteRaceConstrainer(Id raceConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RaceConstrainer.
raceConstrainerId
- the Id
of the
RaceConstrainer
to removeNotFoundException
- raceConstrainerId
not foundNullArgumentException
- raceConstrainerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageRaceConstrainerAliases()
Id
aliases 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 a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if RaceConstrainer
aliasing is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasRaceConstrainer(Id raceConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a RaceConstrainer
for the
purpose of creating compatibility. The primary Id
of
the RaceConstrainer
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. it is
reassigned to the given race constrainer Id.
raceConstrainerId
- the Id
of a
RaceConstrainer
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- raceConstrainerId
not foundNullArgumentException
- raceConstrainerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.