Class BTFileConfirm
java.lang.Object
overit.geocall.bl.BusinessTask<FileConfirmEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<FileConfirmEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<FileConfirmEvent>
overit.geocallapp.docshare.documents.bl.sharedresource.file.task.BTFileConfirm
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(FileConfirmEvent.class)
public class BTFileConfirm
extends ValidPermissionBusinessTask<FileConfirmEvent>
Business task that confirms the upload of a file.
When a
When a
FileConfirmEvent is launched, this task:
- Retrieves all versions of the file
- Verifies that the new version is not older than the currently active one
- Completes the file data (name, extension, size) from the uploaded file
- Activates the new version by calling the
FileActivateEvent
Error codes:
- 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 voidactivateVersion(BOFile lastVersion, PoolKit poolKit) Activates the givenBOFileversion by calling theFileActivateEvent.protected voidcompleteData(BOFile file, PoolKit poolKit) Completes the data of the givenBOFilebefore the activation.protected voidexecute(FileConfirmEvent event, PoolKit poolKit) Validates and activates the latest version of aBOFile.getSortedFileVersions(String uuid, PoolKit poolKit) Returns all the versions of theBOFilewith the given uuid, sorted from the last version on.booleanDetermines whether the current state is valid for execution.protected voidValidates the givenFileConfirmEvent.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
-
BTFileConfirm
public BTFileConfirm()
-
-
Method Details
-
validate
Validates the givenFileConfirmEvent.- Parameters:
uuid- theFileConfirmEventpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getSortedFileVersions
protected List<BOFile> getSortedFileVersions(String uuid, PoolKit poolKit) throws DAValidateException, DAException Returns all the versions of theBOFilewith the given uuid, sorted from the last version on.- Parameters:
uuid- the uuid of theBOFile- Returns:
- a sorted list of
BOFileversions - Throws:
DAValidateException- the DA validate exceptionDAException- the DA 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