Class LdifRecord

  • All Implemented Interfaces:
    Serializable

    public class LdifRecord
    extends BasicDirRecord
    This class represents an entire ldif record. As yet, this is an incomplete implementation. Not all aspects of ldif, as defined in RFC2849 are implemented. No schema checking is carried out by this class and only version 1 is supported. While we may later allow enforcement of the rule that only changes or content be present on a stream, for the present we will allow a mixed stream.

    ldif-content records are largely implemented. The result of calling read with a valid ldif-content input stream is that the record will be populated with a dn and attributes with values and the stream will be left positioned at the start of the next record. The resulting record can be written as a directory record.

    ldif-changes records are partially (and possibly incorrectly) implemented. deletions are complete. A delete record consists of a dn only. adds are complete. An add record is the same as a content record. modify is incomplete.

    Attribute options are not yet implemented nor recognized. base64 encoded dns may be improperly converted to strings. We may need to specify the locale. (May be true of any encoded value) URL values not implemented.

    While reading input we can be in a number of states. An ldif record consists of:

    • dn
    • controls
    • changetype
    • <attributes-or-changes>
    All except the dn are sort of optional. If we don't have a changetype in the appropriate place then, once we have started processing attributes, we may have an attribute named changetype.
    See Also:
    Serialized Form
    • Field Detail

      • changeTypes

        public static final String[] changeTypes
    • Constructor Detail

      • LdifRecord

        public LdifRecord()
        Create an LdifRecord object ready for further processing.