com.sap.portal.wpc.api.content.handler

Interface IContentHandler


public interface IContentHandler

Implement this interface to handle modifications made to pages during content editing, and/or publication of content during the page publication flow. The methods in this interface should implement the logic of the custom content management.


Method Summary
 String getID()
          Should return the ID of this content handler.
 void onBeforeDelete(com.sap.security.api.IUser user, String objectID)
          Invoked before the deletion of an object.
 Map<String,String> onCopy(com.sap.security.api.IUser user, String sourceID, String targetID)
          Invoked after successfully copying an object.
 Map<String,String> onCreate(com.sap.security.api.IUser user, String objectID, ContentDescriptor contentDescriptor)
          Invoked after the creation of an object in a page.
 Map<String,String> onMove(com.sap.security.api.IUser user, String sourceID, String targetID)
          Invoked after successfully moving an object.
 Map<String,String> onPublish(com.sap.security.api.IUser user, String objectID)
          Invoked during the publication flow of the page containing the object.
 void onUnpublish(com.sap.security.api.IUser user, String objectID)
          Invoked during the unpublishing flow of the page containing the object.
 

Method Detail

getID

String getID()
Should return the ID of this content handler.

Returns:
the ID of this content handler

onCreate

Map<String,String> onCreate(com.sap.security.api.IUser user,
                            String objectID,
                            ContentDescriptor contentDescriptor)
Invoked after the creation of an object in a page.

Parameters:
user - the user who is editing the page
objectID - the design time ID of the object that was created
contentDescriptor - the ContentDescriptor object
Returns:
map of returned by the custom content provider; these values need to be set on the created object

onBeforeDelete

void onBeforeDelete(com.sap.security.api.IUser user,
                    String objectID)
Invoked before the deletion of an object.

Parameters:
user - the user who is editing the page
objectID - the design time PCD ID of the object to delete

onCopy

Map<String,String> onCopy(com.sap.security.api.IUser user,
                          String sourceID,
                          String targetID)
Invoked after successfully copying an object.

Parameters:
user - the user who is editing the page
sourceID - the design time PCD ID of the source object
targetID - the design time PCD ID of the target object
Returns:
map of returned by the custom content provider; these values need to be set on the created design time target object

onMove

Map<String,String> onMove(com.sap.security.api.IUser user,
                          String sourceID,
                          String targetID)
Invoked after successfully moving an object.

Parameters:
user - the user who is editing the page
sourceID - the design time PCD ID of the source object
targetID - the design time PCD ID of the target object
Returns:
map of returned by the custom content provider; these values need to be set on the created design time target object

onPublish

Map<String,String> onPublish(com.sap.security.api.IUser user,
                             String objectID)
                             throws PublicationException
Invoked during the publication flow of the page containing the object.

Parameters:
user - the user who is publishing the page
objectID - the design time ID of the object that is being published
Returns:
map of returned by the custom content provider; these values need to be set on the corresponding runtime object
Throws:
PublicationException - in case of an unexpected error

onUnpublish

void onUnpublish(com.sap.security.api.IUser user,
                 String objectID)
                 throws PublicationException
Invoked during the unpublishing flow of the page containing the object.

Parameters:
user - the user who is unpublishing the page
objectID - the design time object ID of the object that is being unpublished
Throws:
PublicationException - in case of an unexpected error
Access Rights

This class can be accessed from:


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


Copyright 2015 SAP AG Complete Copyright Notice