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

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

本文整理了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

/**
 * Retrieves the parent DN for this entry.
 *
 * @return  The parent DN for this entry, or {@code null} if there is no
 *          parent.
 *
 * @throws  LDAPException  If the DN string cannot be parsed as a valid DN.
 */
public DN getParentDN()
    throws LDAPException
{
 return getParsedDN().getParent();
}

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

/**
 * Retrieves the DN of the existing entry which is the closest hierarchical
 * match to the provided DN.
 *
 * @param  dn  The DN for which to retrieve the appropriate matched DN.
 *
 * @return  The appropriate matched DN value, or {@code null} if there is
 *          none.
 */
private String getMatchedDNString(final DN dn)
{
 DN parentDN = dn.getParent();
 while (parentDN != null)
 {
  if (entryMap.containsKey(parentDN))
  {
   return parentDN.toString();
  }
  parentDN = parentDN.getParent();
 }
 return null;
}

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

/**
 * Retrieves the parent DN for this entry.
 *
 * @return  The parent DN for this entry, or {@code null} if there is no
 *          parent.
 *
 * @throws  LDAPException  If the DN string cannot be parsed as a valid DN.
 */
public DN getParentDN()
    throws LDAPException
{
 return getParsedDN().getParent();
}

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

/**
 * Retrieves the parent DN for this entry.
 *
 * @return  The parent DN for this entry, or {@code null} if there is no
 *          parent.
 *
 * @throws  LDAPException  If the DN string cannot be parsed as a valid DN.
 */
public final DN getParentDN()
    throws LDAPException
{
 if (parsedDN == null)
 {
  parsedDN = new DN(dn, schema);
 }
 return parsedDN.getParent();
}

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

/**
 * Retrieves the parent DN for this entry.
 *
 * @return  The parent DN for this entry, or {@code null} if there is no
 *          parent.
 *
 * @throws  LDAPException  If the DN string cannot be parsed as a valid DN.
 */
public final DN getParentDN()
    throws LDAPException
{
 if (parsedDN == null)
 {
  parsedDN = new DN(dn, schema);
 }
 return parsedDN.getParent();
}

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

/**
 * Retrieves the DN that is the parent for the DN with the provided string
 * representation.  Note that neither the null DN nor DNs consisting of a
 * single RDN component will be considered to have parent DNs.
 *
 * @param  s  The string representation of the DN for which to retrieve the
 *            parent.  It must not be {@code null}.
 *
 * @return  The DN that is the parent for this DN, or {@code null} if there
 *          is no parent.
 *
 * @throws  LDAPException  If the provided string cannot be parsed as a DN.
 */
public static DN getParent(final String s)
    throws LDAPException
{
 return new DN(s).getParent();
}

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

/**
 * Retrieves the string representation of 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.
 *
 * @return  The DN that is the parent for this DN, or {@code null} if there
 *          is no parent.
 */
public String getParentString()
{
 final DN parentDN = getParent();
 if (parentDN == null)
 {
  return null;
 }
 else
 {
  return parentDN.toString();
 }
}

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

/**
 * Retrieves the DN that is the parent for the DN with the provided string
 * representation.  Note that neither the null DN nor DNs consisting of a
 * single RDN component will be considered to have parent DNs.
 *
 * @param  s  The string representation of the DN for which to retrieve the
 *            parent.  It must not be {@code null}.
 *
 * @return  The DN that is the parent for this DN, or {@code null} if there
 *          is no parent.
 *
 * @throws  LDAPException  If the provided string cannot be parsed as a DN.
 */
public static DN getParent(final String s)
    throws LDAPException
{
 return new DN(s).getParent();
}

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

/**
 * Retrieves the string representation of 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.
 *
 * @return  The DN that is the parent for this DN, or {@code null} if there
 *          is no parent.
 */
public String getParentString()
{
 final DN parentDN = getParent();
 if (parentDN == null)
 {
  return null;
 }
 else
 {
  return parentDN.toString();
 }
}

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

if (e == null)
 d = d.getParent();
 if (d == null)

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

/**
 * Retrieves the parent DN for this entry as a string.
 *
 * @return  The parent DN for this entry as a string, or {@code null} if there
 *          is no parent.
 *
 * @throws  LDAPException  If the DN string cannot be parsed as a valid DN.
 */
public final String getParentDNString()
    throws LDAPException
{
 if (parsedDN == null)
 {
  parsedDN = new DN(dn, schema);
 }
 final DN parentDN = parsedDN.getParent();
 if (parentDN == null)
 {
  return null;
 }
 else
 {
  return parentDN.toString();
 }
}

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

/**
 * Retrieves the parent DN for this entry as a string.
 *
 * @return  The parent DN for this entry as a string, or {@code null} if there
 *          is no parent.
 *
 * @throws  LDAPException  If the DN string cannot be parsed as a valid DN.
 */
public final String getParentDNString()
    throws LDAPException
{
 if (parsedDN == null)
 {
  parsedDN = new DN(dn, schema);
 }
 final DN parentDN = parsedDN.getParent();
 if (parentDN == null)
 {
  return null;
 }
 else
 {
  return parentDN.toString();
 }
}

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

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

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

return baseDN.equals(getParent());

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

return baseDN.equals(getParent());

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

/**
 * Retrieves the DN that the entry should have after the successful completion
 * of the operation.
 *
 * @return  The DN that the entry should have after the successful completion
 *          of the operation.
 *
 * @throws  LDAPException  If a problem occurs while trying to parse the
 *                         target DN, new RDN, or new superior DN.
 */
public DN getNewDN()
    throws LDAPException
{
 if (newSuperiorDN == null)
 {
  final DN parentDN = getParsedDN().getParent();
  if (parentDN == null)
  {
   return new DN(getParsedNewRDN());
  }
  else
  {
   return new DN(getParsedNewRDN(), parentDN);
  }
 }
 else
 {
  return new DN(getParsedNewRDN(), getParsedNewSuperiorDN());
 }
}

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

/**
 * Retrieves the DN that the entry should have after the successful completion
 * of the operation.
 *
 * @return  The DN that the entry should have after the successful completion
 *          of the operation.
 *
 * @throws  LDAPException  If a problem occurs while trying to parse the
 *                         target DN, new RDN, or new superior DN.
 */
public DN getNewDN()
    throws LDAPException
{
 if (newSuperiorDN == null)
 {
  final DN parentDN = getParsedDN().getParent();
  if (parentDN == null)
  {
   return new DN(getParsedNewRDN());
  }
  else
  {
   return new DN(getParsedNewRDN(), parentDN);
  }
 }
 else
 {
  return new DN(getParsedNewRDN(), getParsedNewSuperiorDN());
 }
}

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

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

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

final DN  parsedOldSuperiorDN = parsedOldDN.getParent();

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

final DN  parsedOldSuperiorDN = parsedOldDN.getParent();

相关文章