1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.krad.uif.authorization; |
17 | |
|
18 | |
import org.kuali.rice.kew.api.WorkflowDocument; |
19 | |
import org.kuali.rice.krad.document.Document; |
20 | |
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | 0 | public class MaintenanceDocumentPresentationControllerBase extends DocumentPresentationControllerBase { |
26 | |
|
27 | |
public boolean canCreate(Class<?> dataObjectClass) { |
28 | 0 | return KRADServiceLocatorWeb.getDocumentDictionaryService().getAllowsNewOrCopy( |
29 | |
KRADServiceLocatorWeb.getDocumentDictionaryService().getMaintenanceDocumentTypeName(dataObjectClass)) |
30 | |
.booleanValue(); |
31 | |
} |
32 | |
|
33 | |
@Override |
34 | |
protected boolean canSave(Document document) { |
35 | 0 | WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument(); |
36 | |
|
37 | 0 | return (!workflowDocument.isEnroute() && super.canSave(document)); |
38 | |
} |
39 | |
|
40 | |
@Override |
41 | |
protected boolean canBlanketApprove(Document document) { |
42 | 0 | WorkflowDocument workflowDocument = document.getDocumentHeader().getWorkflowDocument(); |
43 | |
|
44 | 0 | return (!workflowDocument.isEnroute() && super.canBlanketApprove(document)); |
45 | |
} |
46 | |
} |