org.apache.cocoon.components.flow.javascript.fom
Class FOM_JavaScriptFlowHelper

java.lang.Object
  extended by org.apache.cocoon.components.flow.FlowHelper
      extended by org.apache.cocoon.components.flow.javascript.JavaScriptFlowHelper
          extended by org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptFlowHelper

public class FOM_JavaScriptFlowHelper
extends JavaScriptFlowHelper

Provides the interface between the JavaScript flow controller layer and the view layer. A view can obtain the JavaScript "live connect" objects (that allow access to Java constructors) through this interface, as well as the FOM objects.

Version:
CVS $Id: FOM_JavaScriptFlowHelper.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Constructor Summary
FOM_JavaScriptFlowHelper()
           
 
Method Summary
static org.mozilla.javascript.Scriptable getFOM_Context(Map objectModel)
           
static org.mozilla.javascript.Scriptable getFOM_FlowScope(Map objectModel)
          Get the flowscript scope, usable by JS snippets part of the control layer, such as forms event listeners.
static org.mozilla.javascript.Scriptable getFOM_Request(Map objectModel)
           
static org.mozilla.javascript.Scriptable getFOM_Response(Map objectModel)
           
static org.mozilla.javascript.Scriptable getFOM_Session(Map objectModel)
           
static org.mozilla.javascript.Scriptable getFOM_WebContinuation(Map objectModel)
           
static org.mozilla.javascript.Scriptable getJavaPackage(Map objectModel)
          Return the JS "java" property (that gives access to the "java" package) for use by the view layer
static org.mozilla.javascript.Scriptable getPackages(Map objectModel)
          Return the JS "Packages" property (that gives access to Java packages) for use by the view layer
static void setFOM_Context(Map objectModel, org.mozilla.javascript.Scriptable fom_context)
           
static void setFOM_FlowScope(Map objectModel, org.mozilla.javascript.Scriptable fom_scope)
          Set the flowscript scope usable by JS snippets.
static void setFOM_Request(Map objectModel, org.mozilla.javascript.Scriptable fom_request)
           
static void setFOM_Response(Map objectModel, org.mozilla.javascript.Scriptable fom_response)
           
static void setFOM_Session(Map objectModel, org.mozilla.javascript.Scriptable fom_session)
           
static void setFOM_WebContinuation(Map objectModel, org.mozilla.javascript.Scriptable fom_webContinuation)
           
static void setJavaPackage(Map objectModel, org.mozilla.javascript.Scriptable javaPkg)
          Set the JS "java" property in the current request
static void setPackages(Map objectModel, org.mozilla.javascript.Scriptable pkgs)
          Set the JS "Packages" property in the current request
 
Methods inherited from class org.apache.cocoon.components.flow.javascript.JavaScriptFlowHelper
unwrap
 
Methods inherited from class org.apache.cocoon.components.flow.FlowHelper
getContextObject, getWebContinuation, setContextObject, setWebContinuation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FOM_JavaScriptFlowHelper

public FOM_JavaScriptFlowHelper()
Method Detail

getPackages

public static org.mozilla.javascript.Scriptable getPackages(Map objectModel)
Return the JS "Packages" property (that gives access to Java packages) for use by the view layer

Parameters:
objectModel - The Cocoon Environment's object model
Returns:
The Packages property

setPackages

public static void setPackages(Map objectModel,
                               org.mozilla.javascript.Scriptable pkgs)
Set the JS "Packages" property in the current request

Parameters:
objectModel - The Cocoon Environment's object model

getJavaPackage

public static org.mozilla.javascript.Scriptable getJavaPackage(Map objectModel)
Return the JS "java" property (that gives access to the "java" package) for use by the view layer

Parameters:
objectModel - The Cocoon Environment's object model
Returns:
The java package property

setJavaPackage

public static void setJavaPackage(Map objectModel,
                                  org.mozilla.javascript.Scriptable javaPkg)
Set the JS "java" property in the current request

Parameters:
objectModel - The Cocoon Environment's object model

getFOM_Request

public static org.mozilla.javascript.Scriptable getFOM_Request(Map objectModel)

setFOM_Request

public static void setFOM_Request(Map objectModel,
                                  org.mozilla.javascript.Scriptable fom_request)

getFOM_Response

public static org.mozilla.javascript.Scriptable getFOM_Response(Map objectModel)

setFOM_Response

public static void setFOM_Response(Map objectModel,
                                   org.mozilla.javascript.Scriptable fom_response)

getFOM_Session

public static org.mozilla.javascript.Scriptable getFOM_Session(Map objectModel)

setFOM_Session

public static void setFOM_Session(Map objectModel,
                                  org.mozilla.javascript.Scriptable fom_session)

getFOM_Context

public static org.mozilla.javascript.Scriptable getFOM_Context(Map objectModel)

setFOM_Context

public static void setFOM_Context(Map objectModel,
                                  org.mozilla.javascript.Scriptable fom_context)

getFOM_WebContinuation

public static org.mozilla.javascript.Scriptable getFOM_WebContinuation(Map objectModel)

setFOM_WebContinuation

public static void setFOM_WebContinuation(Map objectModel,
                                          org.mozilla.javascript.Scriptable fom_webContinuation)

getFOM_FlowScope

public static org.mozilla.javascript.Scriptable getFOM_FlowScope(Map objectModel)
Get the flowscript scope, usable by JS snippets part of the control layer, such as forms event listeners.

Parameters:
objectModel - the object model where the scope is stored
Returns:
the flowscript scope

setFOM_FlowScope

public static void setFOM_FlowScope(Map objectModel,
                                    org.mozilla.javascript.Scriptable fom_scope)
Set the flowscript scope usable by JS snippets.

Parameters:
objectModel -
fom_scope -
See Also:
getFOM_FlowScope(Map)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.