001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.maintenance;
017
018import org.kuali.rice.kim.api.identity.Person;
019import org.kuali.rice.krad.document.DocumentAuthorizer;
020
021/**
022 * Authorizer class for {@link MaintenanceDocument} instances
023 *
024 * <p>
025 * The <code>MaintenanceDocumentAuthorizer</code> extends the available actions of <code>DocumentAuthorizer</code>
026 * for <code>MaintenanceDocument</code>s.
027 * </p>
028 *
029 * @author Kuali Rice Team (rice.collab@kuali.org)
030 * @see org.kuali.rice.krad.document.DocumentAuthorizer
031 */
032public interface MaintenanceDocumentAuthorizer extends DocumentAuthorizer {
033
034    /**
035     * Determines whether the user has the permission to create a new <code>MaintenanceDocument</code>
036     *
037     * @param boClass <code>Class</code> of the <code>MaintenanceDocument</code>
038     * @param user <code>Person</code> instance of the current user
039     * @return <code>true</code> if the user is allowed to create a new <code>MaintenanceDocument</code> for
040     *         the boClass, <code>false</code> otherwise
041     */
042    public boolean canCreate(Class boClass, Person user);
043
044    /**
045     * Determines whether the user has the permission to maintain a <code>MaintenanceDocument</code>
046     *
047     * @param dataObject <code>Object</code> of the <code>MaintenanceDocument</code>
048     * @param user <code>Person</code> instance of the current user
049     * @return <code>true</code> if the user is allowed to maintain the dataObject, <code>false</code> otherwise
050     */
051    public boolean canMaintain(Object dataObject, Person user);
052
053    /**
054     * Determines whether the user has the permission to create or maintain a <code>MaintenanceDocument</code>
055     *
056     * @param maintenanceDocument the <code>MaintenanceDocument</code>
057     * @param user <code>Person</code> instance of the current user
058     * @return <code>true</code> if the user is allowed to create or maintain the <code>MaintenanceDocument</code>,
059     *         <code>false</code> otherwise
060     */
061    public boolean canCreateOrMaintain(MaintenanceDocument maintenanceDocument, Person user);
062
063}