Class LDIF2ImpExConverter


  • public class LDIF2ImpExConverter
    extends java.lang.Object
    Converts a given LDIF file to a IMPEX file. An additional mapping object will be used for translating LDAP objectclasses to their corresponding hybris types.
    • Field Detail

      • DEFAULT_ENCODING

        public static final java.lang.String DEFAULT_ENCODING
        See Also:
        Constant Field Values
    • Constructor Detail

      • LDIF2ImpExConverter

        public LDIF2ImpExConverter​(java.lang.String fileName,
                                   ConfigValueObject config)
                            throws java.io.UnsupportedEncodingException,
                                   java.io.FileNotFoundException
        Opens the file with the given filename and sets the given encoding.
        Parameters:
        fileName - the filename of the LDIF file
        Throws:
        java.io.UnsupportedEncodingException - thrown by false encoding type
        java.io.FileNotFoundException - thrown if file not found
      • LDIF2ImpExConverter

        public LDIF2ImpExConverter​(java.io.File file,
                                   ConfigValueObject config)
                            throws java.io.UnsupportedEncodingException,
                                   java.io.FileNotFoundException
        Opens the file and sets the given encoding.
        Parameters:
        file - the LDIF file
        Throws:
        java.io.UnsupportedEncodingException - thrown by false encoding type
        java.io.FileNotFoundException - thrown if file not found
      • LDIF2ImpExConverter

        public LDIF2ImpExConverter​(java.io.InputStream inputStream,
                                   ConfigValueObject config)
                            throws java.io.UnsupportedEncodingException
        Opens the given Inputstream with the given file.
        Parameters:
        inputStream - the InputStream
        Throws:
        java.io.UnsupportedEncodingException
      • LDIF2ImpExConverter

        public LDIF2ImpExConverter​(java.io.Reader reader,
                                   ConfigValueObject config)
        Opens the given reader. The default encoding is set to "UTF-8"
        Parameters:
        reader - the reader
    • Method Detail

      • generateImpExScript

        public boolean generateImpExScript()
                                    throws JaloBusinessException,
                                           java.io.UnsupportedEncodingException
        calls generateImpExScript( "INSERT" )
        Returns:
        success
        Throws:
        JaloBusinessException
        java.io.UnsupportedEncodingException
      • generateImpExScript

        public boolean generateImpExScript​(java.lang.String mode)
                                    throws JaloBusinessException,
                                           java.io.UnsupportedEncodingException
        Throws:
        JaloBusinessException
        java.io.UnsupportedEncodingException
      • getExportAsMedia

        public ImpExMedia getExportAsMedia()
      • getExportAsString

        public java.lang.String getExportAsString()