@Override
public Object provide(Object source, Object current) {
List<IndividualCandidacyDocumentFileType> fileTypesList = new ArrayList<IndividualCandidacyDocumentFileType>();
CandidacyProcessDocumentUploadBean uploadBean = (CandidacyProcessDocumentUploadBean) source;
IndividualCandidacyProcess individualCandidacyProcess = uploadBean.getIndividualCandidacyProcess();
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.PHOTO) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.PHOTO);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.CV_DOCUMENT) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.CV_DOCUMENT);
}
if (individualCandidacyProcess
.getActiveFileForType(IndividualCandidacyDocumentFileType.HABILITATION_CERTIFICATE_DOCUMENT) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.HABILITATION_CERTIFICATE_DOCUMENT);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.DOCUMENT_IDENTIFICATION) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.DOCUMENT_IDENTIFICATION);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.PAYMENT_DOCUMENT) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.PAYMENT_DOCUMENT);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.VAT_CARD_DOCUMENT) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.VAT_CARD_DOCUMENT);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.DEGREE_CERTIFICATE) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.DEGREE_CERTIFICATE);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.REGISTRATION_CERTIFICATE) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.REGISTRATION_CERTIFICATE);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.NO_PRESCRIPTION_CERTIFICATE) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.NO_PRESCRIPTION_CERTIFICATE);
}
if (individualCandidacyProcess
.getActiveFileForType(IndividualCandidacyDocumentFileType.FIRST_CYCLE_ACCESS_HABILITATION_CERTIFICATE) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.FIRST_CYCLE_ACCESS_HABILITATION_CERTIFICATE);
}
if (individualCandidacyProcess
.getActiveFileForType(IndividualCandidacyDocumentFileType.FOREIGN_INSTITUTION_SCALE_CERTIFICATE) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.FOREIGN_INSTITUTION_SCALE_CERTIFICATE);
}
if (individualCandidacyProcess.getActiveFileForType(IndividualCandidacyDocumentFileType.GRADES_DOCUMENT) == null) {
fileTypesList.add(IndividualCandidacyDocumentFileType.GRADES_DOCUMENT);
}
fileTypesList.add(IndividualCandidacyDocumentFileType.REPORT_OR_WORK_DOCUMENT);