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

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


        LOG.debug( "Starts parsing ldif buffer" );

        if ( Strings.isEmpty(ldif) )
        {
            return new DefaultEntry();
        }

        StringReader strIn = new StringReader( ldif );
        reader = new BufferedReader( strIn );
View Full Code Here


     *
     * @return The populated Entry object
     */
    private Entry getEntry() throws LdapException
    {
        Entry attrs = new DefaultEntry();
        attrs.put( getEntry( "attr0" ) );
        attrs.put( getEntry( "attr1" ) );
        attrs.put( getEntry( "attr2" ) );
        return attrs;
    }
View Full Code Here

    public void testReverseModifyDNSuperior() throws LdapException
    {
        Dn dn = new Dn( "cn=john doe, dc=example, dc=com" );
        Dn newSuperior = new Dn( "ou=system" );

        Entry entry = new DefaultEntry( dn );
        entry.add( "objectClass", "person", "uidObject" );
        entry.add( "cn", "john doe", "jack doe" );
        entry.add( "sn", "doe" );
        entry.add( "uid", "jdoe" );

        List<LdifEntry> reverseds = LdifRevertor.reverseMoveAndRename(entry, newSuperior, new Rdn("cn=jack doe"), false);

        assertNotNull( reverseds );
        assertEquals( 1, reverseds.size() );
View Full Code Here

    public void testReverseModifyDNDeleteOldRdnSuperior() throws LdapException
    {
        Dn dn = new Dn( "cn=john doe, dc=example, dc=com" );
        Dn newSuperior = new Dn( "ou=system" );

        Entry entry = new DefaultEntry( dn );
        entry.add( "objectClass", "person", "uidObject" );
        entry.add( "cn", "john doe" );
        entry.add( "sn", "doe" );
        entry.add( "uid", "jdoe" );

        List<LdifEntry> reverseds = LdifRevertor.reverseMoveAndRename( entry, newSuperior, new Rdn( "cn=jack doe" ), false );

        assertNotNull( reverseds );
        assertEquals( 1, reverseds.size() );
View Full Code Here

                // Store the response into the responseQueue
                SearchResultEntry searchResultEntry = ( SearchResultEntry ) response;

                if ( schemaManager != null )
                {
                    searchResultEntry.setEntry( new DefaultEntry( schemaManager, searchResultEntry.getEntry() ) );
                }

                searchFuture = ( SearchFuture ) responseFuture;

                if ( LOG.isDebugEnabled() )
View Full Code Here

        {
            return "";
        }
        else
        {
            Entry entry = new DefaultEntry();
            EntryAttribute attribute = new DefaultEntryAttribute( "m-name" );

            for ( String name : names )
            {
                attribute.add( name );
            }

            entry.put( attribute );

            return LdifUtils.convertAttributesToLdif(entry);
        }
    }
View Full Code Here

        {
            return "";
        }
        else
        {
            Entry entry = new DefaultEntry();
            EntryAttribute attribute = new DefaultEntryAttribute( "m-description", description );

            entry.put( attribute );

            return LdifUtils.convertAttributesToLdif( entry );
        }
    }
View Full Code Here

     */
    protected String extensionsToLdif( String id ) throws LdapException
    {
        StringBuilder sb = new StringBuilder();

        Entry entry = new DefaultEntry();
        EntryAttribute attribute = new DefaultEntryAttribute( id );

        for ( String extension : extensions.keySet() )
        {
            attribute.add( extension );
View Full Code Here

        String dn = "m-oid=" + oid + ", " + SchemaConstants.OBJECT_CLASSES_PATH + ", cn="
            + Rdn.escapeValue(schemaName) + ", ou=schema";

        // First dump the Dn only
        Entry entry = new DefaultEntry( new Dn( dn ) );
        sb.append( LdifUtils.convertEntryToLdif(entry) );

        return sb.toString();
    }
View Full Code Here

        String dn = "m-oid=" + oid + ", " + SchemaConstants.ATTRIBUTES_TYPE_PATH + ", cn="
            + Rdn.escapeValue(schemaName) + ", ou=schema";

        // First dump the Dn only
        Entry entry = new DefaultEntry( new Dn( dn ) );
        sb.append( LdifUtils.convertEntryToLdif(entry) );

        return sb.toString();
    }
View Full Code Here

TOP

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

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.