/** * Get the criticality * * @return <code>true</code> if the criticality flag is true. */ @Override public boolean isCritical() { return decorated.isCritical(); }
/** * {@inheritDoc} */ @Override public boolean isCritical() { return decorated.isCritical(); }
/** * Get the criticality * * @return <code>true</code> if the criticality flag is true. */ @Override public boolean isCritical() { return decorated.isCritical(); }
/** * Get the criticality * * @return <code>true</code> if the criticality flag is true. */ @Override public boolean isCritical() { return decorated.isCritical(); }
/** * @see Object#equals(Object) */ @Override public boolean equals( Object o ) { if ( o == this ) { return true; } if ( o == null ) { return false; } if ( !( o instanceof Control ) ) { return false; } Control otherControl = ( Control ) o; if ( !oid.equalsIgnoreCase( otherControl.getOid() ) ) { return false; } return criticality == otherControl.isCritical(); }
/** * @see Object#equals(Object) */ @Override public boolean equals( Object o ) { if ( o == this ) { return true; } if ( o == null ) { return false; } if ( !( o instanceof Control ) ) { return false; } Control otherControl = ( Control ) o; if ( !oid.equalsIgnoreCase( otherControl.getOid() ) ) { return false; } return criticality == otherControl.isCritical(); }
/** * @see Object#equals(Object) */ @Override public boolean equals( Object o ) { if ( o == this ) { return true; } if ( o == null ) { return false; } if ( !( o instanceof Control ) ) { return false; } Control otherControl = ( Control ) o; if ( !oid.equalsIgnoreCase( otherControl.getOid() ) ) { return false; } return criticality == otherControl.isCritical(); }
return criticality == otherControl.isCritical();
return criticality == otherControl.isCritical();
return criticality == otherControl.isCritical();
/** * {@inheritDoc} */ @Override public javax.naming.ldap.Control toJndiControl( Control control ) throws EncoderException { CodecControl<? extends Control> decorator = newControl( control ); ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() ); decorator.encode( bb ); bb.flip(); return new BasicControl( control.getOid(), control.isCritical(), bb.array() ); }
/** * {@inheritDoc} */ @Override public javax.naming.ldap.Control toJndiControl( Control control ) throws EncoderException { CodecControl<? extends Control> decorator = newControl( control ); ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() ); decorator.encode( bb ); bb.flip(); return new BasicControl( control.getOid(), control.isCritical(), bb.array() ); }
/** * {@inheritDoc} */ @Override public javax.naming.ldap.Control toJndiControl( Control control ) throws EncoderException { CodecControl<? extends Control> decorator = newControl( control ); ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() ); decorator.encode( bb ); bb.flip(); return new BasicControl( control.getOid(), control.isCritical(), bb.array() ); }
ldifControl.setCritical( control.isCritical() ); this.controls.put( control.getOid(), new LdifControl( control.getOid() ) );
ldifControl.setCritical( control.isCritical() ); this.controls.put( control.getOid(), new LdifControl( control.getOid() ) );
/** * Compute the control's encoded length * * @param control The control to compute * @return the encoded control length */ public static int computeControlLength( Control control ) { // First, compute the control's value length int controlValueLength = ( ( CodecControl<?> ) control ).computeLength(); // Now, compute the envelop length // The OID int oidLengh = Strings.getBytesUtf8( control.getOid() ).length; int controlLength = 1 + TLV.getNbBytes( oidLengh ) + oidLengh; // The criticality, only if true if ( control.isCritical() ) { // Always 3 for a boolean controlLength += 1 + 1 + 1; } if ( controlValueLength != 0 ) { controlLength += 1 + TLV.getNbBytes( controlValueLength ) + controlValueLength; } return controlLength; }
/** * Compute the control's encoded length * * @param control The control to compute * @return the encoded control length */ public static int computeControlLength( Control control ) { // First, compute the control's value length int controlValueLength = ( ( CodecControl<?> ) control ).computeLength(); // Now, compute the envelop length // The OID int oidLengh = Strings.getBytesUtf8( control.getOid() ).length; int controlLength = 1 + TLV.getNbBytes( oidLengh ) + oidLengh; // The criticality, only if true if ( control.isCritical() ) { // Always 3 for a boolean controlLength += 1 + 1 + 1; } if ( controlValueLength != 0 ) { controlLength += 1 + TLV.getNbBytes( controlValueLength ) + controlValueLength; } return controlLength; }
/** * Compute the control's encoded length * * @param control The control to compute * @return the encoded control length */ public static int computeControlLength( Control control ) { // First, compute the control's value length int controlValueLength = ( ( CodecControl<?> ) control ).computeLength(); // Now, compute the envelop length // The OID int oidLengh = Strings.getBytesUtf8( control.getOid() ).length; int controlLength = 1 + TLV.getNbBytes( oidLengh ) + oidLengh; // The criticality, only if true if ( control.isCritical() ) { // Always 3 for a boolean controlLength += 1 + 1 + 1; } if ( controlValueLength != 0 ) { controlLength += 1 + TLV.getNbBytes( controlValueLength ) + controlValueLength; } return controlLength; }
if ( control.isCritical() && !ldapServer.getSupportedControls().contains( control.getOid() ) )
LOG.debug( I18n.msg( I18n.MSG_08202_CONTROL_CRITICALITY, control.isCritical() ) );