com.sap.portal.pcm.page

Interface IPages

All Superinterfaces:
com.sap.portal.pcm.IObjectsManager

public interface IPages
extends com.sap.portal.pcm.IObjectsManager

The interface for the page object management service that provides helper methods for working with pages. All its methods are inherited from IObjectsManager.
The main task of an IPages object is to create a descriptor for creating a page object, as shown in the following example:


   import com.sap.portal.pcm.CreateMethod;
   import com.sapportals.portal.prt.jndisupport.InitialContext;
   import com.sapportals.portal.pcd.gl.IPcdContext;
   import javax.naming.Context;
   
IPages pSrv = (IPages)PortalRuntime.getRuntimeResources().getService(IPages.KEY); String targetUrl = "pcd:portal_content/myFolder/myIView"; try {    INewObjectDescriptor iDesc = (INewObjectDescriptor)iSrv.instantiateDescriptor(CreateMethod.NEW, targetUrl, request.getUser()); } catch (OperationFailedException e) {    // ... } catch (ObjectNotFoundException e) {    // ... } Hashtable env = new Hashtable(); env.put(Context.SECURITY_PRINCIPAL, user); env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
try {    InitialContext iCtx = new InitialContext(env);    Context ctx = (Context)iCtx.lookup(folderName); //the PCD name of the folder    ctx.bind("myNewPage", iDesc); } catch (NamingException e) {    // ... }

The target URL is the JNDI name of a template for the object. The target can be:
When the target URL is a PCD object, the create method can be either NEW or DELTA_LINK. When the target URL is not a PCD object, the create method must be NEW.
On startup, the interface creates the default page object if it does not exist. The default page is provided as an implementation of IAttributeSet at pcd:portal_content/com.sap.pct/default_objects/com.sap.portal.default_page<\code>.

See Also:
IPage, IiViews, ILayouts

Field Summary
static String KEY
           
static String OCLASS_PAGE
           
 
Method Summary
 
Methods inherited from interface com.sap.portal.pcm.IObjectsManager
getDefaultAttributes, instantiateDescriptor, instantiateDescriptor, instantiateDescriptor
 

Field Detail

KEY

static final String KEY
See Also:
Constant Field Values

OCLASS_PAGE

static final String OCLASS_PAGE
See Also:
Constant Field Values
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/semantics/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice