Package org.springframework.ldap.filter

Examples of org.springframework.ldap.filter.Filter


            // the entity
            if (!StringUtils.isEmpty(fromEntityUsedIdValue))
            {
                // fetch entities using target Entity DAO with a specific filter
                // on the member attribute
                Filter roleMemberAttrFilter = new EqualsFilter(relationAttribute, fromEntityUsedIdValue);
                return toDAO.getEntities(roleMemberAttrFilter);
            }
        }
        return null;
    }
View Full Code Here


        this.contextMapper = contextMapper;
    }

    public Entity getEntity(String entityId)
    {
        Filter idFilter = createFilterForIdSearch(entityId);
        Collection<Entity> entities = getEntities(idFilter);
        if (entities != null && entities.size() == 1)
        {
            return entities.iterator().next();
        } else
View Full Code Here

        String idAttr = configuration.getLdapIdAttribute();
        for (String id : entityIds)
        {
            idFilter.or(new EqualsFilter(idAttr, id));
        }
        Filter combinedFilter = null;
        if (configuration.getSearchFilter() != null)
        {
            combinedFilter = SearchUtil.andFilters(idFilter, configuration.getSearchFilter());
        } else
        {
View Full Code Here

    protected String getUserDn(String userName) throws SecurityException
    {
        DirContext ctx = null;
        try
        {
            Filter filter = new EqualsFilter(userEntryPrefix, userName);
            if (userFilter != null)
            {
                filter = new AndFilter().and(userFilter).and(filter);
            }
            ctx = poolingContextsource.getReadOnlyContext();
            NamingEnumeration<SearchResult> results = ctx.search(userSearchPath, filter.encode(), searchControls);
           
            String dn = null;        
            if (null != results && results.hasMore())
            {
                SearchResult result = results.next();
View Full Code Here

            // the entity
            if (!StringUtils.isEmpty(fromEntityUsedIdValue))
            {
                // fetch entities using target Entity DAO with a specific filter
                // on the member attribute
                Filter memberAttrFilter = new EqualsFilter(relationAttribute, fromEntityUsedIdValue);
                toDAO.getEntities(memberAttrFilter, handler);
            }
        }
    }
View Full Code Here

    private void authenticateUser(String userName, String password) throws SecurityException
    {
        DirContext ctx = null;
        try
        {
            Filter filter = new EqualsFilter(userEntryPrefix, userName);
            if (userFilter != null)
            {
                filter = new AndFilter().and(userFilter).and(filter);
            }
            ctx = poolingContextsource.getReadOnlyContext();
            NamingEnumeration<SearchResult> results = ctx.search(userSearchPath, filter.encode(), searchControls);
           
            String dn = null;        
            if (null != results && results.hasMore())
            {
                SearchResult result = results.next();
View Full Code Here

TOP

Related Classes of org.springframework.ldap.filter.Filter

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.