The ProviderContext interface is the runtime environment that providers use to retrieve essential information from the Portal Server. The ProviderContext object provides information pertaining to the environment that a provider object is executing within. Such information may be specific to the user, to the web container, or be global (shared between multiple users). This interface does not define what information falls into each of these categories; this is left up to the implementation. Provider developers can obtain a handle to a ProviderContext object by extending ProviderAdapter, and then calling ProviderAdapter.getProviderContext().
The ProviderContext forms the layer between the services used by the provider and the provider implementation thus isolating the provider code from specific service interfaces and implementations. It defines the service interface for the Desktop, and allows different implementation to access the actual data.
The following are some of the methods in the ProviderContext:
Service (data/functions pertaining to the Desktop service): getDesktopURL(), getLocaleString(), getLocale(), getDesktopType(), getLogoutURL(), getStringAttribute(), setStringAttribute(), getDefaultChannelName(), getLoginURL(), getRoles()
Servlet (data/functions pertaining to the servlet): getRequestServer(), getServletConfig()
Client type (data/functions pertaining to the client device type): getClientTypeProperty(), getDefaultClientType(), getClientType(), getCharset(), getClientPath(), getContentType(), getClientTypeProperties()
Data/functions pertaining to the user’s session: get/setSessionProperty(), getSessionID(), getUserID(), encodeURL(), isAuthless()
Data/functions pertaining to per-client properties: get/setClientProperty()
Data/functions pertaining to the debug service: isDebugEnabled(), isDebugErrorEnabled(), isDebugWarningEnabled(), isDebugMessageEnabled(), debugMessage(), debugWarning(), debugError()
Data/functions pertaining to template access: getTemplate(), getTemplatePath(), getTemplateMostSpecificPath()
Data/functions pertaining to channel properties: getProviderName(), getClassName(), getNames(), get/set*Property(), exists*Property(), getProviderVersion()
Data/functions pertaining to config properties: getStaticContentPath(), getConfigProperty()
Data/Functions pertaining to ClientTypeFilters: getClientPropertiesFilters(), getLocalePropertiesFilters(), getClientAndLocalePropertiesFilters()
Data/Functions pertaining to URLEncoding: encodeURLParameter()
See the Javadocs for more information on the methods in this interface.
The ProviderWidths interface defines the widths that can be returned from the Provider.getWidth() method. The width is a suggestion to a client of a provider object as to how much screen real estate should be given to display the provider’s default view.
The provider can be displayed in a thick frame (WIDTH_THICK).
The provider can be displayed in a thin frame (WIDTH_THIN).
The provider can be displayed in a full_top frame at the top (WIDTH_FULL_TOP).
The provider can be displayed in a full_bottom frame at the bottom (WIDTH_FULL_BOTTOM).
See the Javadocs for more information on the methods in this interface.