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.maintenance;
17  
18  import org.kuali.rice.kim.api.identity.Person;
19  import org.kuali.rice.krad.document.DocumentAuthorizer;
20  
21  /**
22   * Authorizer class for {@link MaintenanceDocument} instances
23   *
24   * <p>
25   * The <code>MaintenanceDocumentAuthorizer</code> extends the available actions of <code>DocumentAuthorizer</code>
26   * for <code>MaintenanceDocument</code>s.
27   * </p>
28   *
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   * @see org.kuali.rice.krad.document.DocumentAuthorizer
31   */
32  public interface MaintenanceDocumentAuthorizer extends DocumentAuthorizer {
33  
34      /**
35       * Determines whether the user has the permission to create a new <code>MaintenanceDocument</code>
36       *
37       * @param boClass <code>Class</code> of the <code>MaintenanceDocument</code>
38       * @param user <code>Person</code> instance of the current user
39       * @return <code>true</code> if the user is allowed to create a new <code>MaintenanceDocument</code> for
40       *         the boClass, <code>false</code> otherwise
41       */
42      public boolean canCreate(Class boClass, Person user);
43  
44      /**
45       * Determines whether the user has the permission to maintain a <code>MaintenanceDocument</code>
46       *
47       * @param dataObject <code>Object</code> of the <code>MaintenanceDocument</code>
48       * @param user <code>Person</code> instance of the current user
49       * @return <code>true</code> if the user is allowed to maintain the dataObject, <code>false</code> otherwise
50       */
51      public boolean canMaintain(Object dataObject, Person user);
52  
53      /**
54       * Determines whether the user has the permission to create or maintain a <code>MaintenanceDocument</code>
55       *
56       * @param maintenanceDocument the <code>MaintenanceDocument</code>
57       * @param user <code>Person</code> instance of the current user
58       * @return <code>true</code> if the user is allowed to create or maintain the <code>MaintenanceDocument</code>,
59       *         <code>false</code> otherwise
60       */
61      public boolean canCreateOrMaintain(MaintenanceDocument maintenanceDocument, Person user);
62  
63  }