Class ContextHelper
java.lang.Object
org.apache.ofbiz.common.scripting.ContextHelper
A set of
ScriptContext
convenience methods for scripting engines.-
Method Summary
Modifier and TypeMethodDescriptionaddBinding
(String key, Object value) expandString
(String original) Expands environment variables delimited with ${}<T> T
Gets the named value from the environment.getParameter
(String key) boolean
isEvent()
boolean
void
Calls putEnv for each entry in the Map, thus allowing for the additional flexibility in naming supported in that method.void
putParameter
(String key, Object value) removeBinding
(String key) <T> T
Removes the named value from the environment.void
setUserLogin
(GenericValue userLogin, String userLoginEnvName)
-
Method Details
-
addBinding
-
expandString
Expands environment variables delimited with ${} -
getDelegator
-
getDispatcher
-
getEnv
Gets the named value from the environment. Supports the "." (dot) syntax to access Map members and the "[]" (bracket) syntax to access List entries. This value is expanded, supporting the insertion of other environment values using the "${}" notation.- Parameters:
key
- The name of the environment value to get. Can contain "." and "[]" syntax elements as described above.- Returns:
- The environment value if found, otherwise null.
-
getErrorMessages
-
getEnvEntryIterator
-
getLocale
-
getVisualTheme
-
getParameter
-
getParameters
-
getRequest
-
getResponse
-
getResult
-
getResults
-
getSecurity
-
getTimeZone
-
getUserLogin
-
isEvent
public boolean isEvent() -
isService
public boolean isService() -
putAllEnv
Calls putEnv for each entry in the Map, thus allowing for the additional flexibility in naming supported in that method. -
putParameter
-
removeBinding
-
removeEnv
Removes the named value from the environment. Supports the "." (dot) syntax to access Map members and the "[]" (bracket) syntax to access List entries. This value is expanded, supporting the insertion of other environment values using the "${}" notation.- Parameters:
key
- The name of the environment value to get. Can contain "." syntax elements as described above.
-
setUserLogin
-