Class ExportUtils
- java.lang.Object
-
- de.hybris.platform.impex.jalo.exp.ExportUtils
-
public class ExportUtils extends java.lang.Object
Utility class of the impex based export.
-
-
Constructor Summary
Constructors Constructor Description ExportUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Set<ComposedType>
collectSubtypesWithOwnDeployment(ComposedType rootType)
static ImpExExportMedia
createDataExportTarget()
CallscreateDataExportTarget(java.lang.String)
with argument: "exported_data_" + System.currentTimeMillis()static ImpExExportMedia
createDataExportTarget(java.lang.String code)
Hint:This method should be used for the creation of an 'exported data' media.
Creates a newImpExExportMedia
instance with the specified code and the configured default values for: ImpExExportMedia.COMMENTCHARACTER ImpExExportMedia.FIELDSEPARATOR ImpExExportMedia.FIELDSEPARATOR and ImpExExportMedia.ENCODING.static ImpExMedia
createExportScript(HeaderLibrary headerlibrary, java.util.Collection<Item> items)
static ImpExExportMedia
createMediasExportTarget()
callscreateMediasExportTarget(java.lang.String)
with argument: "exported_medias_" + System.currentTimeMillis()static ImpExExportMedia
createMediasExportTarget(java.lang.String code)
Hint:This method should be used for the creation of an 'exported medias' media.
Creates a new ImpExExportMedia instance with the specified code.static boolean
filterTypeCompletely(ComposedType type)
static java.util.Set<ComposedType>
getExportableRootTypes(ScriptGenerator callback)
static java.lang.StringBuilder
getScriptContent(ImpExMedia media)
Deprecated.since ages - useImpExUtils.getContent(de.hybris.platform.jalo.media.Media)
static java.lang.StringBuffer
mergeHeaderAndItemList(HeaderLibrary library, java.util.Collection<Item> itemlist)
Creates an export script based on the assigned HeaderLibrary and item Collection.
-
-
-
Method Detail
-
createDataExportTarget
public static ImpExExportMedia createDataExportTarget(java.lang.String code)
Hint:This method should be used for the creation of an 'exported data' media.
Creates a newImpExExportMedia
instance with the specified code and the configured default values for:- ImpExExportMedia.COMMENTCHARACTER
- ImpExExportMedia.FIELDSEPARATOR
- ImpExExportMedia.FIELDSEPARATOR and
- ImpExExportMedia.ENCODING.
-
createDataExportTarget
public static ImpExExportMedia createDataExportTarget()
CallscreateDataExportTarget(java.lang.String)
with argument: "exported_data_" + System.currentTimeMillis()
-
createMediasExportTarget
public static ImpExExportMedia createMediasExportTarget(java.lang.String code)
Hint:This method should be used for the creation of an 'exported medias' media.
Creates a new ImpExExportMedia instance with the specified code.
-
createMediasExportTarget
public static ImpExExportMedia createMediasExportTarget()
callscreateMediasExportTarget(java.lang.String)
with argument: "exported_medias_" + System.currentTimeMillis()
-
createExportScript
public static ImpExMedia createExportScript(HeaderLibrary headerlibrary, java.util.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
public static java.util.Set<ComposedType> getExportableRootTypes(ScriptGenerator callback)
- Returns:
- the exportable root types
-
filterTypeCompletely
public static boolean filterTypeCompletely(ComposedType type)
- Parameters:
type
-- Returns:
- should this type be filtered?
-
collectSubtypesWithOwnDeployment
public static java.util.Set<ComposedType> collectSubtypesWithOwnDeployment(ComposedType rootType)
- Parameters:
rootType
-- Returns:
- subtypes with own deployment
-
mergeHeaderAndItemList
public static java.lang.StringBuffer mergeHeaderAndItemList(HeaderLibrary library, java.util.Collection<Item> itemlist) throws java.io.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:
java.io.IOException
-
getScriptContent
@Deprecated public static java.lang.StringBuilder getScriptContent(ImpExMedia media)
Deprecated.since ages - useImpExUtils.getContent(de.hybris.platform.jalo.media.Media)
-
-