© 2002 BEA Systems, Inc.


examples.e2e.b2b
Class SessionStateImpl

java.lang.Object
  |
  +--examples.e2e.b2b.SessionStateImpl

public class SessionStateImpl
extends java.lang.Object
implements SessionState

The SessionState maintains the portal state for a particular HTTP session.

See Also:
Serialized Form

Constructor Summary
SessionStateImpl(StateValue state)
          Constructs a new object with the current state value as specified by the input parameter.
 
Method Summary
 Inventory getPart()
          Returns the part selected.
 Inventory getProduct()
          Returns the product selected.
 QPA getQpa()
          Returns the QPA.
 PurchaseQuote getQuote()
          Returns the PurchaseQuote.
 StateValue getState()
          Returns the current state for this session.
 java.util.Calendar partSelectedTime()
          Retrieves the time at which the customer selected the part in the part inventory portlet.
 java.util.Calendar poSubmittedTime()
          Retrieves the time at which the customer submitted the PO in the PO review portlet.
 boolean poTimedOut(java.util.Calendar currentDate)
          This method determines if the timeout has elapsed since the PO was submitted to the supplier.
 java.util.Calendar qpaSentTime()
          Retrieves the time at which the customer sent the QPA in the price query portlet.
 java.util.Calendar quoteSelectedTime()
          Retrieves the time at which the customer selected the quote in the price quote portlet.
 boolean quoteTimedOut(java.util.Calendar currentDate)
          This method determines if the timeout has elapsed since the QPA was submitted to suppliers.
 void reset()
          Clears all values from the object.
 void setPart(Inventory part)
          Sets this part as the selected part.
 java.util.Calendar setPartSelectedTime(java.util.Calendar calendar)
          Sets the time at which the customer selected the part in the part inventory portlet.
 java.util.Calendar setPOSubmittedTime(java.util.Calendar calendar)
          Sets the time at which the customer submitted the PO in the PO review portlet.
 java.util.Calendar setPOTimeout(java.util.Calendar timeoutDate)
          Set the time after which the purchase order acknowledgement system is considered to be timed out.
 void setProduct(Inventory product)
          Sets this product as the selected product.
 void setQpa(QPA qpa)
          Sets the QPA.
 java.util.Calendar setQPASentTime(java.util.Calendar calendar)
          Sets the time at which the customer sent the qpa in the price query portlet.
 void setQuote(PurchaseQuote quote)
          Returns the PurchaseQuote.
 java.util.Calendar setQuoteSelectedTime(java.util.Calendar calendar)
          Sets the time at which the customer selected a quote in the price quote portlet.
 java.util.Calendar setQuoteTimeout(java.util.Calendar timeoutDate)
          Set the time after which the quote system is considered to be timed out.
 void setState(StateValue state)
          Sets the current state for this session.
 java.lang.String toString()
          Returns a string representation of this object, primarily intended for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionStateImpl

public SessionStateImpl(StateValue state)
Constructs a new object with the current state value as specified by the input parameter.

Parameters:
state - the current state for the new object.
Method Detail

reset

public void reset()
Clears all values from the object.
Specified by:
reset in interface SessionState


getProduct

public Inventory getProduct()
Returns the product selected.
Specified by:
getProduct in interface SessionState


setProduct

public void setProduct(Inventory product)
Sets this product as the selected product.
Specified by:
setProduct in interface SessionState

Parameters:
product - the selected product.

getPart

public Inventory getPart()
Returns the part selected.
Specified by:
getPart in interface SessionState


setPart

public void setPart(Inventory part)
Sets this part as the selected part.
Specified by:
setPart in interface SessionState

Parameters:
part - the selected part.

getQpa

public QPA getQpa()
Returns the QPA.
Specified by:
getQpa in interface SessionState


setQpa

public void setQpa(QPA qpa)
Sets the QPA.
Specified by:
setQpa in interface SessionState

Parameters:
qpa - the QPA for this session.

getQuote

public PurchaseQuote getQuote()
Returns the PurchaseQuote.
Specified by:
getQuote in interface SessionState


setQuote

public void setQuote(PurchaseQuote quote)
Returns the PurchaseQuote.
Specified by:
setQuote in interface SessionState

Parameters:
quote - the selected PurchaseQuote.

getState

public StateValue getState()
Returns the current state for this session.
Specified by:
getState in interface SessionState


setState

public void setState(StateValue state)
Sets the current state for this session.
Specified by:
setState in interface SessionState

