1 /**
2 * Copyright 2005-2014 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.kew.framework.document.security;
17
18 import org.kuali.rice.kew.api.document.Document;
19
20 import java.io.Serializable;
21
22 /**
23 * This is an attribute used to implement custom document security for document search and the route log.
24 * SecurityAttributes are configured to be associated with the document type against which they should
25 * be applied. For each route log or row that is returned from a document search, this authorization
26 * methods will be executed.
27 *
28 * @author Kuali Rice Team (rice.collab@kuali.org)
29 *
30 */
31 public interface DocumentSecurityAttribute extends Serializable {
32
33 /**
34 * Determines whether or not a principal is authorized to see information about a given document.
35 *
36 * @param principalId the principalId for which to check authorization
37 * @param document the document for which to check security
38 *
39 * @return true if the principal is authorized to view the document, false otherwise
40 */
41 boolean isAuthorizedForDocument(String principalId, Document document);
42
43 }