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

Examples of org.apache.directory.shared.ldap.entry.DefaultServerAttribute


        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.contains( (AttributeType )null, "test" ) );
        assertFalse( entry.contains( atCN, "test" ) );
       
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );

        assertFalse( entry.contains( attrCN ) );
       
        entry.add( attrCN );
       
View Full Code Here


        Value<byte[]> binNullValue = new BinaryValue( atPwd, null );

        assertFalse( entry.contains( (String)null, strValue1 ) );
        assertFalse( entry.contains( atCN, binValue1 ) );
       
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, strValue1, strValue2 );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, binValue1, binValue2, binNullValue );

        entry.add( attrCN, attrPWD );
       
        assertTrue( entry.contains( atCN, strValue1, strValue2 ) );
        assertTrue( entry.contains( atPwd, binValue1, binValue2, binNullValue ) );
View Full Code Here

    @Test
    public void testContainsEntryAttributeArray() throws Exception
    {
        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
        EntryAttribute attrSN = new DefaultServerAttribute( atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );

        assertFalse( entry.contains( attrOC, attrCN ) );
       
        entry.add( attrOC, attrCN );
View Full Code Here

        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.contains( (String)null, BYTES3 ) );
        assertFalse( entry.containsAttribute( "objectClass" ) );
       
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, (byte[])null, BYTES2 );

        entry.add( attrPWD );
       
        assertTrue( entry.contains( "  userPASSWORD  ", BYTES1, BYTES2 ) );
        assertTrue( entry.contains( "  userPASSWORD  ", (byte[])null ) );
View Full Code Here

        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.contains( (String)null, "test" ) );
        assertFalse( entry.containsAttribute( "objectClass" ) );
       
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", (String)null, "test2" );

        entry.add( attrCN );
       
        assertTrue( entry.contains( "  CN  ", "test1", "test2" ) );
       
View Full Code Here

        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.contains( (String)null, "test" ) );
        assertFalse( entry.containsAttribute( "objectClass" ) );
       
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2", (String)null );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2, (byte[])null );

        entry.add( attrCN, attrPWD );
       
        Value<String> strValue1 = new StringValue( atCN, "test1" );
        Value<String> strValue2 = new StringValue( atCN, "test2" );
View Full Code Here

    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.containsAttribute( atOC ) );
       
        EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
        EntryAttribute attrSN = new DefaultServerAttribute( atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );

        entry.add( attrOC, attrCN, attrSN, attrPWD );
       
        assertTrue( entry.containsAttribute( atOC ) );
        assertTrue( entry.containsAttribute( atCN ) );
View Full Code Here

    {
        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertFalse( entry.containsAttribute( "objectClass" ) );
       
        EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
        EntryAttribute attrSN = new DefaultServerAttribute( atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );

        entry.add( attrOC, attrCN, attrSN, attrPWD );
       
        assertTrue( entry.containsAttribute( "OBJECTCLASS", " cn ", "Sn", "  userPASSWORD  " ) );
       
View Full Code Here

        assertNotSame( entry1, entry2 );
       
        entry2.setDn( EXAMPLE_DN );
        assertEquals( entry1, entry2 );

        EntryAttribute attrOC = new DefaultServerAttribute( "objectClass", atOC, "top", "person" );
        EntryAttribute attrCN = new DefaultServerAttribute( "cn", atCN, "test1", "test2" );
        EntryAttribute attrSN = new DefaultServerAttribute( "sn", atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( "userPassword", atPwd, BYTES1, BYTES2 );
       
        entry1.put( attrOC, attrCN, attrSN, attrPWD );
        entry2.put( attrOC, attrCN, attrSN );
        assertNotSame( entry1, entry2 );
       
        entry2.put( attrPWD );
        assertEquals( entry1, entry2 );
       
        EntryAttribute attrL1 = new DefaultServerAttribute( "l", atL, "Paris", "New-York" );
        EntryAttribute attrL2 = new DefaultServerAttribute( "l", atL, "Paris", "Tokyo" );
       
        entry1.put( attrL1 );
        entry2.put( attrL1 );
        assertEquals( entry1, entry2 );
       
View Full Code Here

    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
       
        assertEquals( 0, entry.getAttributeTypes().size() );

        EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
        EntryAttribute attrSN = new DefaultServerAttribute( atSN, "Test1", "Test2" );
        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, BYTES2 );

        entry.add( attrOC, attrCN, attrSN, attrPWD );
       
        Set<AttributeType> attributeTypes = entry.getAttributeTypes();
       
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.entry.DefaultServerAttribute

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.