|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.activityspace.WebData
public class WebData
This object wraps HTMLPages and binary data for output to the browser. There will be methods for setting HTTP Headers for the browser. This implementation of the IWebData interface is intended for use by the Interpreter.
Constructor Summary | |
---|---|
WebData(IXPResponse _response,
java.lang.String _strImageBaseURL,
int _nSecurityMode,
boolean _isSecure,
BrowserType _ptBrowserType)
Creates a new WebData object. |
Method Summary | |
---|---|
void |
AddCookie(XPCookie c)
Call this method to add a cookie to the response. |
void |
ClearAllData()
This method is used to clear all of the underlying data from this object to ensure that no memory is "leaked" if a Display Page mistakenly maintains a reference to this object. |
void |
ClearOutputData()
This clears the data to be output (text or binary) so that this object can be used again. |
void |
FlushData()
This optional method flushes all current data in the HTMLPage to the browser. |
boolean |
HasSentData()
This method tells you whether or not the data on this object has already been sent using the OutputData() method. |
boolean |
IsBinaryData()
This method tells you whether or not the data on this object is binary. |
boolean |
IsDataSet()
This method tells you whether or not the data on this object is already set using either of the SetData() methods. |
boolean |
IsHTMLData()
This method tells you whether or not the data on this object is HTML text. |
void |
OutputData()
This method outputs the data 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- Helper method to set the content language header from the locale. |
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 |
SetDataSent()
This method marks the data as being sent so that this page cannot be redisplayed. |
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 |
setResponse(IXPResponse _response)
|
void |
SetStatus(int iStatus)
This method sets a status of the response., |
void |
SetSuppressAutomaticHeaders(boolean bSuppress)
This method turns on or off automatic HTTP headers (such as the automatic expires header set to now). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebData(IXPResponse _response, java.lang.String _strImageBaseURL, int _nSecurityMode, boolean _isSecure, BrowserType _ptBrowserType)
_response
- IXPResponse assigned to the member variable m_xpResponse_strImageBaseURL
- String assigned to the member variable m_strImageBaseURL_nSecurityMode
- int assigned to the member variable _nSecurityMode_isSecure
- boolean assigned to the member variable m_bIsSecure_ptBrowserType
- BrowserType assigned to the member variable m_ptBrowserTypeMethod Detail |
---|
public void setResponse(IXPResponse _response)
public boolean RequireNonEmptyBody(boolean bRequireNonEmptyBody)
RequireNonEmptyBody
in interface IWebData
bRequireNonEmptyBody
- - TRUE if you want WebData object to throw an exception
in case of sending an emptry body, FALSE otherwise.
public void SetContentLanguage(java.lang.String _sLocale)
SetContentLanguage
in interface IWebData
_sLocale
- (e.g.: en-US)public void AddCookie(XPCookie c)
AddCookie
in interface IWebData
XPCookie
- Pass an XPCookiepublic void ClearAllData()
public void ClearOutputData()
public void FlushData()
IWebData
FlushData
in interface IWebData
This 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.
public boolean IsBinaryData()
public boolean IsHTMLData()
public boolean IsDataSet()
public boolean HasSentData()
public void SetDataSent()
public void OutputData()
public void SendRedirect(java.lang.String _strLocation)
SendRedirect
in interface IWebData
_strLocation
- Where to gopublic void SetData(HTMLElement element)
IWebData
SetData
in interface IWebData
public void SetData(java.lang.String strData)
IWebData
SetData
in interface IWebData
String
- text to output to the browserThis method sets the string for output to the browser.
Only one SetData method should be called.
public void SetData(byte[] arrBodyBinary)
IWebData
SetData
in interface IWebData
HTMLPage
- page to output to the browserThis method sets the HTMLPage for output to the browser.
Only one SetData method should be called.
public void SetIsHTMLText(boolean _bIsHTMLText)
IWebData
SetIsHTMLText
in interface IWebData
public void SetHeader(java.lang.String strHeaderName, java.lang.String strHeaderValue)
IWebData
SetHeader
in interface IWebData
String
- header nameString
- header valueThis method sets a HTTP header to a specified value
public void SetDateHeader(java.lang.String strHeaderName, XPDateTime xpDate)
IWebData
SetDateHeader
in interface IWebData
IWebData.SetDateHeader(String, XPDateTime)
public void SetStatus(int iStatus)
IWebData
SetStatus
in interface IWebData
iStatus
- public void SetSuppressAutomaticHeaders(boolean bSuppress)
boolean
- true implies suppress automatic headers
false implies show automatic headers
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |