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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LdifControl()
Create a new ControlLdifControl(String oid)
Create a new Control
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getOid()
byte[]
getValue()
Get back the control valueint
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)
Store the control valueString
toString()
void
writeExternal(ObjectOutput out)
-
-
-
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
-
isCritical
public boolean isCritical()
Tells if the control is critical or not.- Specified by:
isCritical
in interfaceControl
- 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 interfaceControl
- 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 interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classObject
- See Also:
Object.equals(Object)
-
-