Package org.springframework.ldap.core

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


    public Entity getParentEntity(Entity childEntity)
    {
       
        DistinguishedName parentDN = new DistinguishedName(childEntity.getInternalId());
        parentDN.removeLast();
        return getEntityByInternalId(parentDN.encode());
    }

    protected DistinguishedName getRelativeDN(String fullDN)
    {
        DistinguishedName principalDN = new DistinguishedName(fullDN);
View Full Code Here


        try
        {
            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
            String parentId = parent.getInternalId();
            DistinguishedName parentDN = getRelativeDN(parentId);
            results = (Collection<Entity>) ldapTemplate.search(parentDN.encode(), filterStr, SearchControls.ONELEVEL_SCOPE, getContextMapper());
        } finally{
            Thread.currentThread().setContextClassLoader(currentClassLoader);
        }

        return results;
View Full Code Here

        DistinguishedName dn = new DistinguishedName();
        for (String dnPart : dnParts)
        {
            dn.append(new DistinguishedName(dnPart));
        }
        String encodedDn = dn.encode();
        return encodedDn.replace(", ", separator);
    }

    public static final String encodeDn(String... dnParts){
        return encodeDnUsingSeparator(DEFAULT_SEPARATOR, dnParts);
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.