org.apache.directory.api.ldap.model.ldif
Class LdifControl

java.lang.Object
  extended by 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:
Serialized Form

Field Summary
protected  byte[] value
          Optional control value
 
Constructor Summary
LdifControl()
          Create a new Control
LdifControl(String oid)
          Create a new Control
 
Method Summary
 boolean equals(Object o)
           
 String getOid()
          
 byte[] getValue()
          
 int hashCode()
           
 boolean hasValue()
          
 boolean isCritical()
          Tells if the control is critical or not.
 void readExternal(ObjectInput in)
          
 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.
 void setValue(byte[] value)
          
 String toString()
          
 void writeExternal(ObjectOutput out)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected byte[] value
Optional control value

Constructor Detail

LdifControl

public LdifControl()
Create a new Control


LdifControl

public LdifControl(String oid)
Create a new Control

Parameters:
oid - OID of the created control
Method Detail

toString

public String toString()

Overrides:
toString in class Object

getOid

public String getOid()

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()


setValue

public void setValue(byte[] value)


hasValue

public boolean hasValue()


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:
Object.hashCode()

equals

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


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.