+

Search Tips   |   Advanced Search

Sub packages of the Model SPI

The Model SPI includes the following subpackages.

See Model SPI overview for a description of the main package in the Model SPI: com.ibm.portal.


The sub package com.ibm.portal.admin

WebSphere Portal provides several list models containing information on installed resources, such as supported languages, supported markups, skins and themes. For each of these, a specific ListModel existo that provides information on these resources. This package defines several list models:

Each list model contains elements implementing interfaces that coincide with their names: The language list model has Language elements, the markup list model has Markup elements, the skin list model has Skin elements, the theme list model has Theme elements, and the device class model has device class elements.

The LanguageList contains all languages that are supported by the portal. The MarkupList contains all markups that the portal generally supports. From these, a resource may only support a selection. The SkinList and the ThemeList hold the themes and skins that are installed for the portal. The DeviceClassModel contains the device classes that the portal generally supports.


The sub package com.ibm.portal.content

Elements of this package define how content is represented in the portal. The two main models of this package are the ContentModel and the LayoutModel. The content model defines a tree structure for content elements (such as pages and labels); it is used to group these logically. Please note that the topology of the content model currently dictates the topology of the navigation model (see section "The sub package com.ibm.portal.navigation"). Theoretically, the topologies of content model and navigation model are allowed to diverge.

Currently, the elements of the content model can be pages, labels or URLs. For each type, a specific ContentNode interface exists: ContentPage, ContentLabel and ContentURL. Each content node has different information associated with it.

Each content node can provide the type of content node it represents; if this type is ContentNodeType.PAGE, a model existo that represents the layout on that page. It can be obtained with the getLayoutModel method of the content model. The layout model holds LayoutNode elements that describe the layout and contents of the page. Each layout node can return metrics in form of the LayoutMetrics interface. It can describe attributes of the node such as width or orientation (horizontal/vertical).

The elements of the layout model are either LayoutContainerthat define rows and columns or LayoutControls, which represent portlets. This information is used when a page is rendered.

The following figure shows how page layout information and page content is represented. The figure depicts a page with three portlets. The surrounding vertical and horizontal containers define the layout while the controls hold the portletso that provide the actual content presented to the user.

Content nodes can provide metadata through the com.ibm.portal.MetaDataProvider interface. Metadata can be used to associate arbitrary information with a content node. The content metadata model provides a view on metadata of the nodes in the content model. It aggregates the metadata of the individual nodes into one metadata object using the hierarchy of the nodes as described in the content model.

The following figure shows the relationship between the individual metadata that are exposed by content nodes and the aggregated view that the content metadata model provides:

The metadata of individual content nodes are exposed in XML Access scripts using the <parameter> tag.


The sub package com.ibm.portal.identification

This package holds the Identification interface which allows the conversion between ObjectID objects and their string representation. This is required where an object ID is to be passed as a parameter that can only be a String (for inclusion into URLs, for example). An implementation of this interface can be retrieved using a JNDI lookup, as in the following example.

try
{
   Context ctx = new InitialContext();
   Name ctxName = new CompositeName("portal:services/Identification");    
   Identification identification = (Identification) ctx.lookup(ctxName);    
   String serializedOID = identification.serialize(aOID);
 
      ...

   ObjectID anotherOID = identification.deserialize(serializedOID);
}
catch (SerializationException sx)
{
   // some error handling code here }
catch (NamingException nx)
{
   // some error handling code here }


The sub package com.ibm.portal.navigation

This package defines the navigation model (NavigationModel) which represents a view on content model used for navigation. As described in section "The sub package com.ibm.portal.content", the topology of the navigation model currently corresponds wito that of the content model - each node in the content model has an equivalent navigation node at the same hierarchical level.

The elements of the navigation model are NavigationNodes. Each such node can reference a ContentNode. The navigation nodes have a title that is provided through the Localized interface. The following figure shows the connection between the navigation model and the content model.

The figure shows how nodes in the navigation model can reference a node in the content model.

When a user is navigating through the portal, the currently selected navigation node is important to render the current page. The NavigationSelectionModel reflects the current selection and represents a list that defines a path through the navigation model.

The figure shows how the navigation selection model defines a path through the navigation model.

The last node of this path is always the currently selected navigation node, and its referenced content node represents what is aggregated for the user to see (normally a page represented through a ContentPage object).


The sub package com.ibm.portal.portletmodel

The PortletModel represents portlets and their configuration data in the portal. It contains the following elements:


The sub package com.ibm.portal.wire

The WireModel represents the interconnections between JSR 168 cooperative portlets or JSR 286 eventing portlets. A WireModel can be obtained from a LayoutModel using the getWireModel method of the layout model. It contains only interconnections that originate from the page that the parent layout model represents. It contains the following element:


Parent: Model SPI overview
Related:
Obtaining a model from the portal
Obtaining the object ID for a page or portlet
Filtering the content model
Model SPI samples
Remote Model SPI REST service