Package com.gitblit.service

Examples of com.gitblit.service.LdapSyncService


    }
    return sb.toString();
  }

  private void configureSyncService() {
    LdapSyncService ldapSyncService = new LdapSyncService(settings, this);
    if (ldapSyncService.isReady()) {
      long ldapSyncPeriod = getSynchronizationPeriodInMilliseconds();
      int delay = 1;
      logger.info("Ldap sync service will update users and groups every {} minutes.", ldapSyncPeriod);
      scheduledExecutorService.scheduleAtFixedRate(ldapSyncService, delay, ldapSyncPeriod,  TimeUnit.MILLISECONDS);
    } else {
View Full Code Here


    }
    return sb.toString();
  }

  private void configureSyncService() {
    LdapSyncService ldapSyncService = new LdapSyncService(settings, this);
    if (ldapSyncService.isReady()) {
      long ldapSyncPeriod = getSynchronizationPeriodInMilliseconds();
      int delay = 1;
      logger.info("Ldap sync service will update users and groups every {} minutes.", ldapSyncPeriod);
      scheduledExecutorService.scheduleAtFixedRate(ldapSyncService, delay, ldapSyncPeriod,  TimeUnit.MILLISECONDS);
    } else {
View Full Code Here

    settings = getSettings();
  }

  @Test
  public void defaultOfUnAvailableLdapSynchronizeKeyIsLdapServiceNotReady() {
    LdapSyncService ldapSyncService = new LdapSyncService(settings, null);
    assertFalse("When key " + Keys.realm.ldap.synchronize + " is not configured ldap sync is not ready." , ldapSyncService.isReady());
  }
View Full Code Here

    assertFalse("When key " + Keys.realm.ldap.synchronize + " is not configured ldap sync is not ready." , ldapSyncService.isReady());
  }

  @Test
  public void whenLdapSynchronizeKeyIsFalseLdapServiceNotReady() {
    LdapSyncService ldapSyncService = new LdapSyncService(settings, null);
    settings.put(Keys.realm.ldap.synchronize, "false");
    assertFalse("When key " + Keys.realm.ldap.synchronize + " is configured with value false ldap sync is not ready." , ldapSyncService.isReady());
  }
View Full Code Here

    assertFalse("When key " + Keys.realm.ldap.synchronize + " is configured with value false ldap sync is not ready." , ldapSyncService.isReady());
  }

  @Test
  public void whenLdapSynchronizeKeyIsTrueLdapServiceIsReady() {
    LdapSyncService ldapSyncService = new LdapSyncService(settings, null);
    settings.put(Keys.realm.ldap.synchronize, "true");
    assertTrue("When key " + Keys.realm.ldap.synchronize + " is configured with value true ldap sync is not ready." , ldapSyncService.isReady());
  }
View Full Code Here

TOP

Related Classes of com.gitblit.service.LdapSyncService

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.