Package com.xpn.xwiki.web
Class EditAction
- java.lang.Object
-
- com.xpn.xwiki.web.XWikiAction
-
- com.xpn.xwiki.web.EditAction
-
- All Implemented Interfaces:
com.xpn.xwiki.internal.web.LegacyAction
- Direct Known Subclasses:
PreviewAction
,SaveAction
@Component @Named("edit") @Singleton public class EditAction extends XWikiAction
Initializes a document before it is edited.- Version:
- $Id: 25d6ca14bb3caf1c0124d85dee7cc91798d30658 $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.web.XWikiAction
ACTION_PROGRESS, componentDescriptor, container, execution, observation, waitForXWikiInitialization
-
-
Constructor Summary
Constructors Constructor Description EditAction()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<? extends XWikiForm>
getFormClass()
protected XWikiDocument
prepareEditedDocument(XWikiContext context)
Determines the edited document (translation) and updates it based on the template specified on the request and any additional request parameters that overwrite the default values from the template.String
render(XWikiContext context)
-
Methods inherited from class com.xpn.xwiki.web.XWikiAction
action, 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
-
-
-
-
Method Detail
-
getFormClass
protected Class<? extends XWikiForm> getFormClass()
- Overrides:
getFormClass
in classXWikiAction
- Returns:
- the class of the XWikiForm in charge of parsing the request
-
render
public String render(XWikiContext context) throws XWikiException
- Overrides:
render
in classXWikiAction
- Throws:
XWikiException
-
prepareEditedDocument
protected XWikiDocument prepareEditedDocument(XWikiContext context) throws XWikiException
Determines the edited document (translation) and updates it based on the template specified on the request and any additional request parameters that overwrite the default values from the template.- Parameters:
context
- the XWiki context- Returns:
- the edited document
- Throws:
XWikiException
- if something goes wrong
-
-