|
HDIV API 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hdiv.dataComposer.AbstractDataComposer
org.hdiv.dataComposer.DataComposerMemory
public class DataComposerMemory
It generates the states of each page by storing them in the user session. To be able to associate the request state with the state stored in session, an extra parameter is added to each request, containing the state identifier which makes possible to get the state of the user session.
Non editable values are hidden to the client, guaranteeing confidentiality
AbstractDataComposer,
org.hdiv.composer.IDataComposer| Field Summary | |
|---|---|
protected static java.lang.String |
DASH
Dash character |
protected IParameter |
lastParameter
Last parameter treated by the compose method |
protected IPage |
page
Page with the possible requests or states |
protected int |
requestCounter
Represents the identifier of each possible state stored in the page page. |
protected IState |
state
State that represents all the data of a request or a form existing in a page page |
protected java.util.Stack |
statesStack
States stack to store all states of the page page |
| Constructor Summary | |
|---|---|
DataComposerMemory()
|
|
| Method Summary | |
|---|---|
void |
addFlowId(java.lang.String id)
Adds the flow identifier to the page of type IPage. |
void |
beginRequest()
It is called by each request or form existing in the page returned by the server. |
void |
beginRequest(java.lang.String action)
It is called in the pre-processing stage of each request or form existing in the page returned by the server, as long as the destiny of the request is an action. |
java.lang.String |
compose(java.lang.String parameter,
java.lang.String value,
boolean editable)
It generates a new encoded value for the parameter parameter
and the value value passed as parameters. |
java.lang.String |
compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
boolean isActionParam)
Adds a new IParameter object, generated from the values passed as parameters, to the current state state. |
java.lang.String |
compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
boolean isActionParam,
java.lang.String charEncoding)
Adds a new IParameter object, generated from the values passed as parameters, to the current state state. |
java.lang.String |
compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
java.lang.String editableName)
It generates a new encoded value for the parameter parameter
and the value value passed as parameters. |
java.lang.String |
compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
java.lang.String editableName,
boolean isActionParam,
java.lang.String charEncoding)
Adds a new IParameter object, generated from the values passed as parameters, to the current state state. |
java.lang.String |
compose(java.lang.String action,
java.lang.String parameter,
java.lang.String value,
boolean editable)
It generates a new encoded value for the parameter parameter
and the value value passed as parameters. |
java.lang.String |
compose(java.lang.String action,
java.lang.String parameter,
java.lang.String value,
boolean editable,
boolean isActionParam,
java.lang.String charEncoding)
It generates a new encoded value for the parameter parameter
and the value value passed as parameters. |
void |
endPage()
This method is called in the pre-processing stage of each user request to add an IPage object, which represents the page to show by the server, with all its states to the user session. |
java.lang.String |
endRequest()
It is called in the pre-processing stage of each request or form existing in the page returned by the server. |
java.lang.String |
getHDIVParameter()
|
java.lang.String |
getHdivStateSuffix()
Obtains the suffix to add to the _HDIV_STATE_ parameter in the memory version. |
IPage |
getPage()
|
void |
init()
DataComposerMemory initialization with HTTP session wrapper and new stack to store all states of the page page. |
void |
initTesting()
Testing initialization |
void |
mergeParameters(java.lang.String oldParameter,
java.lang.String newParameter)
Creates a new parameter called newParameter and adds all the
values of oldParameter stored in the state to it. |
void |
setConfidentiality(java.lang.Boolean confidentiality)
|
void |
setHdivConfig(HDIVConfig hdivConfig)
|
void |
setPage(IPage page)
|
void |
startPage()
It is called in the pre-processing stage of each user request assigning a new page identifier to the page. |
void |
updateComposerState()
Updates the state state of this with the state
in the first position of the state stack. |
| Methods inherited from class org.hdiv.dataComposer.AbstractDataComposer |
|---|
getAction, getApplication, getPageId, getSession, init, initPageId, setAction, setApplication, setSession |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hdiv.dataComposer.IDataComposer |
|---|
getApplication, getSession, init, setApplication, setSession |
| Field Detail |
|---|
protected static final java.lang.String DASH
protected IPage page
protected IState state
page
protected IParameter lastParameter
protected int requestCounter
page.
protected java.util.Stack statesStack
page
| Constructor Detail |
|---|
public DataComposerMemory()
| Method Detail |
|---|
public void init()
page.
public void initTesting()
public java.lang.String compose(java.lang.String parameter,
java.lang.String value,
boolean editable)
parameter
and the value value passed as parameters. The returned value
guarantees the confidentiality in the encoded and memory strategies if
confidentiality indicator confidentiality is true.
compose in interface IDataComposerparameter - HTTP parameter namevalue - value generated by servereditable - parameter type: editable(textbox, password,etc.) or non
editable (hidden, select, radio, ...)
public java.lang.String compose(java.lang.String action,
java.lang.String parameter,
java.lang.String value,
boolean editable)
parameter
and the value value passed as parameters. The returned value
guarantees the confidentiality in the encoded and memory strategies if
confidentiality indicator confidentiality is true.
compose in interface IDataComposeraction - target actionparameter - HTTP parameter namevalue - value generated by servereditable - parameter type: editable(textbox, password,etc.) or non
editable (hidden, select, radio, ...)
public java.lang.String compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
boolean isActionParam)
state. If confidentiality is activated it
generates a new encoded value that will be returned by the server for the
parameter parameter in the encoded and memory strategies.
parameter - HTTP parametervalue - value generated by servereditable - Parameter type: editable(textbox, password,etc.) or non
editable (hidden, select, radio, ...)isActionParam - parameter added in action attribute
public java.lang.String compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
java.lang.String editableName)
parameter
and the value value passed as parameters. The returned value
guarantees the confidentiality in the encoded and memory strategies if
confidentiality indicator confidentiality is true.
compose in interface IDataComposerparameter - HTTP parameter namevalue - value generated by servereditable - parameter type: editable(textbox, password,etc.) or non
editable (hidden, select, radio, ...)editableName - editable name (text or textarea)
public java.lang.String compose(java.lang.String action,
java.lang.String parameter,
java.lang.String value,
boolean editable,
boolean isActionParam,
java.lang.String charEncoding)
parameter
and the value value passed as parameters. The returned value
guarantees the confidentiality in the encoded and memory strategies if
confidentiality indicator confidentiality is true.
compose in interface IDataComposeraction - target actionparameter - parameter namevalue - value generated by servereditable - parameter type: editable(textbox, password,etc.) or non
editable (hidden, select,...)isActionParam - parameter added in action attributecharEncoding - character encoding
public java.lang.String compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
boolean isActionParam,
java.lang.String charEncoding)
state. If confidentiality is activated it
generates a new encoded value that will be returned by the server for the
parameter parameter in the encoded and memory strategies.
compose in interface IDataComposerparameter - HTTP parametervalue - value generated by servereditable - Parameter type: editable(textbox, password,etc.) or non
editable (hidden, select, radio, ...)isActionParam - parameter added in action attributecharEncoding - character encoding
public java.lang.String compose(java.lang.String parameter,
java.lang.String value,
boolean editable,
java.lang.String editableName,
boolean isActionParam,
java.lang.String charEncoding)
state. If confidentiality is activated it
generates a new encoded value that will be returned by the server for the
parameter parameter in the encoded and memory strategies.
parameter - HTTP parametervalue - value generated by servereditable - Parameter type: editable(textbox, password,etc.) or non
editable (hidden, select, radio, ...)editableName - editable name (text or textarea)isActionParam - parameter added in action attributecharEncoding - character encoding
public void mergeParameters(java.lang.String oldParameter,
java.lang.String newParameter)
newParameter and adds all the
values of oldParameter stored in the state to it.
mergeParameters in interface IDataComposeroldParameter - name of the parameter stored in the statenewParameter - name of the new parameterpublic void beginRequest()
beginRequest in interface IDataComposerbeginRequest in class AbstractDataComposerpublic void beginRequest(java.lang.String action)
beginRequest in interface IDataComposerbeginRequest in class AbstractDataComposeraction - action namebeginRequest()public java.lang.String endRequest()
page and returns and identifier compoded by
the page identifier and the state identifier.
endRequest in interface IDataComposerpublic java.lang.String getHdivStateSuffix()
public void updateComposerState()
state of this with the state
in the first position of the state stack. If the state stack is empty it does
nothing.
public void startPage()
startPage in interface IDataComposerpublic void endPage()
endPage in interface IDataComposerpublic IPage getPage()
public void setPage(IPage page)
page - The page to set.public void setConfidentiality(java.lang.Boolean confidentiality)
confidentiality - The confidentiality to set.public void setHdivConfig(HDIVConfig hdivConfig)
hdivConfig - The HDIV configuration object to set.public java.lang.String getHDIVParameter()
getHDIVParameter in interface IDataComposerpublic void addFlowId(java.lang.String id)
IPage.
addFlowId in interface IDataComposer
|
HDIV 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||