© 2002 BEA Systems, Inc.


examples.e2e.b2b
Class RequestStateImpl

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

public class RequestStateImpl
extends java.lang.Object
implements RequestState

Maintains the portal state for a particular servlet request.

See Also:
Serialized Form

Constructor Summary
RequestStateImpl()
          Constructs a new object.
 
Method Summary
 java.util.Calendar calendar()
          Returns a Calendar for use during this request.
 long getDefaultQpaQty()
          Returns the default quantity value to be displayed in the QPA form.
 java.lang.String getIconUrl(javax.servlet.http.HttpServletRequest request, SessionState sState)
          Returns a URL for obtaining the titlebar icon for the requesting portlet.
 java.util.List getParts()
          Returns the parts inventory to be displayed.
 java.util.List getPOs()
          Returns the purchase orders to be displayed
 java.lang.String getProcessImageURL()
          Returns the image URL for the process portlet.
 java.util.List getProducts()
          Returns the product inventory to be displayed.
 java.util.List getQuotes()
          Returns the quotes to be displayed.
 CalendarFormData qpaCalendarFormData()
          Returns date information collected from the QPA form for redisplay.
 boolean qpaFormDataError()
          Returns true if an error occured when validating form data.
 int qpaFormDataErrorCount()
          Returns a count of the number of errors that have been recorded for the QPA form.
 java.util.List qpaFormDataErrorMsg()
          If qpaFormDataError() returns true this method will return a List of String messages associated with the error(s).
 boolean quoteFormDataError()
          Returns true if an error occured when validating form data.
 java.lang.String quoteFormDataErrorMsg()
          If quoteFormDataError() returns true this method will return a message associated with the error.
 void setDefaultQpaQty(long qty)
          Sets the default quantity value to be displayed in the QPA form.
 void setParts(java.util.List parts)
          Sets this parts inventory to be displayed.
 void setPOs(java.util.List pos)
          Sets the purchase orders to be displayed.
 void setProcessImageURL(java.lang.String url)
          Sets the image URL for the process portlet.
 void setProducts(java.util.List products)
          Sets the product inventory to be displayed.
 CalendarFormData setQpaCalendarFormData(CalendarFormData data)
          Sets the CalendarFormData for this request.
 void setQpaFormDataError(java.lang.String message)
          Use to indicate an error has occured.
 void setQuoteFormDataError(java.lang.String msg)
          Use to indicate an error has occured.
 void setQuotes(java.util.List quotes)
          Sets the quotes to be displayed.
 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

RequestStateImpl

public RequestStateImpl()
Constructs a new object.
Method Detail

calendar

public java.util.Calendar calendar()
Returns a Calendar for use during this request. By using this Calendar all processors and JSPs can use the same effective time when evaluating logic or display output.
Specified by:
calendar in interface RequestState


getIconUrl

public java.lang.String getIconUrl(javax.servlet.http.HttpServletRequest request,
                                   SessionState sState)
                            throws javax.servlet.jsp.JspException
Returns a URL for obtaining the titlebar icon for the requesting portlet. This method must be called during portlet rendering for the results to be meaningful.
Specified by:
getIconUrl in interface RequestState

Parameters:
request - the HttpServletRequest.
sState - the user's SessionState.
Throws:
javax.servlet.jsp.JspException - if unable to obtain information from the portal framework necessary to generate the url.

getProducts

public java.util.List getProducts()
Returns the product inventory to be displayed.
Specified by:
getProducts in interface RequestState

Returns:
a List of Inventory objects.

setProducts

public void setProducts(java.util.List products)
Sets the product inventory to be displayed.
Specified by:
setProducts in interface RequestState

Parameters:
products - a List of Inventory objects.

getParts

public java.util.List getParts()
Returns the parts inventory to be displayed.
Specified by:
getParts in interface RequestState

Returns:
a List of Inventory objects.

setParts

public void setParts(java.util.List parts)
Sets this parts inventory to be displayed.
Specified by:
setParts in interface RequestState

Parameters:
parts - a List of Inventory objects.

getDefaultQpaQty

public long getDefaultQpaQty()
Returns the default quantity value to be displayed in the QPA form.
Specified by:
getDefaultQpaQty in interface RequestState


setDefaultQpaQty

public void setDefaultQpaQty(long qty)
Sets the default quantity value to be displayed in the QPA form.
Specified by:
setDefaultQpaQty in interface RequestState

Parameters:
qty - the default quantity to display in the form.

getQuotes

