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.document;
017
018import org.kuali.rice.krad.uif.view.RequestAuthorizationCache;
019
020/**
021 * Determines what actions are applicable to the given document, irrespective of user
022 * or other state.  These initial actions are used as inputs for further filtering depending
023 * on context.
024 * @see DocumentAuthorizer
025 * @author Kuali Rice Team (rice.collab@kuali.org)
026 */
027public interface DocumentPresentationController {
028
029    public boolean canInitiate(String documentTypeName);
030
031    public boolean canEdit(Document document);
032
033    public boolean canAnnotate(Document document);
034
035    public boolean canReload(Document document);
036
037    public boolean canClose(Document document);
038
039    public boolean canSave(Document document);
040
041    public boolean canRoute(Document document);
042
043    public boolean canCancel(Document document);
044
045    public boolean canCopy(Document document);
046
047    public boolean canPerformRouteReport(Document document);
048
049    public boolean canAddAdhocRequests(Document document);
050
051    public boolean canBlanketApprove(Document document);
052
053    public boolean canApprove(Document document);
054
055    public boolean canDisapprove(Document document);
056
057    public boolean canSendAdhocRequests(Document document);
058
059    public boolean canSendNoteFyi(Document document);
060
061    public boolean canEditDocumentOverview(Document document);
062
063    public boolean canFyi(Document document);
064
065    public boolean canAcknowledge(Document document);
066
067    public boolean canComplete(Document document);
068
069    /**
070     * @since 2.1
071     */
072    public boolean canRecall(Document document);
073
074    /**
075     * Determines if the document state should allow a super user taking an action.
076     *
077     * @param document document to check
078     *
079     * @return true the document state should allow a super user taking an action, otherwise false
080     *
081     * @since 2.5
082     */
083    boolean canSuperUserTakeAction(Document document);
084
085    /**
086     * Determines if the document state should allow a super user approving the document.
087     *
088     * @param document document to check
089     *
090     * @return true if the document state should allow a super user approving the document, otherwise false
091     *
092     * @since 2.5
093     */
094    boolean canSuperUserApprove(Document document);
095
096    /**
097     * Determines if the document state should allow a super user disapproving the document.
098     *
099     * @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}