Class ExportUtils

java.lang.Object
de.hybris.platform.impex.jalo.exp.ExportUtils

public class ExportUtils extends Object
Utility class of the impex based export.
  • Constructor Details

    • ExportUtils

      public ExportUtils()
  • Method Details

    • createDataExportTarget

      public static ImpExExportMedia createDataExportTarget(String code)
      Hint:This method should be used for the creation of an 'exported data' media.
      Creates a new ImpExExportMedia 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()
      Calls createDataExportTarget(java.lang.String) with argument: "exported_data_" + System.currentTimeMillis()
    • createMediasExportTarget

      public static ImpExExportMedia createMediasExportTarget(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()
      calls createMediasExportTarget(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, see mergeHeaderAndItemList(HeaderLibrary, Collection)
      items - the items for which the export script should be created
      Returns:
      export script
      Throws:
      ImpExException
    • getExportableRootTypes

      public static 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 Set<ComposedType> collectSubtypesWithOwnDeployment(ComposedType rootType)
      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)