Package com.sonatype.security.ldap.persist

Examples of com.sonatype.security.ldap.persist.LdapConfigurationSource.load()


    LdapConfigurationSource source = this.lookup(LdapConfigurationSource.class);
    try {
      // Note: This test original also used configuration source, but it does not validate anymore
      // it is done by manager. Hence, validatio code added here below
      final CLdapConfiguration conf = source.load();
      final ValidationResponse vr = lookup(LdapConfigurationValidator.class).validateModel(new ValidationRequest<CLdapConfiguration>(conf));
      if (!vr.isValid()) {
        throw new InvalidConfigurationException(vr);
      }
    }
View Full Code Here


    File testSecConfigFile = new File(ldapXml.getParentFile(), "security-configuration.xml");
    File inplaceSecConfigFile = new File(getSecurityConfiguration());
    FileUtils.copyFile(testSecConfigFile, inplaceSecConfigFile);

    LdapConfigurationSource source = this.lookup(LdapConfigurationSource.class);
    final CLdapConfiguration configuration = source.load();
    Assert.assertEquals("secret", configuration.getServers().get(0).getConnectionInfo().getSystemPassword());

    // get upgraded file as String
    String upgradeResult = FileUtils.readFileToString(inplaceLdapXml);
    String expected = FileUtils.readFileToString(ldapResultXml);
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.