com.plumtree.portalpages.browsing.gateway
Class GatewayModel

java.lang.Object
  extended by com.plumtree.portalpages.browsing.gateway.GatewayModel
All Implemented Interfaces:
IGatewayModel, IGatewayModelRO, IManagedObject, IModel, IModelRO, IMVCObject

public class GatewayModel
extends java.lang.Object
implements IGatewayModel, IGatewayModelRO

Author:
daniilk

Field Summary
static java.lang.String STR_MVC_CLASS_NAME
           
static java.lang.String strModelName
          Deprecated. Use STR_MVC_CLASS_NAME instead
 
Constructor Summary
GatewayModel()
           
 
Method Summary
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 byte[] GetBinaryBody()
          This method returns the body of the response from the remote server as an array of bytes.
 int GetCommunityID()
           
 java.lang.String GetContentType()
          This method returns the value of the content-type header from the HTTP response that came from the remote server
 HTMLElement GetDisplayElement()
           
 int GetErrorCode()
           
 java.lang.String GetErrorHTMLComment()
           
 java.lang.String GetErrorMessage()
           
 java.lang.String GetHeaders()
           
 boolean GetIsHostedMode()
           
 java.lang.String GetName()
          Return the name of the MVC object.
 int GetRefreshMode()
           
 IPTSession GetSession()
           
 int GetStatus()
           
 java.lang.String GetSubtitle()
           
 java.lang.Object[][] GetTextBody()
          This method returns the body of the response from the remote server as string.
 java.lang.String GetTitle()
           
 java.lang.String GetUIMode()
           
 java.lang.String GetUserURL()
           
 void Init(AActivitySpace parent)
          This method initializes the model.
 boolean IsDeviceUIMode()
           
 boolean IsErrorPage()
           
 boolean IsReturnPage()
           
 boolean IsText()
           
 void SetCommunityID(int iCommunityID)
           
 void SetControlCalled()
           
 void SetDisplayElement(HTMLElement elemDisplayString)
          Set the HTMLElement tree to be displayed.
 void SetDisplayMode(int iMode)
           
 void SetError(int iErrorCode, java.lang.String strErrorMessage, java.lang.String strErrorHTMLComment)
           
 void SetFileName(java.lang.String strFileName)
          DCA - for documents in the knowledge directory
 void SetIPTContent(IPTContent ptContent)
          This method is used to set gateway content on the model.
 void SetIsHostedModePTTagPresent(boolean _bHostedMode)
           
 void SetRefreshMode(int iRefreshMode)
           
 void SetReturnURIContent(int iStatusCode, java.lang.String strHeaders, java.lang.String strBody)
           
 void SetSubtitle(java.lang.String strSubtitle)
           
 void SetTitle(java.lang.String strTitle)
           
 void SetUIMode(java.lang.String strUIMode)
           
 void SetUserURL(java.lang.String strUserURL)
           
 boolean WasControlCalled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

strModelName

public static final java.lang.String strModelName
Deprecated. Use STR_MVC_CLASS_NAME instead
See Also:
Constant Field Values
Constructor Detail

GatewayModel

public GatewayModel()
Method Detail

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
See Also:
IModel.CleanupTempData()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
See Also:
IModel.CleanupAllData()

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

GetBinaryBody

public byte[] GetBinaryBody()
This method returns the body of the response from the remote server as an array of bytes.

Specified by:
GetBinaryBody in interface IGatewayModelRO
Returns:

GetContentType

public java.lang.String GetContentType()
This method returns the value of the content-type header from the HTTP response that came from the remote server

Specified by:
GetContentType in interface IGatewayModelRO
Returns:

GetHeaders

public java.lang.String GetHeaders()
Specified by:
GetHeaders in interface IGatewayModelRO
Returns:

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IGatewayModelRO
Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
IMVCObject.GetName()

GetSession

public IPTSession GetSession()
Specified by:
GetSession in interface IGatewayModelRO
Returns:

GetStatus

public int GetStatus()
Specified by:
GetStatus in interface IGatewayModelRO
Returns:

GetTextBody

public java.lang.Object[][] GetTextBody()
This method returns the body of the response from the remote server as string.

Specified by:
GetTextBody in interface IGatewayModelRO
Returns:

Init

public void Init(AActivitySpace parent)
Description copied from interface: IModel
This method initializes the model. This is called automatically when AActivitySpace.RegisterModel() is called.

Specified by:
Init in interface IModel
Parameters:
parent - the parent Activity Space
See Also:
IModel.Init(AActivitySpace)

IsErrorPage

public boolean IsErrorPage()
Specified by:
IsErrorPage in interface IGatewayModelRO
Returns:

IsReturnPage

public boolean IsReturnPage()
Specified by:
IsReturnPage in interface IGatewayModelRO
Returns:

IsText

public boolean IsText()
Specified by:
IsText in interface IGatewayModelRO
Returns:

SetError

public void SetError(int iErrorCode,
                     java.lang.String strErrorMessage,
                     java.lang.String strErrorHTMLComment)
Specified by:
SetError in interface IGatewayModel

GetErrorCode

public int GetErrorCode()
Specified by:
GetErrorCode in interface IGatewayModelRO

GetErrorMessage

public java.lang.String GetErrorMessage()
Specified by:
GetErrorMessage in interface IGatewayModelRO

GetErrorHTMLComment

public java.lang.String GetErrorHTMLComment()
Specified by:
GetErrorHTMLComment in interface IGatewayModelRO

SetIPTContent

public void SetIPTContent(IPTContent ptContent)
This method is used to set gateway content on the model.

Specified by:
SetIPTContent in interface IGatewayModel

SetReturnURIContent

public void SetReturnURIContent(int iStatusCode,
                                java.lang.String strHeaders,
                                java.lang.String strBody)
Specified by:
SetReturnURIContent in interface IGatewayModel

SetUserURL

public void SetUserURL(java.lang.String strUserURL)
Specified by:
SetUserURL in interface IGatewayModel

GetUserURL

public java.lang.String GetUserURL()
Specified by:
GetUserURL in interface IGatewayModelRO

WasControlCalled

public boolean WasControlCalled()
Specified by:
WasControlCalled in interface IGatewayModelRO

SetControlCalled

public void SetControlCalled()
Specified by:
SetControlCalled in interface IGatewayModel

SetCommunityID

public void SetCommunityID(int iCommunityID)
Specified by:
SetCommunityID in interface IGatewayModel

GetCommunityID

public int GetCommunityID()
Specified by:
GetCommunityID in interface IGatewayModelRO

SetUIMode

public void SetUIMode(java.lang.String strUIMode)
Specified by:
SetUIMode in interface IGatewayModel

GetUIMode

public java.lang.String GetUIMode()
Specified by:
GetUIMode in interface IGatewayModelRO

IsDeviceUIMode

public boolean IsDeviceUIMode()
Specified by:
IsDeviceUIMode in interface IGatewayModelRO

GetRefreshMode

public int GetRefreshMode()
Specified by:
GetRefreshMode in interface IGatewayModelRO

SetRefreshMode

public void SetRefreshMode(int iRefreshMode)
Specified by:
SetRefreshMode in interface IGatewayModel

SetDisplayElement

public void SetDisplayElement(HTMLElement elemDisplayString)
Description copied from interface: IGatewayModel
Set the HTMLElement tree to be displayed. NOTE: We do this instead of the display string so that other portlets can add JavaScript/Styles to it later (before it is converted into a string).

Specified by:
SetDisplayElement in interface IGatewayModel

GetDisplayElement

public HTMLElement GetDisplayElement()
Specified by:
GetDisplayElement in interface IGatewayModelRO

GetIsHostedMode

public boolean GetIsHostedMode()

GetTitle

public java.lang.String GetTitle()
Specified by:
GetTitle in interface IGatewayModelRO

GetSubtitle

public java.lang.String GetSubtitle()
Specified by:
GetSubtitle in interface IGatewayModelRO

SetIsHostedModePTTagPresent

public void SetIsHostedModePTTagPresent(boolean _bHostedMode)

SetDisplayMode

public void SetDisplayMode(int iMode)

SetTitle

public void SetTitle(java.lang.String strTitle)
Specified by:
SetTitle in interface IGatewayModel

SetSubtitle

public void SetSubtitle(java.lang.String strSubtitle)
Specified by:
SetSubtitle in interface IGatewayModel

SetFileName

public void SetFileName(java.lang.String strFileName)
Description copied from interface: IGatewayModel
DCA - for documents in the knowledge directory

Specified by:
SetFileName in interface IGatewayModel



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