com.sap.portal.pcm.layout
Interface ILayouts
- All Superinterfaces:
- com.sap.portal.pcm.IObjectsManager
- public interface ILayouts
- extends com.sap.portal.pcm.IObjectsManager
The layout object management service. Provides IObjectsManager functionality:
Default object management
On startup, creates the default layout object if it does not exist ('pcd:portal_content/com.sap.pct/default_objects/com.sap.portal.default_layout').
Provides the default page as IAttributeSet implementation.
New object creation
Provides a descriptor.
ILayouts lSrv = (ILayouts)PortalRuntime.getRuntimeResources().getService(ILayouts.KEY);
String targetId = null;
try
{
lDesc = (INewObjectDescriptor)lSrv.instantiateDescriptor(createMethod, targetUrl, user);
}
catch (OperationFailedException e)
{
// ...
}
catch (ObjectNotFoundException e)
{
// ...
}
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sapportals.portal.pcd.gl.PcdInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, user);
try
{
InitialContext iCtx = new com.sapportals.portal.prt.jndisupport.InitialContext(env);
Context ctx = (Context)iCtx.lookup(folderName);
ctx.bind(newName, lDesc);
}
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/testLayout01' or portal_content/Test/testLayout01')
- 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:
ILayout,
IObjectsManager,
CreateMethod,
IiViews,
IPagess
|
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