public class CmsUgcEditService extends CmsGwtService implements I_CmsUgcEditService
Constructor and Description |
---|
CmsUgcEditService() |
Modifier and Type | Method and Description |
---|---|
void |
checkPermissions(CmsObject cms)
Checks the permissions of the current user to match the required security level.
|
void |
destroySession(CmsUUID sessionId)
Destroys the given session.
|
void |
error(java.lang.Throwable t)
Logs and re-throws the given exception for RPC responses.
|
CmsUgcContent |
getContent(CmsUUID sessionId)
Loads the form content for an existing session.
|
java.lang.String |
getLink(java.lang.String path)
Gets the link corresponding to a given site path.
|
protected void |
handleUpload(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles all multipart requests.
|
java.util.Map<java.lang.String,java.lang.String> |
saveContent(CmsUUID sessionId,
java.util.Map<java.lang.String,java.lang.String> contentValues)
Saves the given content values to the edited content.
|
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
java.util.Map<java.lang.String,java.lang.String> |
uploadFiles(CmsUUID sessionId,
java.util.Set<java.lang.String> fieldNames,
java.lang.String formDataId)
Uploads multiple files.
|
java.util.Map<java.lang.String,java.lang.String> |
validateContent(CmsUUID sessionId,
java.util.Map<java.lang.String,java.lang.String> contentValues)
Validates the new content values for a content loaded in the given session.
|
clearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, setResponse, tryUnlock
checkPermutationStrongName, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponse
doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified
public CmsUgcEditService()
public void checkPermissions(CmsObject cms)
CmsGwtService
Note that the current request and response are not available yet.
Override if needed.
checkPermissions
in class CmsGwtService
cms
- the current cms objectCmsGwtService.checkPermissions(org.opencms.file.CmsObject)
public void destroySession(CmsUUID sessionId) throws CmsUgcException
I_CmsUgcEditService
destroySession
in interface I_CmsUgcEditService
sessionId
- the id of the session to destroyCmsUgcException
I_CmsUgcEditService.destroySession(org.opencms.util.CmsUUID)
public void error(java.lang.Throwable t) throws CmsUgcException
CmsGwtService
error
in class CmsGwtService
t
- the exceptionCmsUgcException
CmsGwtService.error(java.lang.Throwable)
public CmsUgcContent getContent(CmsUUID sessionId) throws CmsUgcException
I_CmsUgcEditService
getContent
in interface I_CmsUgcEditService
sessionId
- the id of the existing sessionCmsUgcException
I_CmsUgcEditService.getContent(org.opencms.util.CmsUUID)
public java.lang.String getLink(java.lang.String path)
I_CmsUgcEditService
getLink
in interface I_CmsUgcEditService
path
- the site pathI_CmsUgcEditService.getLink(java.lang.String)
protected void handleUpload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- the requestresponse
- the responsepublic java.util.Map<java.lang.String,java.lang.String> saveContent(CmsUUID sessionId, java.util.Map<java.lang.String,java.lang.String> contentValues) throws CmsUgcException
I_CmsUgcEditService
saveContent
in interface I_CmsUgcEditService
sessionId
- the session idcontentValues
- the content valuesCmsUgcException
I_CmsUgcEditService.saveContent(org.opencms.util.CmsUUID, java.util.Map)
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public java.util.Map<java.lang.String,java.lang.String> uploadFiles(CmsUUID sessionId, java.util.Set<java.lang.String> fieldNames, java.lang.String formDataId) throws CmsRpcException
I_CmsUgcEditService
uploadFiles
in interface I_CmsUgcEditService
sessionId
- the session idfieldNames
- the set of field names of the form fields containing the uploaded filesformDataId
- the form data id of the form submit in which the form fields were postedCmsRpcException
- if something goes wrongI_CmsUgcEditService.uploadFiles(org.opencms.util.CmsUUID, java.util.Set, java.lang.String)
public java.util.Map<java.lang.String,java.lang.String> validateContent(CmsUUID sessionId, java.util.Map<java.lang.String,java.lang.String> contentValues) throws CmsUgcException
I_CmsUgcEditService
validateContent
in interface I_CmsUgcEditService
sessionId
- the id of the session containing the contentcontentValues
- the values to validateCmsUgcException
- if something goes wrongI_CmsUgcEditService.validateContent(org.opencms.util.CmsUUID, java.util.Map)