com.plumtree.portalpages.browsing.gateway
Class GatewayUtils

java.lang.Object
  extended by com.plumtree.portalpages.browsing.gateway.GatewayUtils

public class GatewayUtils
extends java.lang.Object

Author:
josephs, daniilk

Constructor Summary
GatewayUtils()
           
 
Method Summary
static int AddHeadersToResponse(java.lang.String strRawHeaders, IWebData webData)
           
static int AddHeadersToResponse(java.lang.String strRawHeaders, IWebData webData, boolean bStreaming)
           
static HTMLElement AddMarkupToElement(AActivitySpace _asOwner, java.lang.Object[][] _objArrMarkup)
          The "UI Transformer", see Transformers and Markup DSD in IWS This function converts a markup array as returned by the HTTP GP into HTML elements and converts PT XML tags into HTML -jas This method is designed to be used when there are multiple elements that need markup transformed.
static void AddMarkupToElement(AActivitySpace _asOwner, java.lang.Object[][] _objArrMarkup, HTMLElement _result)
          The "UI Transformer", see Transformers and Markup DSD in IWS This function converts a markup array as returned by the HTTP GP into HTML elements and converts PT XML tags into HTML -jas This method outputs the shared JavaScript in the resulting markup, and the GetSharedJavaScriptFromMarkup method should not be called when this method is used.
static HTMLElement AddMarkupToSingleElement(AActivitySpace _asOwner, java.lang.Object[][] _objArrMarkup)
          The "UI Transformer", see Transformers and Markup DSD in IWS This function converts a markup array as returned by the HTTP GP into HTML elements and converts PT XML tags into HTML -jas This method returns the shared JavaScript in its output, and the GetSharedJavaScriptFromMarkup method should not be called when this method is used.
static boolean ExceptionStackReceived(java.lang.Object[][] objArrMarkup)
           
static java.lang.String GetEffectivePortletTimeout(java.lang.Object[][] objArrMarkup)
           
static int GetErrorCode(java.lang.Object[][] objArrMarkup)
           
static java.lang.String GetErrorMessage(java.lang.Object[][] objArrMarkup)
           
static java.lang.String GetExcepionStackTrace(java.lang.Object[][] objArrMarkup)
           
static boolean GetPortletSupportsPersonalization(int nPortletID, int nPersonalizationType, IPTSession ptSession)
          Check to see whether the given gadget has a particular kind of preferences.
static java.lang.String GetPortletTimeout(java.lang.Object[][] objArrMarkup)
           
static java.lang.String GetResponseBody(java.lang.Object[][] objArrMarkup)
           
static java.lang.String GetResponseStatus(java.lang.Object[][] objArrMarkup)
           
static java.lang.String GetSavedPortletName()
           
static HTMLElement GetSharedJavaScriptFromMarkup(AActivitySpace _asOwner)
          This method returns a single shared JavaScript collection for all of the transformed markup elements on a page.
static boolean GetWebServiceSupportsPersonalization(int nWebServiceID, int nPersonalizationType, IPTSession ptSession)
          Check to see whether the given web service has a particular kind of preferences.
static boolean IsErrorContentArray(java.lang.Object[][] objArrMarkup)
           
static boolean ResponseReceivedForErrors(java.lang.Object[][] objArrMarkup)
           
static boolean SetRedirectToLastHostedPage(AActivitySpace asOwner, IGatewayModel gwModel)
           
static boolean TimeoutErrorReceived(java.lang.Object[][] objArrMarkup)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatewayUtils

public GatewayUtils()
Method Detail

AddHeadersToResponse

public static int AddHeadersToResponse(java.lang.String strRawHeaders,
                                       IWebData webData)

AddHeadersToResponse

public static int AddHeadersToResponse(java.lang.String strRawHeaders,
                                       IWebData webData,
                                       boolean bStreaming)
Parameters:
strRawHeaders -
webData -
Returns:

SetRedirectToLastHostedPage

public static boolean SetRedirectToLastHostedPage(AActivitySpace asOwner,
                                                  IGatewayModel gwModel)

AddMarkupToElement

public static void AddMarkupToElement(AActivitySpace _asOwner,
                                      java.lang.Object[][] _objArrMarkup,
                                      HTMLElement _result)
The "UI Transformer", see Transformers and Markup DSD in IWS This function converts a markup array as returned by the HTTP GP into HTML elements and converts PT XML tags into HTML -jas This method outputs the shared JavaScript in the resulting markup, and the GetSharedJavaScriptFromMarkup method should not be called when this method is used.

Parameters:
_asOwner - Activity Space
_objArrMarkup - markup array in PT_MARKUP_ARRAY_COLS format
_result - markup is added to this element

AddMarkupToSingleElement

public static HTMLElement AddMarkupToSingleElement(AActivitySpace _asOwner,
                                                   java.lang.Object[][] _objArrMarkup)
The "UI Transformer", see Transformers and Markup DSD in IWS This function converts a markup array as returned by the HTTP GP into HTML elements and converts PT XML tags into HTML -jas This method returns the shared JavaScript in its output, and the GetSharedJavaScriptFromMarkup method should not be called when this method is used.

Parameters:
_asOwner - Activity Space
_objArrMarkup - markup array in PT_MARKUP_ARRAY_COLS format
Returns:
HTMLElement The transformed markup.

AddMarkupToElement

public static HTMLElement AddMarkupToElement(AActivitySpace _asOwner,
                                             java.lang.Object[][] _objArrMarkup)
The "UI Transformer", see Transformers and Markup DSD in IWS This function converts a markup array as returned by the HTTP GP into HTML elements and converts PT XML tags into HTML -jas This method is designed to be used when there are multiple elements that need markup transformed. All of these elements share a single JavaScript collection for shared JavaScript. This collection must be displayed in the page before the first markup element is displayed, otherwise there may be JavaScript errors. When using this method to transform markup the oiutput of the GetSharedJavaScriptFromMarkup method must be displayed prior to the transformed elements.

Parameters:
_asOwner - Activity Space
_objArrMarkup - markup array in PT_MARKUP_ARRAY_COLS format
Returns:
HTMLElement The transformed markup.

GetSharedJavaScriptFromMarkup

public static HTMLElement GetSharedJavaScriptFromMarkup(AActivitySpace _asOwner)
This method returns a single shared JavaScript collection for all of the transformed markup elements on a page. This collection must be displayed in the page before the first markup element is displayed, otherwise there may be JavaScript errors. This method should only be used in conjunction with AddMarkupToElement(). It is not needed when using AddMarkupToSingleElement().

Parameters:
_asOwner - Activity Space
Returns:
HTMLElement The shared JavaScript collection.

IsErrorContentArray

public static boolean IsErrorContentArray(java.lang.Object[][] objArrMarkup)

ResponseReceivedForErrors

public static boolean ResponseReceivedForErrors(java.lang.Object[][] objArrMarkup)

TimeoutErrorReceived

public static boolean TimeoutErrorReceived(java.lang.Object[][] objArrMarkup)

ExceptionStackReceived

public static boolean ExceptionStackReceived(java.lang.Object[][] objArrMarkup)

GetErrorCode

public static int GetErrorCode(java.lang.Object[][] objArrMarkup)

GetErrorMessage

public static java.lang.String GetErrorMessage(java.lang.Object[][] objArrMarkup)

GetResponseBody

public static java.lang.String GetResponseBody(java.lang.Object[][] objArrMarkup)

GetResponseStatus

public static java.lang.String GetResponseStatus(java.lang.Object[][] objArrMarkup)

GetPortletTimeout

public static java.lang.String GetPortletTimeout(java.lang.Object[][] objArrMarkup)

GetEffectivePortletTimeout

public static java.lang.String GetEffectivePortletTimeout(java.lang.Object[][] objArrMarkup)

GetExcepionStackTrace

public static java.lang.String GetExcepionStackTrace(java.lang.Object[][] objArrMarkup)

GetPortletSupportsPersonalization

public static boolean GetPortletSupportsPersonalization(int nPortletID,
                                                        int nPersonalizationType,
                                                        IPTSession ptSession)
Check to see whether the given gadget has a particular kind of preferences.

Parameters:
ID - of Portlet
PersonalizationType -
IPTSession -
Returns:
True if the portlet has prefs, false if it does not, or if there was a problem opening the web service.

GetSavedPortletName

public static java.lang.String GetSavedPortletName()
Returns:

GetWebServiceSupportsPersonalization

public static boolean GetWebServiceSupportsPersonalization(int nWebServiceID,
                                                           int nPersonalizationType,
                                                           IPTSession ptSession)
Check to see whether the given web service has a particular kind of preferences.

Parameters:
ID - of WebService
PersonalizationType -
IPTSession -
Returns:
True if the portlet has prefs, false if it does not, or if there was a problem opening the web service.



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