Package org.sonatype.nexus.configuration.model.v2_7_0

Examples of org.sonatype.nexus.configuration.model.v2_7_0.CSmtpConfiguration


   * {@link Map} to {@link List} of {@link CProps} converter, to ease handling of these thingies.
   */
  protected List<CProps> getConfigListFromMap(final Map<String, String> map) {
    final List<CProps> result = Lists.newArrayListWithExpectedSize(map.size());
    for (Map.Entry<String, String> entry : map.entrySet()) {
      final CProps cprop = new CProps();
      cprop.setKey(entry.getKey());
      cprop.setValue(entry.getValue());
      result.add(cprop);
    }
    return result;
  }
View Full Code Here


   *
   * @param conf the new model (2.7.0)
   * @see <a href="https://issues.sonatype.org/browse/NEXUS-4997">NEXUS-4997</a>
   */
  protected void updateSmtpSslTlsSettings(final Configuration conf) {
    final CSmtpConfiguration smtp = conf.getSmtpConfiguration();
    if (smtp != null) {
      if (smtp.isSslEnabled() && smtp.isTlsEnabled()) {
        smtp.setSslEnabled(true);
        smtp.setTlsEnabled(false);
        log.warn(
            "SMTP related configuration change happened: both SSL and TLS was set, updated to use SSL only, assuming that SMTP server port is set to a port where remote SMTP server accepts SSL connections.");
      }
    }
  }
View Full Code Here

    org.sonatype.nexus.configuration.model.v2_5_0.Configuration oldc =
        (org.sonatype.nexus.configuration.model.v2_5_0.Configuration) message.getConfiguration();

    BasicVersionUpgrade versionConverter = new BasicVersionUpgrade();

    Configuration newc = versionConverter.upgradeConfiguration(oldc);
    newc.setVersion(Configuration.MODEL_VERSION);

    upgradeEmptyTrashTaskConfiguration(newc);
    updateSmtpSslTlsSettings(newc);

    message.setModelVersion(Configuration.MODEL_VERSION);
View Full Code Here

      throws ConfigurationIsCorruptedException
  {
    org.sonatype.nexus.configuration.model.v2_5_0.Configuration oldc =
        (org.sonatype.nexus.configuration.model.v2_5_0.Configuration) message.getConfiguration();

    BasicVersionUpgrade versionConverter = new BasicVersionUpgrade();

    Configuration newc = versionConverter.upgradeConfiguration(oldc);
    newc.setVersion(Configuration.MODEL_VERSION);

    upgradeEmptyTrashTaskConfiguration(newc);
    updateSmtpSslTlsSettings(newc);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.configuration.model.v2_7_0.CSmtpConfiguration

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.