Class RelaxRulesRequestControl

java.lang.Object
org.forgerock.opendj.ldap.controls.RelaxRulesRequestControl
All Implemented Interfaces:
Control

public final class RelaxRulesRequestControl extends Object implements Control
The internet-draft defined Relax Rules control. The OID for this control is IANA-assigned, and since this is not an RFC yet, the OID hasn't been officially assigned. An OID (1.3.6.1.4.1.4203.666.5.12) was allocated by OpenLDAP under its experimental arc, which means that it's subject to future change. The control is always critical and does not have a value.

This control can be used with all LDAP update requests: Add, Delete, Modify, ModifyDN. It changes the behavior of the operation as follows:

  • Object metamorphism. Attempts to modify the structural objectclass of an entry will not fail with the objectClassModsProhibited error (as it should according to RFC 4511).
  • Inactive Attribute Type. Attempts to add or modify an attribute that is marked in the schema as OBSOLETE will not fail.
  • DIT Content Rules. Attempts to add an Auxiliary objectClass or an attribute will succeed as if the DIT Content Rule allowed any and all known auxiliary classes, and allowed any and all known attributes.
  • DIT Structure Rules and Name Forms are ignored when performing the update.
  • Modification of Nonconformant Objects. Attempts to modify an entry that does not conform to the schema will be accepted regardless of the resulting entry conforming to the schema or not.
  • NO-USER-MODIFICATION attribute modification. Attempts to modify specific read-only operational attributes will succeed. The following attributes are allowed with this control: entryUUID, modifyTimestamp, createTimestamp, modifiersName, creatorsName. Operational attributes whose values are derived from others or computed by the server must not be allowed to be modified (such as subSchemaSubentry, structuralObjectClass...).
*
 String entryDN = ...;
 Connection connection = ...;

 // Change the modifyTimestamp, telling the directory server not to
 // complain that the attribute is read-only.
 ModifyRequest request = Requests.newModifyRequest(entryDN)
          .addControl(RelaxRulesRequestControl.newControl())
          .addModification(ModificationType.REPLACE, "modifyTimestamp", "20010101000000Z");
 connection.modify(request);
 
  • Field Details

    • OID

      public static final String OID
      The OpenLDAP OID for the Relax Rules request control.
      See Also:
    • ALIASES

      public static final List<String> ALIASES
      The user-friendly aliases for the Relax Rules request control.
    • DECODER

      public static final ControlDecoder<RelaxRulesRequestControl> DECODER
      A decoder which can be used for decoding the permissive modify request control.
  • Method Details

    • newControl

      public static RelaxRulesRequestControl newControl()
      Creates a new permissive modify request control.
      Returns:
      The new control.
    • getOid

      public String getOid()
      Description copied from interface: Control
      Returns the numeric OID associated with this control.
      Specified by:
      getOid in interface Control
      Returns:
      The numeric OID associated with this control.
    • getValue

      public ByteString getValue()
      Description copied from interface: Control
      Returns the value, if any, associated with this control. Its format is defined by the specification of this control.
      Specified by:
      getValue in interface Control
      Returns:
      The value associated with this control, or null if there is no value.
    • hasValue

      public boolean hasValue()
      Description copied from interface: Control
      Returns true if this control has a value. In some circumstances it may be useful to determine if a control has a value, without actually calculating the value and incurring any performance costs.
      Specified by:
      hasValue in interface Control
      Returns:
      true if this control has a value, or false if there is no value.
    • isCritical

      public boolean isCritical()
      Description copied from interface: Control
      Returns true if it is unacceptable to perform the operation without applying the semantics of this control.

      The criticality field only has meaning in controls attached to request messages (except UnbindRequest). For controls attached to response messages and the UnbindRequest, the criticality field SHOULD be false, and MUST be ignored by the receiving protocol peer. A value of true indicates that it is unacceptable to perform the operation without applying the semantics of the control.

      Specified by:
      isCritical in interface Control
      Returns:
      true if this control must be processed by the Directory Server, or false if it can be ignored.
    • toString

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

      public String getAlias()
      Description copied from interface: Control
      Returns the control "friendly name" alias for the control.
      Specified by:
      getAlias in interface Control
      Returns:
      "Friendly name" alias for the control.