com.unboundid.ldap.sdk.DN.getParent()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中com.unboundid.ldap.sdk.DN.getParent()方法的一些代码示例,展示了DN.getParent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DN.getParent()方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.DN
类名称:DN
方法名:getParent

DN.getParent介绍

[英]Retrieves the DN that is the parent for this DN. Note that neither the null DN nor DNs consisting of a single RDN component will be considered to have parent DNs.
[中]检索作为此DN父级的DN。请注意,null DN和由单个RDN组件组成的DNs都不会被视为具有父DNs。

代码示例

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves the parent DN for this entry.
  3. *
  4. * @return The parent DN for this entry, or {@code null} if there is no
  5. * parent.
  6. *
  7. * @throws LDAPException If the DN string cannot be parsed as a valid DN.
  8. */
  9. public DN getParentDN()
  10. throws LDAPException
  11. {
  12. return getParsedDN().getParent();
  13. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the DN of the existing entry which is the closest hierarchical
  3. * match to the provided DN.
  4. *
  5. * @param dn The DN for which to retrieve the appropriate matched DN.
  6. *
  7. * @return The appropriate matched DN value, or {@code null} if there is
  8. * none.
  9. */
  10. private String getMatchedDNString(final DN dn)
  11. {
  12. DN parentDN = dn.getParent();
  13. while (parentDN != null)
  14. {
  15. if (entryMap.containsKey(parentDN))
  16. {
  17. return parentDN.toString();
  18. }
  19. parentDN = parentDN.getParent();
  20. }
  21. return null;
  22. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the parent DN for this entry.
  3. *
  4. * @return The parent DN for this entry, or {@code null} if there is no
  5. * parent.
  6. *
  7. * @throws LDAPException If the DN string cannot be parsed as a valid DN.
  8. */
  9. public DN getParentDN()
  10. throws LDAPException
  11. {
  12. return getParsedDN().getParent();
  13. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves the parent DN for this entry.
  3. *
  4. * @return The parent DN for this entry, or {@code null} if there is no
  5. * parent.
  6. *
  7. * @throws LDAPException If the DN string cannot be parsed as a valid DN.
  8. */
  9. public final DN getParentDN()
  10. throws LDAPException
  11. {
  12. if (parsedDN == null)
  13. {
  14. parsedDN = new DN(dn, schema);
  15. }
  16. return parsedDN.getParent();
  17. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the parent DN for this entry.
  3. *
  4. * @return The parent DN for this entry, or {@code null} if there is no
  5. * parent.
  6. *
  7. * @throws LDAPException If the DN string cannot be parsed as a valid DN.
  8. */
  9. public final DN getParentDN()
  10. throws LDAPException
  11. {
  12. if (parsedDN == null)
  13. {
  14. parsedDN = new DN(dn, schema);
  15. }
  16. return parsedDN.getParent();
  17. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves the DN that is the parent for the DN with the provided string
  3. * representation. Note that neither the null DN nor DNs consisting of a
  4. * single RDN component will be considered to have parent DNs.
  5. *
  6. * @param s The string representation of the DN for which to retrieve the
  7. * parent. It must not be {@code null}.
  8. *
  9. * @return The DN that is the parent for this DN, or {@code null} if there
  10. * is no parent.
  11. *
  12. * @throws LDAPException If the provided string cannot be parsed as a DN.
  13. */
  14. public static DN getParent(final String s)
  15. throws LDAPException
  16. {
  17. return new DN(s).getParent();
  18. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the string representation of the DN that is the parent for this
  3. * DN. Note that neither the null DN nor DNs consisting of a single RDN
  4. * component will be considered to have parent DNs.
  5. *
  6. * @return The DN that is the parent for this DN, or {@code null} if there
  7. * is no parent.
  8. */
  9. public String getParentString()
  10. {
  11. final DN parentDN = getParent();
  12. if (parentDN == null)
  13. {
  14. return null;
  15. }
  16. else
  17. {
  18. return parentDN.toString();
  19. }
  20. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the DN that is the parent for the DN with the provided string
  3. * representation. Note that neither the null DN nor DNs consisting of a
  4. * single RDN component will be considered to have parent DNs.
  5. *
  6. * @param s The string representation of the DN for which to retrieve the
  7. * parent. It must not be {@code null}.
  8. *
  9. * @return The DN that is the parent for this DN, or {@code null} if there
  10. * is no parent.
  11. *
  12. * @throws LDAPException If the provided string cannot be parsed as a DN.
  13. */
  14. public static DN getParent(final String s)
  15. throws LDAPException
  16. {
  17. return new DN(s).getParent();
  18. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves the string representation of the DN that is the parent for this
  3. * DN. Note that neither the null DN nor DNs consisting of a single RDN
  4. * component will be considered to have parent DNs.
  5. *
  6. * @return The DN that is the parent for this DN, or {@code null} if there
  7. * is no parent.
  8. */
  9. public String getParentString()
  10. {
  11. final DN parentDN = getParent();
  12. if (parentDN == null)
  13. {
  14. return null;
  15. }
  16. else
  17. {
  18. return parentDN.toString();
  19. }
  20. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. if (e == null)
  2. d = d.getParent();
  3. if (d == null)

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the parent DN for this entry as a string.
  3. *
  4. * @return The parent DN for this entry as a string, or {@code null} if there
  5. * is no parent.
  6. *
  7. * @throws LDAPException If the DN string cannot be parsed as a valid DN.
  8. */
  9. public final String getParentDNString()
  10. throws LDAPException
  11. {
  12. if (parsedDN == null)
  13. {
  14. parsedDN = new DN(dn, schema);
  15. }
  16. final DN parentDN = parsedDN.getParent();
  17. if (parentDN == null)
  18. {
  19. return null;
  20. }
  21. else
  22. {
  23. return parentDN.toString();
  24. }
  25. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves the parent DN for this entry as a string.
  3. *
  4. * @return The parent DN for this entry as a string, or {@code null} if there
  5. * is no parent.
  6. *
  7. * @throws LDAPException If the DN string cannot be parsed as a valid DN.
  8. */
  9. public final String getParentDNString()
  10. throws LDAPException
  11. {
  12. if (parsedDN == null)
  13. {
  14. parsedDN = new DN(dn, schema);
  15. }
  16. final DN parentDN = parsedDN.getParent();
  17. if (parentDN == null)
  18. {
  19. return null;
  20. }
  21. else
  22. {
  23. return parentDN.toString();
  24. }
  25. }

代码示例来源:origin: sakaiproject/sakai

  1. DN containerDN = dn.getParent();
  2. RDN[] containerRDNs = containerDN.getRDNs();
  3. for (RDN rdn : containerRDNs) {

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. return baseDN.equals(getParent());

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. return baseDN.equals(getParent());

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. /**
  2. * Retrieves the DN that the entry should have after the successful completion
  3. * of the operation.
  4. *
  5. * @return The DN that the entry should have after the successful completion
  6. * of the operation.
  7. *
  8. * @throws LDAPException If a problem occurs while trying to parse the
  9. * target DN, new RDN, or new superior DN.
  10. */
  11. public DN getNewDN()
  12. throws LDAPException
  13. {
  14. if (newSuperiorDN == null)
  15. {
  16. final DN parentDN = getParsedDN().getParent();
  17. if (parentDN == null)
  18. {
  19. return new DN(getParsedNewRDN());
  20. }
  21. else
  22. {
  23. return new DN(getParsedNewRDN(), parentDN);
  24. }
  25. }
  26. else
  27. {
  28. return new DN(getParsedNewRDN(), getParsedNewSuperiorDN());
  29. }
  30. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. /**
  2. * Retrieves the DN that the entry should have after the successful completion
  3. * of the operation.
  4. *
  5. * @return The DN that the entry should have after the successful completion
  6. * of the operation.
  7. *
  8. * @throws LDAPException If a problem occurs while trying to parse the
  9. * target DN, new RDN, or new superior DN.
  10. */
  11. public DN getNewDN()
  12. throws LDAPException
  13. {
  14. if (newSuperiorDN == null)
  15. {
  16. final DN parentDN = getParsedDN().getParent();
  17. if (parentDN == null)
  18. {
  19. return new DN(getParsedNewRDN());
  20. }
  21. else
  22. {
  23. return new DN(getParsedNewRDN(), parentDN);
  24. }
  25. }
  26. else
  27. {
  28. return new DN(getParsedNewRDN(), getParsedNewSuperiorDN());
  29. }
  30. }

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. final DN parentDN = parsedTargetDN.getParent();
  2. if (parentDN == null)

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition

  1. final DN parsedOldSuperiorDN = parsedOldDN.getParent();

代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition

  1. final DN parsedOldSuperiorDN = parsedOldDN.getParent();

相关文章