Class ImpExXMLExportWriter
java.lang.Object
de.hybris.platform.impex.jalo.exp.ImpExExportWriter
de.hybris.platform.impex.jalo.exp.ImpExXMLExportWriter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImpExXMLExportWriter(Writer writer, String encoding) ImpExXMLExportWriter(Writer writer, String encoding, SessionContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying writer.voidWrites a comment.Returns the general writer which is used for this export.voidnewLine()Write a newline.voidwriteComment(String scrline) Writes the Stringcommentto the writer as a line comment.voidwriteCurrentHeader(boolean asComment) Writes the the current header either as a comment, ifasCommentis set totrue, or as a normal row ifasCommentis false.protected voidprotected voidwriteHeaderColumn(AbstractDescriptor.ColumnParams colParams, boolean special) voidExports the Item into the underlying Writer using current header.voidwriteSrcLine(String scrline) Writes the StringsrcLineto the writer as a normal line.Methods inherited from class de.hybris.platform.impex.jalo.exp.ImpExExportWriter
getAllAttributeValues, getAttributeValue, getColumnOffset, getCurrentHeader, getLanguage, setColumnOffset, setCurrentHeader, setCurrentHeader, setCurrentHeader, setCurrentHeader
-
Field Details
-
IMPEX_ROOT_TAG
- See Also:
-
IMPEX_HEADER_TAG
- See Also:
-
IMPEX_MODE_ATTR
- See Also:
-
IMPEX_TYPE_ATTR
- See Also:
-
writer
-
xmlout
protected org.znerd.xmlenc.XMLOutputter xmlout
-
-
Constructor Details
-
ImpExXMLExportWriter
- Throws:
UnsupportedEncodingException
-
ImpExXMLExportWriter
public ImpExXMLExportWriter(Writer writer, String encoding, SessionContext ctx) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
-
Method Details
-
comment
Description copied from class:ImpExExportWriterWrites a comment.- Specified by:
commentin classImpExExportWriter- Parameters:
text- comment to write
-
close
public void close()Description copied from class:ImpExExportWriterCloses the underlying writer.- Specified by:
closein classImpExExportWriter
-
getExportWriter
Description copied from class:ImpExExportWriterReturns the general writer which is used for this export. e.g. a CSvWriter or a XMLWriter. The returnvalue must be casted.- Specified by:
getExportWriterin classImpExExportWriter- Returns:
- uncasted Object
-
newLine
public void newLine()Description copied from class:ImpExExportWriterWrite a newline.- Specified by:
newLinein classImpExExportWriter
-
writeCurrentHeader
Description copied from class:ImpExExportWriterWrites the the current header either as a comment, ifasCommentis set totrue, or as a normal row ifasCommentis false. The columns are shifted according to the set column offset.- Specified by:
writeCurrentHeaderin classImpExExportWriter- Throws:
ImpExException- error while writing- See Also:
-
writeHeaderColumn
- Throws:
IOException
-
writeHeaderColumn
protected void writeHeaderColumn(AbstractDescriptor.ColumnParams colParams, boolean special) throws IOException - Throws:
IOException
-
writeLine
Description copied from class:ImpExExportWriterExports the Item into the underlying Writer using current header.- Specified by:
writeLinein classImpExExportWriter- Parameters:
item- Item to export.- Throws:
ImpExException- error while translating item to text
-
writeComment
Description copied from class:ImpExExportWriterWrites the Stringcommentto the writer as a line comment.- Specified by:
writeCommentin classImpExExportWriter- Parameters:
scrline- the line to be written to the writer- Throws:
IOException- if an error occurs while writing
-
writeSrcLine
Description copied from class:ImpExExportWriterWrites the StringsrcLineto the writer as a normal line.- Specified by:
writeSrcLinein classImpExExportWriter- Parameters:
scrline- the line to be written to the writer- Throws:
IOException- if an error occurs while writing
-