com.sapportals.portal.prt.util

Class AbstractMimeUriGenerator

java.lang.Object
  extended by com.sapportals.portal.prt.util.AbstractMimeUriGenerator

public class AbstractMimeUriGenerator
extends Object

Class for generating abstract, stable and generic URLs for mime objects within the SAP Web Application Server used by portal applications and services.
The purpose of this class is to provide mime URLs for portal UI applications. Those URLs do not rely on the UI-technology of the icon provider. The concept of this approach is described below:

The object provider, i.e., the application that ships the mime object (something like myicon.jpg), exposes a three-part key to identify the icon:

The application-type is one of

AbstractMimeUrlGeneratorCore.APPLICATION_TYPE_PORTAL,
AbstractMimeUrlGeneratorCore.APPLICATION_TYPE_WEBDYNPRO or
AbstractMimeUrlGeneratorCore.APPLICATION_TYPE_WEBAPP.

The application-name is defined only in the context of the specified application-type. The local path has to be prefixed with the path to the root folder of the application's web resources.
With these information the AbstractMimeUrlGeneratorCore library computes an abstract url in the form
<url-context of the ui>/mime/<application-type>/<application-name>/<relative path>.

After rendering, a basic servlet decomposes the abstract URL in its three parts and does an internal forward to fetch the respective mime file.

In order to retrieve the mime url the UI application performs a call to the method getAbstractMimeUri(IPortalComponentRequest, String, String, String).
In order to do so it first has to collect the 3 information (application-type, application-name, local path) either from the object provider's schema entries or, in case the object provider implements the PCM Administration Aspect, from the PCM.

In this case it calls the methods

ICatalogNode#getApplicationName(),
ICatalogNode#getApplicationType(),
ICatalogNode#getLocalIconPath().


Method Summary
static String getAbstractMimeUri(IPortalComponentRequest request, String applicationType, String applicationName, String localIconPath)
          Portal UI applications perform a call this method in order to retrive an abstract mime URL for rendering an icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAbstractMimeUri

public static String getAbstractMimeUri(IPortalComponentRequest request,
                                        String applicationType,
                                        String applicationName,
                                        String localIconPath)
Portal UI applications perform a call this method in order to retrive an abstract mime URL for rendering an icon.

Parameters:
request - IPortalComponentRequest request
applicationType - String applicationType
applicationName - String applicationName
Returns:
An abstract mime URI in the form <url-context of the ui>/mime/<application-type>/<application-name>/<relative path>
See Also:
ICatalogNode#getApplicationName(), ICatalogNode#getApplicationType(), ICatalogNode#getLocalIconPath()
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._apideprecated default EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice