protected FileWrapper handleAddFileAndUpdateCandidateDescription ( Integer candidateId , File file , String candidateDescription , String externalId , FileParams params , boolean deleteFile ) { // first add the file FileWrapper fileWrapper = this . handleAddFileWithFile ( Candidate . class , candidateId , file , externalId , params , deleteFile ) ; // second update the candidate try { Candidate candidateToUpdate = new Candidate ( ) ; candidateToUpdate . setId ( candidateId ) ; if ( ! StringUtils . isBlank ( candidateDescription ) ) { candidateToUpdate . setDescription ( candidateDescription ) ; this . updateEntity ( candidateToUpdate ) ; } } catch ( Exception e ) { log . error ( "Error reading file to resume text" , e ) ; } return fileWrapper ; }
Handles logic to add the file to the candidate entity AND updating the candidate . description with the resume text .