Examples of RootCfgClient


Examples of org.nasutekds.server.admin.std.client.RootCfgClient

        sb.append(" "+CommandBuilder.escapeValue(arg));
      }

      ManagementContext mCtx = LDAPManagementContext.createFromContext(
          JNDIDirContextAdaptor.adapt(ctx));
      RootCfgClient root = mCtx.getRootConfiguration();
      LocalDBBackendCfgClient backend =
        (LocalDBBackendCfgClient)root.getBackend(backendName);
      LocalDBIndexCfgClient index = backend.getLocalDBIndex(attributeName);
      if (!indexTypes.equals(indexToModify.getTypes()))
      {
        index.setIndexType(indexTypes);
      }
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

    private void createIndex(InitialLdapContext ctx) throws OpenDsException
    {
      ManagementContext mCtx = LDAPManagementContext.createFromContext(
          JNDIDirContextAdaptor.adapt(ctx));
      RootCfgClient root = mCtx.getRootConfiguration();
      LocalDBBackendCfgClient backend =
        (LocalDBBackendCfgClient)root.getBackend(backendName.getText());
      LocalDBVLVIndexCfgDefn provider = LocalDBVLVIndexCfgDefn.getInstance();
      LocalDBVLVIndexCfgClient index =
        backend.createLocalDBVLVIndex(provider, name.getText(), null);

      index.setFilter(filter.getText().trim());
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

      child.addChangeListener(cl);

      // Now attempt to disable the referenced connection handler.
      // This should fail.
      try {
        RootCfgClient root = TestCaseUtils.getRootConfiguration();
        ConnectionHandlerCfgClient client = root
            .getConnectionHandler(TEST_CONNECTION_HANDLER_NAME);
        client.setEnabled(false);
        client.commit();
        Assert.fail("Successfully disabled a referenced component");
      } catch (OperationRejectedException e) {
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

  private void createConnectionHandler(boolean enabled) throws Exception {
    ServerSocket freeSocket = TestCaseUtils.bindFreePort();
    int freePort = freeSocket.getLocalPort();
    freeSocket.close();

    RootCfgClient root = TestCaseUtils.getRootConfiguration();
    LDAPConnectionHandlerCfgClient client = root.createConnectionHandler(
        LDAPConnectionHandlerCfgDefn.getInstance(),
        TEST_CONNECTION_HANDLER_NAME, null);
    client.setEnabled(enabled);
    client.setListenPort(freePort);
    client.commit();
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient



  // Deletes the test connection handler after testing.
  private void deleteConnectionHandler() throws Exception {
    RootCfgClient root = TestCaseUtils.getRootConfiguration();
    root.removeConnectionHandler(TEST_CONNECTION_HANDLER_NAME);
  }
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

      }
    });

    ManagementContext mCtx = LDAPManagementContext.createFromContext(
        JNDIDirContextAdaptor.adapt(getInfo().getDirContext()));
    RootCfgClient root = mCtx.getRootConfiguration();
    LocalDBBackendCfgClient backend =
      (LocalDBBackendCfgClient)root.getBackend(backendName);

    if (backend.isEnabled() != enable)
    {
      backend.setEnabled(enable);
      backend.commit();
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

  {
    try
    {
      ManagementContext mCtx = LDAPManagementContext.createFromContext(
          JNDIDirContextAdaptor.adapt(ctx));
      RootCfgClient root = mCtx.getRootConfiguration();
      ReplicationSynchronizationProviderCfgClient sync =
        (ReplicationSynchronizationProviderCfgClient)
        root.getSynchronizationProvider("Multimaster Synchronization");
      if (sync.hasReplicationServer())
      {
        ReplicationServerCfgClient replicationServer =
          sync.getReplicationServer();
        Set<String> replServers = replicationServer.getReplicationServer();
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

    private void createBackend(InitialLdapContext ctx, String backendName,
        String baseDN) throws OpenDsException
    {
      ManagementContext mCtx = LDAPManagementContext.createFromContext(
          JNDIDirContextAdaptor.adapt(ctx));
      RootCfgClient root = mCtx.getRootConfiguration();
      LocalDBBackendCfgDefn provider = LocalDBBackendCfgDefn.getInstance();
      LocalDBBackendCfgClient backend = root.createBackend(provider,
          backendName, null);
      backend.setEnabled(true);
      Set<DN> baseDNs = new HashSet<DN>();
      baseDNs.add(DN.decode(baseDN));
      backend.setBaseDN(baseDNs);
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

    private void addBaseDN(InitialLdapContext ctx, String backendName,
        String baseDN) throws OpenDsException
    {
      ManagementContext mCtx = LDAPManagementContext.createFromContext(
          JNDIDirContextAdaptor.adapt(ctx));
      RootCfgClient root = mCtx.getRootConfiguration();
      LocalDBBackendCfgClient backend =
        (LocalDBBackendCfgClient)root.getBackend(backendName);

      Set<DN> baseDNs = backend.getBaseDN();
      DN dn = DN.decode(baseDN);
      baseDNs.add(dn);
      backend.setBaseDN(baseDNs);
View Full Code Here

Examples of org.nasutekds.server.admin.std.client.RootCfgClient

  private void deleteIndex(InitialLdapContext ctx,
      AbstractIndexDescriptor index) throws OpenDsException
  {
    ManagementContext mCtx = LDAPManagementContext.createFromContext(
        JNDIDirContextAdaptor.adapt(ctx));
    RootCfgClient root = mCtx.getRootConfiguration();
    LocalDBBackendCfgClient backend =
      (LocalDBBackendCfgClient)root.getBackend(
          index.getBackend().getBackendID());
    if (isVLVIndex(index))
    {
      backend.removeLocalDBVLVIndex(index.getName());
    }
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.