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;

            case SEARCH_REQUEST:
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;

            case SEARCH_REQUEST:
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 );
                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(), modifyDnResponse );
                batchResponse.addResponse( modDNResponseDsml );

                break;

            case SEARCH_REQUEST:
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

            modificationItems.toArray( new ModificationItem[0] ), getControls( request ), monitor, null );

        // Creating the response
        if ( batchResponseDsml != null )
        {
            ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml();
            modifyResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.MODIFY_REQUEST ) );
            modifyResponseDsml.getLdapResult().setMatchedDN( request.getObject() );
            batchResponseDsml.addResponse( modifyResponseDsml );
        }

        LdapDN dn = request.getObject();
        IEntry e = browserConnection.getEntryFromCache( dn );
View Full Code Here

    public static void processAsDsmlResponse( StudioNamingEnumeration ne, BatchResponseDsml batchResponse,
        StudioProgressMonitor monitor, SearchParameter searchParameter ) throws NamingException,
        LdapURLEncodingException
    {
        // Creating and adding the search response
        SearchResponseDsml sr = new SearchResponseDsml();
        batchResponse.addResponse( sr );

        if ( !monitor.errorsReported() )
        {
            // Creating and adding a search result entry or reference for each result
            while ( ne.hasMore() )
            {
                SearchResult searchResult = ( SearchResult ) ne.next();
                sr.addResponse( convertSearchResultToDsml( searchResult, searchParameter ) );
            }
        }

        // Creating and adding a search result done at the end of the results
        SearchResultDoneCodec srd = new SearchResultDoneCodec();
        LdapResultCodec ldapResult = new LdapResultCodec();
        if ( !monitor.errorsReported() )
        {
            ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
        }
        else
        {
            // Getting the exception
            Throwable t = monitor.getException();

            // Setting the result code
            ldapResult.setResultCode( ResultCodeEnum.getBestEstimate( t, MessageTypeEnum.SEARCH_REQUEST ) );

            // Setting the error message if there's one
            if ( t.getMessage() != null )
            {
                ldapResult.setErrorMessage( t.getMessage() );
            }
        }
        srd.setLdapResult( ldapResult );
        sr.addResponse( new SearchResultDoneDsml( srd ) );
    }
View Full Code Here

            {
                ldapResult.setErrorMessage( t.getMessage() );
            }
        }
        srd.setLdapResult( ldapResult );
        sr.addResponse( new SearchResultDoneDsml( srd ) );
    }
View Full Code Here

            return srr;
        }
        else
        {
            // The search result is NOT a referral
            SearchResultEntryDsml sre = new SearchResultEntryDsml();
            sre.setEntry( entry );

            return sre;
        }
    }
View Full Code Here

            .getNameInNamespace() ) );

        if ( isReferral( entry ) )
        {
            // The search result is a referral
            SearchResultReferenceDsml srr = new SearchResultReferenceDsml();

            // Getting the 'ref' attribute
            EntryAttribute refAttribute = entry.get( ExportDsmlJob.REF_ATTRIBUTETYPE_NAME );
            if ( refAttribute == null )
            {
                // If we did not get it by its name, let's get it by its OID
                refAttribute = entry.get( ExportDsmlJob.REF_ATTRIBUTETYPE_OID );
            }

            // Adding references
            if ( refAttribute != null )
            {
                for ( Iterator<Value<?>> iterator = refAttribute.iterator(); iterator.hasNext(); )
                {
                    Value<?> value = ( Value<?> ) iterator.next();

                    srr.addSearchResultReference( new LdapURL( ( String ) value.get() ) );
                }
            }

            return srr;
        }
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.