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 Summary
Fields Modifier and Type Field Description static ControlDecoder<RelaxRulesRequestControl>
DECODER
A decoder which can be used for decoding the permissive modify request control.static String
OID
The OpenLDAP OID for the Relax Rules request control.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getOid()
Returns the numeric OID associated with this control.ByteString
getValue()
Returns the value, if any, associated with this control.boolean
hasValue()
Returnstrue
if this control has a value.boolean
isCritical()
Returnstrue
if it is unacceptable to perform the operation without applying the semantics of this control.static RelaxRulesRequestControl
newControl()
Creates a new permissive modify request control.String
toString()
-
-
-
Field Detail
-
OID
public static final String OID
The OpenLDAP OID for the Relax Rules request control.- See Also:
- Constant Field Values
-
DECODER
public static final ControlDecoder<RelaxRulesRequestControl> DECODER
A decoder which can be used for decoding the permissive modify request control.
-
-
Method Detail
-
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.
-
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.
-
hasValue
public boolean hasValue()
Description copied from interface:Control
Returnstrue
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.
-
isCritical
public boolean isCritical()
Description copied from interface:Control
Returnstrue
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 oftrue
indicates that it is unacceptable to perform the operation without applying the semantics of the control.- Specified by:
isCritical
in interfaceControl
- Returns:
true
if this control must be processed by the Directory Server, orfalse
if it can be ignored.
-
-