com.sap.portal.pcm.iview
Interface IiViews

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

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

The iView object management service. Provides IObjectsManager functionality:

Default object management

On startup, creates the default iView object if it does not exist ('pcd:portal_content/com.sap.pct/default_objects/com.sap.portal.default_iView').
Provides the default iView as IAttributeSet implementation.


New object creation

Provides a descriptor.
IiViews iSrv = (IiViews)PortalRuntime.getRuntimeResources().getService(IiViews.KEY);
String targetId = null;
try
{
  iDesc = (INewObjectDescriptor)iSrv.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, iDesc);
}
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/testiView01' or portal_content/Test/testiView01')
  - 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:
IiView, IObjectsManager, CreateMethod, IPages, ILayouts

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

Field Detail

KEY

public static final java.lang.String KEY