Sun Java System Portal Server 7 Developer's Guide

DesktopServlet edit Action


DesktopServletURL?action=edit&provider=editContainer&targetprovider=ChannelName

The flowchart in Action edit shows the various methods executed in the back end to process the edit action. This flowchart shows how the DesktopServlet processes the edit action for a container. In this URL, the provider parameter specifies the edit container for the container, and the targetprovider parameter is the leaf channel inside the container. When the client makes a request to process this edit action, the DesktopServlet:

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

    If provider is null, it uses the default channel name to get the provider. Last accessed channel is not assumed when action equals edit. Otherwise, the DesktopServlet gets the provider responsible specified in the URL.

  2. Once the provider is determined, the edit container’s isEditable() method is invoked to determine if the edit container is editable.

    The DesktopServlet gets the named edit container’s isEditable property. If the edit container is determined to be not editable, an exception is thrown on the Desktop. If the edit container can be edited, the DesktopServlet also checks the editType for that edit container.

    The editType is a property that can be retrieved via the Provider.getEditType() method. The provider’s getEditType() method is invoked to determine the type of edit page to return on the Desktop.

  3. If the edit container’s edit type is:

    • EDIT_COMPLETE:

      • The edit container’s getEdit method is invoked and the leaf channel’s name is determined from the request parameter.

      • Once the leaf channel’s name is determined, the channel’s isEditable() method is invoked to determine if the channel is editable.

        If the channel is determined to be not editable, an exception is thrown on the Desktop. If the channel can be edited, the DesktopServlet also checks the editType for the leaf channel.

      • If the leaf channel’s edit type is:

        • EDIT_COMPLETE, the container calls the leaf channel’s getEdit() method and displays the edit page on the Desktop.

        • EDIT_SUBSET, the container calls the leaf channel’s getEdit() method and the container’s Edit Container wraps the leaf channel’s content before displaying the Edit page ont the Desktop.

          A container can define different edit container and the edit container name must be specified as well as the target channel name. The default Desktop edit container name is stored in the Access Manager as a Desktop service attribute.

    • EDIT_SUBSET, the Desktop servlet fetches the name of the edit container to use to wrap the channel’s edit page. The servlet fetches a handle to the edit container, and then calls the edit container’s getEdit() method. The edit container detects the original channel’s name from request parameters and calls getEdit() on that channel, and wraps the channel’s content before returning it to the servlet. See the legacy edit action for EDIT_SUBSET in Action edit for more information.

Figure 3–3 DesktopServlet edit Action

This figure shows the DesktopServlet edit action.