com.plumtree.uiinfrastructure.activityspace
Interface IWebData

All Known Implementing Classes:
WebData

public interface IWebData

This object wraps HTMLPages and binary data for output to the browser. There will be methods for setting HTTP Headers for the browser. This interface is intended for use in IDisplayPages.

Author:
Don Hayler

Method Summary
 void AddCookie(XPCookie c)
          Call this method to add a cookie to the response.
 void FlushData()
          This optional method flushes all current data in the HTMLPage to the browser.
 boolean RequireNonEmptyBody(boolean bRequireNonEmptyBody)
          This method determines if WebData object will throw an exception in case of sending an empty body of not.
 void SendRedirect(java.lang.String _strLocation)
          Sends a true 302 redirect immediatly.
 void SetContentLanguage(java.lang.String _sLocale)
          JF- Sets the value of the content language.
 void SetData(byte[] arrBodyBinary)
          This method sets array of bytes as the data to be sent to the browser.
 void SetData(HTMLElement element)
          This method sets the HTMLElement as the data to be sent to the browser.
 void SetData(java.lang.String strData)
          This method sets string as the data to be sent to the browser.
 void SetDateHeader(java.lang.String strHeaderName, XPDateTime xpDate)
          Sets a response date header with the given name and date-value.
 void SetHeader(java.lang.String strHeaderName, java.lang.String strHeaderValue)
          This method sets a specified header on the response.
 void SetIsHTMLText(boolean _bIsHTMLText)
          This method specifies whether the text data for this WebData object is HTML or not.
 void SetStatus(int iStatus)
          This method sets a status of the response.,
 

Method Detail

AddCookie

void AddCookie(XPCookie c)
Call this method to add a cookie to the response.

Parameters:
XPCookie - Pass an XPCookie

FlushData

void FlushData()
This optional method flushes all current data in the HTMLPage to the browser. This should only be called when the banner has been fully added to the HTMLPage. This method requires SetData to have been called first. This means that the HTMLHead element must be completed and that all HTMLObjects (like tables) that are currently in the HTMLBody element need to be complete. Data will not be able to be added to them after flushing. Data will be able to be added to the HTMLBody only. This is not currently implemented.


SendRedirect

void SendRedirect(java.lang.String _strLocation)
Sends a true 302 redirect immediatly.

Parameters:
_strLocation - Where to go

SetData

void SetData(HTMLElement element)
This method sets the HTMLElement as the data to be sent to the browser. The element should be an HTMLPage element in most cases - the only time that the element will not be an HTMLPage is when you want to display partial page content. Only one SetData method should be called.

Parameters:
HTMLElement - to output to the browser

SetData

void SetData(byte[] arrBodyBinary)
This method sets array of bytes as the data to be sent to the browser. Only one SetData method should be called.

Parameters:
byte[] - binary data to output to the browser

SetData

void SetData(java.lang.String strData)
This method sets string as the data to be sent to the browser. Only one SetData method should be called.

Parameters:
String - string to output to the browser

SetIsHTMLText

void SetIsHTMLText(boolean _bIsHTMLText)
This method specifies whether the text data for this WebData object is HTML or not. This method is not relevant for binary data. Text data is assumed to be HTML by default.

Parameters:
boolean - whether or not the text data is HTML

SetContentLanguage

void SetContentLanguage(java.lang.String _sLocale)
JF- Sets the value of the content language. The current value of the content language will be set on every response.

Parameters:
_sLocale - (e.g.: en-US)

SetHeader

void SetHeader(java.lang.String strHeaderName,
               java.lang.String strHeaderValue)
This method sets a specified header on the response.

Parameters:
String - that specifies the name of the HTTP header to set
String - that specifies the value of the HTTP header

SetDateHeader

void SetDateHeader(java.lang.String strHeaderName,
                   XPDateTime xpDate)
Sets a response date header with the given name and date-value.

Parameters:
String - strHeaderName - a String containing the name of the Date header
XPDateTime - xpDate - an XPDateTime containing the date.

SetStatus

void SetStatus(int iStatus)
This method sets a status of the response.,

Parameters:
iStatus - an integer corresponding to the HTTP status code

RequireNonEmptyBody

boolean RequireNonEmptyBody(boolean bRequireNonEmptyBody)
This method determines if WebData object will throw an exception in case of sending an empty body of not.

Parameters:
bRequireNonEmptyBody - - TRUE if you want WebData object to throw an exception in case of sending an emptry body, FALSE otherwise.
Returns:
previous value of the flag



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.