Class ExportConfiguration
java.lang.Object
de.hybris.platform.impex.jalo.exp.ExportConfiguration
This value object is used for configuring the impex based export process.
-
Constructor Summary
ConstructorsConstructorDescriptionExportConfiguration(ImpExMedia source, EnumerationValue headerValidationMode) The assigned impex media represents an impex based command script (see the sample below). -
Method Summary
Modifier and TypeMethodDescriptionvoidassignMediaFileToHandler(ImpExZip mediaFile) voidDeprecated.Deprecated.since ages - usegetDataExportTarget()insteadReturns the exported data.Deprecated.since ages - UsegetMediasExportTarget()insteadReturns the exported medias.booleanReturns the export mode i.e.voidsetCommentCharacter(String comment) nullwill be ignored.voidsetDataExportMedia(ImpExExportMedia target) Deprecated.since ages - UsesetDataExportTarget(ImpExExportMedia)insteadvoidsetDataExportMedia(ImpExExportMedia newDataExportMedia, boolean removeCurrentOne) Deprecated.since ages - UsesetDataExportTarget(ImpExExportMedia, boolean)insteadvoidsetDataExportTarget(ImpExExportMedia target) Sets the 'data' export target.voidsetDataExportTarget(ImpExExportMedia newDataExportMedia, boolean removeCurrentOne) Sets the 'data' export target.voidsetDocumentIDRegistry(DocumentIDRegistry registry) voidsetFieldSeparator(String fieldseparator) nullwill be ignored.voidsetHeaderLibrary(HeaderLibrary headerLibrary) voidsetMediaDataHandler(DefaultExportMediaHandler mediaHandler) voidsetMediasExportMedia(ImpExExportMedia target) Deprecated.since ages - UsesetMediasExportTarget(ImpExExportMedia)insteadvoidSets the 'medias' export target.voidsetMediasExportTarget(ImpExExportMedia newMediasExportMedia, boolean removeCurrentOne) Sets the 'medias' export target.voidsetQuoteCharacter(String quote) nullwill be ignored.voidsetSingleFile(boolean singleFile) Sets the export mode i.e.voidsetSource(ImpExMedia source)
-
Constructor Details
-
ExportConfiguration
public ExportConfiguration(ImpExMedia source, EnumerationValue headerValidationMode) throws ImpExException The assigned impex media represents an impex based command script (see the sample below). An ImpExException will be thrown if the source is <null>. Command samples:"#% impex.setLocale( new Locale( ""de"" , """" ) );" <br> "#% impex.setValidationMode( ""import_relax"" );"<br> "#% impex.setTargetFile( ""Language.csv"" , true );"<br> INSERT_UPDATE Language;pk[unique=true];active; fallbackLanguages(pk);isocode[unique=true];name[lang=de];name[lang=en];owner(pk) <br> "#% impex.exportItems( ""Language"" , false );" <br> INSERT Employee; PK; uid[unique=true];<br> "#% impex.exportItems( new String[]{ ""1132326173852672"" } );"<br> INSERT Product; PK; code[unique=true]; name[lang=de]<br> "#% import de.hybris.platform.jalo.product.Product;" <br> "#% impex.exportItems( ""select {pk} from {Product}"", Collections.EMPTY_MAP, Collections.singletonList( Product.class ), true, true, -1, -1 );"
@param source impex media instance, which contains the impex based "export commands" @param headerValidationMode the usedvalidation mode, (seeImpExManager.getImportStrictMode(),ImpExManager.getExportOnlyMode(), etc. ) @throws ImpExException will be thrown, if source is <null>.- Throws:
ImpExException
-
-
Method Details
-
deleteTempFiles
public void deleteTempFiles() -
setHeaderLibrary
- Parameters:
headerLibrary-
-
getHeaderLibrary
- Returns:
- the configured header library
-
getDataFile
- Returns:
- data file
-
getMediaFile
- Returns:
- media zip
-
getFieldSeparator
- Returns:
- configured fieldseparator
-
getCommentCharacetr
Deprecated.since ages - usegetCommentCharacter()instead- Returns:
- configured comment character
-
getCommentCharacter
-
getQuoteCharacter
- Returns:
- configured quote character
-
setFieldSeparator
nullwill be ignored.- Parameters:
fieldseparator-
-
setCommentCharacter
nullwill be ignored.- Parameters:
comment- character
-
setQuoteCharacter
nullwill be ignored.- Parameters:
quote- character
-
setMediaDataHandler
- Parameters:
mediaHandler-
-
assignMediaFileToHandler
- Parameters:
mediaFile-
-
getMediaDataHandler
- Returns:
- used media handler
-
getHeaderValidationMode
- Returns:
- header validation mode
-
getSource
- Returns:
- export script
-
setSource
- Parameters:
source-
-
getDocumentIDRegistry
- Returns:
- used DocumentIDRegistry instance
-
setDocumentIDRegistry
- Parameters:
registry-
-
getDataExportTarget
Returns the exported data.- Returns:
- the exported data
-
getDataExportMedia
Deprecated.since ages - usegetDataExportTarget()instead -
setDataExportMedia
@Deprecated(since="ages", forRemoval=false) public void setDataExportMedia(ImpExExportMedia target) throws ConsistencyCheckException Deprecated.since ages - UsesetDataExportTarget(ImpExExportMedia)insteadSets the 'data' export target. An already assigned media, will be removed!- Parameters:
target- the 'data' export target- Throws:
ConsistencyCheckException
-
setDataExportTarget
Sets the 'data' export target. An already assigned media, will be removed!- Parameters:
target- the 'data' export target- Throws:
ConsistencyCheckException
-
setDataExportMedia
@Deprecated(since="ages", forRemoval=false) public void setDataExportMedia(ImpExExportMedia newDataExportMedia, boolean removeCurrentOne) throws ConsistencyCheckException Deprecated.since ages - UsesetDataExportTarget(ImpExExportMedia, boolean)insteadSets the 'data' export target.- Parameters:
newDataExportMedia- the new 'data' export target.will be ignored! removeCurrentOne- if, an already assigned media, will be removed - Throws:
ConsistencyCheckException
-
setDataExportTarget
public void setDataExportTarget(ImpExExportMedia newDataExportMedia, boolean removeCurrentOne) throws ConsistencyCheckException Sets the 'data' export target.- Parameters:
newDataExportMedia- the new 'data' export target.will be ignored! removeCurrentOne- if, an already assigned media, will be removed - Throws:
ConsistencyCheckException
-
getMediasExportMedia
Deprecated.since ages - UsegetMediasExportTarget()insteadReturns the exported medias.- Returns:
- the exported medias
-
getMediasExportTarget
Returns the exported medias.- Returns:
- the exported medias
-
setMediasExportMedia
@Deprecated(since="ages", forRemoval=false) public void setMediasExportMedia(ImpExExportMedia target) throws ConsistencyCheckException Deprecated.since ages - UsesetMediasExportTarget(ImpExExportMedia)insteadSets the 'medias' export target. An already assigned media, will be removed!- Parameters:
target- new target- Throws:
ConsistencyCheckException
-
setMediasExportTarget
Sets the 'medias' export target. An already assigned media, will be removed!- Parameters:
target- new target- Throws:
ConsistencyCheckException
-
setMediasExportTarget
public void setMediasExportTarget(ImpExExportMedia newMediasExportMedia, boolean removeCurrentOne) throws ConsistencyCheckException Sets the 'medias' export target.- Parameters:
newMediasExportMedia- the new 'medias' export target.will be ignored! removeCurrentOne- if, an already assigned media, will be removed - Throws:
ConsistencyCheckException
-
setSingleFile
public void setSingleFile(boolean singleFile) Sets the export mode i.e. whether data should be exported to a single file or not.- Parameters:
singleFile- iftruedata will be exported to a single file, otherwise normal (zip file) export is used
-
isSingleFile
public boolean isSingleFile()Returns the export mode i.e. if single file or normal (zip) export is used.- Returns:
- the export mode
- See Also:
-
getCommentCharacter()instead