Examples of containsAttribute()


Examples of org.apache.directory.server.core.entry.DefaultServerEntry.containsAttribute()

                    LdifEntry ldifEntry = ldifEntries.get( 0 );
                    LOG.debug( "Adding entry {}", ldifEntry );

                    ServerEntry serverEntry = new DefaultServerEntry( schemaManager, ldifEntry.getEntry() );

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
                    }

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
View Full Code Here

Examples of org.apache.directory.server.core.entry.ServerEntry.containsAttribute()

                    LdifEntry ldifEntry = ldifEntries.get( 0 );
                    LOG.debug( "Adding entry {}", ldifEntry );

                    ServerEntry serverEntry = new DefaultServerEntry( schemaManager, ldifEntry.getEntry() );

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
                    }

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.DefaultServerEntry.containsAttribute()

        // Test a simple addition
        entry.add( "userPASSWORD", atPassword, testB1 );
        assertNotNull( entry.get( atPassword ) );
        assertEquals( 1, entry.get( atPassword ).size() );
        assertTrue( Arrays.equals( b1, entry.get( atPassword ).get().getBytes() ) );
        assertTrue( entry.containsAttribute( atPassword ) );
        assertEquals( "userPASSWORD", entry.get( atPassword ).getUpId() );
       
        // Test some more addition
        entry.add( "userPASSWORD", atPassword, testB2, testB3 );
        assertNotNull( entry.get( atPassword ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.Entry.containsAttribute()

        EntryAttribute c = new DefaultServerAttribute( atC, "FR", "US" );
       
        entry.add( oc, cn, sn, c );
       
        assertEquals( 4, entry.size() );
        assertTrue( entry.containsAttribute( "ObjectClass" ) );
        assertTrue( entry.containsAttribute( "CN" ) );
        assertTrue( entry.containsAttribute( "  sn  " ) );
        assertTrue( entry.containsAttribute( " countryName  " ) );
   
        EntryAttribute attr = entry.get( "objectclass" );
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.ServerEntry.containsAttribute()

                   
                    break;
                   
                case REMOVE_ATTRIBUTE :
                    // First check that the removed attribute exists
                    if ( !tempEntry.containsAttribute( attributeType ) )
                    {
                        String msg = I18n.err( I18n.ERR_55, attributeType );
                        LOG.error( msg );
                        throw new LdapNoSuchAttributeException( msg );
                    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.entry.DefaultEntry.containsAttribute()

        assertTrue( entry.remove( "cn", strValue1, strNullValue ) );
        assertTrue( entry.contains( "cn", strValue2 ) );
        assertFalse( entry.remove( "cn", strValue3 ) );
        assertTrue( entry.remove( "cn", strValue2 ) );
        assertFalse( entry.containsAttribute( "cn" ) );

        entry.add( attrCN, attrPWD );

        assertTrue( entry.remove( "userpassword", binValue1, binNullValue ) );
        assertTrue( entry.contains( "userpassword", binValue2 ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.entry.Entry.containsAttribute()

        assertTrue( entry.remove( "userpassword", binValue1, binNullValue ) );
        assertTrue( entry.contains( "userpassword", binValue2 ) );
        assertFalse( entry.remove( "userpassword", binValue3 ) );
        assertTrue( entry.remove( "userpassword", binValue2 ) );
        assertFalse( entry.containsAttribute( "userpassword" ) );
    }


    /**
     * Test method for setDN( Dn )
View Full Code Here

Examples of org.apache.felix.ipojo.metadata.Element.containsAttribute()

    @Test
    public void testNoArgMethod() {
        String comp_name = "ManipulationMetadata-SimpleMultipleCheckServiceProvider";
        Element manip = getManipulationForComponent(comp_name);
        Element method = getMethodFromName(manip, "check");
        assertFalse("Check no args", method.containsAttribute("arguments"));
        assertEquals("Check return", method.getAttribute("return"), "boolean");
    }

    @Test
    public void testOneArgsMethod() {
View Full Code Here

Examples of org.apache.http.cookie.ClientCookie.containsAttribute()

        assertNotNull(cookies);
        assertEquals(1, cookies.size());
        // only the first occurrence of path attribute is considered, others ignored
        ClientCookie cookie = (ClientCookie) cookies.get(0);
        assertEquals("/", cookie.getPath());
        assertTrue(cookie.containsAttribute(ClientCookie.PATH_ATTR));
    }

    public void testParsePathDefault() throws Exception {
        CookieSpec cookiespec = new RFC2965Spec();
        CookieOrigin origin = new CookieOrigin("www.domain.com", 80, "/path/", false);
View Full Code Here

Examples of org.apache.maven.doxia.sink.SinkEventAttributeSet.containsAttribute()

        SinkEventElement next = it.next();
        assertEquals( "section1", next.getName() );
        SinkEventAttributeSet set = (SinkEventAttributeSet) next.getArgs()[0];
        assertEquals( 3, set.getAttributeCount() );
        assertTrue( set.containsAttribute( "name", "section name" ) );
        assertTrue( set.containsAttribute( "class", "foo" ) );
        assertTrue( set.containsAttribute( "id", "bar" ) );

        next = it.next();
        assertEquals( "sectionTitle1", next.getName() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.