Package org.springframework.ldap.core

Examples of org.springframework.ldap.core.DistinguishedName.startsWith()


        if(base.equals(full)) {
            return "";
        }

        Assert.isTrue(full.startsWith(base), "Full DN does not start with base DN");

        full.removeFirst(base);

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


        if(base.equals(full)) {
            return "";
        }

        Assert.isTrue(full.startsWith(base), "Full DN does not start with base DN");

        full.removeFirst(base);

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

    public void getEntities(Entity parent, Filter filter, EntitySearchResultHandler handler) throws SecurityException
    {
        ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
        DistinguishedName parentDN = getRelativeDN(parent.getInternalId());
        if (configuration.getSearchDN().size() == 0 || parentDN.startsWith(configuration.getSearchDN()))
        {
            String sf = createSearchFilter(filter);
            SearchControls sc = getSearchControls(SearchControls.ONELEVEL_SCOPE, true, configuration.getEntityAttributeNames());
            handler.setEntityFactory(getEntityFactory());
            PagedSearchExecutor pse = new PagedSearchExecutor(parentDN, sf, sc, handler, searchPageSize);
View Full Code Here

    }

    protected void getEntityByInternalId(String internalId, EntitySearchResultHandler handler) throws SecurityException
    {
        DistinguishedName principalDN = getRelativeDN(internalId);
        if (configuration.getSearchDN().size() == 0 || principalDN.startsWith(configuration.getSearchDN()))
        {
            SearchControls sc = getSearchControls(SearchControls.OBJECT_SCOPE, true, configuration.getEntityAttributeNames());
            PagedSearchExecutor pse = new PagedSearchExecutor(principalDN, defaultSearchFilterStr, sc, handler);
            handler.setEntityFactory(getEntityFactory());
           
View Full Code Here

    }

    protected DirContextOperations getEntityContextByInternalId(String internalId, boolean withAttributes) throws SecurityException
    {
        DistinguishedName principalDN = getRelativeDN(internalId);
        if (configuration.getSearchDN().size() == 0 || principalDN.startsWith(configuration.getSearchDN()))
        {
            String sf = createSearchFilter(null);
            SearchControls sc = getSearchControls(SearchControls.OBJECT_SCOPE, true,
                                                  withAttributes ? configuration.getEntityAttributeNames() : new String[0]);
            CollectingSearchResultHandler<DirContextOperations,SearchResult> cbh =
View Full Code Here

    }

    protected DistinguishedName getFullDN(DistinguishedName relativeDN)
    {       
        DistinguishedName fullDN = new DistinguishedName(relativeDN);
        if (configuration.getBaseDN().size() > 0 && !fullDN.startsWith(configuration.getBaseDN()))
        {
            fullDN.prepend(configuration.getBaseDN());
        }
        return fullDN;
    }
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.