/** * Append the specified name to the currently built LdapName. * * @param name the name to add. * @return this builder. */ public LdapNameBuilder add(Name name) { Assert.notNull(name, "name must not be null"); try { ldapName.addAll(ldapName.size(), name); return this; } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * Append the specified name to the currently built LdapName. * * @param name the name to add. * @return this builder. */ public LdapNameBuilder add(Name name) { Assert.notNull(name, "name must not be null"); try { ldapName.addAll(ldapName.size(), name); return this; } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * Append the specified name to the currently built LdapName. * * @param name the name to add. * @return this builder. */ public LdapNameBuilder add(Name name) { Assert.notNull(name, "name must not be null"); try { ldapName.addAll(ldapName.size(), name); return this; } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * Append the specified name to the currently built LdapName. * * @param name the name to add. * @return this builder. */ public LdapNameBuilder add(Name name) { Assert.notNull(name, "name must not be null"); try { ldapName.addAll(ldapName.size(), name); return this; } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * Prepend the supplied path in the beginning the specified * <code>Name</code> if the name instance starts with * <code>path</code>. The original Name will not be affected. * * @param dn the dn to strip from. * @param pathToPrepend the path to prepend in the beginning of the dn. * @return an LdapName instance that is a copy of the original name with the * specified path inserted at its beginning. * @since 2.0 */ public static LdapName prepend(Name dn, Name pathToPrepend) { Assert.notNull(dn, "dn must not be null"); Assert.notNull(pathToPrepend, "pathToRemove must not be null"); LdapName result = newLdapName(dn); try { result.addAll(0, pathToPrepend); } catch (InvalidNameException e) { throw convertLdapException(e); } return result; }
/** * Prepend the supplied path in the beginning the specified * <code>Name</code> if the name instance starts with * <code>path</code>. The original Name will not be affected. * * @param dn the dn to strip from. * @param pathToPrepend the path to prepend in the beginning of the dn. * @return an LdapName instance that is a copy of the original name with the * specified path inserted at its beginning. * @since 2.0 */ public static LdapName prepend(Name dn, Name pathToPrepend) { Assert.notNull(dn, "dn must not be null"); Assert.notNull(pathToPrepend, "pathToRemove must not be null"); LdapName result = newLdapName(dn); try { result.addAll(0, pathToPrepend); } catch (InvalidNameException e) { throw convertLdapException(e); } return result; }
/** * Prepend the supplied path in the beginning the specified * <code>Name</code> if the name instance starts with * <code>path</code>. The original Name will not be affected. * * @param dn the dn to strip from. * @param pathToPrepend the path to prepend in the beginning of the dn. * @return an LdapName instance that is a copy of the original name with the * specified path inserted at its beginning. * @since 2.0 */ public static LdapName prepend(Name dn, Name pathToPrepend) { Assert.notNull(dn, "dn must not be null"); Assert.notNull(pathToPrepend, "pathToRemove must not be null"); LdapName result = newLdapName(dn); try { result.addAll(0, pathToPrepend); } catch (InvalidNameException e) { throw convertLdapException(e); } return result; }
/** * Prepend the supplied path in the beginning the specified * <code>Name</code> if the name instance starts with * <code>path</code>. The original Name will not be affected. * * @param dn the dn to strip from. * @param pathToPrepend the path to prepend in the beginning of the dn. * @return an LdapName instance that is a copy of the original name with the * specified path inserted at its beginning. * @since 2.0 */ public static LdapName prepend(Name dn, Name pathToPrepend) { Assert.notNull(dn, "dn must not be null"); Assert.notNull(pathToPrepend, "pathToRemove must not be null"); LdapName result = newLdapName(dn); try { result.addAll(0, pathToPrepend); } catch (InvalidNameException e) { throw convertLdapException(e); } return result; }
Binding binding = (Binding) enumeration.next(); LdapName childName = LdapUtils.newLdapName(binding.getName()); childName.addAll(0, name); deleteRecursively(ctx, childName);
/** * Composes the distinguished name. * @param parentDn the parent dn * @param rdn the rdn * @param suffix the suffix * @return the ldap name * @throws InvalidNameException if error occurs */ public static LdapName composeDistinguishedName(LdapName parentDn, Rdn rdn, LdapName suffix) throws InvalidNameException { LdapName dn = new LdapName(parentDn.getRdns()); dn.addAll(suffix.getRdns()); if (rdn != null) { dn.add(rdn); } return dn; }
Binding binding = (Binding) enumeration.next(); LdapName childName = LdapUtils.newLdapName(binding.getName()); childName.addAll(0, name); deleteRecursively(ctx, childName);
Binding binding = (Binding) enumeration.next(); LdapName childName = LdapUtils.newLdapName(binding.getName()); childName.addAll(0, name); deleteRecursively(ctx, childName);
Binding binding = (Binding) enumeration.next(); LdapName childName = LdapUtils.newLdapName(binding.getName()); childName.addAll(0, name); deleteRecursively(ctx, childName);
/** * {@inheritDoc} */ @Override public String getNameInNamespace() { if(base.size() == 0) { return dn.toString(); } try { LdapName result = (LdapName) dn.clone(); result.addAll(0, base); return result.toString(); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * {@inheritDoc} */ @Override public String getNameInNamespace() { if(base.size() == 0) { return dn.toString(); } try { LdapName result = (LdapName) dn.clone(); result.addAll(0, base); return result.toString(); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * {@inheritDoc} */ @Override public String getNameInNamespace() { if(base.size() == 0) { return dn.toString(); } try { LdapName result = (LdapName) dn.clone(); result.addAll(0, base); return result.toString(); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
/** * {@inheritDoc} */ @Override public String getNameInNamespace() { if(base.size() == 0) { return dn.toString(); } try { LdapName result = (LdapName) dn.clone(); result.addAll(0, base); return result.toString(); } catch (InvalidNameException e) { throw new org.springframework.ldap.InvalidNameException(e); } }
LdapName result = emptyLdapName(); try { result.addAll(0, name); } catch (InvalidNameException e) { throw convertLdapException(e);
LdapName result = emptyLdapName(); try { result.addAll(0, name); } catch (InvalidNameException e) { throw convertLdapException(e);
LdapName result = emptyLdapName(); try { result.addAll(0, name); } catch (InvalidNameException e) { throw convertLdapException(e);