Parameters:
state - the new state for this session.

quoteTimedOut

public boolean quoteTimedOut(java.util.Calendar currentDate)
This method determines if the timeout has elapsed since the QPA was submitted to suppliers. This method works in conjunction with setQuoteTimeout(java.util.Calendar) which is used to indicate the date after which the quote system is considered to be timed out.
Specified by:
quoteTimedOut in interface SessionState

Parameters:
currentDate - a Calendar representing the current time with which to compare against the timeout time.
Returns:
true if currentDate is after the timeout time, false otherwise.

poTimedOut

public boolean poTimedOut(java.util.Calendar currentDate)
This method determines if the timeout has elapsed since the PO was submitted to the supplier. This method works in conjunction with setPOTimeout(java.util.Calendar) which is used to indicate the date after which the purchase order acknowledgement system is considered to be timed out.
Specified by:
poTimedOut in interface SessionState

Parameters:
currentDate - a Calendar representing the current time with which to compare against the timeout time.
Returns:
true if currentDate is after the timeout time, false otherwise.

setQuoteTimeout

public java.util.Calendar setQuoteTimeout(java.util.Calendar timeoutDate)
Set the time after which the quote system is considered to be timed out. This method works in conjunction with quoteTimedOut(java.util.Calendar) which compares the timeout time with the current time and returns an appropriate boolean response.
Specified by:
setQuoteTimeout in interface SessionState

Parameters:
timeoutDate - the time after which the system is considered to be timed out.
Returns:
the Calendar passed in to this method.

setPOTimeout

public java.util.Calendar setPOTimeout(java.util.Calendar timeoutDate)
Set the time after which the purchase order acknowledgement system is considered to be timed out. This method works in conjunction with poTimedOut(java.util.Calendar) which compares the timeout time with the current time and returns an appropriate boolean response.
Specified by:
setPOTimeout in interface SessionState

Parameters:
timeoutDate - the time after which the system is considered to be timed out.
Returns:
the Calendar passed in to this method.

setPartSelectedTime

public java.util.Calendar setPartSelectedTime(java.util.Calendar calendar)
Sets the time at which the customer selected the part in the part inventory portlet. This value is used for display purposes.
Specified by:
setPartSelectedTime in interface SessionState

Parameters:
calendar - a Calendar representing the time the part was selected.
Returns:
the Calendar passed in to this method.

partSelectedTime

public java.util.Calendar partSelectedTime()
Retrieves the time at which the customer selected the part in the part inventory portlet. This value is used for display purposes.
Specified by:
partSelectedTime in interface SessionState


setQPASentTime

public java.util.Calendar setQPASentTime(java.util.Calendar calendar)
Sets the time at which the customer sent the qpa in the price query portlet. This value is used for display purposes.
Specified by:
setQPASentTime in interface SessionState

Parameters:
calendar - a Calendar representing the time the QPA was submitted.

qpaSentTime

public java.util.Calendar qpaSentTime()
Retrieves the time at which the customer sent the QPA in the price query portlet. This value is used for display purposes.
Specified by:
qpaSentTime in interface SessionState


setQuoteSelectedTime

public java.util.Calendar setQuoteSelectedTime(java.util.Calendar calendar)
Sets the time at which the customer selected a quote in the price quote portlet. This value is used for display purposes.
Specified by:
setQuoteSelectedTime in interface SessionState

Parameters:
calendar - a Calendar representing the time the PurchaseQuote was selected by the user.

quoteSelectedTime

public java.util.Calendar quoteSelectedTime()
Retrieves the time at which the customer selected the quote in the price quote portlet. This value is used for display purposes.
Specified by:
quoteSelectedTime in interface SessionState


setPOSubmittedTime

public java.util.Calendar setPOSubmittedTime(java.util.Calendar calendar)
Sets the time at which the customer submitted the PO in the PO review portlet. This value is used for display purposes.
Specified by:
setPOSubmittedTime in interface SessionState

Parameters:
calendar - a Calendar representing the time the PO was submitted.

poSubmittedTime

public java.util.Calendar poSubmittedTime()
Retrieves the time at which the customer submitted the PO in the PO review portlet. This value is used for display purposes.
Specified by:
poSubmittedTime in interface SessionState


toString

public java.lang.String toString()
Returns a string representation of this object, primarily intended for debugging.

Overrides:
toString in class java.lang.Object

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved