1 16 package org.apache.cocoon.components.flow.javascript.fom; 17 18 import org.apache.cocoon.components.flow.FlowHelper; 19 20 import org.mozilla.javascript.Scriptable; 21 22 import java.util.Map ; 23 24 32 public class FOM_JavaScriptFlowHelper extends FlowHelper { 33 34 private static final String PACKAGES_OBJECT = 43 "cocoon.flow.js.packages"; 44 private static final String JAVA_PACKAGE_OBJECT = 45 "cocoon.flow.js.packages.java"; 46 private static final String FOM_REQUEST = 47 "cocoon.flow.js.fom.FOM_Request"; 48 private static final String FOM_RESPONSE = 49 "cocoon.flow.js.fom.FOM_Response"; 50 private static final String FOM_SESSION = 51 "cocoon.flow.js.fom.FOM_Session"; 52 private static final String FOM_CONTEXT = 53 "cocoon.flow.js.fom.FOM_Context"; 54 private static final String FOM_WEB_CONTINUATION = 55 "cocoon.flow.js.fom.FOM_WebContinuation"; 56 59 private static final String FOM_SCOPE = 60 "cocoon.flow.js.fom.FOM_Scope"; 61 62 68 public static Scriptable getPackages(Map objectModel) { 69 return (Scriptable)objectModel.get(PACKAGES_OBJECT); 70 } 71 72 76 public static void setPackages(Map objectModel, Scriptable pkgs) { 77 objectModel.put(PACKAGES_OBJECT, pkgs); 78 } 79 80 86 public static Scriptable getJavaPackage(Map objectModel) { 87 return (Scriptable)objectModel.get(JAVA_PACKAGE_OBJECT); 88 } 89 90 94 public static void setJavaPackage(Map objectModel, Scriptable javaPkg) { 95 objectModel.put(JAVA_PACKAGE_OBJECT, javaPkg); 96 } 97 98 public static Scriptable getFOM_Request(Map objectModel) { 99 return (Scriptable)objectModel.get(FOM_REQUEST); 100 } 101 102 public static void setFOM_Request(Map objectModel, Scriptable fom_request) { 103 objectModel.put(FOM_REQUEST, fom_request); 104 } 105 106 public static Scriptable getFOM_Response(Map objectModel) { 107 return (Scriptable)objectModel.get(FOM_RESPONSE); 108 } 109 110 public static void setFOM_Response(Map objectModel, Scriptable fom_response) { 111 objectModel.put(FOM_RESPONSE, fom_response); 112 } 113 114 public static Scriptable getFOM_Session(Map objectModel) { 115 return (Scriptable)objectModel.get(FOM_SESSION); 116 } 117 118 public static void setFOM_Session(Map objectModel, Scriptable fom_session) { 119 objectModel.put(FOM_SESSION, fom_session); 120 } 121 122 public static Scriptable getFOM_Context(Map objectModel) { 123 return (Scriptable)objectModel.get(FOM_CONTEXT); 124 } 125 126 public static void setFOM_Context(Map objectModel, Scriptable fom_context) { 127 objectModel.put(FOM_CONTEXT, fom_context); 128 } 129 130 public static Scriptable getFOM_WebContinuation(Map objectModel) { 131 return (Scriptable)objectModel.get(FOM_WEB_CONTINUATION); 132 } 133 134 public static void setFOM_WebContinuation(Map objectModel, 135 Scriptable fom_webContinuation) { 136 objectModel.put(FOM_WEB_CONTINUATION, fom_webContinuation); 137 } 138 139 146 public static Scriptable getFOM_FlowScope(Map objectModel) { 147 return (Scriptable)objectModel.get(FOM_SCOPE); 148 } 149 150 157 public static void setFOM_FlowScope(Map objectModel, Scriptable fom_scope) { 158 objectModel.put(FOM_SCOPE, fom_scope); 159 } 160 } 161 | Popular Tags |