Class LdifReader

    • Constructor Detail

      • LdifReader

        public LdifReader()
    • Method Detail

      • setSkippedRecordsCallback

        public void setSkippedRecordsCallback​(RecordCallbackHandler skippedRecordsCallback)
        RecordCallbackHandler implementations can be used to take action on skipped records.
        Parameters:
        skippedRecordsCallback - will be called for each one of the initial skipped lines before any items are read.
      • setRecordsToSkip

        public void setRecordsToSkip​(int recordsToSkip)
        Public setter for the number of lines to skip at the start of a file. Can be used if the file contains a header without useful (column name) information, and without a comment delimiter at the beginning of the lines.
        Parameters:
        recordsToSkip - the number of lines to skip
      • doRead

        protected org.springframework.ldap.core.LdapAttributes doRead()
                                                               throws java.lang.Exception
        Description copied from class: AbstractItemCountingItemStreamItemReader
        Read next item from input.
        Specified by:
        doRead in class AbstractItemCountingItemStreamItemReader<org.springframework.ldap.core.LdapAttributes>
        Returns:
        an item or null if the data source is exhausted
        Throws:
        java.lang.Exception - Allows subclasses to throw checked exceptions for interpretation by the framework
      • setResource

        public void setResource​(org.springframework.core.io.Resource resource)
        Establishes the resource that will be used as the input for the LdifReader.
        Specified by:
        setResource in interface ResourceAwareItemReaderItemStream<org.springframework.ldap.core.LdapAttributes>
        Parameters:
        resource - the resource that will be read.
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception