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( schemaManager );
        }

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


    public LdifEntry()
    {
        changeType = ChangeType.None; // Default LDIF content
        modificationList = new LinkedList<Modification>();
        modificationItems = new HashMap<String, Modification>();
        entry = new DefaultEntry( (Dn) null );
        entryDn = null;
        controls = null;
    }
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

     * Check that we can create an LdifEntry with an Empty Dn
     */
    @Test
    public void testLdifEntryEmptyDn() throws Exception
    {
        Entry entry = new DefaultEntry( "", "cn: test" );
        LdifEntry ldifEntry = new LdifEntry( "", "cn: test" );
       
        assertNotNull( ldifEntry );
        assertEquals( Dn.EMPTY_DN, ldifEntry.getDn() );
        assertEquals( ChangeType.None, ldifEntry.getChangeType() );
View Full Code Here

     * Check that we can create an LdifEntry with a null Dn
     */
    @Test
    public void testLdifEntryNullDn() throws Exception
    {
        Entry entry = new DefaultEntry( "", "cn: test" );
        LdifEntry ldifEntry = new LdifEntry( (Dn)null, "cn: test" );
       
        assertNotNull( ldifEntry );
        assertEquals( Dn.EMPTY_DN, ldifEntry.getDn() );
        assertEquals( ChangeType.None, ldifEntry.getChangeType() );
View Full Code Here

     *
     * @return
     */
    private Entry getEntry()
    {
        Entry entry = new DefaultEntry();

        try
        {
            entry.put( getAttribute( "attr0" ) );
            entry.put( getAttribute( "attr1" ) );
            entry.put( getAttribute( "attr2" ) );
        }
        catch ( LdapException ne )
        {
            // Do nothing
        }
View Full Code Here

     *
     * @return
     */
    private Entry getEntry()
    {
        Entry entry = new DefaultEntry();

        try
        {
            entry.put( getAttribute( "attr0" ) );
            entry.put( getAttribute( "attr1" ) );
            entry.put( getAttribute( "attr2" ) );
        }
        catch ( LdapException ne )
        {
            // Do nothing
        }
View Full Code Here

        Entry entry = null;

        if ( schemaManager != null )
        {
            entry = new DefaultEntry( schemaManager );
        }
        else
        {
            entry = new DefaultEntry();
        }

        // Now, let's iterate through the other lines
        for ( String line : lines )
        {
View Full Code Here

        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

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.