Package org.opencms.ugc.shared.rpc
Interface I_CmsUgcEditServiceAsync
public interface I_CmsUgcEditServiceAsync
The asynchronous form edit service interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroySession(CmsUUID sessionId, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Destroys a session.com.google.gwt.http.client.RequestBuildergetContent(CmsUUID sessionId, com.google.gwt.user.client.rpc.AsyncCallback<CmsUgcContent> callback) Returns the form content for an existing session.com.google.gwt.http.client.RequestBuilderGets the link corresponding to a given site path.com.google.gwt.http.client.RequestBuildersaveContent(CmsUUID sessionId, Map<String, String> contentValues, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, String>> callback) Saves the given content values to the edited content.com.google.gwt.http.client.RequestBuilderuploadFiles(CmsUUID sessionId, Set<String> fieldNames, String formDataId, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, String>> filenameCallback) Uploads submitted file form fields to the VFS.com.google.gwt.http.client.RequestBuildervalidateContent(CmsUUID sessionId, Map<String, String> values, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, String>> resultCallback) Validates the new content values for a content loaded in the given session.
-
Method Details
-
destroySession
@SynchronizedRpcRequest void destroySession(CmsUUID sessionId, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback) Destroys a session.- Parameters:
sessionId- the id of the session to destroycallback- if something goes wrong
-
getContent
com.google.gwt.http.client.RequestBuilder getContent(CmsUUID sessionId, com.google.gwt.user.client.rpc.AsyncCallback<CmsUgcContent> callback) Returns the form content for an existing session.- Parameters:
sessionId- the id of the existing sessioncallback- the callback for the result- Returns:
- the request builder for this RPC call
-
getLink
com.google.gwt.http.client.RequestBuilder getLink(String path, com.google.gwt.user.client.rpc.AsyncCallback<String> resultCallback) Gets the link corresponding to a given site path.- Parameters:
path- the site pathresultCallback- the callback for the result- Returns:
- the request builder for the RPC call
-
saveContent
com.google.gwt.http.client.RequestBuilder saveContent(CmsUUID sessionId, Map<String, String> contentValues, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, String>> callback) Saves the given content values to the edited content.- Parameters:
sessionId- the session idcontentValues- the content valuescallback- the callback- Returns:
- the request builder for this RPC call
-
uploadFiles
com.google.gwt.http.client.RequestBuilder uploadFiles(CmsUUID sessionId, Set<String> fieldNames, String formDataId, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, String>> filenameCallback) Uploads submitted file form fields to the VFS.- Parameters:
sessionId- the session idfieldNames- the set of names of the form fields containing the uploadsformDataId- the form data idfilenameCallback- the callback to call with the resulting map from field names to file paths- Returns:
- the request builder for this service method
-
validateContent
com.google.gwt.http.client.RequestBuilder validateContent(CmsUUID sessionId, Map<String, String> values, com.google.gwt.user.client.rpc.AsyncCallback<Map<String, String>> resultCallback) Validates the new content values for a content loaded in the given session.- Parameters:
sessionId- the id of the session containing the contentvalues- the values to validateresultCallback- the callback to call with the result- Returns:
- the request builder for the RPC call
-