Thursday, 16 October 2014

Exploring Model SPI websphere portal ibm

Model SPI :- Its a read only API developed by IBM to access information related to content being displayed. It gives all information about pages,navigation structure,themes,skin etc.

Data that can be retrieved by Model SPI and list available:-
            It gives information about pages,labels and urls in portal environment
  • Content Model :- describes the topology in which the content is structured. The content model is a tree structure composed of content nodes. Types of content nodes include pages, labels, internal URLs, and external URLs.
  • Navigation Model :- describes the topology of the navigation visible to a specific user, which is composed of navigation nodes. Navigation nodes are implied by the structure of the content model. A navigation node references content represented by content nodes.
  • Navigation Selection Model :- describes the selected node in the navigation.
  • Content Metadata Model :- provides access to metadata of nodes of the Content Model. The metadata are aggregated using the hierarchy that the content model exposes.
  • Language List :- a list of supported languages.
  • Layout Model :- describes the layout of a page, which is composed of layout nodes. Layout nodes can be containers, which affect the layout of the page (rows and columns), or controls, which affect the content (portlets) of a page.
  • Markup List :- a list of supported markup languages.
  • Skin List :- a list of skins.
  • Theme List :- a list of themes.
  • PortletModel, AdminPortletModel :- describes portlets and their associated configuration data. 

Technical overview of API's core:- Above spis are available under com.ibm.portal package which exposes database persistent data as transient objects. These objects are specific to virtual portal. Navigation related models has exposed some methods to acess navigation structure. They also have provided an efficient way to search for object id using locator object.

  • Obtain the root node of a tree model (getRoot)
  • Query the children of a node of the model (hasChildren)
  • Obtain the children of a node of the model (getChildren)
  • Obtain the parent of a node of the model (getParent)
The Model SPI includes the following subpackages.
  • The sub package com.ibm.portal.admin
  • The sub package com.ibm.portal.content
  • The sub package com.ibm.portal.identification
  • The sub package com.ibm.portal.navigation
  • The sub package com.ibm.portal.portletmodel
  • The sub package com.ibm.portal.wire 
Sub package com.ibm.portal.admin :- This model exposes core services like Available languages, themes, skins, markup lists and device class model.
Sub package com.ibm.portal.content :- The two main models of this package are the ContentModel and the LayoutModel. ContentNodeType.PAGE  by using this we can identify whether it is page or label or url.
Sub package com.ibm.portal.identification :- This package is used to retrieve objectId from currently selected page via navigation model and then convert that ObjectID to string to use it in navigation url structure to reach out to this page.
Sub package com.ibm.portal.navigation :-  Each content node under content model is a navigation node.
Sub package com.ibm.portal.portletModel:-  This model consists of information related to a portlet like window information.









No comments:

Post a Comment

Custom single threaded java server

 package com.diffengine.csv; import java.io.*; import java.net.*; import java.util.Date; public class Server { public static void main(Str...