Examples of addValidationError()


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

  {
    ValidationResponse response = new ValidationResponse();

    if (StringUtils.isEmpty(userAndGroupAuthConf.getUserIdAttribute())) {
      ValidationMessage msg = new ValidationMessage("userIdAttribute", "User ID Attribute cannot be empty.");
      response.addValidationError(msg);
    }
    if (StringUtils.isEmpty(userAndGroupAuthConf.getUserObjectClass())) {
      ValidationMessage msg = new ValidationMessage("userObjectClass", "User Object Class cannot be empty.");
      response.addValidationError(msg);
    }
View Full Code Here

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

      ValidationMessage msg = new ValidationMessage("userIdAttribute", "User ID Attribute cannot be empty.");
      response.addValidationError(msg);
    }
    if (StringUtils.isEmpty(userAndGroupAuthConf.getUserObjectClass())) {
      ValidationMessage msg = new ValidationMessage("userObjectClass", "User Object Class cannot be empty.");
      response.addValidationError(msg);
    }
    if (StringUtils.isEmpty(userAndGroupAuthConf.getUserRealNameAttribute())) {
      ValidationMessage msg = new ValidationMessage(
          "userRealNameAttribute",
          "User Real Name Attribute cannot be empty.");
View Full Code Here

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

    }
    if (StringUtils.isEmpty(userAndGroupAuthConf.getUserRealNameAttribute())) {
      ValidationMessage msg = new ValidationMessage(
          "userRealNameAttribute",
          "User Real Name Attribute cannot be empty.");
      response.addValidationError(msg);
    }
    if (StringUtils.isEmpty(userAndGroupAuthConf.getEmailAddressAttribute())) {
      ValidationMessage msg = new ValidationMessage(
          "emailAddressAttribute",
          "Email Address Attribute cannot be empty.");
View Full Code Here

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

    }
    if (StringUtils.isEmpty(userAndGroupAuthConf.getEmailAddressAttribute())) {
      ValidationMessage msg = new ValidationMessage(
          "emailAddressAttribute",
          "Email Address Attribute cannot be empty.");
      response.addValidationError(msg);
    }

    if (userAndGroupAuthConf.isLdapGroupsAsRoles()
        && StringUtils.isEmpty(userAndGroupAuthConf.getUserMemberOfAttribute())) {
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupIdAttribute())) {
View Full Code Here

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

        && StringUtils.isEmpty(userAndGroupAuthConf.getUserMemberOfAttribute())) {
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupIdAttribute())) {
        ValidationMessage msg = new ValidationMessage(
            "groupIdAttribute",
            "Group ID Attribute cannot be empty when Use LDAP Groups as Roles is true.");
        response.addValidationError(msg);
      }
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupMemberAttribute())) {
        ValidationMessage msg = new ValidationMessage(
            "groupMemberAttribute",
            "Group Member Attribute cannot be empty when Use LDAP Groups as Roles is true.");
View Full Code Here

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

      }
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupMemberAttribute())) {
        ValidationMessage msg = new ValidationMessage(
            "groupMemberAttribute",
            "Group Member Attribute cannot be empty when Use LDAP Groups as Roles is true.");
        response.addValidationError(msg);
      }
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupMemberFormat())) {
        ValidationMessage msg = new ValidationMessage(
            "groupMemberFormat",
            "Group Member Format cannot be empty when Use LDAP Groups as Roles is true.");
View Full Code Here

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

      }
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupMemberFormat())) {
        ValidationMessage msg = new ValidationMessage(
            "groupMemberFormat",
            "Group Member Format cannot be empty when Use LDAP Groups as Roles is true.");
        response.addValidationError(msg);
      }
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupObjectClass())) {
        ValidationMessage msg = new ValidationMessage(
            "groupObjectClass",
            "Group Object Class cannot be empty when Use LDAP Groups as Roles is true.");
View Full Code Here

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

      }
      if (StringUtils.isEmpty(userAndGroupAuthConf.getGroupObjectClass())) {
        ValidationMessage msg = new ValidationMessage(
            "groupObjectClass",
            "Group Object Class cannot be empty when Use LDAP Groups as Roles is true.");
        response.addValidationError(msg);
      }
    }
    return response;
  }
View Full Code Here

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

    if (proposedOrder.size() != actualServerIds.size() || !proposedOrder.containsAll(actualServerIds)) {
      ValidationMessage msg = new ValidationMessage(
          "*",
          "Invalid order, the propsed order contains different elements then the actual order: propsed: " +
              proposedOrder + ", actual: " + actualServerIds);
      response.addValidationError(msg);
    }

    return response;
  }
}
View Full Code Here

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

    }

    if (StringUtils.isEmpty(repositoryTargetId)) {
      ValidationMessage message = new ValidationMessage("repositoryTargetId", "Privilege ID '"
          + privilege.getId() + "' requires a repositoryTargetId.", "Repository Target is required.");
      response.addValidationError(message);
    }

    if (!StringUtils.isEmpty(repositoryId) && !StringUtils.isEmpty(repositoryGroupId)) {
      ValidationMessage message = new ValidationMessage(
          "repositoryId",
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.