|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ixb.publicforapps.ApplicationExportHandlerTemplate
wt.ixb.pdx.PDXExportHandler
Public handler for export in PDX format.
Field Summary | |
private static int |
BUFFER_SIZE
|
protected IxbDomElement |
exportPackageElement
|
protected IxbDomDocument |
finalDoc
|
private int |
fnum
|
private String |
m_attachmentsOption
|
private ExportPackageForPDX |
m_package
|
private File |
m_tempDir
|
static String |
PDX_EXTENSION
|
static String |
XML_ATTR_ATTACHMENTS_OPTION
|
static String |
XML_ATTR_DESCRIPTION
|
static String |
XML_ATTR_EXPORT_PACKAGE_ID
|
static String |
XML_ATTR_GENERATION_TIME
|
static String |
XML_ATTR_IS_ROOT
|
static String |
XML_ATTR_MODIFICATION_TIME
|
static String |
XML_ATTR_ORIGINATOR
|
String |
XML_DECLARATION
|
static String |
XML_EXPORT_PACKAGE
|
static String |
XML_VALUE_ATTACHMENTS
|
static String |
XML_VALUE_ATTACHMENTS_AS_FILE_NAMES
|
static String |
XML_VALUE_NO
|
static String |
XML_VALUE_NO_ATTACHMENTS
|
static String |
XML_VALUE_YES
|
Fields inherited from class wt.ixb.publicforapps.ApplicationExportHandlerTemplate |
|
Fields inherited from interface wt.ixb.publicforapps.ApplicationExpImportHandler |
IMPORTANCE_LEVEL_DEFAULT |
Constructor Summary | |
PDXExportHandler(ExportPackageForPDX ep,
String attachmentOption)
|
Method Summary | |
private void |
cleanTempDir()
|
protected void |
createZip(File dirToSave,
String zipName)
Creates PDX package, which is zip of pdx.xml file and content files. |
private String |
getCurrentDateTime()
|
private String |
getPackageId(ExportPackageForPDX ep)
|
String |
getXML()
Normally should be used only for debugging purposes |
private void |
PP(String s)
|
private void |
setAttachmentOption(String option)
|
private void |
setAttributeIsRoot(IxbElement doc)
Adds attribute isRoot=yes|no indicating whether this element represents a seed WTObject (that is, object which was used as a seed for generating this export package) NB! This method sets isRoot=yes if the object was selected for export BOTH as a seed object and as a child object of some structure. |
String |
storeContent(Object contentAttr)
Stores the given content of exported object. |
String |
storeDocument(IxbElement doc,
String dtd)
Stores the given XML element, which is the XML representation of exported object, based on the provided DTD. |
protected void |
transformToPDXFormat(String xslPath,
String xmlResultFileName)
Transforms XML Document to PDX format and saves it to temporary directory |
Methods inherited from class wt.ixb.publicforapps.ApplicationExportHandlerTemplate |
finalizeAdditionalInfo, reallyStoreContent, storeAdditionalInfo, storeContent, storeDocument, storeLogMessage, storeLogMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String XML_EXPORT_PACKAGE
public static final String XML_ATTR_EXPORT_PACKAGE_ID
public static final String XML_ATTR_GENERATION_TIME
public static final String XML_ATTR_MODIFICATION_TIME
public static final String XML_ATTR_ORIGINATOR
public static final String XML_ATTR_ATTACHMENTS_OPTION
public static final String XML_ATTR_DESCRIPTION
public static final String XML_ATTR_IS_ROOT
public static final String XML_VALUE_YES
public static final String XML_VALUE_NO
public static final String XML_VALUE_ATTACHMENTS
public static final String XML_VALUE_NO_ATTACHMENTS
public static final String XML_VALUE_ATTACHMENTS_AS_FILE_NAMES
public static final String PDX_EXTENSION
public final String XML_DECLARATION
private final ExportPackageForPDX m_package
private final File m_tempDir
protected IxbDomDocument finalDoc
protected IxbDomElement exportPackageElement
private String m_attachmentsOption
private int fnum
private static int BUFFER_SIZE
Constructor Detail |
public PDXExportHandler(ExportPackageForPDX ep, String attachmentOption) throws WTException
ep
- export packageattachmentOption
- Attachments option. Possible values are:
a)XML_VALUE_ATTACHMENTS - content files are included into pdx package (default option)
b)XML_VALUE_NO_ATTACHMENTS - content files are ignored (not mentioned in pdx.xml and not included into package)
c)XML_VALUE_ATTACHMENTS_AS_FILE_NAMES - content files are mentioned in pdx.xml but are not included into packageMethod Detail |
private void setAttachmentOption(String option)
public String storeDocument(IxbElement doc, String dtd) throws WTException
ApplicationExportHandlerTemplate
storeDocument
in interface ApplicationExportHandler
storeDocument
in class ApplicationExportHandlerTemplate
doc
- dtd
-
WTException
storeDocument (IxbElement elem)
private void setAttributeIsRoot(IxbElement doc) throws WTException
WTException
public String storeContent(Object contentAttr) throws WTException
ApplicationExportHandlerTemplate
storeContent
in interface ApplicationExportHandler
storeContent
in class ApplicationExportHandlerTemplate
contentAttr
- The content attribute which is related to InputStream or BLOB. e.g. it can be ApplicationData
, File or String (full path of a file), etc
WTException
public String getXML() throws WTException
WTException
protected void transformToPDXFormat(String xslPath, String xmlResultFileName) throws WTException
xslPath
- path to the XSL file used for transformationxmlResultFileName
- name under which the resulting PDX XML file should be stored
(according to PDX 1.0 specification it should be "pdx.xml", but, unfortunately, some
PDX implementations (Agile eXpress) do not understand it)
WTException
protected void createZip(File dirToSave, String zipName) throws WTException
dirToSave
- directory on server where *.pdx file will be created
WTException
private void cleanTempDir()
private String getPackageId(ExportPackageForPDX ep)
private String getCurrentDateTime()
private void PP(String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |