com.plumtree.server
Interface IPTAsyncGadgetProvider


public interface IPTAsyncGadgetProvider

The interface implemented by portlet providers that support asynchronous processing. Providers are initialized once and then cached. To render a community or a mypage, the server calls BeginProcessing once for each provider, then calls GetHTMLText once for each provider, passing the same arguments that were passed to BeginProcessing. -jas

Author:
Joseph Stanko

Method Summary
 int BeginProcessing(int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, java.lang.Object vAppDataStateObject, IPTUserInterface pUserInterface)
          Same as BeginProcessing (int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, Object vAppDataStateObject, IPTUserInterface pUserInterface, int nStateMode), but nStateMode is set to PT_STATEMODES.PT_STATEMODES_REQUEST
 int BeginProcessing(int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, java.lang.Object vAppDataStateObject, IPTUserInterface pUserInterface, int nStateMode)
          The Provider must be Initialized before this method may be called.
 int GetCapabilitiesAsInt(int lGadgetCapability)
          Query a particular capability of this provider.
 java.lang.Object GetCapabilitiesAsObject(int lGadgetCapability)
          Deprecated.  
 java.lang.Object[][] GetCollapsedOrErrorContent(java.lang.Object spAppGatewayInfo, IPTGadgetInfo spGadgetInfo, boolean bCollapsed)
          Get the content of this portlet that should be displayed in case the portlet is collapsed or has an error.
 java.lang.String GetDescription()
          A short description of this provider.
 java.lang.String GetGadgetBrowserCLSID()
          Deprecated.  
 java.lang.String GetGadgetProviderCLSID()
          The CLSID for this provider.
 java.lang.Object[][] GetHTMLText(int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, java.lang.Object vAppDataStateObject, IPTUserInterface pUserInterface)
          Same as GetHTMLText (int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, Object vAppDataStateObject, IPTUserInterface pUserInterface, int nStateMode), but nStateMode is set to PT_STATEMODES.PT_STATEMODES_REQUEST
 java.lang.Object[][] GetHTMLText(int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, java.lang.Object vAppDataStateObject, IPTUserInterface pUserInterface, int nStateMode)
          Get the HTML text for this portlet as an array of markup fragments, some of which require post-processing.
 java.lang.String GetImageUUID()
          Get the Image UUID for this Provider (used to find the correct Icon or GIF for the Gadget).
 java.lang.String GetName()
          The name of this provider (human readable unique identifier).
 void Initialize(IPTGadgetCacheSite pCacheSite, com.plumtree.openfoundation.util.IXPPropertyBag pbagConfigurationInfo, com.plumtree.openfoundation.util.IXPPropertyBag pbagWebServiceConfigurationInfo, IPTGadgetContentServer pGCServer)
          Initializes all of the data structures in this object and must be called before BeginProcessing.
 java.lang.String SpecificGadgetDescription(com.plumtree.openfoundation.util.IXPPropertyBag pbagConfigurationInfo)
          Retrieve a specific description of the current configuration info.
 

Method Detail

Initialize

void Initialize(IPTGadgetCacheSite pCacheSite,
                com.plumtree.openfoundation.util.IXPPropertyBag pbagConfigurationInfo,
                com.plumtree.openfoundation.util.IXPPropertyBag pbagWebServiceConfigurationInfo,
                IPTGadgetContentServer pGCServer)
Initializes all of the data structures in this object and must be called before BeginProcessing. Can be called only once. -jas

Parameters:
pCacheSite - The Cache Site entry for the portlet
pbagConfigurationInfo - Configuration information about the current portlet
pbagWebServiceConfigurationInfo - Configuration information about the portlet web service used by the current portlet
pGCServer - The remote server used by the portlet web service

BeginProcessing

int BeginProcessing(int lMode,
                    IPTSession pUserSession,
                    IPTGadgetInfo pGadgetInfo,
                    IPTStates pStates,
                    IPTAdminSettings pAdminSettings,
                    java.lang.Object vAppDataStateObject,
                    IPTUserInterface pUserInterface,
                    int nStateMode)
The Provider must be Initialized before this method may be called. After a successful initialization, this method may, if desired, be called, repeatedly with different preferences and different sessions. GetHTMLText should be called with the same arguments after this method if this method returns a success code. -jas

Parameters:
lMode - The mode, see see PT_GADGET_MODES.
pUserSession - The current user's session.
pGadgetInfo - Used to get and set persistent settings.
pStates - State information, used to store page, session, and application level state.
pAdminSettings - Used to set administrator settings. Null if the current user cannot set admin settings in the current mode or context.
vAppDataStateObject - Contains additonal arguments specific to the provider or the user interface.
pUserInterface - The user interface (e.g. devices, low bandwidth). Optional, may be null.
nStateMode - The state to use for storing the requests PT_STATEMODES.
Returns:
A result code. Currently it always returns PT_S_OK.

