001 /**
002 * Copyright 2005-2012 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 */
016 package org.kuali.rice.krad.document;
017
018 import org.kuali.rice.kim.api.identity.Person;
019 import org.kuali.rice.krad.bo.DataObjectAuthorizer;
020
021 /**
022 * Authorizer class for {@link Document} instances
023 *
024 * <p>
025 * Authorizer provides user based authorization
026 * </p>
027 *
028 * <p>
029 * The document authorizer is associated with a document type through its data dictionary
030 * {@link org.kuali.rice.krad.datadictionary.DocumentEntry}. This is then used by the framework to authorize certain
031 * actions and in addition used for view presentation logic
032 * </p>
033 *
034 * @author Kuali Rice Team (rice.collab@kuali.org)
035 */
036 public interface DocumentAuthorizer extends DataObjectAuthorizer {
037
038 public boolean canInitiate(String documentTypeName, Person user);
039
040 public boolean canOpen(Document document, Person user);
041
042 public boolean canEdit(Document document, Person user);
043
044 public boolean canAnnotate(Document document, Person user);
045
046 public boolean canReload(Document document, Person user);
047
048 public boolean canClose(Document document, Person user);
049
050 public boolean canSave(Document document, Person user);
051
052 public boolean canRoute(Document document, Person user);
053
054 public boolean canCancel(Document document, Person user);
055
056 public boolean canCopy(Document document, Person user);
057
058 public boolean canPerformRouteReport(Document document, Person user);
059
060 public boolean canBlanketApprove(Document document, Person user);
061
062 public boolean canApprove(Document document, Person user);
063
064 public boolean canDisapprove(Document document, Person user);
065
066 public boolean canSendNoteFyi(Document document, Person user);
067
068 public boolean canEditDocumentOverview(Document document, Person user);
069
070 public boolean canFyi(Document document, Person user);
071
072 public boolean canAcknowledge(Document document, Person user);
073
074 public boolean canReceiveAdHoc(Document document, Person user, String actionRequestCode);
075
076 public boolean canAddNoteAttachment(Document document, String attachmentTypeCode, Person user);
077
078 public boolean canDeleteNoteAttachment(Document document, String attachmentTypeCode,
079 String authorUniversalIdentifier, Person user);
080
081 public boolean canViewNoteAttachment(Document document, String attachmentTypeCode, String authorUniversalIdentifier,
082 Person user);
083
084 public boolean canSendAdHocRequests(Document document, String actionRequestCd, Person user);
085
086 public boolean canSendAnyTypeAdHocRequests(Document document, Person user);
087
088 public boolean canTakeRequestedAction(Document document, String actionRequestCode, Person user);
089 }