public class BeanShellImporter extends java.lang.Object implements BeanShellImportable
| Constructor and Description |
|---|
BeanShellImporter(ImpExReader impExReader,
ModelService modelService) |
| Modifier and Type | Method and Description |
|---|---|
void |
enableBeanShellCodeExecution(boolean enable)
Delegates to underlying
ImpExReader. |
void |
enableBeanShellSyntaxParsing(boolean enable)
Delegates to underlying
ImpExReader. |
void |
enableResolving(boolean enable)
Enables/disables dumping mechanism for the impex.
|
void |
enableSLModeForImport(boolean value)
Enables/disables a service layer mode flag for a
importer context object. |
ItemModel |
getLastImportedData()
Gets last imported
ItemModel instance if impex is in 'servicelayer mode' otherwise it returns null. |
java.util.Locale |
getLocale() |
void |
importFile(java.io.File file,
java.lang.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.
|
void |
importMedia(ImpExMedia media,
java.lang.Integer columnOffset,
java.lang.String encoding,
java.lang.Character delimiter,
java.lang.Integer linesToSkip)
Delegates to underlying
ImpExReader. |
void |
importQuery(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String className,
java.lang.String sqlStatement)
Delegates to underlying
ImpExReader. |
void |
importStream(java.io.InputStream inputStream,
java.lang.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.
|
boolean |
isBeanShellCodeExecutionEnabled() |
boolean |
isBeanShellSyntaxParsingEnabled() |
boolean |
isResolvingEnabled() |
boolean |
isSLModeEnabled() |
void |
setLocale(java.util.Locale locale)
Delegates to underlying
ImpExReader. |
public BeanShellImporter(ImpExReader impExReader, ModelService modelService)
public void enableSLModeForImport(boolean value)
BeanShellImportableimporter context object. This value could be used
inside an impex process as marker of pending impex mode.enableSLModeForImport in interface BeanShellImportablepublic void setLocale(java.util.Locale locale)
BeanShellImportableImpExReader.setLocale in interface BeanShellImportableImpExReader.setLocale(Locale)public void importQuery(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String className,
java.lang.String sqlStatement)
BeanShellImportableImpExReader.importQuery in interface BeanShellImportableImpExReader.includeSQLData(String, String, String, String, String)public void importFile(java.io.File file,
java.lang.String encoding,
int linesToSkip)
throws java.io.UnsupportedEncodingException,
java.io.FileNotFoundException,
ImpExException
BeanShellImportableimportFile in interface BeanShellImportablefile - file which contains external data to be includedencoding - the encoding used in given filelinesToSkip - amount of lines the reader of the file will initial skipjava.io.UnsupportedEncodingException - given encoding is unknownjava.io.FileNotFoundException - given file is not foundImpExExceptionpublic void importStream(java.io.InputStream inputStream,
java.lang.String encoding,
char[] delimiter,
int linesToSkip,
int columnOffset)
throws java.io.UnsupportedEncodingException
BeanShellImportableimportStream in interface BeanShellImportableinputStream - input stream from which external data to be included is accessableencoding - the used encodingdelimiter - field separators used in external datalinesToSkip - amount of lines the reader of the stream will initial skipcolumnOffset - 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.java.io.UnsupportedEncodingException - given encoding is unknownpublic void importMedia(ImpExMedia media, java.lang.Integer columnOffset, java.lang.String encoding, java.lang.Character delimiter, java.lang.Integer linesToSkip) throws java.io.UnsupportedEncodingException
BeanShellImportableImpExReader.importMedia in interface BeanShellImportablejava.io.UnsupportedEncodingExceptionImpExReader.includeExternalDataMedia(ImpExMedia, String, char, int, int)public void enableBeanShellCodeExecution(boolean enable)
BeanShellImportableImpExReader.enableBeanShellCodeExecution in interface BeanShellImportableImpExReader.enableExternalCodeExecution(boolean)public void enableBeanShellSyntaxParsing(boolean enable)
BeanShellImportableImpExReader.enableBeanShellSyntaxParsing in interface BeanShellImportableImpExReader.enableExternalSyntaxParsing(boolean)public void enableResolving(boolean enable)
BeanShellImportableenableResolving in interface BeanShellImportableImpExImportReader.setDumpingAllowed(boolean)public ItemModel getLastImportedData()
BeanShellImportableItemModel instance if impex is in 'servicelayer mode' otherwise it returns null.getLastImportedData in interface BeanShellImportablepublic boolean isSLModeEnabled()
public java.util.Locale getLocale()
public boolean isBeanShellCodeExecutionEnabled()
public boolean isBeanShellSyntaxParsingEnabled()
public boolean isResolvingEnabled()
Copyright © 2018 SAP SE. All Rights Reserved.