public class LongRunningTaskMovePageCommandDecorator extends ConfluenceAbstractLongRunningTask implements MovePageCommand
log, progress
POSITION_ABOVE, POSITION_APPEND, POSITION_BELOW, POSITION_TOP_LEVEL
Constructor and Description |
---|
LongRunningTaskMovePageCommandDecorator(MovePageCommand commandDelegate,
LongRunningTaskManagerInternal longRunningTaskManager) |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute the command.
|
MovePageCommand |
getCommandDelegate() |
String |
getName() |
Page |
getPage() |
Collection<ValidationError> |
getValidationErrors()
Gets the list of errors that are preventing the command from being executed.
|
boolean |
isAuthorized()
Determine if the current user is authorized to execute this command.
|
boolean |
isValid()
Determine if the command is in a valid state to be executed.
|
protected void |
runInternal()
Run the long running process.
|
getResourceBundle, run
public LongRunningTaskMovePageCommandDecorator(MovePageCommand commandDelegate, LongRunningTaskManagerInternal longRunningTaskManager)
public MovePageCommand getCommandDelegate()
public Page getPage()
getPage
in interface MovePageCommand
public boolean isValid()
ServiceCommand
ServiceCommand.execute()
is be expected to perform successfully (unless prevented by some system
error). If this method returns false, execute
will fail with a
NotValidException
.
This method should be called after checking ServiceCommand.isAuthorized()
. If the current user is not
authorized to execute this command, this method must throw a NotAuthorizedException
.
If this method returns false, then ServiceCommand.getValidationErrors()
must return a non-empty list of
errors explaining why the command was not valid. If this method returns true, the collection returned by
getValidationErrors()
must be empty.
isValid
in interface ServiceCommand
public Collection<ValidationError> getValidationErrors()
ServiceCommand
ServiceCommand.isValid()
will always return an empty collection.getValidationErrors
in interface ServiceCommand
ValidationError
objects describing why command validation failedpublic boolean isAuthorized()
ServiceCommand
AuthenticatedUserThreadLocal.get()
.isAuthorized
in interface ServiceCommand
protected void runInternal()
ConfluenceAbstractLongRunningTask
runInternal
in class ConfluenceAbstractLongRunningTask
public void execute()
ServiceCommand
execute
in interface ServiceCommand
public String getName()
getName
in interface com.atlassian.core.task.longrunning.LongRunningTask
Copyright © 2003–2021 Atlassian. All rights reserved.