public class ParamContext
extends java.lang.Object
ContextParam
) capable to host the
value of a Joty datum.
It is used as intermediate medium in parameter passing activities: Identified the 'context' in which a caller/client invokes a method of a provider of some functionality, in all cases in which it is manifest that the actualization of the generic parameter (typically performed through some computation itself) is reusable some where in the same context during its life, then it is convenient to store the value here as if the caller is the server for the parameter value. At the same time or 'later' the 'client' of the parameter value can get it by name from this storage area.
Joty uses this structure along the whole framework, anywhere the above
scenario occurs, but, also, uses it in communication from the client to the
Joty Server. Actually this class takes an important role in the main feature
the framework offers, the duality of the mode of running web or not web: the
instantiated object in non web mode is a decoupler of the interaction between
caller and called part. This decoupling is used in web mode where the object
is in some way disassembled within a BasicPostStatement
vehicle and is
re-composed on the server side.
Furthermore instances of this class are used to allocate different
environments, that can contain even the same set of parameters but each
environment keeping its copy of the values isolated and protected. An
instance of the class is kept in the JotyDialog
object (in the
JotyDialog.m_callContext
member), just right with this task.
In a MenuActivity
object, instead, only a reference to an object of
this type is held; the instance may be embedded or coming from the outside
since shared with the external context.
BasicPostStatement
Modifier and Type | Class and Description |
---|---|
class |
ParamContext.ContextParam |
static class |
ParamContext.CTXP_type |
Modifier and Type | Field and Description |
---|---|
CaselessStringKeyMap<ParamContext.ContextParam> |
m_paramsSet |
Constructor and Description |
---|
ParamContext(JotyMessenger jotyMessanger) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.lang.String |
contextParameter(java.lang.String name) |
void |
copy(java.lang.Object callContext) |
ParamContext.ContextParam |
getContextParam(java.lang.String varName,
ParamContext.CTXP_type type) |
boolean |
isMissingParam(java.lang.String name) |
void |
setContextParam(java.lang.String varName,
java.lang.Double valueExpr) |
void |
setContextParam(java.lang.String varName,
IJotyDate valueExpr) |
void |
setContextParam(java.lang.String varName,
long valueExpr) |
void |
setContextParam(java.lang.String varName,
java.lang.String valueExpr) |
void |
setDirty(boolean predicate) |
public CaselessStringKeyMap<ParamContext.ContextParam> m_paramsSet
public ParamContext(JotyMessenger jotyMessanger)
public void clear()
public java.lang.String contextParameter(java.lang.String name)
public void copy(java.lang.Object callContext)
public ParamContext.ContextParam getContextParam(java.lang.String varName, ParamContext.CTXP_type type)
public boolean isMissingParam(java.lang.String name)
public void setContextParam(java.lang.String varName, java.lang.Double valueExpr)
public void setContextParam(java.lang.String varName, IJotyDate valueExpr)
public void setContextParam(java.lang.String varName, long valueExpr)
public void setContextParam(java.lang.String varName, java.lang.String valueExpr)
public void setDirty(boolean predicate)