org.kuali.student.common.ui.server.gwt
Class SecurityRpcGwtServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.kuali.student.common.ui.server.gwt.SecurityRpcGwtServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, Servlet, ServletConfig, SecurityRpcService

public class SecurityRpcGwtServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements SecurityRpcService

This provides security RPC services to the GWT Application. It should be noted that this does not provide true client authorization as these calls can be easily manipulated by the end user. These calls are to be used to solely hide application components for users which are not privileged to view them and the check is merely for visual display. The real security checks are performed via security checks on the data RPC get/save operations as well as masking/hiding of data returned to the browser.

Author:
Kuali Student Team
See Also:
Serialized Form

Field Summary
(package private)  Logger LOG
           
private  IdentityManagementService permissionService
           
private static long serialVersionUID
           
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
SecurityRpcGwtServlet()
           
 
Method Summary
 HashMap<String,Boolean> getPermissions(ArrayList<String> permissionNames)
          Given a list of permission names returns the list of permissions and if the
 ArrayList<String> getPermissionsByType(PermissionType permissionType)
          This will return all permissions assigned to this user.
 IdentityManagementService getPermissionService()
           
 String getPrincipalUsername()
           
 HashMap<String,Boolean> getScreenPermissions(ArrayList<String> screens)
          Given a list of screen components, returns if user has permission for that screen element.
 Boolean hasPermissionByPermissionName(String permissionName)
          This is used to check if the user has a specific permission by the permission name
 Boolean hasScreenPermission(String screenName)
          This is used to check if the user has screen access based on a screen permission.
 void setPermissionService(IdentityManagementService permissionService)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

final Logger LOG

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

permissionService

private IdentityManagementService permissionService
Constructor Detail

SecurityRpcGwtServlet

public SecurityRpcGwtServlet()
Method Detail

getPrincipalUsername

public String getPrincipalUsername()
Specified by:
getPrincipalUsername in interface SecurityRpcService

getScreenPermissions

public HashMap<String,Boolean> getScreenPermissions(ArrayList<String> screens)
Description copied from interface: SecurityRpcService
Given a list of screen components, returns if user has permission for that screen element.

Specified by:
getScreenPermissions in interface SecurityRpcService
Returns:

getPermissions

public HashMap<String,Boolean> getPermissions(ArrayList<String> permissionNames)
                                       throws OperationFailedException
Description copied from interface: SecurityRpcService
Given a list of permission names returns the list of permissions and if the

Specified by:
getPermissions in interface SecurityRpcService
Returns:
Throws:
OperationFailedException

hasScreenPermission

public Boolean hasScreenPermission(String screenName)
                            throws OperationFailedException
Description copied from interface: SecurityRpcService
This is used to check if the user has screen access based on a screen permission.

Specified by:
hasScreenPermission in interface SecurityRpcService
Returns:
true if user has permission
Throws:
OperationFailedException

hasPermissionByPermissionName

public Boolean hasPermissionByPermissionName(String permissionName)
                                      throws OperationFailedException
Description copied from interface: SecurityRpcService
This is used to check if the user has a specific permission by the permission name

Specified by:
hasPermissionByPermissionName in interface SecurityRpcService
Returns:
true if user has the permission.
Throws:
OperationFailedException

getPermissionsByType

public ArrayList<String> getPermissionsByType(PermissionType permissionType)
                                       throws OperationFailedException
This will return all permissions assigned to this user. TODO: Need to determine if permission details are required.

Specified by:
getPermissionsByType in interface SecurityRpcService
Returns:
list of permission names
Throws:
OperationFailedException

setPermissionService

public void setPermissionService(IdentityManagementService permissionService)

getPermissionService

public IdentityManagementService getPermissionService()
                                               throws OperationFailedException
Throws:
OperationFailedException


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.