@Component @Named(value="delete") @Singleton public class DeleteAction extends XWikiAction
Modifier and Type | Field and Description |
---|---|
protected static String |
ACTION_NAME |
protected static String |
ASYNC_PARAM |
protected static String |
CONFIRM_PARAM
confirm parameter name.
|
protected static String |
EMPTY_RECYCLE_BIN |
protected static String |
RECYCLED_DOCUMENT_ID_PARAM |
ACTION_PROGRESS, componentDescriptor, container, execution, handleRedirectObject, observation, waitForXWikiInitialization
Constructor and Description |
---|
DeleteAction() |
Modifier and Type | Method and Description |
---|---|
boolean |
action(XWikiContext context) |
protected boolean |
delete(XWikiContext context) |
protected boolean |
deleteDocument(EntityReference entityReference,
XWikiContext context,
boolean shouldSkipRecycleBin)
Create a job to delete an entity.
|
String |
render(XWikiContext context) |
answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getFormClass, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRedirectObject, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, writeAjaxErrorResponse
protected static final String CONFIRM_PARAM
protected static final String ACTION_NAME
protected static final String ASYNC_PARAM
protected static final String RECYCLED_DOCUMENT_ID_PARAM
protected static final String EMPTY_RECYCLE_BIN
public boolean action(XWikiContext context) throws XWikiException
action
in class XWikiAction
XWikiException
public String render(XWikiContext context) throws XWikiException
render
in class XWikiAction
XWikiException
protected boolean delete(XWikiContext context) throws XWikiException
XWikiException
@Unstable protected boolean deleteDocument(EntityReference entityReference, XWikiContext context, boolean shouldSkipRecycleBin) throws XWikiException
shouldSkipRecycleBin
parameter.
When shouldSkipRecycleBin
is true
the entity is preferably permanently deleted.
Otherwise, the entity is preferably moved to the recycle bin.
Note that it only express a choice made by the user.
If the user does not have the right to remove an entity permanently, the entity might still be saved in the
recycle bin.
If the wiki does not have access to a recycle bin, the entity might be permanently removed, regardless of the
user's preferences.entityReference
- the entity to deletecontext
- the current context, used to access the user's requestshouldSkipRecycleBin
- if false
the entity is preferably sent to the recycle bin, if true
,
the entity is preferably deleted permanentlytrue
if the user is redirected, false
otherwiseXWikiException
- if anything goes wrong during the document deletionCopyright © 2004–2021 XWiki. All rights reserved.