コード例 #1
0
  public ActionForward uploadDocument(
      ActionMapping mapping,
      ActionForm actionForm,
      HttpServletRequest request,
      HttpServletResponse response)
      throws FenixFilterException, FenixServiceException, IOException {
    CandidacyProcessDocumentUploadBean uploadBean =
        (CandidacyProcessDocumentUploadBean)
            getObjectFromViewState("individualCandidacyProcessBean.document");
    try {
      IndividualCandidacyDocumentFile documentFile =
          createIndividualCandidacyDocumentFile(
              uploadBean,
              uploadBean
                  .getIndividualCandidacyProcess()
                  .getPersonalDetails()
                  .getDocumentIdNumber());
      uploadBean.setDocumentFile(documentFile);

      executeActivity(getProcess(request), "EditDocuments", uploadBean);
    } catch (DomainException e) {
      addActionMessage(request, e.getMessage(), e.getArgs());
    }

    return prepareExecuteEditDocuments(mapping, actionForm, request, response);
  }
コード例 #2
0
  public ActionForward prepareExecuteEditDocuments(
      ActionMapping mapping,
      ActionForm actionForm,
      HttpServletRequest request,
      HttpServletResponse response) {
    final IndividualCandidacyProcess process = getProcess(request);
    request.setAttribute(getIndividualCandidacyProcessBeanName(), process);
    CandidacyProcessDocumentUploadBean uploadBean = new CandidacyProcessDocumentUploadBean();
    uploadBean.setIndividualCandidacyProcess(process);
    request.setAttribute("candidacyDocumentUploadBean", uploadBean);

    RenderUtils.invalidateViewState("individualCandidacyProcessBean.document");

    return mapping.findForward("prepare-edit-candidacy-documents");
  }
コード例 #3
0
 @Override
 protected DegreeChangeIndividualCandidacyProcess executeActivity(
     DegreeChangeIndividualCandidacyProcess process, User userView, Object object) {
   ((CandidacyProcessDocumentUploadBean) object)
       .getDocumentFile()
       .setCandidacyFileActive(Boolean.FALSE);
   return process;
 }
コード例 #4
0
  public ActionForward revokeDocumentFile(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws FenixFilterException, FenixServiceException {
    CandidacyProcessDocumentUploadBean uploadBean =
        (CandidacyProcessDocumentUploadBean)
            getObjectFromViewState("individualCandidacyProcessBean.document");
    String documentExternalId = request.getParameter("documentFileOid");
    IndividualCandidacyDocumentFile documentFile =
        IndividualCandidacyDocumentFile.fromExternalId(documentExternalId);
    uploadBean.setDocumentFile(documentFile);

    executeActivity(getProcess(request), "RevokeDocumentFile", uploadBean);

    return prepareExecuteEditDocuments(mapping, form, request, response);
  }
コード例 #5
0
 protected IndividualCandidacyDocumentFile createIndividualCandidacyDocumentFile(
     CandidacyProcessDocumentUploadBean uploadBean, String documentIdNumber) throws IOException {
   return uploadBean.createIndividualCandidacyDocumentFile(
       getParentProcessType(), documentIdNumber);
 }