From fb55eb8ac9393eddaf791102c25027f312a951f0 Mon Sep 17 00:00:00 2001 From: dsyer Date: Tue, 11 Mar 2008 21:48:19 +0000 Subject: [PATCH] OPEN - issue BATCH-425: Add documentation for RepeatTemplate --- docs/src/site/docbook/reference/repeat.xml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/docs/src/site/docbook/reference/repeat.xml b/docs/src/site/docbook/reference/repeat.xml index f24167463..def9a31e1 100644 --- a/docs/src/site/docbook/reference/repeat.xml +++ b/docs/src/site/docbook/reference/repeat.xml @@ -80,6 +80,80 @@ template.iterate(new RepeatCallback() { if you want to count the number of occurrences of an even in the iteration and remember it across subsequent calls. + +
+ ExitStatus + + ExitStatus is used by Spring Batch to + indicate whether processing has finished, and if so whether or not is + was successful. It is also used to carry textual information about the + end state of a batch or iteration, in the form of an exit code and a + description of the status in freeform text. These are the properties of + an ExitStatus: + + + ExitStatus properties + + + + + Property Name + + Type + + Description + + + + continuable + + boolean + + true if there is more work to do + + + + exitCode + + String + + Short code describing the exit status, e.g. CONTINUABLE, + FINISHED, FAILED + + + + exitDescription + + String + + Long description of the exit status, could be a stack + trace for example. + + + +
+ + ExitStatus values are designed to be + flexible, so that they can be created with any code and description the + user needs. Spring Batch comes with some standard values out of the box, + to support common use cases, but users are free to create their own + values, as long as the semantics of teh continuable + property are honoured. + + ExitStatus values can also be combined with valrious operators + built into the class as methods. You can add an exit code, or + description, or combine the continuable values with logical AND using + methods in ExitStatus. You can also combine two ExitStatus values with + the and method taking ExitStatus as a parameter. The effect of this is + to do a logical AND on the continuable flag, concatenate the + descriptions and replace the exit code with the new value, as long as + the result is continuable, or the input is not continuable. This has the + effect of maintaining the semantics of the continuable flag, but not + making any "surprising" changes to the exit code (e.g. it never becomes + CONTINUABLE when it was already FINISHED, unless someone does something + wilful, like pass in a value that is not continuable, but with a code of + CONTINUABLE). +