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

Examples of org.apache.directory.shared.ldap.model.entry.EntryAttribute


        LdifAttributesReader reader = new LdifAttributesReader();
        Entry entry = reader.parseEntry( ldif );

        assertNotNull( entry );

        EntryAttribute attr = entry.get( "cn" );
        assertTrue( attr.contains( "Emmanuel L\u00e9charny".getBytes( "UTF-8" ) ) );

        attr = entry.get( "objectclass" );
        assertTrue( attr.contains( "top" ) );
        assertTrue( attr.contains( "apApplication" ) );

        attr = entry.get( "displayname" );
        assertTrue( attr.contains( "app1" ) );

        attr = entry.get( "dependencies" );
        assertNull( attr.get().get() );

        attr = entry.get( "envvars" );
        assertNull( attr.get().get() );
    }
View Full Code Here


        LdifAttributesReader reader = new LdifAttributesReader();
        Entry entry = reader.parseEntry( ldif );

        assertNotNull( entry );

        EntryAttribute attr = entry.get( "cn" );
        assertTrue( attr.contains( "Emmanuel L\u00e9charny  ".getBytes( "UTF-8" ) ) );

        attr = entry.get( "objectclass" );
        assertTrue( attr.contains( "top" ) );
        assertTrue( attr.contains( "apApplication" ) );

        attr = entry.get( "displayname" );
        assertTrue( attr.contains( "app1" ) );

        attr = entry.get( "dependencies" );
        assertNull( attr.get().get() );

        attr = entry.get( "envvars" );
        assertNull( attr.get().get() );
    }
View Full Code Here

            + "uid: bjensen\n" + "telephonenumber: +1 408 555 1212\n" + "description: A big sailing fan.\n";

        LdifAttributesReader reader = new LdifAttributesReader();
        Entry entry = reader.parseEntry( ldif );

        EntryAttribute attr = entry.get( "objectclass" );
        assertTrue( attr.contains( "top" ) );
        assertTrue( attr.contains( "person" ) );
        assertTrue( attr.contains( "organizationalPerson" ) );

        attr = entry.get( "cn" );
        assertTrue( attr.contains( "Barbara Jensen" ) );
        assertTrue( attr.contains( "Barbara J Jensen" ) );
        assertTrue( attr.contains( "Babs Jensen" ) );

        attr = entry.get( "sn" );
        assertTrue( attr.contains( "Jensen" ) );

        attr = entry.get( "uid" );
        assertTrue( attr.contains( "bjensen" ) );

        attr = entry.get( "telephonenumber" );
        assertTrue( attr.contains( "+1 408 555 1212" ) );

        attr = entry.get( "description" );
        assertTrue( attr.contains( "A big sailing fan." ) );

    }
View Full Code Here

            + " rch of perfect sailing conditions.\n" + "title:Product Manager, Rod and Reel Division";

        LdifAttributesReader reader = new LdifAttributesReader();
        Entry entry = reader.parseEntry( ldif );

        EntryAttribute attr = entry.get( "objectclass" );
        assertTrue( attr.contains( "top" ) );
        assertTrue( attr.contains( "person" ) );
        assertTrue( attr.contains( "organizationalPerson" ) );

        attr = entry.get( "cn" );
        assertTrue( attr.contains( "Barbara Jensen" ) );
        assertTrue( attr.contains( "Barbara J Jensen" ) );
        assertTrue( attr.contains( "Babs Jensen" ) );

        attr = entry.get( "sn" );
        assertTrue( attr.contains( "Jensen" ) );

        attr = entry.get( "uid" );
        assertTrue( attr.contains( "bjensen" ) );

        attr = entry.get( "telephonenumber" );
        assertTrue( attr.contains( "+1 408 555 1212" ) );

        attr = entry.get( "description" );
        assertTrue( attr
            .contains( "Babs is a big sailing fan, and travels extensively in search of perfect sailing conditions." ) );

        attr = entry.get( "title" );
        assertTrue( attr.contains( "Product Manager, Rod and Reel Division" ) );

    }
View Full Code Here

        assertTrue( entry.isLdifContent() );

        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );

        EntryAttribute attr = entry.get( "displayname" );
        assertTrue( attr.contains( "app1" ) );
    }
View Full Code Here

        assertTrue( entry.isLdifContent() );

        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );

        EntryAttribute attr = entry.get( "displayname" );
        assertTrue( attr.contains( "app1" ) );

    }
View Full Code Here

        assertEquals( "dc=example,dc=com", entry.getDn().getName() );

        List<Modification> mods = entry.getModificationItems();
        assertTrue( mods.size() == 1 );
        EntryAttribute attr = mods.get( 0 ).getAttribute();
        assertTrue( attr.getId().equals( "administrativerole" ) );
        assertEquals( attr.getString(), "accessControlSpecificArea" );
    }
View Full Code Here

     * @param id the id for the attribute
     * @return the EntryAttribute assembled for testing
     */
    private EntryAttribute getEntry( String id )
    {
        EntryAttribute attr = new DefaultEntryAttribute( id );
        attr.add( "value0" );
        attr.add( "value1" );
        attr.add( "value2" );
        return attr;
    }
View Full Code Here

        LdifEntry entry = entries.get( 0 );
        assertTrue( entry.isLdifContent() );

        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );

        EntryAttribute attr = entry.get( "cn" );
        assertTrue( attr.contains( "app1" ) );

        attr = entry.get( "objectclass" );
        assertTrue( attr.contains( "top" ) );
        assertTrue( attr.contains( "apApplication" ) );

        attr = entry.get( "displayname" );
        assertTrue( attr.contains( "app1" ) );

        attr = entry.get( "dependencies" );
        assertNull( attr.get().get() );

        attr = entry.get( "envvars" );
        assertNull( attr.get().get() );
    }
View Full Code Here

        LdifEntry entry = entries.get( 0 );
        assertTrue( entry.isLdifContent() );

        assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );

        EntryAttribute attr = entry.get( "cn" );
        assertTrue( attr.contains( "app1#another comment" ) );

        attr = entry.get( "objectclass" );
        assertTrue( attr.contains( "top" ) );
        assertTrue( attr.contains( "apApplication" ) );

        attr = entry.get( "displayname" );
        assertTrue( attr.contains( "app1" ) );

        attr = entry.get( "dependencies" );
        assertNull( attr.get().get() );

        attr = entry.get( "envvars" );
        assertNull( attr.get().get() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.entry.EntryAttribute

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.