Class LdifControl

java.lang.Object
org.apache.directory.api.ldap.model.ldif.LdifControl
All Implemented Interfaces:
Externalizable, Serializable, Control

public class LdifControl extends Object implements Control, Externalizable
The LdifControl class stores a control defined for an entry found in a LDIF file.
Author:
Apache Directory Project
See Also:
  • Field Details

    • value

      protected byte[] value
      Optional control value
  • Constructor Details

    • LdifControl

      public LdifControl()
      Create a new Control
    • LdifControl

      public LdifControl(String oid)
      Create a new Control
      Parameters:
      oid - OID of the created control
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOid

      public String getOid()
      Get the control's OID
      Specified by:
      getOid in interface Control
      Returns:
      The Control's OID
    • isCritical

      public boolean isCritical()
      Tells if the control is critical or not.
      Specified by:
      isCritical in interface Control
      Returns:
      true if the control is critical, false otherwise
    • setCritical

      public void setCritical(boolean criticality)
      Sets the critical flag which determines whether or not this control is critical for the correct operation of a request or response message. The default for this value should be false.
      Specified by:
      setCritical in interface Control
      Parameters:
      criticality - true if the control is critical false otherwise.
    • getValue

      public byte[] getValue()
      Get back the control value
      Returns:
      The control's value
    • setValue

      public void setValue(byte[] value)
      Store the control value
      Parameters:
      value - The value to store
    • hasValue

      public boolean hasValue()
      Returns:
      true if the control has a value
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      See Also: