Class ExportUtils
java.lang.Object
de.hybris.platform.impex.jalo.exp.ExportUtils
Utility class of the impex based export.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<ComposedType>collectSubtypesWithOwnDeployment(ComposedType rootType) static ImpExExportMediaCallscreateDataExportTarget(java.lang.String)with argument: "exported_data_" + System.currentTimeMillis()static ImpExExportMediacreateDataExportTarget(String code) Hint:This method should be used for the creation of an 'exported data' media.
Creates a newImpExExportMediainstance with the specified code and the configured default values for: ImpExExportMedia.COMMENTCHARACTER ImpExExportMedia.FIELDSEPARATOR ImpExExportMedia.FIELDSEPARATOR and ImpExExportMedia.ENCODING.static ImpExMediacreateExportScript(HeaderLibrary headerlibrary, Collection<Item> items) static ImpExExportMediacallscreateMediasExportTarget(java.lang.String)with argument: "exported_medias_" + System.currentTimeMillis()static ImpExExportMediaHint:This method should be used for the creation of an 'exported medias' media.
Creates a new ImpExExportMedia instance with the specified code.static booleanstatic Set<ComposedType>getExportableRootTypes(ScriptGenerator callback) static StringBuildergetScriptContent(ImpExMedia media) Deprecated.static StringBuffermergeHeaderAndItemList(HeaderLibrary library, Collection<Item> itemlist) Creates an export script based on the assigned HeaderLibrary and item Collection.
-
Constructor Details
-
ExportUtils
public ExportUtils()
-
-
Method Details
-
createDataExportTarget
Hint:This method should be used for the creation of an 'exported data' media.
Creates a newImpExExportMediainstance with the specified code and the configured default values for:- ImpExExportMedia.COMMENTCHARACTER
- ImpExExportMedia.FIELDSEPARATOR
- ImpExExportMedia.FIELDSEPARATOR and
- ImpExExportMedia.ENCODING.
-
createDataExportTarget
CallscreateDataExportTarget(java.lang.String)with argument: "exported_data_" + System.currentTimeMillis() -
createMediasExportTarget
Hint:This method should be used for the creation of an 'exported medias' media.
Creates a new ImpExExportMedia instance with the specified code. -
createMediasExportTarget
callscreateMediasExportTarget(java.lang.String)with argument: "exported_medias_" + System.currentTimeMillis() -
createExportScript
public static ImpExMedia createExportScript(HeaderLibrary headerlibrary, Collection<Item> items) throws ImpExException - Parameters:
headerlibrary- the used headerlibrary, seemergeHeaderAndItemList(HeaderLibrary, Collection)items- the items for which the export script should be created- Returns:
- export script
- Throws:
ImpExException
-
getExportableRootTypes
- Returns:
- the exportable root types
-
filterTypeCompletely
- Parameters:
type-- Returns:
- should this type be filtered?
-
collectSubtypesWithOwnDeployment
- Parameters:
rootType-- Returns:
- subtypes with own deployment
-
mergeHeaderAndItemList
public static StringBuffer mergeHeaderAndItemList(HeaderLibrary library, Collection<Item> itemlist) throws IOException Creates an export script based on the assigned HeaderLibrary and item Collection. Example:- itemlist consists of: "{1132337018702352 [4],1132337018702353 [4]}"
- library consists of: "User; PK; uid[unique=true];"
- generated script, will be:
#-----------------------------------------------------------<br> INSERT Employee; PK; uid[unique=true];<br> #-----------------------------------------------------------<br> "#% impex.exportItems( new String[]{""1132337018702352"", ""1132337018702353""} );"<br>- Parameters:
library-itemlist-- Returns:
- the created export script
- Throws:
IOException
-
getScriptContent
@Deprecated(since="ages", forRemoval=false) public static StringBuilder getScriptContent(ImpExMedia media) Deprecated.since ages - useImpExUtils.getContent(de.hybris.platform.jalo.media.Media)
-
ImpExUtils.getContent(de.hybris.platform.jalo.media.Media)