Class BTMaterialClassInsert
java.lang.Object
overit.geocall.bl.BusinessTask<MaterialClassInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<MaterialClassInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<MaterialClassInsertEvent>
overit.geocallapp.wfm.materials.bl.materialclass.task.BTMaterialClassInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(MaterialClassInsertEvent.class)
public class BTMaterialClassInsert
extends ValidPermissionBusinessTask<MaterialClassInsertEvent>
Business task in order to insert a
When the
BOMaterialClass. When the
MaterialClassInsertEvent is launched the BT notices the call and inserts the BOMaterialClass
basing on the event's input. Error Code:
Codes.INVALID_PROPERTY_VALUE: Invalid value for property {0}.Codes.PROPERTY_REQUIRED: Property {0} is required.Codes.CODE_ALREADY_DEFINED: Code already defined.
- Since:
- 17.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckCode(BOMaterialClass materialClass, PoolKit poolKit) Validate the code of the material itemprotected voidexecute(MaterialClassInsertEvent event, PoolKit pk) Inserts the givenBOMaterialClassand writes the newly generated id into the event journal.booleanChecks if the execution is execution.voidvalidateData(BOMaterialClass materialClass, PoolKit poolKit) Validates the material class data before the insertion.Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTMaterialClassInsert
public BTMaterialClassInsert()
-
-
Method Details
-
execute
protected void execute(MaterialClassInsertEvent event, PoolKit pk) throws DAException, DAValidateException Inserts the givenBOMaterialClassand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<MaterialClassInsertEvent>- Parameters:
event- theMaterialClassInsertEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is execution.- Returns:
- true, if successful
-
validateData
public void validateData(BOMaterialClass materialClass, PoolKit poolKit) throws DAValidateException, DAException Validates the material class data before the insertion.- Parameters:
materialClass- the current material classpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkCode
protected void checkCode(BOMaterialClass materialClass, PoolKit poolKit) throws DAValidateException, DAException Validate the code of the material item- Parameters:
materialClass- the current material classpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-