com.sap.netweaver.coll.shared.api.extension
Interface IExtension

All Superinterfaces:
IDisplayable

public interface IExtension
extends IDisplayable

Interface describing an extension. Customers develop extensions to add functionality to an application that processes extension points. An extension provider provides the extension with input parameter values and an output parameter mapping and exposes it to an extension processor. The processor collects and processes the extension when the extension point is reached.


Method Summary
 void commit(IExtensionPoint extension, IExtensionContext context)
          Method called by the extension processor when no error occured and all changings are finalized.
 IExtensionPoint[] getExtensionPoints()
          List the extension points the extension wants to handle.
 IParameterInfo[] getInputParameterInfos(IExtensionPoint point)
          List infos for all input parameters the extension needs to process an extension point.
 IParameterInfo[] getOutputParameterInfos(IExtensionPoint point)
          List infos for all output parameters the extension delivers after processing an extension point.
 IExtensionResult process(IExtensionPoint extension, IExtensionContext context)
          Method called by the extension processor when an extension point is reached and the extension needs to be processed.
 void rollback(IExtensionPoint extension, IExtensionContext context)
          Method called by the extension processor when an error occured.
 void validate(IExtensionPoint extension, IExtensionContext context)
          Method called by the extension processor to validate that the extension can be processed.
 
Methods inherited from interface com.sap.netweaver.coll.shared.api.extension.IDisplayable
getDescription, getId, getName
 

Method Detail

getExtensionPoints

public IExtensionPoint[] getExtensionPoints()
List the extension points the extension wants to handle.
Returns:
The list of extension points, null if all are handled

getInputParameterInfos

public IParameterInfo[] getInputParameterInfos(IExtensionPoint point)
List infos for all input parameters the extension needs to process an extension point.
Parameters:
extensionPoint - The extension point for wich the parameters are listed
Returns:
The list of required parameters

getOutputParameterInfos

public IParameterInfo[] getOutputParameterInfos(IExtensionPoint point)
List infos for all output parameters the extension delivers after processing an extension point.
Parameters:
extensionPoint - The extension point for wich the parameters are listed
Returns:
The list of delivered parameters

validate

public void validate(IExtensionPoint extension,
                     IExtensionContext context)
              throws ExtensionException
Method called by the extension processor to validate that the extension can be processed. The extension should check the validity and the consistence of all input parameters in the context. No output is produced. Since input parameter values may be result of other extensions that also produce no ouput at validation, all input parameters must be treated as being optional.
Parameters:
extensionPoint - The extension point to handle
extensionContext - A context containing the required input parameters

process

public IExtensionResult process(IExtensionPoint extension,
                                IExtensionContext context)
                         throws ExtensionException
Method called by the extension processor when an extension point is reached and the extension needs to be processed. The extension produces the ouput, but in a way that can be rolled back. Temporary backups and helpers can be prepared for a later undo.
Parameters:
extensionPoint - The extension point to handle
extensionContext - A context containing the required input parameters
Returns:
A context containing the ouput parameters plus a return code

rollback

public void rollback(IExtensionPoint extension,
                     IExtensionContext context)
              throws ExtensionException
Method called by the extension processor when an error occured. The rollback must undo all changings carried out in the process method.
Parameters:
extensionPoint - The extension point to handle
extensionContext - A context containing the required input parameters

commit

public void commit(IExtensionPoint extension,
                   IExtensionContext context)
            throws ExtensionException
Method called by the extension processor when no error occured and all changings are finalized. The extension should delete backups and helpers for a rollback now.
Parameters:
extensionPoint - The extension point to handle
extensionContext - A context containing the required input parameters