Class BTPermitsIntersectionsChecker<I>
java.lang.Object
overit.geocall.bl.BusinessTask<CheckerEvent<I>>
overit.geocallapp.utilities.core.bl.common.check.checker.task.AbstractCheckerBusinessTask<I>
overit.geocallapp.utilities.core.bl.common.check.checker.task.ValidExecutionAbstractCheckerBusinessTask<I>
overit.geocallapp.wfm.core.bl.permits.checker.task.BTPermitsIntersectionsChecker<I>
- Type Parameters:
I- the generic type
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
- Direct Known Subclasses:
BTPermitsIntersectionsCristallizationChecker,BTPermitsIntersectionsModifyChecker,BTPermitsIntersectionsPasteChecker
public abstract class BTPermitsIntersectionsChecker<I>
extends ValidExecutionAbstractCheckerBusinessTask<I>
Generic business task for the permit checker entities.
Before executing its purpose, the task checks whether the permit module is active or not.
Before executing its purpose, the task checks whether the permit module is active or not.
Error Code:
- Since:
- 14.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddIssue(List<CheckIssue> checkIssues, Code code, CheckIssueLevel level, boolean userConfirmNecessary, Object... params) Adds the issue.protected voidcheckAndAddIssues(PoolKit poolKit, Date schedulingActivityDate, Set<Long> woOperationIds, List<CheckIssue> issues) protected voidcheckAndAddIssues(PoolKit poolKit, Date schedulingActivityDate, Set<Long> woOperationIds, List<CheckIssue> issues, Map<Long, WorkOrderPermits> workOrderPermitsByOperation) Returns the exception that describes why execution is invalid.protected DategetSchedulingDate(Set<Long> schedulingIds, PoolKit poolKit) protected LonggetWorkOrder(Long woOperationId, PoolKit poolKit) protected StringgetWorkOrderCode(PoolKit poolKit, Long workOrderId) booleanChecks whether the permit is activated or not.booleanControls whether an exception should be thrown when execution is invalid.Methods inherited from class overit.geocallapp.utilities.core.bl.common.check.checker.task.ValidExecutionAbstractCheckerBusinessTask
body, checkValidExecutionMethods inherited from class overit.geocallapp.utilities.core.bl.common.check.checker.task.AbstractCheckerBusinessTask
addCheckIssuesToCheckResult, computeCheckIssues, initCheckResultMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTPermitsIntersectionsChecker
public BTPermitsIntersectionsChecker()
-
-
Method Details
-
isValidExecution
public boolean isValidExecution()Checks whether the permit is activated or not.- Returns:
- true, if the data collection module is active, false otherwise
-
throwExceptionIfInvalid
public boolean throwExceptionIfInvalid()Description copied from interface:ValidExecutionControls whether an exception should be thrown when execution is invalid. This method allows implementing classes to specify their exception-throwing behavior whenValidExecution.isValidExecution()returns false. If this method returns true, callers should throw the exception returned byValidExecution.getException().- Returns:
- true if an exception should be thrown for invalid execution, false otherwise
-
getException
Description copied from interface:ValidExecutionReturns the exception that describes why execution is invalid. This method provides detailed information about validation failures whenValidExecution.isValidExecution()returns false. The returned exception can be thrown by callers ifValidExecution.throwExceptionIfInvalid()returns true.- Returns:
- a
DAValidateExceptiondescribing the validation failure, or null if execution is valid or no specific exception is available
-
addIssue
protected void addIssue(List<CheckIssue> checkIssues, Code code, CheckIssueLevel level, boolean userConfirmNecessary, Object... params) Adds the issue.- Parameters:
checkIssues- list of check issue elementscode- the codelevel- the levelparams- the params
-
getWorkOrder
protected Long getWorkOrder(Long woOperationId, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
checkAndAddIssues
protected void checkAndAddIssues(PoolKit poolKit, Date schedulingActivityDate, Set<Long> woOperationIds, List<CheckIssue> issues) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
checkAndAddIssues
protected void checkAndAddIssues(PoolKit poolKit, Date schedulingActivityDate, Set<Long> woOperationIds, List<CheckIssue> issues, Map<Long, WorkOrderPermits> workOrderPermitsByOperation) throws DAException, DAValidateException- Throws:
DAExceptionDAValidateException
-
getWorkOrderCode
protected String getWorkOrderCode(PoolKit poolKit, Long workOrderId) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
getSchedulingDate
protected Date getSchedulingDate(Set<Long> schedulingIds, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-