View Javadoc

1   /**
2    * Copyright 2005-2012 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.kim.api.identity.Person;
19  import org.kuali.rice.krad.bo.DataObjectAuthorizer;
20  
21  /**
22   * Authorizer class for {@link Document} instances
23   *
24   * <p>
25   * Authorizer provides user based authorization
26   * </p>
27   *
28   * <p>
29   * The document authorizer is associated with a document type through its data dictionary
30   * {@link org.kuali.rice.krad.datadictionary.DocumentEntry}. This is then used by the framework to authorize certain
31   * actions and in addition used for view presentation logic
32   * </p>
33   *
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   */
36  public interface DocumentAuthorizer extends DataObjectAuthorizer {
37  
38      public boolean canInitiate(String documentTypeName, Person user);
39  
40      public boolean canOpen(Document document, Person user);
41  
42      public boolean canEdit(Document document, Person user);
43  
44      public boolean canAnnotate(Document document, Person user);
45  
46      public boolean canReload(Document document, Person user);
47  
48      public boolean canClose(Document document, Person user);
49  
50      public boolean canSave(Document document, Person user);
51  
52      public boolean canRoute(Document document, Person user);
53  
54      public boolean canCancel(Document document, Person user);
55  
56      public boolean canCopy(Document document, Person user);
57  
58      public boolean canPerformRouteReport(Document document, Person user);
59  
60      public boolean canBlanketApprove(Document document, Person user);
61  
62      public boolean canApprove(Document document, Person user);
63  
64      public boolean canDisapprove(Document document, Person user);
65  
66      public boolean canSendNoteFyi(Document document, Person user);
67  
68      public boolean canEditDocumentOverview(Document document, Person user);
69  
70      public boolean canFyi(Document document, Person user);
71  
72      public boolean canAcknowledge(Document document, Person user);
73  
74      public boolean canReceiveAdHoc(Document document, Person user, String actionRequestCode);
75  
76      public boolean canAddNoteAttachment(Document document, String attachmentTypeCode, Person user);
77  
78      public boolean canDeleteNoteAttachment(Document document, String attachmentTypeCode,
79              String authorUniversalIdentifier, Person user);
80  
81      public boolean canViewNoteAttachment(Document document, String attachmentTypeCode, String authorUniversalIdentifier,
82              Person user);
83  
84      public boolean canSendAdHocRequests(Document document, String actionRequestCd, Person user);
85  
86      public boolean canSendAnyTypeAdHocRequests(Document document, Person user);
87  
88      public boolean canTakeRequestedAction(Document document, String actionRequestCode, Person user);
89  }