Modifier and Type | Method and Description |
---|---|
static String |
getCSVStringFromDataSheet(StringDataSheet sheet) |
static StringDataSheet |
getDataSheet(String data,
CSVFormatWrapper csvFormat,
int startAtLine) |
static StringDataSheet |
getDataSheetFromCSVByteArray(byte[] bytes,
CSVFormatWrapper csvFormat,
int startAtLine) |
static StringDataSheet |
getDataSheetFromCSVString(String csvString,
CSVFormatWrapper csvFormat,
int startAtLine) |
static StringDataSheet |
getDataSheetFromExcelByteArray(byte[] data,
String sheetName,
int startAtLine)
Generates a
StringDataSheet for the given sheet name |
static StringDataSheet |
getDataSheetFromTemplate(Textbaustein template,
Locale clientLocale,
String technicalNameKeyColumn,
String displayNameKeyColumn,
String technicalNameDefaultColumn)
Create a
StringDataSheet object and returns it. |
static Map<String,StringDataSheet> |
getDataSheetsFromExcelByteArray(byte[] data)
Generates a
Map with StringDataSheet s (values) and their names (key) |
static Map<String,StringDataSheet> |
getDataSheetsFromExcelByteArray(byte[] data,
List<String> sheetNames)
Generates a
Map with StringDataSheet s (values) and their names (key) for the given sheet names |
static StringDataSheet |
getDefaultDataSheet() |
static Map<String,Properties> |
getPropertyObjectsFromDataSheet(StringDataSheet dataSheet,
String columnNameForPropertyKey,
String columnNameForDefault,
Locale currentClientLocale)
Generates a Properties-Object from all Columns in given data sheet.
|
static Charset |
guessCharset(InputStream is) |
static void |
prefillDataSheetReferencesFromSystemProperties(ADataSheet<String> sheet,
Locale clientLocale,
String keyColumnName,
String propKeyReferences)
Fills the given data sheet with the data from the system properties.
|
public static final StringDataSheet getDefaultDataSheet()
public static final String getCSVStringFromDataSheet(StringDataSheet sheet)
public static final StringDataSheet getDataSheetFromCSVString(String csvString, CSVFormatWrapper csvFormat, int startAtLine) throws Exception
Exception
public static final StringDataSheet getDataSheet(String data, CSVFormatWrapper csvFormat, int startAtLine) throws Exception
Exception
public static final StringDataSheet getDataSheetFromCSVByteArray(byte[] bytes, CSVFormatWrapper csvFormat, int startAtLine) throws Exception
Exception
public static Charset guessCharset(InputStream is) throws IOException
IOException
public static final StringDataSheet getDataSheetFromExcelByteArray(byte[] data, String sheetName, int startAtLine) throws Exception
StringDataSheet
for the given sheet namedata
- byte array of excel file (.xls or .xlsx)sheetName
- String
of sheet name to generate StringDataSheet
s forStringDataSheet
for given sheet nameException
- when an error during the reading occurspublic static final Map<String,StringDataSheet> getDataSheetsFromExcelByteArray(byte[] data, List<String> sheetNames) throws Exception
Map
with StringDataSheet
s (values) and their names (key) for the given sheet namesdata
- byte array of excel file (.xls or .xlsx)sheetNames
- List
of names to generate StringDataSheet
s forMap
with sheet names and sheetsException
- when an error during the reading occurspublic static final Map<String,StringDataSheet> getDataSheetsFromExcelByteArray(byte[] data) throws Exception
Map
with StringDataSheet
s (values) and their names (key)public static final StringDataSheet getDataSheetFromTemplate(Textbaustein template, Locale clientLocale, String technicalNameKeyColumn, String displayNameKeyColumn, String technicalNameDefaultColumn) throws IOException
StringDataSheet
object and returns it. The entries are read from the given Textbaustein
.template
- the Textbaustein
object with the language specific overloaded propertiesclientLocale
- the locale of the current Mandant
objecttechnicalNameKeyColumn
- technical name for the key columndisplayNameKeyColumn
- display name for the key columntechnicalNameDefaultColumn
- technical name of the default columnStringDataSheet
IOException
- when an error during the reading occurspublic static final void prefillDataSheetReferencesFromSystemProperties(ADataSheet<String> sheet, Locale clientLocale, String keyColumnName, String propKeyReferences)
sheet
- the data sheet to prefillclientLocale
- the locale of the current Mandant
-objectkeyColumnName
- the name of the 'key' columnpropKeyReferences
- name of the i18n properties file key, which holds the reference valuespublic static final Map<String,Properties> getPropertyObjectsFromDataSheet(StringDataSheet dataSheet, String columnNameForPropertyKey, String columnNameForDefault, Locale currentClientLocale)
dataSheet
- contains the data for the properties objectscolumnNameForPropertyKey
- name of the columns, which represents the key's for the properties-objectscolumnNameForDefault
- name of the column, with represents the default locale for the clientcurrentClientLocale
- the current locale of Mandant
-objectMap
-object with all overloaded PropertiesCopyright © 2021 XIMA MEDIA GmbH. All rights reserved.