1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.fp.document.authorization;
17
18 import java.util.Set;
19
20 import org.kuali.ole.sys.OLEConstants;
21 import org.kuali.ole.sys.document.AmountTotaling;
22 import org.kuali.ole.sys.document.FinancialSystemTransactionalDocument;
23 import org.kuali.ole.sys.document.authorization.FinancialSystemTransactionalDocumentPresentationControllerBase;
24 import org.kuali.rice.krad.document.Document;
25
26 public class CreditCardReceiptDocumentPresentationController extends FinancialSystemTransactionalDocumentPresentationControllerBase{
27
28 @Override
29 public Set<String> getDocumentActions(Document document) {
30
31 Set<String> documentActions = super.getDocumentActions(document);
32
33 if (document instanceof FinancialSystemTransactionalDocument) {
34 if (canErrorCorrect((FinancialSystemTransactionalDocument) document)) {
35 documentActions.add(OLEConstants.KFS_ACTION_CAN_ERROR_CORRECT);
36 }
37
38 documentActions.add(OLEConstants.KFS_ACTION_CAN_EDIT_BANK);
39 }
40
41 return documentActions;
42 }
43
44 @Override
45 public Set<String> getEditModes(Document document) {
46
47 Set<String> editModes = super.getEditModes(document);
48 if (document instanceof AmountTotaling) {
49 editModes.add(OLEConstants.AMOUNT_TOTALING_EDITING_MODE);
50 }
51
52 editModes.add(OLEConstants.BANK_ENTRY_VIEWABLE_EDITING_MODE);
53
54 return editModes;
55
56 }
57 }