Class PreSaveWikiPageTask
- java.lang.Object
- 
- org.apache.wiki.workflow.AbstractStep
- 
- org.apache.wiki.workflow.Task
- 
- org.apache.wiki.tasks.pages.PreSaveWikiPageTask
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- Step
 
 public class PreSaveWikiPageTask extends Task Handles the page pre-save actions. If the proposed page text is the same as the current version, theexecute( Context )method returnsOutcome.STEP_ABORT. Any WikiExceptions thrown by page filters will be re-thrown, and the workflow will abort.- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from interface org.apache.wiki.workflow.StepTIME_NOT_SET
 
- 
 - 
Constructor SummaryConstructors Constructor Description PreSaveWikiPageTask(java.lang.String proposedText)Creates the task.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Outcomeexecute(Context context)Executes the processing for this Step and returns an Outcome indicating if it succeeded (Outcome.STEP_COMPLETEorOutcome.STEP_ABORT).- 
Methods inherited from class org.apache.wiki.workflow.TaskgetActor, getSuccessor, setSuccessor
 - 
Methods inherited from class org.apache.wiki.workflow.AbstractStepaddError, addSuccessor, getAvailableOutcomes, getEndTime, getErrors, getMessageKey, getOutcome, getStartTime, getSuccessor, getWorkflowContext, getWorkflowId, isCompleted, isStarted, setOutcome, setWorkflow, start
 
- 
 
- 
- 
- 
Constructor Detail- 
PreSaveWikiPageTaskpublic PreSaveWikiPageTask(java.lang.String proposedText) Creates the task.- Parameters:
- proposedText- The text that was just saved.
 
 
- 
 - 
Method Detail- 
executepublic Outcome execute(Context context) throws WikiException Executes the processing for this Step and returns an Outcome indicating if it succeeded ( Outcome.STEP_COMPLETEorOutcome.STEP_ABORT). Processing instructions can do just about anything, such as executing custom business logic or changing the Step's final outcome viaStep.setOutcome(Outcome). A return value ofSTEP_COMPLETEindicates that the instructions executed completely, without errors;STEP_ABORTindicates that the Step and its parent Workflow should be aborted (that is, fail silently without error). If the execution step encounters any errors, it should throw a WikiException or a subclass.Note that successful execution of this methods does not necessarily mean that the Step is considered "complete"; rather, it just means that it has executed. Therefore, it is possible that executecould run multiple times.- Specified by:
- executein interface- Step
- Specified by:
- executein class- AbstractStep
- Parameters:
- context- executing wiki context.
- Returns:
- the result of the Step, expressed as an Outcome
- Throws:
- WikiException- if the step encounters errors while executing
 
 
- 
 
-