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, tryUnlockcheckPermutationStrongName, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponsedoPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModifiedpublic CmsUgcEditService()
public void checkPermissions(CmsObject cms)
CmsGwtServiceNote that the current request and response are not available yet.
Override if needed.
checkPermissions in class CmsGwtServicecms - the current cms objectCmsGwtService.checkPermissions(org.opencms.file.CmsObject)public void destroySession(CmsUUID sessionId) throws CmsUgcException
I_CmsUgcEditServicedestroySession in interface I_CmsUgcEditServicesessionId - the id of the session to destroyCmsUgcExceptionI_CmsUgcEditService.destroySession(org.opencms.util.CmsUUID)public void error(java.lang.Throwable t) throws CmsUgcException
CmsGwtServiceerror in class CmsGwtServicet - the exceptionCmsUgcExceptionCmsGwtService.error(java.lang.Throwable)public CmsUgcContent getContent(CmsUUID sessionId) throws CmsUgcException
I_CmsUgcEditServicegetContent in interface I_CmsUgcEditServicesessionId - the id of the existing sessionCmsUgcExceptionI_CmsUgcEditService.getContent(org.opencms.util.CmsUUID)public java.lang.String getLink(java.lang.String path)
I_CmsUgcEditServicegetLink in interface I_CmsUgcEditServicepath - the site pathI_CmsUgcEditService.getLink(java.lang.String)public 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_CmsUgcEditServicesaveContent in interface I_CmsUgcEditServicesessionId - the session idcontentValues - the content valuesCmsUgcExceptionI_CmsUgcEditService.saveContent(org.opencms.util.CmsUUID, java.util.Map)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_CmsUgcEditServiceuploadFiles in interface I_CmsUgcEditServicesessionId - 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_CmsUgcEditServicevalidateContent in interface I_CmsUgcEditServicesessionId - 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)protected void handleUpload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request - the requestresponse - the responseprotected 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.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionHttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)