Syntax
void
restrictionCheck
(
final Long
subTransactionId
,
final Long
actorId
,
final boolean
persist
) throws MobiliserServiceException, DataAccessException, TransactionException
Parameters
-
subTransactionId –
the sub transaction's id; this parameter is mandatory
-
actorId –
the actorId (authenticated user)
-
persist –
whether the changes should be persisted or discarded; you can discard changes if you just want to check for the outcome w/o actually changing data
Exceptions
-
MobiliserServiceException –
if checking of the transaction limits fails for some reason (business rules)
-
DataAccessException –
if some error occurs communicated / writing / reading persistent storage
-
TransactionException –
if some error occurs while handling the transactions related to persistent storage
Usage
Performs the restriction check for the given
SubTransaction
.
Notes on transactional semantics:
This operation will run inside its own database transaction. Any failure will trigger a rollback and also if the user requests
persist=false
the changes will also be rolled back. Exception will
always
cause the
SubTransaction
and the main
Transaction
to be marked as failed in a fresh database transaction.