The Jsr168Environment class inherits from PortalEnvironment. You can extend Jsr168Environment to integrate WDK portlets into a JSR-168 compliant portal server that does not have an environment supplied by Documentum. The following methods are implemented:
The onRequestStart() and onRequestFinish() methods provide access to the request events
The getUsername(), getUserPassword(), getDomain(), getDocbaseName(), getUserPrincipal(), and getLocale() methods provide access to the user's portal session.
The preProcess() method turns on pre-processing.
The encodeUrl() method returns a JSR-168 action URL.
The namespaceJsMethodName() method changes the supplied JavaScript function name to a name unique within the generated web page by prefixing that function with the portlet ID. The rewriteScriptTag() method prefixes the portlet ID to a supplied JavaScript function name.
The rewriteATag() method rewrites the href and onclick attributes in a JavaScript call to prefix the call with the portlet ID. This gives the JavaScript call a unique name in the scope of the whole web page that is generated.
Several methods enumerate preferences and look up or write preference values (user-level or portlet-level, or application-level). The Jsr168Environment class handles the writing of Portlet level preferences through the writePortletLevelPreference() method. The writing of user level preferences is not covered by the JSR-168 specification: They are written by vendor-specific environment classes.
The getErrorUrl() method handles errors in a JSR-168 environment, passing the error to the stack trace.