Package org.opencms.ugc.shared.rpc
Interface I_CmsUgcEditService
- All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
- All Known Implementing Classes:
CmsUgcEditService
The form edit service interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroySession
(CmsUUID sessionId) Destroys the given session.getContent
(CmsUUID sessionId) Loads the form content for an existing session.Gets the link corresponding to a given site path.saveContent
(CmsUUID sessionId, Map<String, String> contentValues) Saves the given content values to the edited content.uploadFiles
(CmsUUID sessionId, Set<String> fieldNames, String formDataId) Uploads multiple files.validateContent
(CmsUUID sessionId, Map<String, String> contentValues) Validates the new content values for a content loaded in the given session.
-
Method Details
-
destroySession
Destroys the given session.- Parameters:
sessionId
- the id of the session to destroy- Throws:
CmsRpcException
- if something goes wrong
-
getContent
Loads the form content for an existing session.- Parameters:
sessionId
- the id of the existing session- Returns:
- the form content information
- Throws:
CmsRpcException
- if something goes wrong
-
getLink
Gets the link corresponding to a given site path.- Parameters:
path
- the site path- Returns:
- the link for the path
-
saveContent
Map<String,String> saveContent(CmsUUID sessionId, Map<String, String> contentValues) throws CmsRpcExceptionSaves the given content values to the edited content.- Parameters:
sessionId
- the session idcontentValues
- the content values- Returns:
- the validation errors, if there are any
- Throws:
CmsRpcException
- if something goes wrong
-
uploadFiles
Map<String,String> uploadFiles(CmsUUID sessionId, Set<String> fieldNames, String formDataId) throws CmsRpcException Uploads multiple files.- Parameters:
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 posted- Returns:
- the map from field names to the VFS paths of uploaded files
- Throws:
CmsRpcException
- if something goes wrong
-
validateContent
Map<String,String> validateContent(CmsUUID sessionId, Map<String, String> contentValues) throws CmsUgcExceptionValidates the new content values for a content loaded in the given session.- Parameters:
sessionId
- the id of the session containing the contentcontentValues
- the values to validate- Returns:
- the map of validation results
- Throws:
CmsUgcException
- if something goes wrong
-