Class ExportConfiguration

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

public class ExportConfiguration extends Object
This value object is used for configuring the impex based export process.
  • Constructor Details

    • ExportConfiguration

      public ExportConfiguration(ImpExMedia source, EnumerationValue headerValidationMode) throws ImpExException
      The assigned impex media represents an impex based command script (see the sample below). An ImpExException will be thrown if the source is <null>.

      Command samples:

       "#% impex.setLocale( new Locale( ""de"" , """" ) );" <br>
       "#% impex.setValidationMode( ""import_relax"" );"<br>
       "#% impex.setTargetFile( ""Language.csv"" , true );"<br>
       INSERT_UPDATE Language;pk[unique=true];active; fallbackLanguages(pk);isocode[unique=true];name[lang=de];name[lang=en];owner(pk) <br>
       "#% impex.exportItems( ""Language"" , false );" <br>
       INSERT Employee; PK; uid[unique=true];<br>
       "#% impex.exportItems( new String[]{ ""1132326173852672"" } );"<br>
       INSERT Product; PK; code[unique=true]; name[lang=de]<br>
       "#% import de.hybris.platform.jalo.product.Product;" <br>
       "#% impex.exportItems( ""select {pk} from {Product}"", Collections.EMPTY_MAP, Collections.singletonList( Product.class ), true, true, -1, -1 );"
       
      
       @param source
                 impex media instance, which contains the impex based "export commands"
       @param headerValidationMode
                 the usedvalidation mode, (see ImpExManager.getImportStrictMode(),
                 ImpExManager.getExportOnlyMode(), etc. )
       @throws ImpExException
       will be thrown, if source is <null>.
      Throws:
      ImpExException
  • Method Details

    • deleteTempFiles

      public void deleteTempFiles()
    • setHeaderLibrary

      public void setHeaderLibrary(HeaderLibrary headerLibrary)
      Parameters:
      headerLibrary -
    • getHeaderLibrary

      public HeaderLibrary getHeaderLibrary()
      Returns:
      the configured header library
    • getDataFile

      public ImpExFile getDataFile()
      Returns:
      data file
    • getMediaFile

      public ImpExZip getMediaFile()
      Returns:
      media zip
    • getFieldSeparator

      public String getFieldSeparator()
      Returns:
      configured fieldseparator
    • getCommentCharacetr

      @Deprecated(since="ages", forRemoval=false) public String getCommentCharacetr()
      Deprecated.
      since ages - usegetCommentCharacter() instead
      Returns:
      configured comment character
    • getCommentCharacter

      public String getCommentCharacter()
    • getQuoteCharacter

      public String getQuoteCharacter()
      Returns:
      configured quote character
    • setFieldSeparator

      public void setFieldSeparator(String fieldseparator)
      null will be ignored.
      Parameters:
      fieldseparator -
    • setCommentCharacter

      public void setCommentCharacter(String comment)
      null will be ignored.
      Parameters:
      comment - character
    • setQuoteCharacter

      public void setQuoteCharacter(String quote)
      null will be ignored.
      Parameters:
      quote - character
    • setMediaDataHandler

      public void setMediaDataHandler(DefaultExportMediaHandler mediaHandler)
      Parameters:
      mediaHandler -
    • assignMediaFileToHandler

      public void assignMediaFileToHandler(ImpExZip mediaFile)
      Parameters:
      mediaFile -
    • getMediaDataHandler

      public DefaultExportMediaHandler getMediaDataHandler()
      Returns:
      used media handler
    • getHeaderValidationMode

      public EnumerationValue getHeaderValidationMode()
      Returns:
      header validation mode
    • getSource

      public ImpExMedia getSource()
      Returns:
      export script
    • setSource

      public void setSource(ImpExMedia source)
      Parameters:
      source -
    • getDocumentIDRegistry

      public DocumentIDRegistry getDocumentIDRegistry()
      Returns:
      used DocumentIDRegistry instance
    • setDocumentIDRegistry

      public void setDocumentIDRegistry(DocumentIDRegistry registry)
      Parameters:
      registry -
    • getDataExportTarget

      public ImpExExportMedia getDataExportTarget()
      Returns the exported data.
      Returns:
      the exported data
    • getDataExportMedia

      @Deprecated(since="ages", forRemoval=false) public ImpExExportMedia getDataExportMedia()
      Deprecated.
      since ages - usegetDataExportTarget() instead
    • setDataExportMedia

      @Deprecated(since="ages", forRemoval=false) public void setDataExportMedia(ImpExExportMedia target) throws ConsistencyCheckException
      Deprecated.
      Sets the 'data' export target. An already assigned media, will be removed!
      Parameters:
      target - the 'data' export target
      Throws:
      ConsistencyCheckException
    • setDataExportTarget

      public void setDataExportTarget(ImpExExportMedia target) throws ConsistencyCheckException
      Sets the 'data' export target. An already assigned media, will be removed!
      Parameters:
      target - the 'data' export target
      Throws:
      ConsistencyCheckException
    • setDataExportMedia

      @Deprecated(since="ages", forRemoval=false) public void setDataExportMedia(ImpExExportMedia newDataExportMedia, boolean removeCurrentOne) throws ConsistencyCheckException
      Deprecated.
      Sets the 'data' export target.
      Parameters:
      newDataExportMedia - the new 'data' export target. will be ignored!
      removeCurrentOne - if , an already assigned media, will be removed
      Throws:
      ConsistencyCheckException
    • setDataExportTarget

      public void setDataExportTarget(ImpExExportMedia newDataExportMedia, boolean removeCurrentOne) throws ConsistencyCheckException
      Sets the 'data' export target.
      Parameters:
      newDataExportMedia - the new 'data' export target. will be ignored!
      removeCurrentOne - if , an already assigned media, will be removed
      Throws:
      ConsistencyCheckException
    • getMediasExportMedia

      @Deprecated(since="ages", forRemoval=false) public ImpExExportMedia getMediasExportMedia()
      Deprecated.
      since ages - UsegetMediasExportTarget() instead
      Returns the exported medias.
      Returns:
      the exported medias
    • getMediasExportTarget

      public ImpExExportMedia getMediasExportTarget()
      Returns the exported medias.
      Returns:
      the exported medias
    • setMediasExportMedia

      @Deprecated(since="ages", forRemoval=false) public void setMediasExportMedia(ImpExExportMedia target) throws ConsistencyCheckException
      Deprecated.
      Sets the 'medias' export target. An already assigned media, will be removed!
      Parameters:
      target - new target
      Throws:
      ConsistencyCheckException
    • setMediasExportTarget

      public void setMediasExportTarget(ImpExExportMedia target) throws ConsistencyCheckException
      Sets the 'medias' export target. An already assigned media, will be removed!
      Parameters:
      target - new target
      Throws:
      ConsistencyCheckException
    • setMediasExportTarget

      public void setMediasExportTarget(ImpExExportMedia newMediasExportMedia, boolean removeCurrentOne) throws ConsistencyCheckException
      Sets the 'medias' export target.
      Parameters:
      newMediasExportMedia - the new 'medias' export target. will be ignored!
      removeCurrentOne - if , an already assigned media, will be removed
      Throws:
      ConsistencyCheckException
    • setSingleFile

      public void setSingleFile(boolean singleFile)
      Sets the export mode i.e. whether data should be exported to a single file or not.
      Parameters:
      singleFile - if true data will be exported to a single file, otherwise normal (zip file) export is used
    • isSingleFile

      public boolean isSingleFile()
      Returns the export mode i.e. if single file or normal (zip) export is used.
      Returns:
      the export mode
      See Also: