+

Search Tips   |   Advanced Search

Controller SPI


We can use the Controller SPI for portal administration. It allows us to modify portal resources. It enhances the read-only portal Model SPI by adding writable aspects.

The interfaces of the programming model for portal resources that are published under the topic Model SPI overview offered only read-only methods. The Controller SPI extends them by adding has a set of new interfaces. These interfaces are derived from the read-only portal models and interfaces and map to them, but they also extend them with methods for modifying the resources that they represent. This way the Controller SPI allows us to modify portal resources to a certain extent.


Controller SPI overview

The Controller SPI provides controllers for portal resources. We can use these controllers to modify portal resources that are exposed by particular models of the Model SPI. Controllers offer methods to modify the topology and properties of the model and of its nodes. They expose the same interfaces as the corresponding read-only model, and they instantly reflect modifications that you apply to the controller.

While the modifications come into effect immediately for the controller, they not reflected in the persistence layer until you commit the controller and the changes that you made by it.

The resources that are exposed by the controller can be modified through specific interfaces which match their read-only counterparts. For an example, refer to the following class list:

Classes from the read-only model . . . . . . are reflected in the Controller SPI by the following classes
ContentNode

  • MarkupCapable

  • Localized

  • Identifiable

  • ActiveFlag

ModifiableContentNode

  • ModifiableMarkupCapable
  • ModifiableLocalized
  • ModifiableIdentifiable
  • ModifiableActiveFlag

Further benefits of the Controller SPI are as follows:

The Controller SPI provides the following controllers:

At this time there is no controller for the following models:

A controller is based on the corresponding read-only model. This means when you first create the controller on the basis of a read-only model, both the controller and the model expose the same information. We can then use the controller to create, update, or delete information exposed through it. These changes will be reflected in the controller immediately. To persist changes that you made to the underlying read-only model, you need to commit the controller.

In particular, a controller offers methods to do all of the following:

Before we use the Controller SPI, be sure to familiarize yourself with the read-only models. Refer to Model SPI overview.


Scope of the Controller SPI

A controller instance is based on a read-only model instance. Therefore it has the same scope and lifetime as the corresponding read-only model. Consequently, the following equivalences apply:


Parent: Develop portlets
Related:
Model SPI overview
Related:

http://www-10.lotus.com/ldd/portalwiki.nsf/xpViewCategories.xsp?lookupName=IBM%20WebSphere%20Portal%207%20API%20and%20SPI%20Reference