Package org.springframework.ldap.filter

Examples of org.springframework.ldap.filter.AbstractFilter.encode()


    public final void testCreateFilterWithoutEqualFilterAttribute()
    {
        sut = new FindByAttributeQuery();
        AbstractFilter filter = sut.getFilter("attrib=something");

        assertEquals("(attrib=something)", filter.encode());
    }

    /**
     * Tests creating the filter.
     */
 
View Full Code Here


        filterList.add(new EqualsFilter("objectclass", "person"));
        filterList.add(new EqualsFilter("objectclass", "user"));
        sut = new FindByAttributeQuery(filterList);
        AbstractFilter filter = sut.getFilter("attrib=something");

        assertEquals("(&(objectclass=person)(objectclass=user)(attrib=something))", filter.encode());
    }

    /**
     * Tests creating the filter with a malformed search string.
     */
 
View Full Code Here

        sut = new FindByAttribute("cn", findByAttribFilterCreator, false);

        AbstractFilter filter = sut.getFilter("something");

        assertEquals("(&(objectclass=person)(objectclass=user)(cn=something*))", filter.encode());
    }

    /**
     * Tests creating the filter.
     */
 
View Full Code Here

        sut = new FindByAttribute("cn", findByAttribFilterCreator, true);

        AbstractFilter filter = sut.getFilter("something");

        assertEquals("(&(objectclass=person)(objectclass=user)(cn=something))", filter.encode());
    }
}
View Full Code Here

        // get the configured CollectingNameClassPairCallbackHandler to use for query.
        CollectingNameClassPairCallbackHandler collectingHandler = handlerFactory.getCallbackHandler();

        // execute query.
        ldapSearchStrategy.searchLdap(template, abstractFilter.encode(), searchControls, collectingHandler);

        // get results gathered by CollectingNameClassPairCallbackHandler.
        List<Type> rawResults = collectingHandler.getList();

        // Results contain nulls if the context/attribute mappers were unable to create objects, so pull them out.
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.