public class ImportConfig
extends java.lang.Object
ImportService. If specific setter are not called, default values
will be set (mentioned at setter methods). The import script is a mandatory parameter for import, so do not forget to
call setScript(ImpExResource) method.| Modifier and Type | Class and Description |
|---|---|
static class |
ImportConfig.ValidationMode
Represents the validation modes available for import.
|
| Constructor and Description |
|---|
ImportConfig() |
| Modifier and Type | Method and Description |
|---|---|
JobLogLevel |
getDistributedImpexLogLevel()
Returns current log level for distributed ImpEx.
|
java.lang.String |
getDistributedImpexProcessCode() |
java.lang.Boolean |
getEnableCodeExecution()
Tells whether the ImpEx job allows execution of code inside the input data.
|
java.util.Locale |
getLocale()
Gets the configured locale for import.
|
java.lang.String |
getMainScriptWithinArchive()
Gets the main script within zip archive set as import script.
|
int |
getMaxThreads()
Gets the number of threads used maximal for import.
|
ImpExResource |
getMediaArchive()
Gets the resource containing data files used for
MediaDataTranslator (mostly media files) packed in a zip
archive. |
java.lang.String |
getNodeGroup()
Tells, which nodeGroup has been chosen as allowed to execute the import.
|
java.util.Collection<ImpExResource> |
getReferencedData()
Gets the collection of referenced data resources.
|
ImpExResource |
getScript()
Gets the configured import script.
|
ImportConfig.ValidationMode |
getValidationMode()
Gets the configured validation mode of import.
|
java.lang.Boolean |
isDistributedImpexEnabled()
Checks whether current import config is enabled for distributed ImpEx.
|
boolean |
isDumpingEnabled()
Checks whether multi pass mechanism (or dumping of unresolved lines for next pass) is enabled.
|
boolean |
isFailOnError()
Will the import fail on an error or tries to continue? Default is true.
|
boolean |
isHmcSavedValuesEnabled()
Checks whether saved values will be created at import for each item modification.
|
java.lang.Boolean |
isLegacyMode()
Checks the local legacy mode setting.
|
boolean |
isRemoveOnSuccess()
Checks whether the executed import cronjob and it's related media will be removed on successful execution.
|
java.lang.Boolean |
isSldForData()
Checks whether direct persistence for data is enabled for the import.
|
boolean |
isSynchronous()
Will the import be executed synchronous? Default is true.
|
void |
setDistributedImpexEnabled(boolean enabled)
Enables current import to be executed using distributed ImpEx, which will run import on a cluster.
|
void |
setDistributedImpexLogLevel(JobLogLevel level)
Allows to set log level for distributed ImpEx.
|
void |
setDistributedImpexProcessCode(java.lang.String distributedImpexProcessCode) |
void |
setDumpingEnabled(boolean dumpingEnabled)
Sets whether multi pass mechanism (or dumping of unresolved lines for next pass) is enabled.
|
void |
setEnableCodeExecution(java.lang.Boolean enableCodeExecution)
Defines whether the ImpEx job should allow execution of code inside the input data.
|
void |
setFailOnError(boolean failOnError)
Sets whether the export will fail on error or tries to continue execution.
|
void |
setHmcSavedValuesEnabled(boolean hmcSavedValuesEnabled)
Sets whether saved values will be created at import for each item modification.
|
void |
setLegacyMode(java.lang.Boolean legacyMode)
Sets the legacy mode setting overriding global
impex.legacy.mode setting from
project.properties file. |
void |
setLocale(java.util.Locale locale)
Sets the locale to use for import.
|
void |
setMainScriptWithinArchive(java.lang.String mainScriptWithinArchive)
Sets the main script within zip archive set as import script.
|
void |
setMaxThreads(int maxThreads)
Sets the number of threads used maximal for import.
|
void |
setMediaArchive(ImpExResource mediaArchive)
Sets the resource containing data files used for
MediaDataTranslator (mostly media files) packed in a zip
archive. |
void |
setNodeGroup(java.lang.String nodeGroup)
Defines on which cluster node group the import can be executed.
|
void |
setReferencedData(java.util.Collection<ImpExResource> referencedData)
Sets a collection of referenced data for import.
|
void |
setRemoveOnSuccess(boolean removeOnSuccess)
Sets whether the executed import cronjob and it's related media will be removed on successful execution.
|
void |
setScript(ImpExResource script)
Sets the import script to use for import.
|
void |
setScript(java.lang.String script)
Sets the import script to use for import as String.
|
void |
setSldForData(java.lang.Boolean sldForData)
Sets whether direct persistence for data should be enabled for the import.
|
void |
setSynchronous(boolean synchronous)
Sets whether the import be executed synchronous? Default is true.
|
void |
setValidationMode(ImportConfig.ValidationMode validationMode)
Sets the validation mode for export.
|
public void setDistributedImpexLogLevel(JobLogLevel level)
public JobLogLevel getDistributedImpexLogLevel()
public void setDistributedImpexEnabled(boolean enabled)
public java.lang.Boolean isDistributedImpexEnabled()
public java.lang.String getDistributedImpexProcessCode()
public void setDistributedImpexProcessCode(java.lang.String distributedImpexProcessCode)
public ImpExResource getScript()
public void setScript(ImpExResource script)
setMainScriptWithinArchive(String) method for
specifying the main script within the zip archive (except it has the default naming convention
"importscript.impex".script - the import script to usepublic void setScript(java.lang.String script)
StreamBasedImpExResource
object for you and will use setScript(ImpExResource) as normal.script - the import script to usepublic java.util.Collection<ImpExResource> getReferencedData()
public void setReferencedData(java.util.Collection<ImpExResource> referencedData)
referencedData - the collection of referenced data to setpublic ImpExResource getMediaArchive()
MediaDataTranslator (mostly media files) packed in a zip
archive. Default is null.public void setMediaArchive(ImpExResource mediaArchive)
MediaDataTranslator (mostly media files) packed in a zip
archive. Default is null.mediaArchive - the media archive resource to setpublic int getMaxThreads()
public boolean isRemoveOnSuccess()
public boolean isHmcSavedValuesEnabled()
public java.util.Locale getLocale()
public ImportConfig.ValidationMode getValidationMode()
ImportConfig.ValidationMode.STRICT.public boolean isDumpingEnabled()
public boolean isFailOnError()
public boolean isSynchronous()
public java.lang.Boolean isSldForData()
public void setSldForData(java.lang.Boolean sldForData)
sldForData - if true - direct persistence will be enabledpublic void setMaxThreads(int maxThreads)
maxThreads - the maximal amount of threads used for importpublic void setRemoveOnSuccess(boolean removeOnSuccess)
removeOnSuccess - true if the cronjob will be removed on successful executionpublic void setHmcSavedValuesEnabled(boolean hmcSavedValuesEnabled)
hmcSavedValuesEnabled - true if saved values will be createdpublic void setSynchronous(boolean synchronous)
synchronous - true if import will be executed synchronouspublic void setLocale(java.util.Locale locale)
locale - the locale to setpublic void setValidationMode(ImportConfig.ValidationMode validationMode)
ImportConfig.ValidationMode.STRICT.validationMode - the validation mode to setpublic void setDumpingEnabled(boolean dumpingEnabled)
dumpingEnabled - true if dumping is enabledpublic void setFailOnError(boolean failOnError)
failOnError - true if it should fail on errorpublic java.lang.String getMainScriptWithinArchive()
setScript(ImpExResource) a zip archive is set as resource. Default is null.public void setMainScriptWithinArchive(java.lang.String mainScriptWithinArchive)
setScript(ImpExResource) a zip archive is set as resource. Default is null.mainScriptWithinArchive - the name of file within import zip archive which contains the main scriptpublic java.lang.Boolean isLegacyMode()
impex.legacy.mode
setting from project.properties file.public void setLegacyMode(java.lang.Boolean legacyMode)
impex.legacy.mode setting from
project.properties file.legacyMode - the new legacy modepublic java.lang.Boolean getEnableCodeExecution()
null the default
settings of ImpExImportCronJob are used.public void setEnableCodeExecution(java.lang.Boolean enableCodeExecution)
public java.lang.String getNodeGroup()
public void setNodeGroup(java.lang.String nodeGroup)
nodeGroup - the node groupCopyright © 2018 SAP SE. All Rights Reserved.