/** * Creates a new move subtree transformation with the provided information. * * @param sourceDN The source base DN to be replaced with the target base * DN. It must not be {@code null}. * @param targetDN The target base DN to use to replace the source base DN. * It must not be {@code null}. */ public MoveSubtreeTransformation(final DN sourceDN, final DN targetDN) { this.sourceDN = sourceDN; targetRDNs = Arrays.asList(targetDN.getRDNs()); }
/** * Creates a new instance of this translator. * * @param splitBaseDN The base DN below which entries are to be split. It * must not be {@code null}. */ SplitLDIFTranslator(final DN splitBaseDN) { this.splitBaseDN = splitBaseDN; splitBaseRDNs = splitBaseDN.getRDNs(); errorSetNames = Collections.singleton(SplitLDIFEntry.SET_NAME_ERRORS); ldifBuffers = new ThreadLocal<ByteStringBuffer>(); messageDigests = new ThreadLocal<MessageDigest>(); }
/** * Retrieves the set of RDNs that comprise the DN with the provided string * representation. * * @param s The string representation of the DN for which to retrieve the * RDNs. It must not be {@code null}. * * @return The set of RDNs that comprise the DN with the provided string * representation. * * @throws LDAPException If the provided string cannot be parsed as a DN. */ public static RDN[] getRDNs(final String s) throws LDAPException { return new DN(s).getRDNs(); }
/** * Retrieves the set of RDNs that comprise the DN with the provided string * representation. * * @param s The string representation of the DN for which to retrieve the * RDNs. It must not be {@code null}. * * @return The set of RDNs that comprise the DN with the provided string * representation. * * @throws LDAPException If the provided string cannot be parsed as a DN. */ public static RDN[] getRDNs(final String s) throws LDAPException { return new DN(s).getRDNs(); }
if(null != groups) { for(String group : groups) { for (RDN rdn : new DN(group).getRDNs()) { if (rdn.hasAttribute("cn")) { roles.addAll(Arrays.asList(rdn.getAttributeValues()));
if(null != groups) { for(String group : groups) { for (RDN rdn : new DN(group).getRDNs()) { if (rdn.hasAttribute("cn")) { roles.addAll(Arrays.asList(rdn.getAttributeValues()));
final RDN[] rdns = new DN(dn).getRDNs(); final String[] rdnStrings = new String[rdns.length]; for (int i=0; i < rdns.length; i++)
for (final RDN rdn : dn.getRDNs())
this.excludeFilter = excludeFilter; flattenBaseRDNs = flattenBaseDN.getRDNs();
DN dn = new DN(dnString); DN containerDN = dn.getParent(); RDN[] containerRDNs = containerDN.getRDNs(); for (RDN rdn : containerRDNs) { String mappedValue = mapRdn(rdn.toNormalizedString());
final RDN[] originalRDNs = dn.getRDNs(); final RDN[] scrambledRDNs = new RDN[originalRDNs.length]; for (int i=0; i < originalRDNs.length; i++)
final RDN[] targetRDNs = targetDN.getRDNs(); final RDN[] refEntryRDNs = referralEntry.getParsedDN().getRDNs(); retainRDNs = new RDN[targetRDNs.length - refEntryRDNs.length]; System.arraycopy(targetRDNs, 0, retainRDNs, 0, retainRDNs.length); final RDN[] refRDNs = url.getBaseDN().getRDNs(); final RDN[] newRefRDNs = new RDN[retainRDNs.length + refRDNs.length]; System.arraycopy(retainRDNs, 0, newRefRDNs, 0, retainRDNs.length);
final RDN[] rdns = dn.getRDNs(); final int targetRDNIndex = rdns.length - splitBaseRDNs.length - 1; final byte[] normalizedRDNBytes =
final RDN[] originalRDNs = parsedDN.getRDNs(); final RDN[] newRDNs = new RDN[originalRDNs.length]; for (int i=0; i < originalRDNs.length; i++)
final RDN[] originalRDNs = dn.getRDNs(); final int numRDNsToOmit = originalRDNs.length - flattenBaseRDNs.length - 1; if (numRDNsToOmit == 0)
final RDN[] originalRDNs = new DN(dn).getRDNs(); final RDN[] newRDNs = new RDN[originalRDNs.length]; for (int i=0; i < originalRDNs.length; i++)