HDIV API 2.0.4

org.hdiv.dataComposer
Interface IDataComposer

All Known Implementing Classes:
AbstractDataComposer, DataComposerCipher, DataComposerHash, DataComposerMemory

public interface IDataComposer

DataComposers's main interface. There are three implementations: encryption, hash and memory

Author:
Roberto Velasco

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 of the html page sent back by the server.
 void beginRequest(java.lang.String action)
          It is called by each request or form of the html 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, 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 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()
          It is called in the post-processing stage of each user request.
 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.
 IApplication getApplication()
           
 java.lang.String getHDIVParameter()
           
 ISession getSession()
           
 void init(ISession session, IApplication application)
          Initializes IdataComposer with the user session and the application context
 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 setApplication(IApplication application)
           
 void setSession(ISession session)
           
 void startPage()
          It is called in the pre-processing stage of each user request.
 

Method Detail

compose

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. The returned value guarantees the confidentiality in the encoded and memory strategies if confidentiality indicator confidentiality is true.

Parameters:
parameter - HTTP parameter name
value - value generated by server
editable - parameter type: editable(textbox, password,etc.) or non editable (hidden, select, radio, ...)
Returns:
Codified value to send to the client

compose

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. The returned value guarantees the confidentiality in the encoded and memory strategies if confidentiality indicator confidentiality is true.

Parameters:
action - target action
parameter - HTTP parameter name
value - value generated by server
editable - parameter type: editable(textbox, password,etc.) or non editable (hidden, select, radio, ...)
Returns:
Codified value to send to the client

compose

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. The returned value guarantees the confidentiality in the encoded and memory strategies if confidentiality indicator confidentiality is true.

Parameters:
parameter - HTTP parameter name
value - value generated by server
editable - parameter type: editable(textbox, password,etc.) or non editable (hidden, select, radio, ...)
editableName - editable name (text or textarea)
Returns:
Codified value to send to the client
Since:
HDIV 1.1

compose

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. 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.

Parameters:
parameter - HTTP parameter
value - value generated by server
editable - Parameter type: editable(textbox, password,etc.) or non editable (hidden, select, radio, ...)
isActionParam - parameter added in action attribute
charEncoding - character encoding
Returns:
Codified value to send to the client

compose

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. The returned value guarantees the confidentiality in the encoded and memory strategies if confidentiality indicator confidentiality is true.

Parameters:
action - target action
parameter - parameter name
value - value generated by server
editable - parameter type: editable(textbox, password,etc.) or non editable (hidden, select,...)
isActionParam - parameter added in action attribute
charEncoding - character encoding
Returns:
Codified value to send to the client

beginRequest

void beginRequest()
It is called by each request or form of the html page sent back by the server.


beginRequest

void beginRequest(java.lang.String action)
It is called by each request or form of the html page returned by the server, as long as the destiny of the request is an action.

Parameters:
target - Target name

endRequest

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.

Returns:
Identifier composed by the page identifier and the state identifier.

init

void init(ISession session,
          IApplication application)
Initializes IdataComposer with the user session and the application context

Parameters:
session - Http session wrapper
application - ServletContext wrapper

startPage

void startPage()
It is called in the pre-processing stage of each user request.


endPage

void endPage()
It is called in the post-processing stage of each user request.


setSession

void setSession(ISession session)
Parameters:
session - The session to set.

setApplication

void setApplication(IApplication application)
Parameters:
application - The application to set.

getSession

ISession getSession()
Returns:
Returns the session.

getApplication

IApplication getApplication()
Returns:
Returns the application.

mergeParameters

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.

Parameters:
oldParameter - name of the parameter stored in the state
newParameter - name of the new parameter

getHDIVParameter

java.lang.String getHDIVParameter()
Returns:
Returns the HDIV state parameter.

addFlowId

void addFlowId(java.lang.String id)
Adds the flow identifier to the page of type IPage.

Since:
HDIV 2.0.3

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.