byte[] atBytes = Strings.getBytesUtf8( sk.getAttributeTypeDesc() ); skLen += 1 + TLV.getNbBytes( atBytes.length ) + atBytes.length; if ( sk.getMatchingRuleId() != null ) byte[] mrBytes = Strings.getBytesUtf8( sk.getMatchingRuleId() ); skLen += 1 + TLV.getNbBytes( mrBytes.length ) + mrBytes.length; if ( sk.isReverseOrder() )
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String matchingRuleOid = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05309_MATCHING_RULE_OID, matchingRuleOid ) ); } container.getCurrentKey().setMatchingRuleId( matchingRuleOid ); container.setGrammarEndAllowed( true ); }
SortKey sk = new SortKey( SchemaConstants.ENTRY_DN_AT ); sk.setMatchingRuleId( "2.5.13.1" ); sk.setReverseOrder( true );
AttributeType at = schemaManager.getAttributeType( sk.getAttributeTypeDesc() ); ldapResult.setDiagnosticMessage( "No attribute with the name " + sk.getAttributeTypeDesc() + " exists in the server's schema" ); resp.setSortResult( SortResultCode.NOSUCHATTRIBUTE ); resp.setAttributeName( sk.getAttributeTypeDesc() ); return resp; String mrOid = sk.getMatchingRuleId(); + " is not applicable for the attribute " + sk.getAttributeTypeDesc() ); resp.setSortResult( SortResultCode.INAPPROPRIATEMATCHING ); resp.setAttributeName( sk.getAttributeTypeDesc() ); return resp; resp.setAttributeName( sk.getAttributeTypeDesc() ); return resp; + sk.getAttributeTypeDesc() ); resp.setSortResult( SortResultCode.INAPPROPRIATEMATCHING ); resp.setAttributeName( sk.getAttributeTypeDesc() );
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String atDesc = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05307_ATTRIBUTE_TYPE_DESC, atDesc ) ); } SortKey sk = new SortKey( atDesc ); container.setCurrentKey( sk ); container.getControl().addSortKey( sk ); container.setGrammarEndAllowed( true ); }
sb.append( sortKey.getAttributeTypeDesc() );
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean reverseOrder = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05308_REVERSE_ORDER, reverseOrder ) ); } container.getCurrentKey().setReverseOrder( reverseOrder ); container.setGrammarEndAllowed( true ); } catch ( BooleanDecoderException bde ) { throw new DecoderException( bde.getMessage(), bde ); } }
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String atDesc = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05307_ATTRIBUTE_TYPE_DESC, atDesc ) ); } SortKey sk = new SortKey( atDesc ); container.setCurrentKey( sk ); container.getControl().addSortKey( sk ); container.setGrammarEndAllowed( true ); }
sb.append( sortKey.getAttributeTypeDesc() );
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean reverseOrder = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05308_REVERSE_ORDER, reverseOrder ) ); } container.getCurrentKey().setReverseOrder( reverseOrder ); container.setGrammarEndAllowed( true ); } catch ( BooleanDecoderException bde ) { throw new DecoderException( bde.getMessage(), bde ); } }
byte[] atBytes = Strings.getBytesUtf8( sk.getAttributeTypeDesc() ); skLen += 1 + TLV.getNbBytes( atBytes.length ) + atBytes.length; if ( sk.getMatchingRuleId() != null ) byte[] mrBytes = Strings.getBytesUtf8( sk.getMatchingRuleId() ); skLen += 1 + TLV.getNbBytes( mrBytes.length ) + mrBytes.length; if ( sk.isReverseOrder() )
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String atDesc = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05307_ATTRIBUTE_TYPE_DESC, atDesc ) ); } SortKey sk = new SortKey( atDesc ); container.setCurrentKey( sk ); container.getControl().addSortKey( sk ); container.setGrammarEndAllowed( true ); }
sb.append( sortKey.getAttributeTypeDesc() );
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String matchingRuleOid = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05309_MATCHING_RULE_OID, matchingRuleOid ) ); } container.getCurrentKey().setMatchingRuleId( matchingRuleOid ); container.setGrammarEndAllowed( true ); }
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { boolean reverseOrder = BooleanDecoder.parse( value ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05308_REVERSE_ORDER, reverseOrder ) ); } container.getCurrentKey().setReverseOrder( reverseOrder ); container.setGrammarEndAllowed( true ); } catch ( BooleanDecoderException bde ) { throw new DecoderException( bde.getMessage(), bde ); } }
byte[] atBytes = Strings.getBytesUtf8( sk.getAttributeTypeDesc() ); skLen += 1 + TLV.getNbBytes( atBytes.length ) + atBytes.length; if ( sk.getMatchingRuleId() != null ) byte[] mrBytes = Strings.getBytesUtf8( sk.getMatchingRuleId() ); skLen += 1 + TLV.getNbBytes( mrBytes.length ) + mrBytes.length; if ( sk.isReverseOrder() )
SortKey sk = new SortKey( SchemaConstants.ENTRY_DN_AT, "2.5.13.1" );
@Override public void action( SortRequestContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); String matchingRuleOid = Strings.utf8ToString( value.getData() ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05309_MATCHING_RULE_OID, matchingRuleOid ) ); } container.getCurrentKey().setMatchingRuleId( matchingRuleOid ); container.setGrammarEndAllowed( true ); }
buffer.put( TLV.getBytes( skLen ) ); BerValue.encode( buffer, sk.getAttributeTypeDesc() ); String mrId = sk.getMatchingRuleId(); if ( mrId != null ) if ( sk.isReverseOrder() )
SortKey sk = new SortKey( SchemaConstants.ENTRY_DN_AT, "2.5.13.1" ); SortRequest ctrl = new SortRequestControlImpl(); ctrl.addSortKey( sk );