Interface SpeedZoneBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, SpeedZoneAdminSession
This session creates, updates, and deletes SpeedZones in bulk.
The data for create and update is provided by the consumer via the form
object. OsidForms are requested for each create or update and may
not be reused.
Create and update operations differ in their usage. To create a
SpeedZone , a SpeedZoneForm is requested using
getSpeedZoneFormsForCreate() specifying the desired record Types
or none if no record Types are needed. Each of the returned
SpeedZoneForms will indicate that it is to be used with a create
operation and can be used to examine metdata or validate data prior to
creation. Once a SpeedZoneForm is submiited to a create operation,
it cannot be reused with another create operation unless the first
operation was unsuccessful. Each SpeedZoneForm corresponds to an
attempted transaction.
The SpeedZoneForms returned from
getSpeedZoneFormsForCreate() may be linked to the originating request
through the peer Ids of the SpeedZoneForm . In the case
where there may be duplicates, any SpeedZoneForm of the same peer
Ids may be used for a create operation.
Once a batch of SpeedZoneForms are submitted for create, a
CreateResponse is returned for each SpeedZoneForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createSpeedZones() ,
errors specific to an individual SpeedZoneForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating SpeedZoneForm through the
SpeedZoneForm Id .
For updates, SpeedZoneForms are requested to the
SpeedZone Id that is to be updated using
getSpeedZoneFormsForUpdate() where the reference Id in the
SpeedZoneForm may be used to link the request. Similarly, the
SpeedZoneForm has metadata about the data that can be updated and it can
perform validation before submitting the update. The SpeedZoneForm
can only be used once for a successful update and cannot be reused.
Once a batch of SpeedZoneForms are submitted for update, an
UpdateResponse is returned for each SpeedZoneForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateSpeedZones() ,
errors specific to an individual SpeedZoneForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating SpeedZoneForm through the
SpeedZoneForm Id .
The delete operations delete SpeedZones in bulk. To unmap a
SpeedZone from the current Map , the
SpeedZoneMapAssignmentSession should be used. These delete operations
attempt to remove the SpeedZone itself thus removing it from all
known Map catalogs. Bulk delete operations return the results in
DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasSpeedZones(AliasRequestList aliasRequests) Adds anIdto aSpeedZonefor the purpose of creating compatibility.createSpeedZones(SpeedZoneBatchFormList speedZoneForms) Creates a new set ofSpeedZones.Deletes allSpeedZonesin thisMap.deleteSpeedZones(IdList speedZoneIds) Deletes speed zones for the givenIds.deleteSpeedZonesOnPath(Id pathId) Deletes all speed zones on a path.getSpeedZoneFormsForCreate(long number, Type[] speedZoneRecordTypes) Gets the speed zone forms for creating a bunch of new speed zones.getSpeedZoneFormsForUpdate(IdList speedZoneIds) Gets the speed zone forms for updating an existing set of speed zones.updateSpeedZones(SpeedZoneBatchFormList speedZoneForms) Updates existing speed zones.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.Methods inherited from interface SpeedZoneAdminSession
aliasSpeedZone, canCreateSpeedZones, canCreateSpeedZoneWithRecordTypes, canDeleteSpeedZone, canManageSpeedZoneAliases, canUpdateSpeedZones, createSpeedZone, deleteSpeedZone, getMap, getMapId, getSpeedZoneFormForCreate, getSpeedZoneFormForUpdate, updateSpeedZoneModifier and TypeMethodDescriptionvoidaliasSpeedZone(Id speedZoneId, Id aliasId) Adds anIdto aSpeedZonefor the purpose of creating compatibility.booleanTests if this user can createSpeedZones.booleancanCreateSpeedZoneWithRecordTypes(Type[] speedZoneRecordTypes) Tests if this user can create a singleSpeedZoneusing the desired record types.booleancanDeleteSpeedZone(Id speedZoneId) Tests if this user can delete a specifiedSpeedZone.booleanTests if this user can manageIdaliases forSpeedZones.booleanTests if this user can updateSpeedZones.createSpeedZone(SpeedZoneForm speedZoneForm) Creates a newSpeedZone.voiddeleteSpeedZone(Id speedZoneId) Deletes aSpeedZone.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.getSpeedZoneFormForCreate(Type[] speedZoneRecordTypes) Gets the speed zone form for creating new speed zones.getSpeedZoneFormForUpdate(Id speedZoneId) Gets the speed zone form for updating an existing speed zone.voidupdateSpeedZone(SpeedZoneForm speedZoneForm) Updates an existing speed zone.
-
Method Details
-
getSpeedZoneFormsForCreate
SpeedZoneBatchFormList getSpeedZoneFormsForCreate(long number, Type[] speedZoneRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the speed zone forms for creating a bunch of new speed zones.- Parameters:
number- the numebr of forms to retrievespeedZoneRecordTypes- array of speed zone record types to be included in each create operation or an empty list if none- Returns:
- the speed zone forms
- Throws:
NullArgumentException-speedZoneRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createSpeedZones
CreateResponseList createSpeedZones(SpeedZoneBatchFormList speedZoneForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofSpeedZones. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
speedZoneForms- the speed zone forms- Returns:
- the create responses
- Throws:
NullArgumentException-speedZoneFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getSpeedZoneFormsForUpdate
SpeedZoneBatchFormList getSpeedZoneFormsForUpdate(IdList speedZoneIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the speed zone forms for updating an existing set of speed zones. A new speed zone form should be requested for each update transaction.- Parameters:
speedZoneIds- theIdsof theSpeedZone- Returns:
- the speed zone forms
- Throws:
NotFoundException- aspeedZoneIdis not foundNullArgumentException-speedZoneIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateSpeedZones
UpdateResponseList updateSpeedZones(SpeedZoneBatchFormList speedZoneForms) throws OperationFailedException, PermissionDeniedException Updates existing speed zones. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
speedZoneForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-speedZoneFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllSpeedZones
Deletes allSpeedZonesin thisMap.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteSpeedZones
DeleteResponseList deleteSpeedZones(IdList speedZoneIds) throws OperationFailedException, PermissionDeniedException Deletes speed zones for the givenIds.- Parameters:
speedZoneIds- theIdsof the speed zones to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-speedZoneIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteSpeedZonesOnPath
DeleteResponseList deleteSpeedZonesOnPath(Id pathId) throws OperationFailedException, PermissionDeniedException Deletes all speed zones on a path.- Parameters:
pathId- anIdof a path- Returns:
- the delete responses
- Throws:
NullArgumentException-pathIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasSpeedZones
AliasResponseList aliasSpeedZones(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aSpeedZonefor the purpose of creating compatibility. The primaryIdof theSpeedZoneis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another speed zone, it is reassigned to the given speed zoneId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-