Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2004Q2 Migration Guide 

Appendix B  
Sun ONE Portal Server 3.0 Data Migration Module Author's Guide


Note

All instances of the Sun™ ONE Portal Server 3.0 product refer to what were formerly known as the iPlanet™ Portal Server 3.0, Service Pack 3a, iPlanet™ Portal Server 3.0, Service Pack 4 products, and iPlanet™ Portal Server 3.0, Service Pack 5 products.


The data migration tools are designed to be expandable by using modules. The module can define a menu option, order items within the menu, and specify when it should run relative to other modules. The migration tools themselves are designed as a series of modules which makes them excellent examples of how to write modules.

This appendix contains the following sections:


What Makes a Module?

The syntax for module file names is:

[0-9][0-9][descriptive_text][export,convert, or import]

Migration modules must meet certain criteria. In particular, they must:


Module Example

This section provides examples of the Desktop module located in BaseDir/SUNWps/migration/modules/desktop.

Desktop Module Files

Table B-1 shows the files comprising the Desktop module and their definitions. This two-column table shows the module name in the first column and its description in the second column.

Table B-1  Desktop Module File Names and Their Descriptions  

File Name

Description

20dtxpconvert

This is an “always-run” module that extracts the Desktop templates to a temporary directory. The LDAP module uses some of these templates as well, so it runs for every conversion.

50dtconvert

Contains the functionality for converting Desktop templates.

50dtexport

Contains the functionality for exporting Desktop templates from Sun ONE Portal Server 3.0.

50dtimport

Contains the functionality for importing Desktop templates to Sun ONE Portal Server 6.2.

auth.cksum

File used to compare authentication templates.

convertJsp.pl

Converts a single JSP file.

convertTemplate.pl

Converts a single template file.

migrate_files.txt

Contains additional files to be migrated.

Module Code Examples

This section provides code extracts from two Desktop Modules.

Note that the Desktop menu option localized the menu option prior to printing it.

Important Variables

Table B-2 shows variables that are considered important for use by modules. This two-column table shows the variable in the first column and its description in the second column.

Table B-2  Important Variables Used by Modules 

Variable

Definition

$exportDir

Location of export data.

$importDir

Location of import data.

$tempDesktop/exportData

Location of extracted templates during conversion.

$isFlatRole

Describes role migration type used only during conversion.

If $isFlatRole=0 (default), then the conversion tool performs role to suborganization migration.

If $isFlatRole=1, then the conversion tool peforms role to role migration.

$isMerge

Describes the display profile merge type used only during import.

If $isMerge=0 (default), then the import tool overwrites all existing display profile documents when they conflict with imported display profile documents.

If $isMerge=1, then the import tool merges all existing display profile documents when they conflict with imported display profile documents.

$keepUsers

Describes user LDIF record add and delete type used only during import.

If $keepUsers=0 (default), then overwrite all existing users by deleting any existing users that conflict with imported users and add new users.

If $keepUsers=1, then keep existing users that conflict with imported users.

$reportFile

FQP to report file. You should only append to this file.

$errorFile

FQP to error file. You should only append to this file.

All variables and functions in each of the core tools are available to the module files.

The following is an example of writing to $reportFile and $errorFile:

if [ ! -d $tempDesktop/exportData ]; then

print “`$GETTEXT ‘Error - Cannot find exported template data in’` $tempDesktop/exportData” | tee -a $errorFile $reportFile



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.