org.apache.taglibs.rdc.scxml
Class SCXMLDigester

java.lang.Object
  extended byorg.apache.taglibs.rdc.scxml.SCXMLDigester

public class SCXMLDigester
extends java.lang.Object

The SCXMLDigester can be used to:
a) Digest a SCXML file placed in a web application context
b) Obtain a Digester instance configured with rules for SCXML digestion
c) Serialize an SCXML object (primarily for debugging)

Author:
Rahul Akolkar

Nested Class Summary
static class SCXMLDigester.DigestSrcAttributeRule
          Custom digestion rule for external sources, that is, the src attribute of the <state> element
static class SCXMLDigester.SetExecutableParentRule
          Custom digestion rule for setting Executable parent of Action elements
static class SCXMLDigester.UpdateModelRule
          Custom digestion rule for establishing necessary associations within the SCXML object, which include:
1) Updation of the SCXML object's global targets Map
2) Obtaining a handle to the SCXML object's NotificationRegistry
 
Constructor Summary
SCXMLDigester()
           
 
Method Summary
static SCXML digest(java.lang.String documentRealPath, org.xml.sax.ErrorHandler errHandler, Context evalCtx, Evaluator evalEngine, PathResolver pr)
          API for standalone usage where the SCXML document is a URI.
static SCXML digest(java.net.URL scxmlURL, org.xml.sax.ErrorHandler errHandler, Context evalCtx, Evaluator evalEngine)
          API for standalone usage where the SCXML document is a URL.
static java.lang.String serializeSCXML(SCXML scxml)
          Serialize this SCXML object (primarily for debugging)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCXMLDigester

public SCXMLDigester()
Method Detail

digest

public static SCXML digest(java.net.URL scxmlURL,
                           org.xml.sax.ErrorHandler errHandler,
                           Context evalCtx,
                           Evaluator evalEngine)
API for standalone usage where the SCXML document is a URL.

Parameters:
scxmlURL - a canonical absolute URL to parse (relative URLs within the top level document are to be resovled against this URL).
errHandler - The SAX ErrorHandler
evalCtx - the document-level variable context for guard condition evaluation
evalEngine - the scripting/expression language engine for creating local state-level variable contexts (if supported by a given scripting engine)
Returns:
SCXML The SCXML object corresponding to the file argument
See Also:
Context, ErrorHandler, Evaluator, PathResolver

digest

public static SCXML digest(java.lang.String documentRealPath,
                           org.xml.sax.ErrorHandler errHandler,
                           Context evalCtx,
                           Evaluator evalEngine,
                           PathResolver pr)
API for standalone usage where the SCXML document is a URI. A PathResolver must be provided.

Parameters:
documentRealPath - The String pointing to the absolute (real) path of the SCXML config
errHandler - The SAX ErrorHandler
evalCtx - the document-level variable context for guard condition evaluation
evalEngine - the scripting/expression language engine for creating local state-level variable contexts (if supported by a given scripting engine)
Returns:
SCXML The SCXML object corresponding to the file argument
See Also:
Context, ErrorHandler, Evaluator, PathResolver

serializeSCXML

public static java.lang.String serializeSCXML(SCXML scxml)
Serialize this SCXML object (primarily for debugging)

Parameters:
scxml - The SCXML to be serialized
Returns:
String The serialized SCXML


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.