public class CmsGwtService
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
| 构造器和说明 |
|---|
CmsGwtService()
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkPermissions(CmsObject cms)
Checks the permissions of the current user to match the required security level.
|
protected void |
clearThreadStorage()
Clears the objects stored in thread local.
|
protected com.google.gwt.user.server.rpc.SerializationPolicy |
doGetSerializationPolicy(javax.servlet.http.HttpServletRequest request,
java.lang.String moduleBaseURL,
java.lang.String strongName)
We do not want that the server goes to fetch files from the servlet context.
|
protected void |
doUnexpectedFailure(java.lang.Throwable e) |
protected CmsLockActionRecord |
ensureLock(CmsResource resource)
Locks the given resource with a temporary, if not already locked by the current user.
|
protected CmsLockActionRecord |
ensureLock(CmsUUID structureId)
Locks the given resource with a temporary, if not already locked by the current user.
|
protected CmsLockActionRecord |
ensureLock(java.lang.String sitepath)
Locks the given resource with a temporary, if not already locked by the current user.
|
protected void |
ensureSession()
Ensures that the user session is still valid.
|
void |
error(java.lang.Throwable t)
Logs and re-throws the given exception for RPC responses.
|
CmsObject |
getCmsObject()
Returns the current cms context.
|
protected java.util.Map<java.lang.String,CmsProperty> |
getPropertiesByName(java.util.List<CmsProperty> properties)
Converts a list of properties to a map.
|
javax.servlet.http.HttpServletRequest |
getRequest()
Returns the current request.
|
javax.servlet.http.HttpServletResponse |
getResponse()
Returns the current response.
|
void |
log(java.lang.String msg) |
void |
log(java.lang.String message,
java.lang.Throwable t) |
void |
logError(java.lang.Throwable t)
Logs the given exception.
|
void |
service(javax.servlet.ServletRequest arg0,
javax.servlet.ServletResponse arg1) |
void |
setCms(CmsObject cms)
Sets the current cms context.
|
void |
setContext(CmsGwtServiceContext context)
Sets the service context.
|
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the current request.
|
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the current response.
|
protected void |
tryUnlock(CmsResource resource)
Tries to unlock a resource.
|
checkPermutationStrongName, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponsedoPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, servicepublic void checkPermissions(CmsObject cms) throws CmsRoleViolationException
Note that the current request and response are not available yet.
Override if needed.
cms - the current cms objectCmsRoleViolationException - if the security level can not be satisfiedpublic void error(java.lang.Throwable t)
throws CmsRpcException
t - the exceptionCmsRpcException - the converted exceptionpublic CmsObject getCmsObject()
public javax.servlet.http.HttpServletRequest getRequest()
AbstractRemoteServiceServlet.getThreadLocalRequest()public javax.servlet.http.HttpServletResponse getResponse()
AbstractRemoteServiceServlet.getThreadLocalResponse()public void log(java.lang.String msg)
log 在类中 javax.servlet.GenericServletGenericServlet.log(java.lang.String)public void log(java.lang.String message,
java.lang.Throwable t)
log 在类中 javax.servlet.GenericServletGenericServlet.log(java.lang.String, java.lang.Throwable)public void logError(java.lang.Throwable t)
t - the exception to logpublic void service(javax.servlet.ServletRequest arg0,
javax.servlet.ServletResponse arg1)
throws javax.servlet.ServletException,
java.io.IOException
service 在接口中 javax.servlet.Servletservice 在类中 javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionHttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)public void setCms(CmsObject cms)
cms - the current cms context to setpublic void setContext(CmsGwtServiceContext context)
context - the new service contextpublic void setRequest(javax.servlet.http.HttpServletRequest request)
request - the request to setpublic void setResponse(javax.servlet.http.HttpServletResponse response)
response - the response to setprotected com.google.gwt.user.server.rpc.SerializationPolicy doGetSerializationPolicy(javax.servlet.http.HttpServletRequest request,
java.lang.String moduleBaseURL,
java.lang.String strongName)
doGetSerializationPolicy 在类中 com.google.gwt.user.server.rpc.RemoteServiceServletRemoteServiceServlet.doGetSerializationPolicy(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String)protected void doUnexpectedFailure(java.lang.Throwable e)
doUnexpectedFailure 在类中 com.google.gwt.user.server.rpc.AbstractRemoteServiceServletAbstractRemoteServiceServlet.doUnexpectedFailure(java.lang.Throwable)protected CmsLockActionRecord ensureLock(CmsResource resource) throws CmsException
resource - the resource to lockCmsException - if the resource could not be lockedprotected CmsLockActionRecord ensureLock(CmsUUID structureId) throws CmsException
structureId - the structure id of the resourceCmsException - if something goes wrongprotected CmsLockActionRecord ensureLock(java.lang.String sitepath) throws CmsException
sitepath - the site-path of the resource to lockCmsException - if the resource could not be lockedprotected void ensureSession()
throws CmsException
CmsException - if the current user is the guest userprotected java.util.Map<java.lang.String,CmsProperty> getPropertiesByName(java.util.List<CmsProperty> properties)
properties - the list of propertiesprotected void tryUnlock(CmsResource resource)
resource - the resource to unlockprotected void clearThreadStorage()