Class LicenseRefusal

All Implemented Interfaces:
Serializable

public final class LicenseRefusal extends Exception
A licence document or key certificate the LicenseVerifier refuses: the step of LICENSE-V2-DESIGN.md section 2.5 that failed and the reason. The message names the step and the rule and NEVER a byte of the document, so it is safe to log: "failures are logged naming the step, never the document bytes" (2.5). A document failing only step 5 (expiry) is not refused; it is returned as expired.
Author:
Christopher Mindus
See Also:
  • Constructor Details

    • LicenseRefusal

      public LicenseRefusal(LicenseRefusal.Step step, String reason)
      Constructor.
      Parameters:
      step - The step that refused.
      reason - The reason: the rule, never a byte of the document.
  • Method Details

    • getStep

      public LicenseRefusal.Step getStep()
      Gets the step that refused.
      Returns:
      The step.
    • getReason

      public String getReason()
      Gets the reason.
      Returns:
      The reason, without the step.