Sun Java System Portal Server 6 2004Q2 Migration Guide |
Chapter 9
Changes in Sun ONE Portal Server APIs that Affect Migration
This chapter provides information on the API changes between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2.
This chapter contains the following sections:
Changes From Sun ONE Portal Server 3.0 That Affect Application DevelopmentThe following changes to Portal Server 3.0 affect portal developers:
- New data model - Sun ONE Portal Server 6.2 uses Sun ONE Directory Server as its storage mechanism. This replaces the Portal Server 3.0 internal role tree directory.
- The Portal Server 3.0 APIs for session, profile, authentication, and so on, have been replaced by the Sun ONE Identity Server APIs. See the Sun ONE Portal Server 6.0 Developer’s Guide for more information.
- If you migrate from Portal Server 3.0 to Sun ONE Portal Server 6.2, the migration process also includes modifying source code to use the new Portal Server APIs. See Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2" for API mappings.
- The Portal Server 3.0 Provider API (PAPI) has been updated as follows:
Migrating Sun ONE Portal Server 3.0 Session to Sun ONE Identity Server SSOTokenFor details on API changes needed for migrating Sun ONE Portal Server 3.0 session toSun ONE Identity Server SSOToken, see Table C-1 in Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2."
Migrating the Sun ONE Portal Server 3.0 Profile to Sun ONE Identity Server User Management Classes and Service Management ClassesFor details on API changes needed for migrating Sun ONE Portal Server 3.0 profile to Sun ONE Identity Serveruser management classes and service management classes, see Table C-2 in Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2."
Migrating Sun ONE Portal Server 3.0 Logging to Sun ONE Identity Server Logging APIsFor details on API changes needed for migrating Sun ONE Portal Server 3.0 logging to Sun ONE Identity Server logging APIs, see Table C-3 in Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2."
Migrating Sun ONE Portal Server 3.0 Debug to Sun ONE Identity Server Debug APIsFor details on API changes needed for migrating Sun ONE Portal Server 3.0 debug to Sun ONE Identity Server debug APIs, see Table C-4 in Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2."
Migrating Sun ONE Portal Server 3.0 Provider APIs to Sun ONE Portal Server 6.2 Provider APIsThe Desktop SDK for Sun ONE Portal Server 3.0 included the following interfaces and classes:
This section outlines the Desktop API changes between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2. For the Sun ONE Portal Server 3.0 Desktop SDK classes and methods that have changed syntactically or semantically, see Table C-5 in Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2."
By far, the largest changes are in the provider interface. These changes fall into two general categories:
In Sun ONE Portal Server 3.0, there is a single implicit container for all channels. This container cannot be modified or replaced. All leaf channels can assume a single container with a particular implementation. In Sun ONE Portal Server 6.2, the idea of a container channel is formalized. The Sun ONE Portal Server 6.2 Desktop consists of a number of container channels, all with different implementations and features. In the Sun ONE Portal Server 3.0 provider interface, there is a subset of methods that assume a single container. For example, the Sun ONE Portal Server 3.0 container called the Provider.isDetached() method on a leaf channel to determine if the provider should be displayed in a detached window. The information describing whether the channel is detached or not is logically connected to the channel. This does not scale to an environment in which the channel's detached status will be different for every container. Specifically, the detached flag is actually a property of the container channel, not the leaf channel.
Additionally, having an isDetached() method in the provider interface assumes that all containers support this functionality. This is not the case. A tab container, for example, would not support detachability.
It is useful to split channel properties into two categories:
Provider.isDetached() is a type 2 property since it describes a relationship between a container and leaf channel rather than being the same regardless of the container in which the channel is displayed. In Sun ONE Portal Server 6.2, all type 2 properties are owned by the container channel. In other words, they are properties of the container channel. For example, if a container supports detachability for its leaf channels, it must store a property that is a mapping between leaf channel name and detached status, for every leaf channel it contains.
The methods to access type 2 properties are therefore removed from the provider interface.
In Sun ONE Portal Server 6.2, the underlying services layer changed from using the proprietary Sun ONE Portal Server 3.0 services to Sun ONE Identity Server. Because the Sun ONE Portal Server 3.0 provider interface is tightly integrated with the Sun ONE Portal Server 3.0 service APIs, migration is required in Sun ONE Portal Server 6.2. In an attempt to prevent this problem in the future, Sun ONE Portal Server 6.2 separates service access into an agnostic interface called ProviderContext. The idea is that provider developers access services through ProviderContext and are therefore immune to changes in the underlying services implementation.
There is a subset of methods in the provider interface that are specific to the syntax and semantics of the Sun ONE Portal Server 3.0 service APIs. These have been changed to use standard JDK or Portal Server APIs. An example of this is the Provider.init() method. In Sun ONE Portal Server 3.0, this method took a Sun ONE Portal Server 3.0 session object as an argument. In Sun ONE Portal Server 6.2, this method takes a servlet request object from the Servlets 2.2 SDK.
Table C-5 in Appendix C, "Public API Changes Between Sun ONE Portal Server 3.0 and Sun ONE Portal Server 6.2." maps the Sun ONE Portal Server 3.0 classes and methods that have changed syntactically or semantically to the Sun ONE Portal Server 6.2 equivalents. Note that classes and methods where there is no syntactic or semantic change are excluded from the table.