Package org.apache.directory.shared.dsmlv2.reponse

Examples of org.apache.directory.shared.dsmlv2.reponse.ModDNResponseDsml


                break;

            case MODIFYDN_REQUEST:
                ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
                resultCode = modifyDnResponse.getLdapResult().getResultCode();
                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(),
                    modifyDnResponse );
                writeResponse( respWriter, modDNResponseDsml );

                break;
View Full Code Here


                getControls( request ), monitor, null );

        // Creating the response
        if ( batchResponseDsml != null )
        {
            ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( codec );
            LdapResult ldapResult = modDNResponseDsml.getLdapResult();
            setLdapResultValuesFromMonitor( ldapResult, monitor, MessageTypeEnum.ADD_REQUEST );
            modDNResponseDsml.getLdapResult().setMatchedDn( request.getName() );
            batchResponseDsml.addResponse( modDNResponseDsml );
        }

        // Update cached entries
        Dn dn = request.getName();
View Full Code Here

                break;

            case MODIFYDN_REQUEST:
                ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
                resultCode = modifyDnResponse.getLdapResult().getResultCode();
                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(),
                    modifyDnResponse );
                writeResponse( respWriter, modDNResponseDsml );

                break;
View Full Code Here

                break;

            case MODIFYDN_REQUEST:
                ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
                resultCode = modifyDnResponse.getLdapResult().getResultCode();
                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(),
                    modifyDnResponse );
                writeResponse( respWriter, modDNResponseDsml );

                break;
View Full Code Here

                break;

            case MODIFYDN_REQUEST:
                ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
                resultCode = modifyDnResponse.getLdapResult().getResultCode();
                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(),
                    modifyDnResponse );
                writeResponse( respWriter, modDNResponseDsml );

                break;
View Full Code Here

        else if ( LdapConstants.MODIFYDN_RESPONSE == response.getMessageType() )
        {
            ModifyDNResponse modifyDNResponse = response.getModifyDNResponse();
            copyMessageIdAndControls( response, modifyDNResponse );

            ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDNResponse );
            batchResponse.addResponse( modDNResponseDsml );
        }
        else if ( LdapConstants.EXTENDED_RESPONSE == response.getMessageType() )
        {
            ExtendedResponse extendedResponse = response.getExtendedResponse();
View Full Code Here

            ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( response );
            modifyResponseDsml.toDsml( xmlResponse.getRootElement() );
        }
        else if ( LdapConstants.MODIFYDN_RESPONSE == response.getMessageType() )
        {
            ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( response );
            modDNResponseDsml.toDsml( xmlResponse.getRootElement() );
        }
        else if ( LdapConstants.EXTENDED_RESPONSE == response.getMessageType() )
        {
            ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( response );
            extendedResponseDsml.toDsml( xmlResponse.getRootElement() );
View Full Code Here

     * Test parsing of a request with the principal attribute
     */
    @Test
    public void testRequestWithPrincipal()
    {
        Dsmlv2Parser parser = null;
        try
        {
            parser = newParser();

            parser.setInput( AuthRequestTest.class.getResource( "request_with_principal_attribute.xml" ).openStream(),
                "UTF-8" );

            parser.parse();
        }
        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        BindRequest bindRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();

        assertEquals( "CN=Bob Rush,OU=Dev,DC=Example,DC=COM", bindRequest.getName() );
    }
View Full Code Here

     * Test parsing of a request with the (optional) requestID attribute
     */
    @Test
    public void testRequestWithRequestId()
    {
        Dsmlv2Parser parser = null;
        try
        {
            parser = newParser();

            parser.setInput( AuthRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
                "UTF-8" );

            parser.parse();
        }
        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();

        assertEquals( 456, abandonRequest.getMessageId() );
    }
View Full Code Here

     * Test parsing of a request with a (optional) Control element
     */
    @Test
    public void testRequestWith1Control()
    {
        Dsmlv2Parser parser = null;
        try
        {
            parser = newParser();

            parser.setInput( AuthRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );

            parser.parse();
        }
        catch ( Exception e )
        {
            fail( e.getMessage() );
        }

        BindRequest abandonRequest = ( BindRequest ) parser.getBatchRequest().getCurrentRequest();
        Map<String, Control> controls = abandonRequest.getControls();

        assertEquals( 1, abandonRequest.getControls().size() );

        Control control = controls.get( "1.2.840.113556.1.4.643" );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.dsmlv2.reponse.ModDNResponseDsml

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.