com.sap.portal.pcm.page
Interface IPages
- All Superinterfaces:
- com.sap.portal.pcm.IObjectsManager
- public interface IPages
- extends com.sap.portal.pcm.IObjectsManager
The page object management service. Provides IObjectsManager functionality:
Default object management
On startup, creates the default page object if it does not exist ('pcd:portal_content/com.sap.pct/default_objects/com.sap.portal.default_page').
Provides the default page as IAttributeSet implementation.
New object creation
Provides a descriptor.
IPages pSrv = (IPages)PortalRuntime.getRuntimeResources().getService(IPages.KEY);
String targetId = null;
try
{
pDesc = (INewObjectDescriptor)pSrv.instantiateDescriptor(createMethod, targetUrl, user);
}
catch (OperationFailedException e)
{
// ...
}
catch (ObjectNotFoundException e)
{
// ...
}
Hashtable env = new Hashtable();
env.put(Context.SECURITY_PRINCIPAL, user);
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sapportals.portal.pcd.gl.PcdInitialContextFactory");
try
{
InitialContext iCtx = new com.sapportals.portal.prt.jndisupport.InitialContext(env);
Context ctx = (Context)iCtx.lookup(folderName);
ctx.bind(newName, pDesc);
}
catch (NamingException e)
{
// ...
}
Parameters:
TargetId :
The target id is the JNDI name of a template that the object will be based upon. The target can be:
- PCD url (i.e. 'pcd:/portal_content/Test/testPage01' or portal_content/Test/testPage01')
- Application component (i.e. 'ApplicationName.ComponentName' or 'par:/applications/ApplicationName/components/ComponentName')
- External url (i.e. 'otherPrefix:/Test/TestObj01')
CreateMethod :
When creating an object upon a PCD-template-object, the object can be created as either NEW or DELTA_LINK.
For other type objects, the CreateMethod can be NEW only.
Throws:
ObjectNotFoundException :
When trying to create a new object based on a unexists PCD object.
OperationFailedException :
When trying to create delta-link over a non-PCD url.
- See Also:
IPage,
IObjectsManager,
CreateMethod,
IiViews,
ILayouts
|
Field Summary |
static java.lang.String |
KEY
|
| Methods inherited from interface com.sap.portal.pcm.IObjectsManager |
getDefaultAttributes, instantiateDescriptor, instantiateDescriptor |
KEY
public static final java.lang.String KEY