Content Management Guide
CHAPTER 7
This chapter describes the import and export facilities provided with the exteNd Director Content Management (CM) subsystem. It has these sections:
The CM subsystem includes facilities for importing and exporting data between databases or within a single database.
Uses for the import and export facilities include:
This chapter describes how the import and export functions work and how you can customize them.
You can use the import/export facilities in the CMS Administration Console to import and export content.
For more information, see Importing and Exporting Content
The export facility comprises these elements:
Export facility element |
Description |
---|---|
Export component(s) |
A portal portlet (or other UI element) that gets the data export descriptor (DED) selected by the user and lets the user save the CM archive generated by the EbiExporter object. NOTE: This function is provided in the CMS Administration Console. |
Data export descriptor (DED) |
An XML descriptor that defines the export data selected by the user.
|
EbiExporter |
Contains the API for exporting CM data. This object queries the CM repository for data based on the scope specified in the DED and then packages the result into a CM archive. |
CM export servlet |
Provides a connection between the EbiExporter object and the exporter portlet. This object passes the DED from the portlet to the exporter API and then gets the CM archive from the exporter and returns it to the portlet. |
CM archive |
A ZIP file that contains the CM export data and a default data import descriptor (DID) for subsequent use with the import facility.
|
Here is how the export process works:
The export process begins when a portlet gets the selected DED and passes it to the CM export servlet.
The export servlet forwards the DED to an object that implements the EbiExporter API.
NOTE: The servlet provides remote access to the EbiExporter API; however, the portlet could call the API directly.
The CM exporter API uses the DED to create a query representing all data and infrastructure the user has identified and executes the query against the CM database.
The CM database responds to the query by returning a raw result set.
The CM exporter API formats the raw query result into a structured ZIP archive file containing the content and data descriptors and returns the archive to the export servlet.
The export servlet returns the ZIP file to the portlet as bytes of content with a MIME type of application/zip.
The export portlet gets the ZIP file and saves it in a disk location specified by the user.
The import facility is made up of these elements:
Import facility element |
Description |
---|---|
Import component(s) |
A portal portlet (or other UI element) that provides the UI for the user to select import data. This import function is provided in the CMS Administration Console. |
Data import descriptor (DID) |
An XML descriptor based on the contents of the CM archive generated by the exporter.
|
EbiImporter |
Contains the API for importing CM data. It extracts the DID from the CM archive and uses it to insert data into the target database. |
CM import servlet |
Provides a connection between the EbiImporter and the CMS Administration Console. This object passes the CM archive to the importer API and creates an XML document that enumerates any warnings and failures encountered in the import process. |
Here is how the import process works:
The import process begins when a portlet allows the user to select the CM archive containing the DID.
The import portlet posts the ZIP file to the CM import servlet via HTTP.
NOTE: The servlet provides remote access to the EbiImporter API; however, the portlet could call the API directly.
The import servlet passes the ZIP file to the CM importer as an input stream.
The CM importer extracts the DID from the ZIP and uses it to transfer the data from the ZIP file to the underlying content repository.
The CM importer returns a summary of its execution to the CM import servlet.
The import servlet creates an XML document that represents successes, warnings, and failures that were encountered during the import process.
The import servlet returns the XML document to the portlet, which generates a report for the user.
You can customize data imports and exports several ways:
The data export descriptor (DED) is an XML file you can use to:
Format for entries The entries in your DED must conform to the DTDs in your project's library/ContentMgmtService/ContentMgmtService.spf/DTD directory.
Sample DED files There are several sample DED files in your project's library/ContentMgmtService/ContentMgmtService.spf/DTD directory. Each of these samples represents a typical export scenario:
The data import descriptor (DID) is an XML file you can use to:
Format for entries The entries in your DID must conform to contentmgmt-import-descr_5_0.dtd in your project's library/ContentMgmtService/ContentMgmtService.spf/DTD directory.
Sample DID file There is a sample DID file in your project's library/ContentMgmtService/ContentMgmtService.spf/DTD directory that shows how to set all available import options:
In most cases, editing the descriptors or the CM archive should provide most of the flexibility you need. However you can access the import and export API directly for tasks ranging from ad hoc imports and exports to writing your own facility.
Potential uses of the functionality provided by EbiImporter and EbiExporter include:
For more information, see the online API documentation for EbiExporter and EbiImporter.
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...