Class ValidExecutionBusinessTask<I>
java.lang.Object
overit.geocall.bl.BusinessTask<I>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<I>
- Type Parameters:
I- the type of input event for this business task
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
- Direct Known Subclasses:
BTBundleOperationTooltipDataLoad,BTBundler,BTCriticalActivity,BTDailyPlanBundleCacheInitialize,BTDataCollection,BTGisAuthConfigLoad,BTGisAuthTokenLoad,BTMultistage,BTPermit,BTSchedulingProposal,ValidPermissionBusinessTask
public abstract class ValidExecutionBusinessTask<I>
extends BusinessTask<I>
implements ValidExecution
Abstract business task that validates execution conditions before proceeding.
This class extends
This class extends
BusinessTask and implements ValidExecution to provide
a framework for business tasks that require validation before execution. It automatically
checks validation conditions in the body method and only proceeds with execution if
validation passes.
The validation process:
- Calls
ValidExecution.isValidExecution()to check if execution is valid - If invalid and
ValidExecution.throwExceptionIfInvalid()returns true, throws the validation exception - If valid, proceeds with the
execute(Object, PoolKit)method
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidMain execution method that validates before proceeding with business logic.protected booleanPerforms validation check and handles exception throwing if configured.protected abstract voidExecutes the actual business logic after validation has passed.getEvent()Returns the input event being processed by this business task.Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackgroundMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecution
getException, isValidExecution, throwExceptionIfInvalid
-
Constructor Details
-
ValidExecutionBusinessTask
public ValidExecutionBusinessTask()
-
-
Method Details
-
body
Main execution method that validates before proceeding with business logic. This method stores the input event and performs validation usingcheckValidExecution(). If validation passes, it delegates to theexecute(Object, PoolKit)method for actual business logic execution.- Specified by:
bodyin classBusinessTask<I>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails and exceptions are enabled
-
checkValidExecution
Performs validation check and handles exception throwing if configured. This method callsValidExecution.isValidExecution()to determine if execution should proceed. If execution is invalid andValidExecution.throwExceptionIfInvalid()returns true, it throws the exception returned byValidExecution.getException().- Returns:
- true if execution is valid and should proceed, false otherwise
- Throws:
DAValidateException- if validation fails and exception throwing is enabled
-
execute
Executes the actual business logic after validation has passed.- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
getEvent
Returns the input event being processed by this business task.- Returns:
- the input event, or null if no event has been set
-