Tabnine Logo
ValidationIssue
Code IndexAdd Tabnine to your IDE (free)

How to use
ValidationIssue
in
colesico.framework.validation

Best Java code snippets using colesico.framework.validation.ValidationIssue (Showing top 4 results out of 315)

origin: net.colesico.framework/colesico-validation

public void addSubissue(ValidationIssue subissue) {
  subissues.put(subissue.getSubject(), subissue);
}
origin: net.colesico.framework/colesico-htmlrenderer

private void buildValidationMessages(ValidationIssue issue, String superKey) {
  String key;
  if (StringUtils.isEmpty(superKey)) {
    key = issue.getSubject();
  } else {
    key = superKey + '.' + issue.getSubject();
  }
  for (Map.Entry<String, ValidationIssue> entry : issue.getSubissues().entrySet()) {
    buildValidationMessages(entry.getValue(), key);
  }
  if (issue.hasErrors()) {
    List<String> msgs = new ArrayList<>();
    for (ValidationError ve : issue.getErrors()) {
      msgs.add(ve.getMessage());
    }
    String msg = StringUtils.join(msgs, "; ");
    String msgKey = StringUtils.isEmpty(key) ? VALIDATION_KEY : key;
    messages.put(msgKey, msg);
  }
}
origin: net.colesico.framework/colesico-validation

protected ValidationIssue exportErrors() {
  ValidationIssue issue = new ValidationIssue(getSubject());
  for (ValidationContext childContext : childContexts) {
    ValidationIssue childIssue = childContext.exportErrors();
    if (childIssue != null) {
      issue.addSubissue(childIssue);
    }
  }
  if (hasErrors()) {
    // export errors
    for (ValidationError error : this.errors) {
      issue.addError(error);
    }
    return issue;
  } else if (issue.hasSubissues()) {
    return issue;
  }
  return null;
}
origin: net.colesico.framework/colesico-validation

  @Override
  public String toString() {
    StringBuilder eb = new StringBuilder();
    for (ValidationError e : errors) {
      eb.append(e.toString()).append(",\n");
    }

    StringBuilder ib = new StringBuilder();
    for (ValidationIssue vi : subissues.values()) {
      ib.append(vi.toString()).append(",\n");
    }

    return "ValidationIssue : {" +
        "  subject: '" + subject + "',\n" +
        "  errors: {\n" +
        eb.toString() +
        "  \n},\n" +
        "  subissues: {\n" +
        ib.toString() +
        "  \n}\n" +
        '}';
  }
}
colesico.framework.validationValidationIssue

Most used methods

  • getSubject
  • <init>
  • addError
  • addSubissue
  • getErrors
  • getSubissues
  • hasErrors
  • hasSubissues
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now