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
Modifier and TypeFieldDescriptionstatic final Pattern
static final String
static final String
protected static final Pattern
static final String
static final String
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.csv.AbstractCSVWriter
ctx, registry, schemaManager, TEXT_CSV, TEXT_CSV_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
escapeInjectableValue
(String value) protected String
getTranslatedValue
(Session session, String schema, String lang, String value) static String
Deprecated.since 2021.32 Use escapeInjectableValue instead to allow lighter data alterationprotected String
replaceNewline
(String value) protected String
protected void
protected void
writeHeader
(Property property, org.apache.commons.csv.CSVPrinter printer) protected void
writeListProperty
(Property property, org.apache.commons.csv.CSVPrinter printer) protected void
writeListVocabularyProperty
(String[] values, Directory vocabulary, org.apache.commons.csv.CSVPrinter printer) protected void
writeScalarProperty
(Property property, org.apache.commons.csv.CSVPrinter printer) protected void
writeScalarVocabularyProperty
(String value, Directory vocabulary, org.apache.commons.csv.CSVPrinter printer) protected void
writeUnsupported
(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:
write
in classAbstractCSVWriter<Property>
- Throws:
IOException
-
writeHeader
protected void writeHeader(Property property, org.apache.commons.csv.CSVPrinter printer) throws IOException - Specified by:
writeHeader
in 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
-