Examples of numSubordinates()


Examples of org.nasutekds.server.api.Backend.numSubordinates()

      Entry subBaseEntry = b.getEntry(subBase);
      if (subBaseEntry != null)
      {
        if(subtree)
        {
          long subCount = b.numSubordinates(subBase, true);
          if(subCount < 0)
          {
            return -1;
          }
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

  {
    Backend b = DirectoryServer.getBackend("ldifRoot");
    assertNotNull(b);
    assertTrue(b instanceof LDIFBackend);

    assertEquals(b.numSubordinates(DN.decode("o=ldif"), false), 1);
    assertEquals(b.numSubordinates(DN.decode("o=ldif"), true), 26);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), false), 0);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), true), 0);
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

    Backend b = DirectoryServer.getBackend("ldifRoot");
    assertNotNull(b);
    assertTrue(b instanceof LDIFBackend);

    assertEquals(b.numSubordinates(DN.decode("o=ldif"), false), 1);
    assertEquals(b.numSubordinates(DN.decode("o=ldif"), true), 26);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), false), 0);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), true), 0);
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

    assertNotNull(b);
    assertTrue(b instanceof LDIFBackend);

    assertEquals(b.numSubordinates(DN.decode("o=ldif"), false), 1);
    assertEquals(b.numSubordinates(DN.decode("o=ldif"), true), 26);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), false), 0);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), true), 0);

    try
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

    assertEquals(b.numSubordinates(DN.decode("o=ldif"), false), 1);
    assertEquals(b.numSubordinates(DN.decode("o=ldif"), true), 26);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), false), 0);
    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), true), 0);

    try
    {
      b.numSubordinates(DN.decode("ou=nonexistent,o=ldif"), false);
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

    assertEquals(b.numSubordinates(
        DN.decode("uid=user.1,ou=People,o=ldif"), true), 0);

    try
    {
      b.numSubordinates(DN.decode("ou=nonexistent,o=ldif"), false);
      fail("Expected an exception when calling numSubordinates on a " +
           "non-existent entry");
    }
    catch (DirectoryException de)
    {
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

                          backend.getBackendID().toString());
      logError(message);
      throw new DirectoryException(ResultCode.OTHER, message);
    }

    return backend.numSubordinates(baseDn, true) + 1;
  }

  /**
   * {@inheritDoc}
   */
 
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

  {
    Backend backend = DirectoryServer.getBackend(entry.getDN());

    try
    {
      long count = backend.numSubordinates(entry.getDN(), false);
      if(count >= 0)
      {
        AttributeValue value =
            AttributeValues.create(ByteString.valueOf(String.valueOf(count)),
                ByteString.valueOf(String.valueOf(count)));
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

  {
    Backend backend = DirectoryServer.getBackend(entry.getDN());

    try
    {
       return backend.numSubordinates(entry.getDN(), false) >= 0;
    }
    catch(DirectoryException de)
    {
      if (debugEnabled())
      {
View Full Code Here

Examples of org.nasutekds.server.api.Backend.numSubordinates()

  {
     Backend backend = DirectoryServer.getBackend(entry.getDN());

    try
    {
      long count = backend.numSubordinates(entry.getDN(), false);
      if(count >= 0)
      {
        return Long.parseLong(value.getNormalizedValue().toString())
            == count;
      }
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.