Package org.springframework.ldap.core

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


            return "";
        }

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

        full.removeFirst(base);

        return full.toString();
    }

    /**
 
View Full Code Here


            return "";
        }

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

        full.removeFirst(base);

        return full.toString();
    }

    /**
 
View Full Code Here

    protected DistinguishedName getRelativeDN(String fullDN)
    {
        DistinguishedName principalDN = new DistinguishedName(fullDN);
        if (configuration.getBaseDN() != null && configuration.getBaseDN().length() > 0)
        {
            principalDN.removeFirst(new DistinguishedName(configuration.getBaseDN()));
        }
        return principalDN;
    }

    protected String createSearchFilter(Filter filter)
View Full Code Here

    {
        if (parentEntity == null || parentEntity.getInternalId() == null){
            throw new SecurityException(SecurityException.UNEXPECTED.create(getClass().getName(),"add(Entity entity, Entity parentEntity)","Provided parent entity is null or has no internal ID."));
        }       
        DistinguishedName parentDn = new DistinguishedName(parentEntity.getInternalId());
        parentDn.removeFirst(new DistinguishedName(configuration.getBaseDN()));
        internalAdd(entity,parentDn);       
    }

    public void add(Entity entity) throws SecurityException
    {
View Full Code Here

            else
            {
                ctx = poolingContextsource.getReadWriteContext();
            }
            DistinguishedName name = new DistinguishedName(dn);
            name.removeFirst(new DistinguishedName(ctx.getNameInNamespace()));
            Attribute namingAttr = new BasicAttribute("userPassword", newPassword);
            ModificationItem[] items = new ModificationItem[1];
            items[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, namingAttr);
            ctx.modifyAttributes(name, items);
        }
View Full Code Here

        {
            throw new SecurityException(SecurityException.UNEXPECTED.create(getClass().getName(), "add(Entity entity, Entity parentEntity)",
                                                                            "Provided parent entity is null or has no internal ID."));
        }
        DistinguishedName parentDn = new DistinguishedName(parentEntity.getInternalId());
        parentDn.removeFirst(new DistinguishedName(configuration.getBaseDN()));
        internalAdd(entity, parentDn);
    }

    public void add(Entity entity) throws SecurityException
    {
View Full Code Here

    protected DistinguishedName getRelativeDN(String fullDN)
    {
        DistinguishedName principalDN = new DistinguishedName(fullDN);
        if (configuration.getBaseDN().size() > 0)
        {
            principalDN.removeFirst(configuration.getBaseDN());
        }
        return principalDN;
    }

    protected DistinguishedName getFullDN(DistinguishedName relativeDN)
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.