CentraSite Documentation : CentraSite Administrator’s Guide : Importing Objects Using the API : Invoking an Importer from a Java Class : Creating a Script File to Invoke an Importer : Creating a Script File for UNIX (C-Shell Script)
Creating a Script File for UNIX (C-Shell Script)
Create a script file that looks as follows if CentraSite is running under UNIX.
set javaexe="fullPathToJava.exe"
set redist="CentraSiteHomeDirectory/redist"
set mainjar="CentraSiteUtils.jar"
set delim='\:'
cd "$redist"
set cl=""
foreach j ( 'ls *.jar' )
if ($cl != "") set cl=${cl}${delim}
set cl=${cl}${j}
end
setenv CLASSPATH ${mainjar}${delim}${cl}
$javaexe importerClassName $*
Where importerClassName is the name of the Importer class that you want to run. See Importer Class Names for a list of the importer class names.
Example
The following is an example of a script file that calls the XML Schema importer:
#!/bin/csh
#
# Run XML Schema Importer
#
set javaexe="/mydir/softwareag/cjp/v16/bin/java"
set redist="/mydir/softwareag/CentraSite/redist"
set mainjar="CentraSiteUtils.jar"
set delim='\:'
# build CLASSPATH with all files from jar directory
cd "$redist"
set cl=""
foreach j ( 'ls *.jar' )
if ($cl != "") set cl=${cl}${delim}
set cl=${cl}${j} end
setenv CLASSPATH ${mainjar}${delim}${cl}
$javaexe com.centrasite.jaxr.schema.SchemaImporter $*
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback