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

Examples of org.apache.directory.shared.ldap.model.message.controls.ManageDsaIT


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

        AddRequest addRequest = new AddRequestImpl();
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );
        addRequest.addControl( manageDSAIT );

        // add success
        Entry entry = new DefaultEntry( "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system",
            "objectClass", "organizationalUnit",
View Full Code Here


    public void testOnReferral() throws Exception
    {
        LdapConnection conn = getWiredConnection( getLdapServer() );

        AddRequest addRequest = new AddRequestImpl();
        ManageDsaIT manageDSAIT = new ManageDsaITImpl();
        manageDSAIT.setCritical( true );
        //addRequest.addControl( manageDSAIT );

        // referrals failure
        Entry entry = new DefaultEntry(
            "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system",
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

    @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

    @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

TOP

Related Classes of org.apache.directory.shared.ldap.model.message.controls.ManageDsaIT

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.