Adding Custom-Developed Portlets

Overview of Adding Custom-Developed Portlets

A portlet is a rectangular display component of the SAS Information Delivery portal in which content and links to content are displayed. You can develop a custom portlet and add it to the portal. Your custom-developed portlet can be either a local portlet (contained in a PAR file) or a remote portlet that is contained in a PAR file and a Web application archive (WAR) file.
To design and develop a custom local or remote portlet for deployment in the portal, you should have a working knowledge of JavaServer Pages (JSPs), Java servlets, and the Java programming language. Once you have developed a portlet, you can add it to the portal.
For guidelines on developing custom portlets, see Developing Portlets for SAS Information Delivery Portal.
The following sections describe the steps for developing a custom portlet and adding it to the portal.

Step 1: Design and Code the Portlet

For details about designing and coding the portlet, see Developing Portlets for the SAS Information Delivery Portal.

Step 2: Deploy the Portlet in the SAS Information Delivery Portal

To deploy a portlet to the SAS Information Delivery Portal, follow these steps:
  1. Move or copy the portlet's PAR files to the portlet deployment directory located on the machine where the portal application resides.
    If a custom portlet was developed by following the instructions provided in Developing Portlets for the SAS Information Delivery Portal, and the portal resides on the same machine where the portlet is located, there is no need to manually copy the PAR files.
    The location of the PAR files is defined by the webapp.sasportlets.deployed.dir property in the configuration file located at SAS-configuration-directory\Lev1\Utilities folder. The portal automatically adds the portlet to the SAS Metadata Repository. For example, on a Windows system that you might copy portlet.par to the SAS-configuration-directory \Lev1\Web\Applications\SASPortlets4.3\Deployed directory.
  2. With the SAS Deployment Manager, rebuild the sas.portal4.3.ear file.
  3. Redeploy the sas.portal4.3.ear file from the C:\SAS\Config\Lev1\Web\Staging directory to the Web-application-server\server\SASServer1\deploy_sas directory.
  4. Stop and restart the Web application server.
If the portlet is a remote portlet, you must also do the following:
  1. Deploy the associated WAR file in the Web application server.
  2. Add permissions to the policy files of the SAS Services Application. For details, see Access Permissions for Custom Portlets and Web Applications in SAS Intelligence Platform: Middle-Tier Administration Guide.
For details about PAR and WAR files, see Developing Portlets for the SAS Information Delivery Portal.

Step 3: Ensure That the Appropriate Resource Metadata Is Added to the SAS Metadata Repository

If your data resources have already been defined in the metadata repository, you can skip this step.
To enable the portlet to leverage the SAS Information Delivery Portal's content and security features, you must ensure that the appropriate metadata for each resource has been added to the portal's SAS Metadata Repository. Resources might include SAS Stored Processes, SAS Information Maps, SAS packages, SAS publication channels, and SAS Reports. The SAS servers, spawners, and logins associated with the resources must also be defined.
For an overview of metadata requirements for content, see Adding Content to the Portal.
In addition, when you add SAS publication channels, syndication channels, and servers, you must enable your portlet to access the content by specifying the appropriate permissions in your Web application server's policy file.
Note: Although the metadata for portlet data resources must be added to the SAS Metadata Repository, it is not necessary for these data resources to be surfaced in portlets.

Step 4: For Remote Portlets Only, Add the Permission Statements for the Portlet to the Required Policy Files

Add the remote portlet's codebase and permissions, and any additional permissions for the SAS Information Delivery Portal and SAS Services Application codebases to the required policy file. For details, see Access Permissions for Custom Portlets and Web Applications in SAS Intelligence Platform: Middle-Tier Administration Guide.

Step 5: Implement Authorization for the Portlet

When a portlet is developed, authorization metadata that specifies whether all users or specific groups can access the portlet can be included in the descriptor file for the portlet. In order to enable the sharing of the portlet, the descriptor file can also contain an attribute that enables authorized portal users to create new instances of the portlet.
For information about using the portlet deployment descriptor file to specify whether all users or specific groups are authorized to access the portlet, see “Creating a Deployment Descriptor” in Developing Portlets for the SAS Information Delivery Portal.
Note: When a portlet is deployed within the scope of users, all users can use the portlet. If the same portlet is deployed within the scope of a group, only the specified group can use it.

Step 6: Add the Portlet to the SAS Information Delivery Portal

To add your custom-developed portlet to the portal, see Main Steps to Add a Portlet.