HDIV API 2.0.4

org.hdiv.dataComposer
Class DataComposerHash

java.lang.Object
  extended by org.hdiv.dataComposer.AbstractDataComposer
      extended by org.hdiv.dataComposer.DataComposerMemory
          extended by org.hdiv.dataComposer.DataComposerHash
All Implemented Interfaces:
IDataComposer

public class DataComposerHash
extends DataComposerMemory

It generates the page states stored in the client and in the user session. These states will be added to each possible request encoded in Base64 and the hash of each state will be stored in the user session. With this implementation we are able to check if the hash received in a request is equal to the one stored in session, which means the request is correct.

Author:
Gorka Vicente
See Also:
DataComposerMemory

Field Summary
 
Fields inherited from class org.hdiv.dataComposer.DataComposerMemory
DASH, lastParameter, page, requestCounter, state, statesStack
 
Constructor Summary
DataComposerHash()
           
 
Method Summary
 java.lang.String endRequest()
          The state that is sent to the client is generated in Base64 and the hash of this state is stored in the session.
 EncodingUtil getEncodingUtil()
           
 void setAllowedLength(int allowedLength)
           
 void setEncodingUtil(EncodingUtil encodingUtil)
           
 
Methods inherited from class org.hdiv.dataComposer.DataComposerMemory
addFlowId, beginRequest, beginRequest, compose, compose, compose, compose, compose, compose, compose, endPage, getHDIVParameter, getHdivStateSuffix, getPage, init, initTesting, mergeParameters, setConfidentiality, setHdivConfig, setPage, startPage, updateComposerState
 
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
 

Constructor Detail

DataComposerHash

public DataComposerHash()
Method Detail

endRequest

public java.lang.String endRequest()
The state that is sent to the client is generated in Base64 and the hash of this state is stored in the session. Thus, it is able to check the state received in the request with the hash in the server.

Specified by:
endRequest in interface IDataComposer
Overrides:
endRequest in class DataComposerMemory
Returns:
Obtains the state encoded in Base64 that will be added to the request in the HDIV extra parameter.

getEncodingUtil

public EncodingUtil getEncodingUtil()
Returns:
Returns the encoding util.

setEncodingUtil

public void setEncodingUtil(EncodingUtil encodingUtil)
Parameters:
encodingUtil - The encoding util to set.

setAllowedLength

public void setAllowedLength(int allowedLength)
Parameters:
allowedLength - The allowed length to set.

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.