Enum Class CanvasAdapterSummaryFormat

java.lang.Object
java.lang.Enum<CanvasAdapterSummaryFormat>
com.nicholasalfonso.lato.integration.adapter.CanvasAdapterSummaryFormat
All Implemented Interfaces:
Serializable, Comparable<CanvasAdapterSummaryFormat>, Constable

public enum CanvasAdapterSummaryFormat extends Enum<CanvasAdapterSummaryFormat>
Known Canvas course metadata formats, one constant per institution. Each school's Canvas instance formats the bracketed SUMMARY metadata differently, so parsing is dispatched per-format here rather than threaded through generic "legacy vs. new" conditionals - that keeps each school's quirks contained to one place and makes it obvious which school broke when a feed fails to parse.

To support another institution, add a constant below with its own matches()/code()/section()/name()/year()/term() rules. Keep matches() implementations mutually exclusive so detection doesn't depend on declaration order.

  • Enum Constant Details

    • HCC

      public static final CanvasAdapterSummaryFormat HCC
      Hillsborough Community College (HCC). Bracket shape: "YY/TERM-CODE-SECTION NAME", e.g. "26/SU-COP-2939-15597 Computer Programming Capstone".
    • UCF

      public static final CanvasAdapterSummaryFormat UCF
      University of Central Florida (UCF). Bracket shape: "CODE-YYTerm SECTION[ NAME]" - usually no trailing NAME, e.g. "COT4210-26Fall 0001".
  • Method Details

    • values

      public static CanvasAdapterSummaryFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CanvasAdapterSummaryFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null