Coverage Report - org.kuali.rice.kew.doctype.SecurityAttribute
 
Classes in this File Line Coverage Branch Coverage Complexity
SecurityAttribute
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2009 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.doctype;
 17  
 
 18  
 import java.io.Serializable;
 19  
 
 20  
 import org.kuali.rice.kim.bo.Person;
 21  
 
 22  
 
 23  
 /**
 24  
  * This is an attribute used to implement custom document security for document search and the route log.
 25  
  * SecurityAttributes are configured to be associated with the document type against which they should
 26  
  * be applied.  For each route log or row that is returned from a document search, this authorization
 27  
  * methods will be executed. 
 28  
  *
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  *
 31  
  */
 32  
 public interface SecurityAttribute extends Serializable {
 33  
 
 34  
     /**
 35  
      * Determines whether or not a Person is authorized to see a given row in document search results.
 36  
      * The row being checked corresponds to the documentId given.
 37  
      *
 38  
      * @param currentUser the Person who is executing the search
 39  
      * @param docTypeName the name of the Document Type of the Document being checked for authorization
 40  
      * @param documentId the ID of the Document to check authorization for
 41  
      * @param initiatorPrincipalId the principal ID of the initiator of the document
 42  
      * 
 43  
      * @return true if the Person is authorized to view the row in document search, false otherwise
 44  
      */
 45  
     public Boolean docSearchAuthorized(Person currentUser, String docTypeName, String documentId, String initiatorPrincipalId);
 46  
 
 47  
     /**
 48  
      * Determines whether or not a Person is authorized to open the route log for the document with the given ID.
 49  
      *
 50  
      * @param currentUser the Person who is attempting to view the route log
 51  
      * @param docTypeName the name of the Document Type of the Document being checked for authorization
 52  
      * @param documentId the ID of the Document that the user is trying to view the route log for
 53  
      * @param initiatorPrincipalId the principal ID of the initiator of the document
 54  
      * 
 55  
      * @return true if the Person is authorized to view the route log, false otherwise
 56  
      */
 57  
     public Boolean routeLogAuthorized(Person currentUser, String docTypeName, String documentId, String initiatorPrincipalId);
 58  
 
 59  
 }