Package com.xpn.xwiki.web
Class SaveAction
- java.lang.Object
-
- com.xpn.xwiki.web.XWikiAction
-
- com.xpn.xwiki.web.EditAction
-
- com.xpn.xwiki.web.SaveAction
-
- All Implemented Interfaces:
com.xpn.xwiki.internal.web.LegacyAction
@Component @Named("save") @Singleton public class SaveAction extends EditActionAction used for saving and proceeding to view the saved page.Used as a generic action for saving documents.
- Version:
- $Id: 2f8d0b71739fd793bf3aef966a229d466528943e $
-
-
Field Summary
Fields Modifier and Type Field Description static StringACTION_NAMEThe identifier of the save action.protected static StringASYNC_PARAM-
Fields inherited from class com.xpn.xwiki.web.XWikiAction
ACTION_PROGRESS, componentDescriptor, container, execution, observation, waitForXWikiInitialization
-
-
Constructor Summary
Constructors Constructor Description SaveAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaction(XWikiContext context)Stringrender(XWikiContext context)booleansave(XWikiContext context)Saves the current document, updated according to the parameters sent in the request.-
Methods inherited from class com.xpn.xwiki.web.EditAction
getFormClass, prepareEditedDocument
-
Methods inherited from class com.xpn.xwiki.web.XWikiAction
answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, supportRedirections, writeAjaxErrorResponse
-
-
-
-
Field Detail
-
ACTION_NAME
public static final String ACTION_NAME
The identifier of the save action.- See Also:
- Constant Field Values
-
ASYNC_PARAM
protected static final String ASYNC_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
save
public boolean save(XWikiContext context) throws XWikiException
Saves the current document, updated according to the parameters sent in the request.- Parameters:
context- The current requestcontext.- Returns:
trueif there was an error and the response needs to render an error page,falseif the document was correctly saved.- Throws:
XWikiException- If an error occured: cannot communicate with the storage module, or cannot update the document because the request contains invalid parameters.
-
action
public boolean action(XWikiContext context) throws XWikiException
- Overrides:
actionin classXWikiAction- Throws:
XWikiException
-
render
public String render(XWikiContext context) throws XWikiException
- Overrides:
renderin classEditAction- Throws:
XWikiException
-
-