wt.ixb.pdx
Class PDXExportHelper

java.lang.Object
  extended bywt.ixb.pdx.PDXExportHelper

public class PDXExportHelper
extends Object

Helper class for export in PDX format. Creates pdx file in a specified directory on server.


Field Summary
static String AGILE_COMPATIBLE
          ixb property.
static String AGILE_PDX_FILE_NAME
           
static String AGILE_XSL
           
private static boolean AgileCompatible
           
static boolean DEBUG
           
static String DTD_FILE_PATH
           
static String DTD_FILE_PATH_KEY
           
private static String DTD_HEAD
           
private static String DTD_TAIL
           
static String PDX_DIR
           
static String STANDARD_PDX_FILE_NAME
           
static String STANDARD_XSL
           
static String XSL_FILE_PATH_KEY
          ixb property.
private static String xslFilePath
           
 
Constructor Summary
PDXExportHelper()
           
 
Method Summary
static void doExportToPDX(ExportPackageForPDX expPackage, String attachmentOption, File dirToSave, String zipName)
           
static void doExportToPDX(WTContainerRef container, ExportPackageForPDX expPackage, String attachmentOption, File dirToSave, String zipName)
          Creates pdx file on server.
protected static String getDtdString()
           
protected static void PP(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AGILE_COMPATIBLE

public static final String AGILE_COMPATIBLE
ixb property. If the property is set to true, the 'Agile Compatible' version of PDX 0.7 format will be used (default is true). If you need to export to standard PDX 1.0, set 'wt.ixb.pdx.AgileCompatible=false' in wt.properties.

See Also:
Constant Field Values

XSL_FILE_PATH_KEY

public static final String XSL_FILE_PATH_KEY
ixb property. If a customized xsl file will be used for WC XML -> PDX transformations, set 'wt.ixb.pdx.export.xslFilePath= in wt.properties. If the property is not set, than either wcxml2pdx.xsl or wcxml2pdx_agile.xsl will be used, depending on the value of pdx.AgileCompatible property. If DTD should be embedded into the output, set wt.ixb.pdx.export.dtdFilePath= in wt.properties. By default DTD will not be embedded.

See Also:
Constant Field Values

DTD_FILE_PATH_KEY

public static final String DTD_FILE_PATH_KEY
See Also:
Constant Field Values

PDX_DIR

public static final String PDX_DIR
See Also:
Constant Field Values

STANDARD_XSL

public static final String STANDARD_XSL
See Also:
Constant Field Values

AGILE_XSL

public static final String AGILE_XSL
See Also:
Constant Field Values

STANDARD_PDX_FILE_NAME

public static final String STANDARD_PDX_FILE_NAME
See Also:
Constant Field Values

AGILE_PDX_FILE_NAME

public static final String AGILE_PDX_FILE_NAME
See Also:
Constant Field Values

DTD_HEAD

private static String DTD_HEAD

DTD_TAIL

private static String DTD_TAIL

AgileCompatible

private static boolean AgileCompatible

xslFilePath

private static String xslFilePath

DTD_FILE_PATH

public static String DTD_FILE_PATH

DEBUG

public static boolean DEBUG
Constructor Detail

PDXExportHelper

public PDXExportHelper()
Method Detail

doExportToPDX

public static void doExportToPDX(WTContainerRef container,
                                 ExportPackageForPDX expPackage,
                                 String attachmentOption,
                                 File dirToSave,
                                 String zipName)
                          throws WTException
Creates pdx file on server.

Parameters:
container - Source container
expPackage - Export package
attachmentOption - Attachments option. Possible values are: a)PDXExportHandler.XML_VALUE_ATTACHMENTS - content files are included into pdx package (default option) b)PDXExportHandler.XML_VALUE_NO_ATTACHMENTS - content files are ignored (not mentioned in pdx.xml) c)PDXExportHandler.XML_VALUE_ATTACHMENTS_AS_FILE_NAMES - content files are mentioned in pdx.xml but are not included into zip
dirToSave - directory on server where the resulting pdx file will be stored
zipName - name for the resulting pdx file (pass name without extension since extension '.pdx' is added)
Throws:
WTException

doExportToPDX

public static void doExportToPDX(ExportPackageForPDX expPackage,
                                 String attachmentOption,
                                 File dirToSave,
                                 String zipName)
                          throws WTException
Throws:
WTException

getDtdString

protected static String getDtdString()
                              throws IOException
Throws:
IOException

PP

protected static void PP(String s)