Interface SpeedZoneEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes speed zone enablers. The data for
create and update is provided via the SpeedZoneEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasSpeedZoneEnabler(Id speedZoneEnablerId, Id aliasId) Adds aIdto aSpeedZoneEnablerfor the purpose of creating compatibility.booleanTests if this user can create speed zone enablers.booleancanCreateSpeedZoneEnablerWithRecordTypes(Type[] speedZoneEnablerRecordTypes) Tests if this user can create a singleSpeedZoneEnablerusing the desired record types.booleanTests if this user can delete speed zone enablers.booleanTests if this user can manageIdaliases for speed zone enablers.booleanTests if this user can update speed zone enablers.createSpeedZoneEnabler(SpeedZoneEnablerForm speedZoneEnablerForm) Creates a newSpeedZoneEnabler.voiddeleteSpeedZoneEnabler(Id speedZoneEnablerId) Deletes aSpeedZoneEnabler.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.getSpeedZoneEnablerFormForCreate(Type[] speedZoneEnablerRecordTypes) Gets the speed zone enabler form for creating new speed zone enablers.getSpeedZoneEnablerFormForUpdate(Id speedZoneEnablerId) Gets the speed zone enabler form for updating an existing speed zone enabler.voidupdateSpeedZoneEnabler(SpeedZoneEnablerForm speedZoneEnablerForm) Updates an existing speed zone enabler.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
-
getMapId
Id getMapId()Gets theMapIdassociated with this session.- Returns:
- the
Map Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMap
Gets theMapassociated with this session.- Returns:
- the map
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateSpeedZoneEnabler
boolean canCreateSpeedZoneEnabler()Tests if this user can create speed zone enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aSpeedZoneEnablerwill 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:
falseifSpeedZoneEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateSpeedZoneEnablerWithRecordTypes
Tests if this user can create a singleSpeedZoneEnablerusing the desired record types. WhileMappingPathRulesManager.getSpeedZoneEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificSpeedZoneEnabler. Providing an empty array tests if aSpeedZoneEnablercan be created with no records.- Parameters:
speedZoneEnablerRecordTypes- array of speed zone enabler record types- Returns:
trueifSpeedZoneEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-speedZoneEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getSpeedZoneEnablerFormForCreate
SpeedZoneEnablerForm getSpeedZoneEnablerFormForCreate(Type[] speedZoneEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the speed zone enabler form for creating new speed zone enablers. A new form should be requested for each create transaction.- Parameters:
speedZoneEnablerRecordTypes- array of speed zone enabler record types- Returns:
- the speed zone enabler form
- Throws:
NullArgumentException-speedZoneEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createSpeedZoneEnabler
SpeedZoneEnabler createSpeedZoneEnabler(SpeedZoneEnablerForm speedZoneEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newSpeedZoneEnabler.- Parameters:
speedZoneEnablerForm- the form for thisSpeedZoneEnabler- Returns:
- the new
SpeedZoneEnabler - Throws:
IllegalStateException-speedZoneEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-speedZoneEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-speedZoneEnablerFormdid not originate fromgetSpeedZoneEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateSpeedZoneEnablers
boolean canUpdateSpeedZoneEnablers()Tests if this user can update speed zone enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aSpeedZoneEnablerwill 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:
falseifSpeedZoneEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getSpeedZoneEnablerFormForUpdate
SpeedZoneEnablerForm getSpeedZoneEnablerFormForUpdate(Id speedZoneEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the speed zone enabler form for updating an existing speed zone enabler. A new speed zone enabler form should be requested for each update transaction.- Parameters:
speedZoneEnablerId- theIdof theSpeedZoneEnabler- Returns:
- the speed zone enabler form
- Throws:
NotFoundException-speedZoneEnablerIdis not foundNullArgumentException-speedZoneEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateSpeedZoneEnabler
void updateSpeedZoneEnabler(SpeedZoneEnablerForm speedZoneEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing speed zone enabler.- Parameters:
speedZoneEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-speedZoneEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-speedZoneEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-speedZoneEnablerFormdid not originate fromgetSpeedZoneEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteSpeedZoneEnablers
boolean canDeleteSpeedZoneEnablers()Tests if this user can delete speed zone enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aSpeedZoneEnablerwill 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:
falseifSpeedZoneEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteSpeedZoneEnabler
void deleteSpeedZoneEnabler(Id speedZoneEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aSpeedZoneEnabler.- Parameters:
speedZoneEnablerId- theIdof theSpeedZoneEnablerto remove- Throws:
NotFoundException-speedZoneEnablerIdnot foundNullArgumentException-speedZoneEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSpeedZoneEnablerAliases
boolean canManageSpeedZoneEnablerAliases()Tests if this user can manageIdaliases for speed zone 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifSpeedZoneEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasSpeedZoneEnabler
void aliasSpeedZoneEnabler(Id speedZoneEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds aIdto aSpeedZoneEnablerfor the purpose of creating compatibility. The primaryIdof theSpeedZoneEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another speed zone enabler. it is reassigned to the given speed zone enablerId.- Parameters:
speedZoneEnablerId- theIdof aSpeedZoneEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-speedZoneEnablerIdnot foundNullArgumentException-speedZoneEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-