Examples of addValidationWarning()


Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

    }
    else {

      if (StringUtils.isEmpty(ldapServerConfiguration.getId()) && !update) {
        ValidationMessage msg = new ValidationMessage("id", "Id was generated.");
        response.addValidationWarning(msg);

        ldapServerConfiguration.setId(idGenerator.generateId());
      }
      else if (StringUtils.isEmpty(ldapServerConfiguration.getId()) && update) {
        ValidationMessage msg = new ValidationMessage("id", "Id cannot be empty.");
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

        ldapServerConfiguration.setId(idGenerator.generateId());
      }
      else if (StringUtils.isEmpty(ldapServerConfiguration.getId()) && update) {
        ValidationMessage msg = new ValidationMessage("id", "Id cannot be empty.");
        response.addValidationWarning(msg);
      }

      if (StringUtils.isEmpty(ldapServerConfiguration.getName())) {
        ValidationMessage msg = new ValidationMessage("name", "Name cannot be empty.");
        response.addValidationError(msg);
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

      String newId = idGenerator.generateId();

      ValidationMessage message =
          new ValidationMessage("id", "Fixed wrong privilege ID from '" + privilege.getId() + "' to '" + newId
              + "'");
      response.addValidationWarning(message);

      privilege.setId(newId);

      response.setModified(true);
    }
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

      response.append(validateRemoteConnectionSettings(context, model.getGlobalConnectionSettings()));
    }
    else {
      model.setGlobalConnectionSettings(new CRemoteConnectionSettings());

      response
          .addValidationWarning(
              "Global connection settings block, which is mandatory, was missing. Reset with defaults.");

      response.setModified(true);
    }
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

      response.append(validateHttpProxySettings(context, model.getHttpProxy()));
    }
    else {
      model.setHttpProxy(new CHttpProxySettings());

      response.addValidationWarning("The HTTP Proxy section was missing from configuration, defaulted it.");

      response.setModified(true);
    }

    // routing
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

      response.append(validateRouting(context, model.getRouting()));
    }
    else {
      model.setRouting(new CRouting());

      response.addValidationWarning("The routing section was missing from configuration, defaulted it.");

      response.setModified(true);
    }

    // check existing reposes and check their realms
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

    // if repo id isn't valid, nothing below here will validate properly
    else {
      if (StringUtils.isEmpty(repo.getName())) {
        repo.setName(repo.getId());

        response.addValidationWarning(new ValidationMessage("id", "Repository with ID='" + repo.getId()
            + "' has no name, defaulted to it's ID."));

        response.setModified(true);
      }
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

      response.addValidationError(new ValidationMessage("id", "Repository ID can't be 'all', reserved word"));
    }

    // Name
    if (StringUtils.isBlank(cfg.getName())) {
      response.addValidationWarning(new ValidationMessage("id", "Repository with ID='" + cfg.getId()
          + "' has no name, defaulted it's name to it's ID."));

      cfg.setName(cfg.getId());

      response.setModified(true);
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

          + LocalStatus.IN_SERVICE + "\" and \"" + LocalStatus.OUT_OF_SERVICE + "\")", e));
    }

    // indexable
    if (cfg.isIndexable() && (!"maven2".equals(cfg.getProviderHint()))) {
      response.addValidationWarning(new ValidationMessage("indexable", "Indexing isn't supported for \""
          + cfg.getProviderHint() + "\" repositories, only Maven2 repositories are indexable!"));

      cfg.setIndexable(false);

      response.setModified(true);
View Full Code Here

Examples of org.sonatype.configuration.validation.ValidationResponse.addValidationWarning()

        item.getId()))) {
      String newId = generateId();

      item.setId(newId);

      response.addValidationWarning("Fixed wrong route ID from '" + item.getId() + "' to '" + newId + "'");

      response.setModified(true);
    }

    if (StringUtils.isEmpty(item.getGroupId())) {
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.