public java.util.List getQuotes()
Returns the quotes to be displayed.
Specified by:
getQuotes in interface RequestState

Returns:
a List of PurchaseQuote objects.

setQuotes

public void setQuotes(java.util.List quotes)
Sets the quotes to be displayed.
Specified by:
setQuotes in interface RequestState

Parameters:
quotes - a List of PurchaseQuote objects.

getPOs

public java.util.List getPOs()
Returns the purchase orders to be displayed
Specified by:
getPOs in interface RequestState

Returns:
a List of PO objects.

setPOs

public void setPOs(java.util.List pos)
Sets the purchase orders to be displayed.
Specified by:
setPOs in interface RequestState

Parameters:
pos - a List of PO objects.

getProcessImageURL

public java.lang.String getProcessImageURL()
Returns the image URL for the process portlet.
Specified by:
getProcessImageURL in interface RequestState


setProcessImageURL

public void setProcessImageURL(java.lang.String url)
Sets the image URL for the process portlet.
Specified by:
setProcessImageURL in interface RequestState

Parameters:
the - current process image url.

qpaFormDataError

public boolean qpaFormDataError()
Returns true if an error occured when validating form data. Messages corresponding to the error(s) can be retrieved with the qpaFormDataErrorMsg() method.
Specified by:
qpaFormDataError in interface RequestState

See Also:
qpaFormDataErrorMsg(), qpaFormDataErrorCount(), setQpaFormDataError(java.lang.String)

qpaFormDataErrorCount

public int qpaFormDataErrorCount()
Returns a count of the number of errors that have been recorded for the QPA form.
Specified by:
qpaFormDataErrorCount in interface RequestState

Returns:
zero if qpaFormDataError() returns false, otherwise the the number of errors will be returned and will be equal to the size of the List returned by qpaFormDataErrorMsg().
See Also:
qpaFormDataError(), setQpaFormDataError(java.lang.String), qpaFormDataErrorMsg()

qpaFormDataErrorMsg

public java.util.List qpaFormDataErrorMsg()
If qpaFormDataError() returns true this method will return a List of String messages associated with the error(s).
Specified by:
qpaFormDataErrorMsg in interface RequestState

Returns:
a List of String objects or null if no errors have occured.
See Also:
qpaFormDataError(), qpaFormDataErrorCount(), setQpaFormDataError(java.lang.String)

setQpaFormDataError

public void setQpaFormDataError(java.lang.String message)
Use to indicate an error has occured. The message will be added to a list of messages and can be retrieved with the qpaFormDataErrorMsg() call. Use of this method will cause a call to qpaFormDataError() to return true.
Specified by:
setQpaFormDataError in interface RequestState

Parameters:
message - a string indicating the error that occured.
See Also:
qpaFormDataErrorMsg(), qpaFormDataError(), qpaFormDataErrorCount()

qpaCalendarFormData

public CalendarFormData qpaCalendarFormData()
Returns date information collected from the QPA form for redisplay.
Specified by:
qpaCalendarFormData in interface RequestState

Returns:
a populated CalendarFormData or null. See QpaProcessor for more details on when this value is valid.

setQpaCalendarFormData

public CalendarFormData setQpaCalendarFormData(CalendarFormData data)
Sets the CalendarFormData for this request.
Specified by:
setQpaCalendarFormData in interface RequestState


quoteFormDataError

public boolean quoteFormDataError()
Returns true if an error occured when validating form data. A message corresponding to the error(s) can be retrieved with the quoteFormDataErrorMsg() method.
Specified by:
quoteFormDataError in interface RequestState

See Also:
setQuoteFormDataError(java.lang.String), quoteFormDataErrorMsg()

quoteFormDataErrorMsg

public java.lang.String quoteFormDataErrorMsg()
If quoteFormDataError() returns true this method will return a message associated with the error.
Specified by:
quoteFormDataErrorMsg in interface RequestState

Returns:
a String corresponding to the error that occurred.
See Also:
quoteFormDataError(), setQuoteFormDataError(java.lang.String)

setQuoteFormDataError

public void setQuoteFormDataError(java.lang.String msg)
Use to indicate an error has occured. The message can be retrieved with a call to quoteFormDataErrorMsg(). Use of this method will cause a call to quoteFormDataError() to return true.
Specified by:
setQuoteFormDataError in interface RequestState

Parameters:
msg - a string indicating the error that occured.
See Also:
quoteFormDataErrorMsg(), quoteFormDataError()

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