Sun Java System Portal Server 7 Developer's Guide

Action content

When the action is content, the DesktopServlet gets the named channel’s main content. When the DesktopServlet receives a request where the action is content, to perform the content action on the channel, it takes the following parameters:

DesktopServletURL?action=content&provider=ChannelName[&last=false]

The content action maps directly to the following method calls in the PAPI: ProviderContext.getDefaultChannelName(), Provider.isPresentable(), and Provider.getContent().

The flowchart in Figure 2-5 on page 39 shows the various methods executed in the back end to process the content action. When the client makes a request for content (say after login), the DesktopServlet:

  1. Determines the provider responsible for generating the requested content.

    If provider is null, it uses the default channel name (stored in the DefaultChannelName attribute) to get the provider. The default channel name is an Sun Java System Access Manager software attribute (DefaultChannelName) in the Desktop service, which is set to the topmost container that represents the whole Desktop view. The default channel name is set to the current target provider value when the request parameter last is set to false. If the provider is not null, the DesktopServlet gets the provider responsible from the HTTP parameter in the URL for generating the requested content.

  2. Once the provider is determined, the provider’s isPresentable() method is invoked to determine if the provider can be presented to the requesting client.

    If the provider is determined to be not presentable, an error is thrown on the Desktop. If the provider can be presented, the provider’s getContent() method fetches the content for display on the client’s Desktop.

  3. When last is set to false, the DesktopServlet will not set the last channel to the value of the provider parameter. If not specified, the default setting is last=true, and the last accessed channel is set to the value of the provider parameter.

    The next time when the action is content, the DesktopServlet provider parameter will be used to fetch the content. If the provider parameter is absent in the request URL, the DesktopServlet assumes it is equal to the value of the last request.

Figure 3–1 DesktopServlet content Action

This figure shows the DesktopServlet content action.