public class ImpExManager extends GeneratedImpExManager
Extension.RestrictedLanguagesProvider, Extension.RightsProviderManager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreatorDEFAULT_INITIAL_ATTRIBUTES| Constructor and Description |
|---|
ImpExManager() |
| Modifier and Type | Method and Description |
|---|---|
ImpExExportCronJob |
createDefaultExportCronJob()
Creates an export cronjob with default values including the
DEST_MEDIA media and
ItemPKsMedia media (all Items of the System). |
ImpExExportCronJob |
createDefaultExportCronJob(ExportConfiguration config)
Creates an export cronjob with given export configuration.
|
ImpExExportCronJob |
createDefaultExportCronJob(HeaderLibrary headerlibrary,
java.util.Collection<Item> items)
Creates an export cronjob with default values including the
DEST_MEDIA media and
ItemPKsMedia media with the given list (null for all Items of the System). |
ImpExExportCronJob |
createDefaultExportCronJob(ImpExExportJob impexExportJob,
HeaderLibrary headerlibrary,
java.util.Collection<Item> items)
Creates an export cronjob with default values including the
DEST_MEDIA media and
ItemPKsMedia media with the given list (null for all Items of the System). |
ImpExImportCronJob |
createDefaultImpExImportCronJob()
Creates a cronjob instance.
|
ImpExImportCronJob |
createDefaultImpExImportCronJob(ImpExImportJob impexImportJob)
Creates a cronjob instance.
|
void |
createEssentialData(java.util.Map params,
JspContext jspc) |
ImpExExportMedia |
createImpExExportMedia(java.lang.String code)
Creates an
ImpExExportMedia with given code. |
ImpExMedia |
createImpExMedia(java.lang.String code)
Creates an
ImpExMedia with given code. |
ImpExMedia |
createImpExMedia(java.lang.String code,
EnumerationValue encoding)
Creates an
ImpExMedia with given code and default encoding. |
ImpExMedia |
createImpExMedia(java.lang.String code,
java.lang.String encoding)
Creates an
ImpExMedia with given code and default encoding as well as CSV as mime type. |
ImpExMedia |
createImpExMedia(java.lang.String code,
java.lang.String encoding,
java.io.InputStream content)
Creates an
ImpExMedia with given code, default encoding and content as well as CSV as mime type. |
ImpExMedia |
createImpExMedia(java.lang.String code,
java.lang.String encoding,
java.lang.String content)
Creates an
ImpExMedia with given code, default encoding and content as well as CSV as mime type. |
ImpExMedia |
createImpExMediaForCodeAndExtractionId(java.lang.String code,
java.lang.String extractionId) |
Item |
createItem(java.lang.String type,
java.lang.String attributes,
java.lang.String values)
Creates any item using ImpEx specific syntax.
|
Export |
exportData(ExportConfiguration config,
boolean synchronous)
Exports data using a new
ImpExExportCronJob instance. |
Export |
exportData(ExportConfiguration config,
HeaderLibrary library,
java.util.Collection<Item> items,
boolean synchronous)
Exports data using a new
ImpExExportCronJob instance. |
ImpExExportCronJob |
exportData(ImpExExportCronJob cronJob,
boolean synchronous)
Exports data using given
ImpExExportCronJob instance. |
Export |
exportDataLight(ExportConfiguration config)
Exports data without using a cronjob.
ATTENTION: No logs are available except of these fired to the log4j system. |
Export |
exportDataLight(ExportConfiguration config,
HeaderLibrary library,
java.util.Collection<Item> items)
Exports data without using a cronjob.
ATTENTION: No logs are available except of these fired to the log4j system. |
static EnumerationValue |
getExportOnlyMode()
Gathers the enumeration value for the export only validation mode.
|
static EnumerationValue |
getExportReimportRelaxedMode()
Gathers the enumeration value for the relaxed export validation mode.
|
static EnumerationValue |
getExportReimportStrictMode()
Gathers the enumeration value for the strict export validation mode.
|
MediaFolder |
getImpExMediaFolder()
Gets the impex specific
MediaFolder used for storing data of ImpExMedia. |
static EnumerationValue |
getImportRelaxedMode()
Gathers the enumeration value for the relaxed import validation mode.
|
static EnumerationValue |
getImportStrictMode()
Gathers the enumeration value for the strict import validation mode.
|
static ImpExManager |
getInstance()
Gets the singleton instance of this manager.
|
ImpExExportJob |
getOrCreateImpExExportJob()
Gets (or creates) the central
ImpExExportJob instance. |
ImpExImportJob |
getOrCreateImpExImportJob()
Gets the central import job instance or creates it if not existent already.
|
static EnumerationValue |
getValidationMode(java.lang.String code)
Gathers the enumeration value for given validation mode.
|
ImpExImportCronJob |
importData(ImpExImportCronJob cronJob,
boolean synchronous,
boolean removeOnSuccess)
Imports data using given
ImpExImportCronJob instance. |
ImpExImportCronJob |
importData(ImpExMedia media,
java.util.Collection<ImpExMedia> externalData,
boolean codeexecution,
boolean synchronous,
boolean removeOnSuccess)
Imports data using a new
ImpExImportCronJob instance. |
ImpExImportCronJob |
importData(ImpExMedia media,
ImpExMedia zipMedia,
java.util.Collection<ImpExMedia> externalData,
boolean codeexecution,
boolean synchronous,
boolean removeOnSuccess)
Imports data using a new
ImpExImportCronJob instance. |
ImpExImportCronJob |
importData(java.io.InputStream dataIs,
java.io.InputStream mediaIs,
java.lang.String encoding,
char fieldSeparator,
char quoteCharacter,
boolean codeexecution)
Imports data using a new
ImpExImportCronJob instance. |
ImpExImportCronJob |
importData(java.io.InputStream input,
java.lang.String encoding,
boolean codeexecution)
Imports data using a new
ImpExImportCronJob instance. |
ImpExImportCronJob |
importData(java.io.InputStream input,
java.lang.String encoding,
char fieldSeparator,
char quoteCharacter,
boolean codeexecution)
Imports data using a new
ImpExImportCronJob instance. |
Importer |
importDataLight(CSVReader reader,
boolean codeexecution)
Imports data without using a cronjob.
Amount of maximal performed passes will be set to infinit (-1). For getting further informations about passed import process, the used Importer instance is returned.ATTENTION: No logs are available except of those fired to the log4j system. |
Importer |
importDataLight(CSVReader reader,
boolean codeexecution,
int passes)
Imports data without using a cronjob.
For getting further informations about passed import process, the used Importer instance is returned.ATTENTION: No logs are available except of these fired to the log4j system. |
Importer |
importDataLight(java.io.InputStream input,
java.lang.String encoding,
boolean codeexecution)
Imports data without using a cronjob.
Amount of maximal performed passes will be set to infinit (-1). For getting further informations about passed import process, the used Importer instance is returned.ATTENTION: No logs are available except of these fired to the log4j system. |
java.lang.Boolean |
isSystemType(SessionContext ctx,
ComposedType item)
This overridden version adds support for inheritance of the "system type" flag, i.e.
|
createDistributedImportProcess, createDistributedImportProcess, createDistributedImportSplitErrorDump, createDistributedImportSplitErrorDump, createExport, createExport, createExternalImportKey, createExternalImportKey, createHeaderLibrary, createHeaderLibrary, createImpexDocumentId, createImpexDocumentId, createImpExExportCronJob, createImpExExportCronJob, createImpExExportJob, createImpExExportJob, createImpExExportMedia, createImpExExportMedia, createImpExImportCronJob, createImpExImportCronJob, createImpExImportJob, createImpExImportJob, createImpExMedia, createImpExMedia, createImportBatch, createImportBatch, createImportBatchContent, createImportBatchContent, createReport, createReport, getDefaultAttributeModes, getName, isSystemType, isSystemTypeAsPrimitive, isSystemTypeAsPrimitive, setSystemType, setSystemType, setSystemType, setSystemTypecheckBeforeItemRemoval, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, isCreatorDisabled, notifyInitializationEnd, notifyInitializationStart, notifyItemRemoval, onFirstSessionCreation, writeReplaceafterItemCreation, beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrappublic static ImpExManager getInstance()
public ImpExExportCronJob createDefaultExportCronJob(ExportConfiguration config)
config - export configurationpublic ImpExExportCronJob createDefaultExportCronJob()
DEST_MEDIA media and
ItemPKsMedia media (all Items of the System).public ImpExExportCronJob createDefaultExportCronJob(HeaderLibrary headerlibrary, java.util.Collection<Item> items) throws ImpExException
DEST_MEDIA media and
ItemPKsMedia media with the given list (null for all Items of the System).items - list of items to export (PK-Strings and/or Items) or null for all.ImpExExceptionpublic ImpExExportCronJob createDefaultExportCronJob(ImpExExportJob impexExportJob, HeaderLibrary headerlibrary, java.util.Collection<Item> items) throws ImpExException
DEST_MEDIA media and
ItemPKsMedia media with the given list (null for all Items of the System).impexExportJob - job instance set to cronjobitems - list of items to export (PK-Strings and/or Items) or null for all.ImpExExceptionpublic ImpExExportJob getOrCreateImpExExportJob()
ImpExExportJob instance.public ImpExImportCronJob createDefaultImpExImportCronJob()
singleexecutable is set to true and changrecordingenabled is set to false.errorMode is set to FAIL.public ImpExImportCronJob createDefaultImpExImportCronJob(ImpExImportJob impexImportJob)
null is given the default job
will be used.singleexecutable is set to true and changrecordingenabled is set to false.errorMode is set to FAIL.impexImportJob - job instance the cronjob will be initialized with or null if default job will be usedpublic ImpExImportJob getOrCreateImpExImportJob()
public ImpExExportMedia createImpExExportMedia(java.lang.String code)
ImpExExportMedia with given code.code - code to use for mediapublic ImpExMedia createImpExMedia(java.lang.String code)
ImpExMedia with given code. (null not allowed here)code - code to use for mediapublic ImpExMedia createImpExMediaForCodeAndExtractionId(java.lang.String code, java.lang.String extractionId)
public ImpExMedia createImpExMedia(java.lang.String code, EnumerationValue encoding)
ImpExMedia with given code and default encoding.code - code to use for mediaencoding - encoding set to encoding attribute of mediapublic ImpExMedia createImpExMedia(java.lang.String code, java.lang.String encoding, java.io.InputStream content) throws java.io.UnsupportedEncodingException
ImpExMedia with given code, default encoding and content as well as CSV as mime type.code - code to use for mediaencoding - encoding set to encoding attribute of mediacontent - content to be set to the mediajava.io.UnsupportedEncodingExceptionpublic ImpExMedia createImpExMedia(java.lang.String code, java.lang.String encoding, java.lang.String content) throws java.io.UnsupportedEncodingException
ImpExMedia with given code, default encoding and content as well as CSV as mime type.code - code to use for mediaencoding - encoding set to encoding attribute of mediacontent - content to be set to the mediajava.io.UnsupportedEncodingExceptionpublic ImpExMedia createImpExMedia(java.lang.String code, java.lang.String encoding) throws java.io.UnsupportedEncodingException
ImpExMedia with given code and default encoding as well as CSV as mime type.code - code to use for mediaencoding - encoding set to encoding attribute of mediajava.io.UnsupportedEncodingException - given encoding can not be resolved to a valid encoding instancepublic Item createItem(java.lang.String type, java.lang.String attributes, java.lang.String values) throws ImpExException
INSERT mode. For usage you have to give the type of the
desired type, all attributes in ImpEx style you want to use (like in a header description) as well as the values
for specified attributes.CSVConstants.HYBRIS_FIELD_SEPARATOR.CSVConstants.HYBRIS_QUOTE_CHARACTER.
Language lang = (Language) ImpExUtils.createItem("Language", "isocode; active", "testLang; false");
The example call will result in an import with following script:
INSERT Language ; isocode ; active
; testLang ; false
type - the code of the type of the desired itemattributes - separated text with specification of all attributes used in values in same order (for
accepted separator see CSVConstants.DEFAULT_FIELD_SEPARATORvalues - separated text with values for all attributes as specified in attributes in same order (for
accepted separator see CSVConstants.DEFAULT_FIELD_SEPARATORImpExException - error while import of itempublic ImpExExportCronJob exportData(ImpExExportCronJob cronJob, boolean synchronous)
ImpExExportCronJob instance. cronJob - cronjob used for importsynchronous - start cronjob synchronous or asynchronous?public Export exportData(ExportConfiguration config, boolean synchronous)
ImpExExportCronJob instance. Export
instance is returned if successful.config - export configuration to usesynchronous - start cronjob synchronous or asynchronous?public Export exportData(ExportConfiguration config, HeaderLibrary library, java.util.Collection<Item> items, boolean synchronous) throws ImpExException
ImpExExportCronJob instance. ExportUtils.createExportScript(HeaderLibrary, Collection). As result the resulting
Export instance is returned if successful.config - export configuration to uselibrary - header library used for creating of the export scriptitems - list of items used for creating of the export scriptsynchronous - start cronjob synchronous or asynchronous?ImpExException - Error while creating export script of given library and itemspublic Export exportDataLight(ExportConfiguration config, HeaderLibrary library, java.util.Collection<Item> items) throws ImpExException
config - export configuration to uselibrary - header library used for creating of the export scriptitems - list of items used for creating of the export scriptImpExException - Error while creating export script of given library and itemspublic Export exportDataLight(ExportConfiguration config) throws ImpExException
config - export configuration to useImpExException - if no export script is set at configpublic ImpExImportCronJob importData(ImpExImportCronJob cronJob, boolean synchronous, boolean removeOnSuccess)
ImpExImportCronJob instance. cronJob - cronjob used for importsynchronous - start cronjob synchronous or asynchronous?removeOnSuccess - removes the used cronjob instance on successpublic ImpExImportCronJob importData(ImpExMedia media, java.util.Collection<ImpExMedia> externalData, boolean codeexecution, boolean synchronous, boolean removeOnSuccess)
ImpExImportCronJob instance. media - input mediaexternalData - medias containing external datacodeexecution - enable code execution while importsynchronous - start cronjob synchronous or asynchronous?removeOnSuccess - removes the used cronjob instance on successpublic ImpExImportCronJob importData(ImpExMedia media, ImpExMedia zipMedia, java.util.Collection<ImpExMedia> externalData, boolean codeexecution, boolean synchronous, boolean removeOnSuccess)
ImpExImportCronJob instance. media - input mediazipMedia - input zip mediaexternalData - medias containing external datacodeexecution - enable code execution while importsynchronous - start cronjob synchronous or asynchronous?removeOnSuccess - removes the used cronjob instance on successpublic ImpExImportCronJob importData(java.io.InputStream input, java.lang.String encoding, char fieldSeparator, char quoteCharacter, boolean codeexecution)
ImpExImportCronJob instance.input - input stream to source dataencoding - encoding used by source datafieldSeparator - separator used for separating CSV-fields within given streamquoteCharacter - separator used for separating CSV-fields within given streamcodeexecution - enable code execution while importpublic ImpExImportCronJob importData(java.io.InputStream input, java.lang.String encoding, boolean codeexecution)
ImpExImportCronJob instance. importData(ImpExMedia, Collection, boolean, boolean, boolean) or
importData(ImpExImportCronJob, boolean, boolean) directly.input - input stream to source dataencoding - encoding used by source datacodeexecution - enable code execution while importpublic ImpExImportCronJob importData(java.io.InputStream dataIs, java.io.InputStream mediaIs, java.lang.String encoding, char fieldSeparator, char quoteCharacter, boolean codeexecution)
ImpExImportCronJob instance.dataIs - input stream to source datamediaIs - input stream to source mediaencoding - encoding used by source datafieldSeparator - separator used for separating CSV-fields within given streamquoteCharacter - separator used for separating CSV-fields within given streamcodeexecution - enable code execution while importpublic Importer importDataLight(java.io.InputStream input, java.lang.String encoding, boolean codeexecution) throws ImpExException
Importer instance is returned.input - input stream to source dataencoding - encoding used by source datacodeexecution - enable code execution while importImporter instanceImpExException - unsupported encodingpublic Importer importDataLight(CSVReader reader, boolean codeexecution) throws ImpExException
Importer instance is returned.reader - reader providing source datacodeexecution - enable code execution while importImporter instanceImpExException - error while importpublic Importer importDataLight(CSVReader reader, boolean codeexecution, int passes) throws ImpExException
Importer instance is returned.reader - providing source datacodeexecution - enable code execution while importpasses - maximal amount of import passes for resolving linesImporter instanceImpExException - unsupported encodingpublic java.lang.Boolean isSystemType(SessionContext ctx, ComposedType item)
isSystemType in class GeneratedImpExManagerpublic void createEssentialData(java.util.Map params,
JspContext jspc)
throws ConsistencyCheckException
createEssentialData in class ExtensionConsistencyCheckExceptionpublic MediaFolder getImpExMediaFolder()
MediaFolder used for storing data of ImpExMedia.public static EnumerationValue getImportStrictMode()
public static EnumerationValue getImportRelaxedMode()
public static EnumerationValue getExportOnlyMode()
public static EnumerationValue getExportReimportRelaxedMode()
public static EnumerationValue getExportReimportStrictMode()
public static EnumerationValue getValidationMode(java.lang.String code)
Copyright © 2018 SAP SE. All Rights Reserved.