| ASF |
#437879 |
Mon Aug 28 23:48:48 UTC 2006 |
craigmcc |
Beginnings of experiments on improving the Dialog functionality in
Shale.
Abstract out the basic interfaces required to operate in a dialog
environment from the implementation of the state machine. The primary
interface is o.a.s.dialog2.Context, which is instantiated (in request
scope) once per active dialog for a user. It plays a similar role to
what Status does in the current implementation (but does not suffer from
"one active dialog per user" problems). In addition, there is a
simplified Dialog2NavigationHandler that utilizes the new approach to
start up a Context based on a logical outcome with a matching prefix,
but it will also be possible to start a dialog instance
programmatically, by interacting with a o.a.s.dialog2.Contexts (note the
trailing "s") instance provided by a state machine implementation.
This API is packaged in a separate package (org.apache.shale.dialog2),
and uses unique attribute keys for everything, so that it should not
interfere with the existing functionality while we are experimenting.
In fact, as you can see from the POM, it has no direct dependency on the
rest of Shale at the moment either. All you'd need to add is this JAR,
plus the state machine implementation for your favorite version (see
upcoming submits).
WARNING: This code has been desk checked, and compiles clean, but has
not been tested for real yet. I'm committing now for feedback on the
design approach, and so we can all experiment.
SHALE-10 SHALE-48 SHALE-61
|