Package org.apache.directory.shared.ldap.model.name

Examples of org.apache.directory.shared.ldap.model.name.Dn


     * @throws LdapLdifException If we get any other exception
     */
    public LdifEntry( String dn, Object... strings )
        throws LdapInvalidAttributeValueException, LdapLdifException, LdapInvalidDnException
    {
        this( new Dn( dn ), strings );
    }
View Full Code Here


        // The entry must start with a dn: or a dn::
        String line = lines.get( 0 );

        String name = parseDn( line );

        Dn dn = new Dn( name );

        // Ok, we have found a Dn
        LdifEntry entry = new LdifEntry();
        entry.setDn( dn );
View Full Code Here

        if ( req.isVersion3() != isVersion3() )
        {
            return false;
        }

        Dn dn1 = req.getName();
        Dn dn2 = getName();

        if ( Dn.isNullOrEmpty( dn1) )
        {
            if ( !Dn.isNullOrEmpty( dn2 ) )
            {
View Full Code Here

        ModifyRequestImpl req = new ModifyRequestImpl();
        req.setMessageId( 45 );

        try
        {
            req.setName( new Dn( "cn=admin,dc=apache,dc=org" ) );
        }
        catch ( LdapException ne )
        {
            // do nothing
        }
View Full Code Here

    public void testNotEqualDiffName()
    {
        try
        {
            ModifyRequestImpl req0 = getRequest();
            req0.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
            ModifyRequestImpl req1 = getRequest();
            req1.setName( new Dn( "cn=admin,dc=apache,dc=org" ) );

            assertFalse( req0.equals( req1 ) );
        }
        catch ( LdapException ine )
        {
View Full Code Here

            public Dn getName()
            {
                try
                {
                    return new Dn( "cn=admin,dc=apache,dc=org" );
                }
                catch ( Exception e )
                {
                    //do nothing
                    return null;
View Full Code Here

        LdapResult r1 = msg1.getLdapResult();

        r0.setErrorMessage( "blah blah blah" );
        r1.setErrorMessage( "blah blah blah" );

        r0.setMatchedDn( new Dn( "dc=example,dc=com" ) );
        r1.setMatchedDn( new Dn( "dc=example,dc=com" ) );

        r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
        r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );

        Referral refs0 = new ReferralImpl();
View Full Code Here

        LdapResult r1 = msg1.getLdapResult();

        r0.setErrorMessage( "blah blah blah" );
        r1.setErrorMessage( "blah blah blah" );

        r0.setMatchedDn( new Dn( "dc=example,dc=com" ) );
        r1.setMatchedDn( new Dn( "dc=apache,dc=org" ) );

        r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
        r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );

        Referral refs0 = new ReferralImpl();
View Full Code Here

    public void testEqualsExactCopy() throws LdapException
    {
        BindRequestImpl req0 = new BindRequestImpl();
        req0.setMessageId( 5 );
        req0.setCredentials( "password".getBytes() );
        req0.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setSimple( true );
        req0.setVersion3( true );

        BindRequestImpl req1 = new BindRequestImpl();
        req1.setMessageId( 5 );
        req1.setCredentials( "password".getBytes() );
        req1.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setSimple( true );
        req1.setVersion3( true );

        assertTrue( req0.equals( req1 ) );
    }
View Full Code Here

    public void testNotEqualDiffId() throws LdapException
    {
        BindRequestImpl req0 = new BindRequestImpl();
        req0.setMessageId( 7 );
        req0.setCredentials( "password".getBytes() );
        req0.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setSimple( true );
        req0.setVersion3( true );

        BindRequestImpl req1 = new BindRequestImpl();
        req1.setMessageId( 5 );
        req1.setCredentials( "password".getBytes() );
        req1.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setSimple( true );
        req1.setVersion3( true );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.name.Dn

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.