Show TOC Start of Content Area

Background documentation Working with Semantic Objects  Locate the document in its SAP Library structure

A semantic object is a persistable portal object, such as an iView or page. Semantic objects are persisted in the PCD as a collection of attributes. By creating and modifying these objects in the PCD, you can change the iViews, pages and other portal objects that are displayed in the portal or that are available to administrators.

In order to obtain semantic Java objects from a PCD lookup, set the environment variable Constants.REQUESTED_ASPECT to PcmConstants.ASPECT_SEMANTICS. For more information, see Aspects.

Java Interfaces

For each type of semantic object, there are generally two types of Java interfaces:

      The semantic object interface, such as IiView for an iView.

Create an instance of a semantic object interface by performing a JNDI lookup, as described in Looking Up Objects.

      A helper service interface that provides helper methods for working with that type of semantic object, such as IiViews for iViews.

Some helper services simply provide special implementations of the methods defined in the com.sap.portal.pcm.IObjectsManager interface, which these helper services implement. Others provide additional methods. For example, IiViews defines no new methods, while ISystems provides additional methods, for example, for retrieving all systems defined in the PCD.

Create an instance of a helper service as you would any portal service, with the PortalRuntime class. The following shows how to create the helper service for iViews:

IiViews iViewSrv = (IiViews)PortalRuntime.getRuntimeResources()
   .getService(IiViews.KEY);

The following are the public Java semantic interfaces:

Semantic Object

Interfaces

iView

IiView, IiViews

Page

IPage, IPages

Layout

ILayout, ILayouts

System

ISystem, ISystems

 

End of Content Area