Class BTFileDelete
java.lang.Object
overit.geocall.bl.BusinessTask<FileDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<FileDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<FileDeleteEvent>
overit.geocallapp.docshare.documents.bl.sharedresource.file.task.BTFileDelete
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(FileDeleteEvent.class)
public class BTFileDelete
extends ValidPermissionBusinessTask<FileDeleteEvent>
Business task that manages file version deletion.
When a
When a
FileDeleteEvent is launched, this task:
- sets to
truethedeletedflag of theBOFileversion - possibly deletes the associated physical file
- Since:
- 14.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 voiddeleteFile(BOFile file) Deletes the physical file associated to the givenBOFile.protected voidexecute(FileDeleteEvent event, PoolKit poolKit) Deletes aBOFileversion and possibly deletes the physical file associated with it.booleanDetermines whether the current state is valid for execution.protected BOFileloadFile(FileDeleteInput input, PoolKit poolKit) Loads theBOFileby the givenFileDeleteInput.protected BOFileloadFileByVersion(String fileUuid, Long version, PoolKit poolKit) Loads the file based on the given uuid and version.protected BOFileloadMainVersionFile(String fileUuid, PoolKit poolKit) Loads the main version of the file.protected voidupdateFile(BOFile file, PoolKit poolKit) Updates the givenBOFile.protected voidvalidate(FileDeleteInput input, PoolKit poolKit) Validates the given event input.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
-
BTFileDelete
public BTFileDelete()
-
-
Method Details
-
loadMainVersionFile
protected BOFile loadMainVersionFile(String fileUuid, PoolKit poolKit) throws DAValidateException, DAException Loads the main version of the file.- Parameters:
fileUuid- theBOFileuuidpoolKit- thePoolKit- Returns:
- the loaded
BOFile - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadFileByVersion
protected BOFile loadFileByVersion(String fileUuid, Long version, PoolKit poolKit) throws DAValidateException, DAException Loads the file based on the given uuid and version.- Parameters:
fileUuid- theBOFileuuidversion- the versionpoolKit- thePoolKit- Returns:
- the loaded
BOFile - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise