Class DocumentPropertyCSVWriter
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.csv.AbstractCSVWriter<Property>
org.nuxeo.ecm.platform.csv.export.io.DocumentPropertyCSVWriter
- All Implemented Interfaces:
Marshaller<Property>,Writer<Property>
@Setup(mode=SINGLETON,
priority=2000)
public class DocumentPropertyCSVWriter
extends AbstractCSVWriter<Property>
- Since:
- 10.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternstatic final Stringstatic final Stringprotected static final Patternstatic final Stringstatic final StringFields inherited from class org.nuxeo.ecm.core.io.marshallers.csv.AbstractCSVWriter
ctx, registry, TEXT_CSV, TEXT_CSV_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringescapeInjectableValue(String value) protected StringgetTranslatedValue(Session session, String schema, String lang, String value) static StringDeprecated.since 2021.32 Use escapeInjectableValue instead to allow lighter data alterationprotected StringreplaceNewline(String value) protected Stringprotected voidprotected voidwriteHeader(Property property, org.apache.commons.csv.CSVPrinter printer) protected voidwriteListProperty(Property property, org.apache.commons.csv.CSVPrinter printer) protected voidwriteListVocabularyProperty(String[] values, Directory vocabulary, org.apache.commons.csv.CSVPrinter printer) protected voidwriteScalarProperty(Property property, org.apache.commons.csv.CSVPrinter printer) protected voidwriteScalarVocabularyProperty(String value, Directory vocabulary, org.apache.commons.csv.CSVPrinter printer) protected voidwriteUnsupported(Type type, org.apache.commons.csv.CSVPrinter printer) Methods inherited from class org.nuxeo.ecm.core.io.marshallers.csv.AbstractCSVWriter
accept, getCSVPrinter, printCalendar, write
-
Field Details
-
LIST_DELIMITER
- See Also:
-
NEWLINE_REPLACEMENT_CTX_DATA
- Since:
- 11.5
- See Also:
-
LANG_CTX_DATA
- See Also:
-
UNKNOWN_TRANSLATED_VALUE_LABEL
- See Also:
-
FORBIDDEN_CHARACTERS
- Since:
- 2021.10
-
NEWLINE
-
sanitizer
- Since:
- 2021.10
-
-
Constructor Details
-
DocumentPropertyCSVWriter
public DocumentPropertyCSVWriter()
-
-
Method Details
-
write
protected void write(Property property, org.apache.commons.csv.CSVPrinter printer) throws IOException - Specified by:
writein classAbstractCSVWriter<Property>- Throws:
IOException
-
writeHeader
protected void writeHeader(Property property, org.apache.commons.csv.CSVPrinter printer) throws IOException - Specified by:
writeHeaderin classAbstractCSVWriter<Property>- Throws:
IOException
-
writeScalarProperty
protected void writeScalarProperty(Property property, org.apache.commons.csv.CSVPrinter printer) throws IOException - Throws:
IOException
-
writeScalarVocabularyProperty
protected void writeScalarVocabularyProperty(String value, Directory vocabulary, org.apache.commons.csv.CSVPrinter printer) throws IOException - Throws:
IOException
-
writeListProperty
protected void writeListProperty(Property property, org.apache.commons.csv.CSVPrinter printer) throws IOException - Throws:
IOException
-
writeListVocabularyProperty
protected void writeListVocabularyProperty(String[] values, Directory vocabulary, org.apache.commons.csv.CSVPrinter printer) throws IOException - Throws:
IOException
-
getTranslatedValue
-
writeUnsupported
protected void writeUnsupported(Type type, org.apache.commons.csv.CSVPrinter printer) throws IOException - Throws:
IOException
-
replaceNewline
-
removeFirstForbiddenCharacter
Deprecated.since 2021.32 Use escapeInjectableValue instead to allow lighter data alteration- Since:
- 2021.10
-
escapeInjectableValue
- Since:
- 2021.32 See https://owasp.org/www-community/attacks/CSV_Injection
-
sanitize
- Since:
- 2021.10
-