BeginProcessing

int BeginProcessing(int lMode,
                    IPTSession pUserSession,
                    IPTGadgetInfo pGadgetInfo,
                    IPTStates pStates,
                    IPTAdminSettings pAdminSettings,
                    java.lang.Object vAppDataStateObject,
                    IPTUserInterface pUserInterface)
Same as BeginProcessing (int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, Object vAppDataStateObject, IPTUserInterface pUserInterface, int nStateMode), but nStateMode is set to PT_STATEMODES.PT_STATEMODES_REQUEST

Parameters:
lMode -
pUserSession -
pGadgetInfo -
pStates -
pAdminSettings -
vAppDataStateObject -
pUserInterface -
Returns:

GetHTMLText

java.lang.Object[][] GetHTMLText(int lMode,
                                 IPTSession pUserSession,
                                 IPTGadgetInfo pGadgetInfo,
                                 IPTStates pStates,
                                 IPTAdminSettings pAdminSettings,
                                 java.lang.Object vAppDataStateObject,
                                 IPTUserInterface pUserInterface,
                                 int nStateMode)
Get the HTML text for this portlet as an array of markup fragments, some of which require post-processing. You must call BeginProcessing before calling this function and pass the same set of arguments to both.

Parameters:
lMode - The mode, see see PT_GADGET_MODES.
pUserSession - The current user's session.
pGadgetInfo - Used to get and set persistent settings.
pStates - State information, used to store page, session, and application level state.
pAdminSettings - Used to set administrator settings. Null if the current user cannot set admin settings in the current mode or context.
vAppDataStateObject - Contains additonal arguments specific to the provider or the user interface.
pUserInterface - The user interface (e.g. devices, low bandwidth). Optional, may be null.
nStateMode - The state to use for storing the requests PT_STATEMODES.
Returns:
A 2D array of markup fragments with columns defined by PT_MARKUP_ARRAY_COLS.

GetHTMLText

java.lang.Object[][] GetHTMLText(int lMode,
                                 IPTSession pUserSession,
                                 IPTGadgetInfo pGadgetInfo,
                                 IPTStates pStates,
                                 IPTAdminSettings pAdminSettings,
                                 java.lang.Object vAppDataStateObject,
                                 IPTUserInterface pUserInterface)
Same as GetHTMLText (int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, Object vAppDataStateObject, IPTUserInterface pUserInterface, int nStateMode), but nStateMode is set to PT_STATEMODES.PT_STATEMODES_REQUEST

Parameters:
lMode -
pUserSession -
pGadgetInfo -
pStates -
pAdminSettings -
vAppDataStateObject -
pUserInterface -
Returns:

GetCollapsedOrErrorContent

java.lang.Object[][] GetCollapsedOrErrorContent(java.lang.Object spAppGatewayInfo,
                                                IPTGadgetInfo spGadgetInfo,
                                                boolean bCollapsed)
Get the content of this portlet that should be displayed in case the portlet is collapsed or has an error. This can be JavaScript or HTML Comments.

Parameters:
spAppGatewayInfo - app data object
spGadgetInfo - Used to get and set persistent settings
boolean - bCollapsed True if the portlet is collapsed.
Returns:
A 2D array of markup fragments with columns defined by PT_MARKUP_ARRAY_COLS.

GetCapabilitiesAsInt

int GetCapabilitiesAsInt(int lGadgetCapability)
Query a particular capability of this provider.

Parameters:
lGadgetCapability - See PT_GADGETPROVIDER_CAPABILITIES.
Returns:
Depends on the capability.

GetCapabilitiesAsObject

java.lang.Object GetCapabilitiesAsObject(int lGadgetCapability)
Deprecated. 

Use GetCapabilitiesAsInt instead.


GetName

java.lang.String GetName()
The name of this provider (human readable unique identifier).

Returns:
The name.

GetDescription

java.lang.String GetDescription()
A short description of this provider.

Returns:
The description.

GetGadgetProviderCLSID

java.lang.String GetGadgetProviderCLSID()
The CLSID for this provider.

Returns:
The CLSID.

GetGadgetBrowserCLSID

java.lang.String GetGadgetBrowserCLSID()
Deprecated. 


GetImageUUID

java.lang.String GetImageUUID()
Get the Image UUID for this Provider (used to find the correct Icon or GIF for the Gadget).

Returns:
The Image UUID.

SpecificGadgetDescription

java.lang.String SpecificGadgetDescription(com.plumtree.openfoundation.util.IXPPropertyBag pbagConfigurationInfo)
Retrieve a specific description of the current configuration info.

Parameters:
pbagConfigurationInfo - Configuration info.
Returns:
A string describing the contents of the configuration info.


Copyright © 2008 Plumtree Software Inc. All Rights Reserved.