com.sap.portal.admin.wizard.handlers

Interface IObjectTypeHandler

All Known Implementing Classes:
AbstractObjectTypeHandler, IViewHandler, LayoutHandler, PageHandler, ProducerPortalHandler, SystemHandler

Deprecated. Use Admin Studio Wizard Framework, as described in Creating Administration Interfaces (Web Dynpro) on the Help Portal documentation (help.sap.com).

public interface IObjectTypeHandler

The interface that defines methods for creating a portal object while executing a PCM wizard.
The handler implementation identifies the object type, creates an object descriptor, fills it with the relevant data, and saves it in the persistence layer.
Each type of portal object must have a handler implementation in order to be supported by the PCM wizard toolkit. The PCM wizard toolkit calls this interface both during and after the creation process.
The descriptor is the object that is saved in the persistence layer. It holds a set of properties that form the new object. This API is called from SavePane as follows:


   
 
   // create new descriptor
   Object descriptor = createObjectDescriptor(typeHandler,context);
 
   
   
 
   // finalize the descriptor (add the attributes)
   wizard.finalizeDescriptor(attributesMap, descriptor, context);
 
   // save the object
   typeHandler.saveObject(descriptor, context);
 
   // finalize the object
   wizard.finalizeObject(context);
 
   ...
 
 
The PCM wizard toolkit provides default handlers that can be re-used or extended: iView, page, layout, system and producer (Global Portal). The following describes how to use the handler mechanism:
In order for the toolkit to know which handler is used, it does the following:
Note: In the first case (when using a public handler that is provided by the toolkit), if the ObjectType parameter is known to be one of the implemented types, there is no need to set the property for the handler service; the toolkit finds it automatically.
Any time that one of the previously mentioned properties is set, the toolkit gives it a higher priority. Defining both properties should be avoided. If they are both defined, the handlerServiceKey property is applied, and the handlerClassName property is disregarded.

See Also:
AbstractPCMWizard

Method Summary
 Object createObjectDescriptor(String targetId, com.sap.portal.pcm.CreateMethod method, IWizardContext context)
          Deprecated. Creates a new object descriptor for storing the object data.
 void saveObject(Object descriptor, IWizardContext context)
          Deprecated. Saves the object in the persistence layer.
 

Method Detail

createObjectDescriptor

Object createObjectDescriptor(String targetId,
                              com.sap.portal.pcm.CreateMethod method,
                              IWizardContext context)
                              throws DescriptorNotCreatedException
Deprecated. 
Creates a new object descriptor for storing the object data. The Portal Content Model (PCM) uses it to save the new object in the persistence layer.
Every handler generates an implementation-dependent descriptor.
Note: The implementation should only deal with the descriptor creation. Everything else is implemented in AbstractPCMWizard.finalizeDescriptor(Map, Object, com.sapportals.admin.wizardframework.api.IWizardContext).

Parameters:
targetId - a target object path
method - a creation method as defined by CreateMethod
context - the current wizard context
Returns:
Object the descriptor
Throws:
DescriptorNotCreatedException - if the descriptor cannot be created
See Also:
INewObjectDescriptor

saveObject

void saveObject(Object descriptor,
                IWizardContext context)
                throws ObjectNotCreatedException
Deprecated. 
Saves the object in the persistence layer. The way to save the object is up to the wizard developer. The toolkit uses Context.bind(String, Object) as the default.

Parameters:
descriptor - an object descriptor
context - the current wizard context
Throws:
ObjectNotCreatedException - if the save fails
See Also:
AbstractObjectTypeHandler.saveObject(Object, IWizardContext)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/admin/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice