Search in sources :

Example 1 with AdvanceDepositForm

use of org.kuali.kfs.fp.document.web.struts.AdvanceDepositForm in project cu-kfs by CU-CommunityApps.

the class CuAdvanceDepositAction method insertBONote.

/**
 * Overridden to treat "Confidential" add-attachment authorization failures as validation errors, rather than throwing an authorization exception.
 *
 * @see org.kuali.kfs.kns.web.struts.action.KualiDocumentActionBase#insertBONote(
 * org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm,
 * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
 */
@SuppressWarnings("deprecation")
@Override
public ActionForward insertBONote(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    AdvanceDepositForm adForm = (AdvanceDepositForm) form;
    Note newNote = adForm.getNewNote();
    Document document = adForm.getDocument();
    if (!ConfidentialAttachmentUtil.attachmentIsNonConfidentialOrCanAddConfAttachment(newNote, document, adForm.getAttachmentFile(), getDocumentHelperService().getDocumentAuthorizer(document))) {
        return mapping.findForward(RiceConstants.MAPPING_BASIC);
    }
    return super.insertBONote(mapping, form, request, response);
}
Also used : Note(org.kuali.kfs.krad.bo.Note) AdvanceDepositForm(org.kuali.kfs.fp.document.web.struts.AdvanceDepositForm) Document(org.kuali.kfs.krad.document.Document)

Aggregations

AdvanceDepositForm (org.kuali.kfs.fp.document.web.struts.AdvanceDepositForm)1 Note (org.kuali.kfs.krad.bo.Note)1 Document (org.kuali.kfs.krad.document.Document)1