1 /**
2 * Copyright 2005-2016 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.document;
17
18 import org.kuali.rice.krad.uif.view.RequestAuthorizationCache;
19
20 /**
21 * Determines what actions are applicable to the given document, irrespective of user
22 * or other state. These initial actions are used as inputs for further filtering depending
23 * on context.
24 * @see DocumentAuthorizer
25 * @author Kuali Rice Team (rice.collab@kuali.org)
26 */
27 public interface DocumentPresentationController {
28
29 public boolean canInitiate(String documentTypeName);
30
31 public boolean canEdit(Document document);
32
33 public boolean canAnnotate(Document document);
34
35 public boolean canReload(Document document);
36
37 public boolean canClose(Document document);
38
39 public boolean canSave(Document document);
40
41 public boolean canRoute(Document document);
42
43 public boolean canCancel(Document document);
44
45 public boolean canCopy(Document document);
46
47 public boolean canPerformRouteReport(Document document);
48
49 public boolean canAddAdhocRequests(Document document);
50
51 public boolean canBlanketApprove(Document document);
52
53 public boolean canApprove(Document document);
54
55 public boolean canDisapprove(Document document);
56
57 public boolean canSendAdhocRequests(Document document);
58
59 public boolean canSendNoteFyi(Document document);
60
61 public boolean canEditDocumentOverview(Document document);
62
63 public boolean canFyi(Document document);
64
65 public boolean canAcknowledge(Document document);
66
67 public boolean canComplete(Document document);
68
69 /**
70 * @since 2.1
71 */
72 public boolean canRecall(Document document);
73
74 /**
75 * Determines if the document state should allow a super user taking an action.
76 *
77 * @param document document to check
78 *
79 * @return true the document state should allow a super user taking an action, otherwise false
80 *
81 * @since 2.5
82 */
83 boolean canSuperUserTakeAction(Document document);
84
85 /**
86 * Determines if the document state should allow a super user approving the document.
87 *
88 * @param document document to check
89 *
90 * @return true if the document state should allow a super user approving the document, otherwise false
91 *
92 * @since 2.5
93 */
94 boolean canSuperUserApprove(Document document);
95
96 /**
97 * Determines if the document state should allow a super user disapproving the document.
98 *
99 * @param document document to check
100 *
101 * @return true if the document state should allow a super user disapproving the document, otherwise false
102 *
103 * @since 2.5
104 */
105 boolean canSuperUserDisapprove(Document document);
106
107 void setDocumentRequestAuthorizationCache(DocumentRequestAuthorizationCache documentRequestAuthorizationCache);
108
109 }