Package de.hybris.platform.impex.jalo
Interface BeanShellImportable
- All Known Implementing Classes:
BeanShellImporter
public interface BeanShellImportable
Provides methods available to "import" BeanShell variable.
-
Method Summary
Modifier and TypeMethodDescriptionvoidenableBeanShellCodeExecution(boolean enable) Delegates to underlyingImpExReader.voidenableBeanShellSyntaxParsing(boolean enable) Delegates to underlyingImpExReader.voidenableResolving(boolean enable) Enables/disables dumping mechanism for the impex.voidenableSLModeForImport(boolean value) Enables/disables a service layer mode flag for aimportercontext object.Gets last importedItemModelinstance if impex is in 'servicelayer mode' otherwise it returns null.voidimportFile(File file, String encoding, int linesToSkip) Creates a new temporary reader with given file and encoding and redirects the main reader to that temporary reader for including external data.voidimportMedia(ImpExMedia media, Integer columnOffset, String encoding, Character delimiter, Integer linesToSkip) Delegates to underlyingImpExReader.voidDelegates to underlyingImpExReader.voidimportStream(InputStream inputStream, String encoding, char[] delimiter, int linesToSkip, int columnOffset) Creates a new temporary reader with given input stream and encoding and redirects the main reader to that temporary reader for including external data.voidDelegates to underlyingImpExReader.
-
Method Details
-
enableSLModeForImport
void enableSLModeForImport(boolean value) Enables/disables a service layer mode flag for aimportercontext object. This value could be used inside an impex process as marker of pending impex mode. -
setLocale
Delegates to underlyingImpExReader.- See Also:
-
importQuery
Delegates to underlyingImpExReader. -
importFile
void importFile(File file, String encoding, int linesToSkip) throws UnsupportedEncodingException, FileNotFoundException, ImpExException Creates a new temporary reader with given file and encoding and redirects the main reader to that temporary reader for including external data. So you can include external data within the main reader flow. Reading from temporary reader can be stopped by reaching the end of stream (switches back automatically). The column offset will be set to -1, so normal CSV data is assumed (not in hybris style).- Parameters:
file- file which contains external data to be includedencoding- the encoding used in given filelinesToSkip- amount of lines the reader of the file will initial skip- Throws:
UnsupportedEncodingException- given encoding is unknownFileNotFoundException- given file is not foundImpExException
-
importStream
void importStream(InputStream inputStream, String encoding, char[] delimiter, int linesToSkip, int columnOffset) throws UnsupportedEncodingException Creates a new temporary reader with given input stream and encoding and redirects the main reader to that temporary reader for including external data. So you can include external data within the main reader flow.- Parameters:
inputStream- input stream from which external data to be included is accessablecolumnOffset- position difference of header columns to data columns. Is data in hybris style, use 0 because data columns positions are exactly the same as in header. In default style use -1, because the data columns do not have a first column with type information. So the header columns have to be shifted one to the left =>-1.delimiter- field separators used in external dataencoding- the used encodinglinesToSkip- amount of lines the reader of the stream will initial skip- Throws:
UnsupportedEncodingException- given encoding is unknown
-
importMedia
void importMedia(ImpExMedia media, Integer columnOffset, String encoding, Character delimiter, Integer linesToSkip) throws UnsupportedEncodingException Delegates to underlyingImpExReader. -
enableBeanShellCodeExecution
void enableBeanShellCodeExecution(boolean enable) Delegates to underlyingImpExReader. -
enableBeanShellSyntaxParsing
void enableBeanShellSyntaxParsing(boolean enable) Delegates to underlyingImpExReader. -
enableResolving
void enableResolving(boolean enable) Enables/disables dumping mechanism for the impex. ` * -
getLastImportedData
ItemModel getLastImportedData()Gets last importedItemModelinstance if impex is in 'servicelayer mode' otherwise it returns null.
-