Coverage Report - org.kuali.student.common.ui.client.service.SecurityRpcService
 
Classes in this File Line Coverage Branch Coverage Complexity
SecurityRpcService
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.common.ui.client.service;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.HashMap;
 20  
 
 21  
 import org.kuali.student.common.rice.authorization.PermissionType;
 22  
 import org.kuali.student.common.ui.client.service.exceptions.OperationFailedException;
 23  
 
 24  
 import com.google.gwt.user.client.rpc.RemoteService;
 25  
 import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
 26  
 
 27  
 /**
 28  
  * 
 29  
  * @author Kuali Student Team
 30  
  * 
 31  
  */
 32  
 @RemoteServiceRelativePath("rpcservices/SecurityRpcService")
 33  
 public interface SecurityRpcService extends RemoteService {
 34  
 
 35  
         public String getPrincipalUsername();
 36  
 
 37  
         /**
 38  
          * This is used to check if the user has screen access based on a screen permission. 
 39  
          * 
 40  
          * @param screenName
 41  
          * @return true if user has permission
 42  
          * @throws OperationFailedException
 43  
          */
 44  
         public Boolean hasScreenPermission(String screenName) throws OperationFailedException;
 45  
         
 46  
         
 47  
         /**
 48  
          * Given a list of screen components, returns if user has permission for that screen element.
 49  
          * 
 50  
          * @param screens
 51  
          * @return
 52  
          * @throws OperationFailedException
 53  
          */
 54  
         public HashMap<String,Boolean> getScreenPermissions(ArrayList<String> screens) throws OperationFailedException; 
 55  
         
 56  
         /**
 57  
          * Given a list of permission names returns the list of permissions and if the 
 58  
          * @param permissionNames
 59  
          * @return
 60  
          * @throws OperationFailedException
 61  
          */
 62  
         public HashMap<String,Boolean> getPermissions(ArrayList<String> permissionNames) throws OperationFailedException;
 63  
         
 64  
         /**
 65  
          * This is used to check if the user has a specific permission by the permission name
 66  
          * 
 67  
          * @param permissionName
 68  
          * @return true if user has the permission.
 69  
          */
 70  
         public Boolean hasPermissionByPermissionName(String permissionName) throws OperationFailedException;
 71  
         
 72  
         /**
 73  
          * This is used to get all permissions assigned to the user based on a permission template.
 74  
          * 
 75  
          * @param templateName
 76  
          * @return list of permission names
 77  
          */
 78  
         public ArrayList<String> getPermissionsByType(PermissionType permissionType) throws OperationFailedException;
 79  
 }