@Component @Named(value="save") @Singleton public class SaveAction extends EditAction
Used as a generic action for saving documents.
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_NAME
The identifier of the save action.
|
protected static String |
ASYNC_PARAM |
ACTION_PROGRESS, componentDescriptor, container, execution, handleRedirectObject, observation, waitForXWikiInitialization
Constructor and Description |
---|
SaveAction() |
Modifier and Type | Method and Description |
---|---|
boolean |
action(XWikiContext context) |
String |
render(XWikiContext context) |
boolean |
save(XWikiContext context)
Saves the current document, updated according to the parameters sent in the request.
|
getFormClass, prepareEditedDocument
answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRedirectObject, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, writeAjaxErrorResponse
public static final String ACTION_NAME
protected static final String ASYNC_PARAM
public boolean save(XWikiContext context) throws XWikiException
context
- The current request context
.true
if there was an error and the response needs to render an error page,
false
if the document was correctly saved.XWikiException
- If an error occured: cannot communicate with the storage module, or cannot update the
document because the request contains invalid parameters.public boolean action(XWikiContext context) throws XWikiException
action
in class XWikiAction
XWikiException
public String render(XWikiContext context) throws XWikiException
render
in class EditAction
XWikiException
Copyright © 2004–2021 XWiki. All rights reserved.