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


Method Summary
 int BeginProcessing(int lMode, IPTSession pUserSession, IPTGadgetInfo pGadgetInfo, IPTStates pStates, IPTAdminSettings pAdminSettings, java.lang.Object vAppDataStateObject, IPTUserInterface pUserInterface)
          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.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)
          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

public 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

public int BeginProcessing(int lMode,
                           IPTSession pUserSession,
                           IPTGadgetInfo pGadgetInfo,
                           IPTStates pStates,
                           IPTAdminSettings pAdminSettings,
                           java.lang.Object vAppDataStateObject,
                           IPTUserInterface pUserInterface)
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.
Returns:
A result code. Currently it always returns PT_S_OK.

GetHTMLText

public java.lang.Object[][] GetHTMLText(int lMode,
                                        IPTSession pUserSession,
                                        IPTGadgetInfo pGadgetInfo,
                                        IPTStates pStates,
                                        IPTAdminSettings pAdminSettings,
                                        java.lang.Object vAppDataStateObject,
                                        IPTUserInterface pUserInterface)
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.
Returns:
A 2D array of markup fragments with columns defined by PT_MARKUP_ARRAY_COLS.

GetCapabilitiesAsInt

public int GetCapabilitiesAsInt(int lGadgetCapability)
Query a particular capability of this provider.
Parameters:
lGadgetCapability - See PT_GADGETPROVIDER_CAPABILITIES.
Returns:
Depends on the capability.

GetCapabilitiesAsObject

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

Use GetCapabilitiesAsInt instead.

GetName

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

GetDescription

public java.lang.String GetDescription()
A short description of this provider.
Returns:
The description.

GetGadgetProviderCLSID

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

GetGadgetBrowserCLSID

public java.lang.String GetGadgetBrowserCLSID()
Deprecated.  


GetImageUUID

public 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

public 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 © 2003 Plumtree Software Inc. All Rights Reserved.