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
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]valueOptional control value
-
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 booleanequals(Object o)StringgetOid()byte[]getValue()Get back the control valueinthashCode()booleanhasValue()booleanisCritical()Tells if the control is critical or not.voidreadExternal(ObjectInput in)voidsetCritical(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.voidsetValue(byte[] value)Store the control valueStringtoString()voidwriteExternal(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:
isCriticalin interfaceControl- Returns:
trueif the control is critical,falseotherwise
-
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:
setCriticalin 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:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObject- See Also:
Object.hashCode()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classObject- See Also:
Object.equals(Object)
-
-