Package org.apache.directory.api.ldap.model.message.controls

Examples of org.apache.directory.api.ldap.model.message.controls.ManageDsaITImpl


    @Test
    public void testOnReferralWithManageDsaITControl() throws Exception
    {
        LdapConnection conn = getWiredConnection( getLdapServer() );
   
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );
   
        // ModifyDN success
        ModifyDnRequest modifyDnRequest = new ModifyDnRequestImpl();
        modifyDnRequest.setName( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
        modifyDnRequest.setNewRdn( new Rdn( "uid=ref" ) );
View Full Code Here


    @Test
    public void testNewSuperiorOnReferralWithManageDsaITControl() throws Exception
    {
        LdapConnection conn = getWiredConnection( getLdapServer() );
   
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );
   
        ModifyDnRequest modifyDnRequest = new ModifyDnRequestImpl();
        modifyDnRequest.setName( new Dn( "uid=elecharny,ou=users,ou=system" ) );
        modifyDnRequest.setNewRdn( new Rdn( "uid=newuser" ) );
        modifyDnRequest.setNewSuperior( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
View Full Code Here

    @Test
    public void testOnReferralWithManageDsaITControl() throws Exception
    {
        LdapConnection conn = getWiredConnection( getLdapServer() );
   
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );
   
        // modify success
        ModifyRequest modifyRequest = new ModifyRequestImpl();
        modifyRequest.setName( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
        modifyRequest.add( "description", "referral to akarasulu" );
View Full Code Here

    @Test
    public void testOnReferralWithManageDsaITControl() throws Exception
    {
        LdapConnection conn = getWiredConnection( getLdapServer() );

        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );

        // delete success
        DeleteRequest deleteRequest = new DeleteRequestImpl();
        deleteRequest.setName( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
        deleteRequest.addControl( manageDSAIT );
View Full Code Here

            "sn: testadd_sn"
            );

        AddRequest addRequest = new AddRequestImpl();
        addRequest.setEntry( entry );
        addRequest.addControl( new ManageDsaITImpl() );

        AddResponse response = connection.add( addRequest );

        assertNotNull( response );
        assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
View Full Code Here

        List<LdifEntry> reverses = LdifRevertor.reverseMoveAndRename(
            serverEntry, moveAndRenameContext.getNewSuperiorDn(), moveAndRenameContext.getNewRdn(), false );

        if ( moveAndRenameContext.isReferralIgnored() )
        {
            forward.addControl( new ManageDsaITImpl() );
            LdifEntry reversedEntry = reverses.get( 0 );
            reversedEntry.addControl( new ManageDsaITImpl() );
        }

        moveAndRenameContext
            .setChangeLogEvent( changeLog.log( getPrincipal( moveAndRenameContext ), forward, reverses ) );
    }
View Full Code Here

        // comparison failure
        CompareRequest compareRequest = new CompareRequestImpl();
        compareRequest.setName( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
        compareRequest.setAttributeId( "uid" );
        compareRequest.setAssertionValue( "elecharny" );
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );
        compareRequest.addControl( manageDSAIT );

        CompareResponse compareResponse = conn.compare( compareRequest );
        assertEquals( ResultCodeEnum.COMPARE_FALSE, compareResponse.getLdapResult().getResultCode() );
View Full Code Here

        // comparison success
        CompareRequest compareRequest = new CompareRequestImpl();
        compareRequest.setName( new Dn( "uid=akarasulu,ou=users,ou=system" ) );
        compareRequest.setAttributeId( "uid" );
        compareRequest.setAssertionValue( "akarasulu" );
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( false );
        compareRequest.addControl( manageDSAIT );

        CompareResponse compareResponse = conn.compare( compareRequest );
        assertEquals( ResultCodeEnum.COMPARE_TRUE, compareResponse.getLdapResult().getResultCode() );
View Full Code Here

                control = new EntryChangeDecorator( getDirectoryService().getLdapCodecService() );

                break;

            case MANAGE_DSA_IT_CONTROL:
                control = new ManageDsaITDecorator( getDirectoryService().getLdapCodecService(), new ManageDsaITImpl() );

                break;

            case PAGED_RESULTS_CONTROL:
                control = new PagedResultsDecorator( getDirectoryService().getLdapCodecService() );
View Full Code Here

    @Test
    public void testSimpleSearchWithControl() throws Exception
    {
        SearchRequest searchRequest = new SearchRequestImpl().setBase( new Dn( "ou=system" ) )
            .setFilter( "(objectclass=*)" )
            .setScope( SearchScope.ONELEVEL ).addControl( new ManageDsaITImpl() );
        SearchCursor cursor = connection.search( searchRequest );
        int count = 0;
   
        while ( cursor.next() )
        {
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.message.controls.ManageDsaITImpl

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.