Previous Page | Next Page

Using the Portlet API

Class Reference

The following classes are of particular usefulness in creating custom portlets:

com.sas.portal.portlet.DefaultPortletAction

Extend this class in order to create your own portlet actions. For more information, see Creating a Portlet Action Class.

com.sas.portal.portlet.ErrorHandlerInterface

Use this interface to handle errors that your portlet encounters. For more information, see Creating an Error Handling Action.

com.sas.portal.portlet.HTMLPortletAction

Extend this class in order to create your own portlet actions. For more information, see Creating a Portlet Action Class. Possible uses include the following:

  • correctly displaying non-Latin1 character sets when a portlet is displayed in preview mode. For an example of this use, see Step 4: Create the Action Class.

  • preparing URLs for actions within an interactive form JSP and populating a JavaBean with parameters from a JSP form. For an example of these uses, see Step 4: Create the Action Class.

com.sas.portal.portlet.PortletContext

Use this interface to obtain a local or remote session context, which you can use to pass information from one portlet to another. For examples, see Obtaining a User and Session Context.

com.sas.portal.portlet.NavigationUtil

Use this class to do the following:

  • create URLs for buttons on your JSP pages (for example, OK and Cancel).

  • obtain a portlet's resource bundles in order to create a localization context for your portlet's JSP page.

com.sas.portal.portlet.PortletActionInterface

Use this interface to develop an action class for your portlet. For more information, see Creating a Portlet Action Class and Step 4: Create the Action Class.

com.sas.portal.portlet.PortletInitializerInterface

Use this interface to develop an initializer class, which runs before your portlet is displayed for the first time on a portal page. Possible uses include

  • reading initial parameters that are specified in your portlet's deployment descriptor file (portlet.xml).

  • connecting to an external resource such as a database. For more information, see Creating an Initializer Action Class.

com.sas.portal.portlet.PostProcessorInterface

Use this interface to develop a postprocessor class that runs when your portlet is no longer displayed. Possible uses include the following:

  • freeing resources that were used in the portlet initializer.

  • removing HttpSession attributes that were set in the portlet initializer or portlet action. This is especially important to consider because multiple copies of your portlet could exist on other portal pages or even on the same page.

For more information, see Creating a Postprocessing Action Class.

Previous Page | Next Page | Top of Page