com.sap.workspaces.module.extension

Interface IModuleTransport

All Superinterfaces:
IWorkspacesService

public interface IModuleTransport
extends IWorkspacesService

Provides callback methods that are invoked during the workspace transport; implement them to export or import the module's external resources, such as documents or records.

When a workspace is exported, the modules implementing this interface are called to export their external resources. An in the transport package (zip file) is a file that contains one or more external resources of the module. Modules should return their export entries in a getExportEntries(IModuleContext)array. Each entry is then saved to the output stream using IModuleTransport.IExportEntry.writeEntryData(OutputStream).

When a workspace is imported, modules implementing this interface are called to import their external resources, using the importEntries(IModuleContext, com.sap.workspaces.module.extension.IModuleTransport.IImportEntry[]) Each import entry corresponds to an export entry, so that the order of import entries is the same as of export entries.


Nested Class Summary
static interface IModuleTransport.IExportEntry
          Implement the callback methods for exporting of the module's external resources.
static interface IModuleTransport.IImportEntry
          Implement the callback methods for importing of the module's external resources.
 
Method Summary
 IModuleTransport.IExportEntry[] getExportEntries(IModuleContext context)
          Implementing modules should return an array of callback entries to export.
 void importEntries(IModuleContext context, IModuleTransport.IImportEntry[] importEntries)
          A callback invoked after a workspace in imported.
 

Method Detail

getExportEntries

IModuleTransport.IExportEntry[] getExportEntries(IModuleContext context)
Implementing modules should return an array of callback entries to export. An entry represents a file in the transport zip file. The order of imported entries is the same as returned by the module by calling the getExportEntries(IModuleContext).

Parameters:
context - Module context
Returns:
list of this module export entries

importEntries

void importEntries(IModuleContext context,
                   IModuleTransport.IImportEntry[] importEntries)
                   throws IOException
A callback invoked after a workspace in imported. Imported entries are the entries exported by the module, using IModuleTransport.IExportEntry.writeEntryData(OutputStream)

Parameters:
context - module context
importEntries - entries to import
Throws:
IOException


Copyright 2010 SAP AG Complete Copyright Notice