org.broadleafcommerce.openadmin.security
Class CompatibleGWTSecuredRPCServiceExporter

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.gwtwidgets.server.spring.GWTRPCServiceExporter
                      extended by org.broadleafcommerce.openadmin.security.CompatibleGWTSecuredRPCServiceExporter
All Implemented Interfaces:
com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.gwtwidgets.server.spring.RPCServiceExporter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.web.context.ServletConfigAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class CompatibleGWTSecuredRPCServiceExporter
extends org.gwtwidgets.server.spring.GWTRPCServiceExporter

Inspired by GWTRPCSecuredServiceExporter by David Martin http://code.google.com/p/gwt-incubator-lib/

Author:
jfischer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.gwtwidgets.server.spring.GWTRPCServiceExporter
beanName, COMPRESSION_AUTO, COMPRESSION_DISABLED, COMPRESSION_ENABLED, compressResponse, disableResponseCaching, logger, methodCache, modulePathTranslation, serializationFlags, serializationPolicyProvider, service, serviceInterfaces, servletContext, shouldCheckPermutationStrongName, throwUndeclaredExceptionToServletContainer
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
CompatibleGWTSecuredRPCServiceExporter()
           
 
Method Summary
 int getCompressResponse()
           
 boolean getDisableResponseCaching()
           
 Map<Method,Method> getMethodCache()
           
 Class[] getServiceInterfaces()
           
 javax.servlet.ServletContext getServletContext()
           
 String processCall(String payload)
          Wrap the original method in order to detect a Spring Security specific exception and manage it the way we want.
protected  String processException(Throwable e, com.google.gwt.user.server.rpc.RPCRequest rpcRequest)
           
 void setCompressResponse(int compressResponse)
           
 void setDisableResponseCaching(boolean disableResponseCaching)
           
 void setMethodCache(Map<Method,Method> methodCache)
           
 void setServiceInterfaces(Class[] serviceInterfaces)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class org.gwtwidgets.server.spring.GWTRPCServiceExporter
afterPropertiesSet, checkPermutationStrongName, doGetSerializationPolicy, doUnexpectedFailure, encodeResponseForFailure, getMethodToInvoke, getSerializationFlags, getSerializationPolicyProvider, getService, handleExporterProcessingException, handleIllegalAccessException, handleIllegalArgumentException, handleIncompatibleRemoteServiceException, handleInvocationTargetException, handleRequest, handleServiceException, handleUndeclaredThrowableException, invokeMethodOnService, onAfterResponseSerialized, onBeforeRequestDeserialized, preprocessHTTP, processResponse, setBeanName, setModulePathTranslation, setResponseCachingDisabled, setSerializationFlags, setSerializationPolicyProvider, setService, setServletConfig, setShouldCheckPermutationStrongName, setThrowUndeclaredExceptionToServletContainer, shouldCompressResponse, toString
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, processPost
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, 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, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompatibleGWTSecuredRPCServiceExporter

public CompatibleGWTSecuredRPCServiceExporter()
Method Detail

setServiceInterfaces

public void setServiceInterfaces(Class[] serviceInterfaces)
Specified by:
setServiceInterfaces in interface org.gwtwidgets.server.spring.RPCServiceExporter
Overrides:
setServiceInterfaces in class org.gwtwidgets.server.spring.GWTRPCServiceExporter

getServiceInterfaces

public Class[] getServiceInterfaces()

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface org.springframework.web.context.ServletContextAware
Overrides:
setServletContext in class org.gwtwidgets.server.spring.GWTRPCServiceExporter

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface javax.servlet.ServletConfig
Overrides:
getServletContext in class org.gwtwidgets.server.spring.GWTRPCServiceExporter

setCompressResponse

public void setCompressResponse(int compressResponse)
Overrides:
setCompressResponse in class org.gwtwidgets.server.spring.GWTRPCServiceExporter

getCompressResponse

public int getCompressResponse()

setDisableResponseCaching

public void setDisableResponseCaching(boolean disableResponseCaching)

getDisableResponseCaching

public boolean getDisableResponseCaching()

setMethodCache

public void setMethodCache(Map<Method,Method> methodCache)

getMethodCache

public Map<Method,Method> getMethodCache()

processCall

public String processCall(String payload)
                   throws com.google.gwt.user.client.rpc.SerializationException
Wrap the original method in order to detect a Spring Security specific exception and manage it the way we want.

Overrides:
processCall in class org.gwtwidgets.server.spring.GWTRPCServiceExporter
Parameters:
payload -
Throws:
com.google.gwt.user.client.rpc.SerializationException
See Also:
GWTRPCServiceExporter.processCall(java.lang.String)

processException

protected String processException(Throwable e,
                                  com.google.gwt.user.server.rpc.RPCRequest rpcRequest)
                           throws com.google.gwt.user.client.rpc.SerializationException
Throws:
com.google.gwt.user.client.rpc.SerializationException


Copyright © 2013. All Rights Reserved.