Package org.nasutekds.server.protocols.internal

Examples of org.nasutekds.server.protocols.internal.InternalClientConnection


            .append(FILTER_CIPHER_KEY_LENGTH)
            .append(")").toString();
    final LinkedHashSet<String> requestedAttributes
            = new LinkedHashSet<String>();
    requestedAttributes.add("dn");
    final InternalClientConnection icc
            = InternalClientConnection.getRootConnection();
    InternalSearchOperation searchOp = icc.processSearch(
            baseDN,
            SearchScope.SINGLE_LEVEL,
            DereferencePolicy.NEVER_DEREF_ALIASES,
            /* size limit */ 0, /* time limit */ 0,
            /* types only */ false,
View Full Code Here


    AttributeBuilder builder = new AttributeBuilder(attrType, attrTypeString);
    for(String valString : attrValStrings) {
      builder.add(valString);
    }
    mods.add(new Modification(ModificationType.REPLACE, builder.toAttribute()));
    InternalClientConnection conn =
            InternalClientConnection.getRootConnection();
    conn.processModify(dn, mods);
  }
View Full Code Here

    for(String attrTypeString : attrTypeStrings) {
      AttributeType attrType = getAttrType(attrTypeString);
      mods.add(new Modification(ModificationType.DELETE,
          Attributes.empty(attrType)));
    }
    InternalClientConnection conn =
            InternalClientConnection.getRootConnection();
    conn.processModify(dn, mods);
  }
View Full Code Here

      attrType = DirectoryServer.getDefaultAttributeType(attrTypeString);
    return attrType;
  }

  private void deleteEntries(String... dns) throws Exception{
    InternalClientConnection conn =
                                 InternalClientConnection.getRootConnection();
    for(String dn : dns) {
         DeleteOperation op=conn.processDelete(DN.decode(dn));
       assertEquals(op.getResultCode(), ResultCode.SUCCESS);
    }
  }
View Full Code Here



  private void deleteSubtree(String... dns) throws Exception
  {
    InternalClientConnection conn = InternalClientConnection
        .getRootConnection();

    SubtreeDeleteControl control = new SubtreeDeleteControl(true);
    List<Control> controls = new ArrayList<Control>(1);
    controls.add(control);

    for (String dn : dns)
    {
      DeleteOperation op = conn.processDelete(DN.decode(dn), controls);
      assertEquals(op.getResultCode(), ResultCode.SUCCESS);
    }
  }
View Full Code Here

                                     String attr,
                                     String... dns)
          throws Exception {
    AttributeType type= getAttrType(attr);
    String filterStr="(" + attr + "=*)";
    InternalClientConnection conn =
            InternalClientConnection.getRootConnection();
    InternalSearchOperation operation = conn.processSearch(DN.decode(entryDN),
            SearchScope.BASE_OBJECT,
            DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false,
            SearchFilter.createFilterFromString(filterStr),
            null);
    for (SearchResultEntry entry : operation.getSearchEntries()) {
View Full Code Here

   *
   * @throws Exception If an unexpected result happens.
   *
   */
  private void addEntries(String... dns) throws Exception {
        InternalClientConnection conn =
         InternalClientConnection.getRootConnection();
    for(String dn : dns) {
      Entry e=makeEntry(dn);
      AddOperation op=conn.processAdd(e);
      assertEquals(op.getResultCode(), ResultCode.SUCCESS);
    }
  }
View Full Code Here

         "objectClass: inetOrgPerson",
         "cn: Test User",
         "givenName: Test",
         "sn: User");

    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();
    AddOperation addOperation =
         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    String keyStorePath   = DirectoryServer.getInstanceRoot() + File.separator +
View Full Code Here

         "objectClass: inetOrgPerson",
         "cn: Test User",
         "givenName: Test",
         "sn: User");

    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();
    AddOperation addOperation =
         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    String keyStorePath   = DirectoryServer.getInstanceRoot() + File.separator +
View Full Code Here

         "cn: Test User",
         "userPassword: password",
         "ds-pwp-password-policy-dn: cn=Clear UserPassword Policy," +
              "cn=Password Policies,cn=config");

    InternalClientConnection conn =
         InternalClientConnection.getRootConnection();
    AddOperation addOperation =
         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    String[] args =
View Full Code Here

TOP

Related Classes of org.nasutekds.server.protocols.internal.InternalClientConnection

Copyright © 2018 www.massapicom. 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.