Class CanvasAdapter

java.lang.Object
com.nicholasalfonso.lato.integration.adapter.CanvasAdapter
All Implemented Interfaces:
LMSAdapter

@Component public class CanvasAdapter extends Object implements LMSAdapter
Adapter that parses Canvas iCalendar feeds into course and assignment models. Extracts metadata from Canvas-specific calendar entry formats.
  • Constructor Details

    • CanvasAdapter

      public CanvasAdapter()
  • Method Details

    • getProvider

      public Integration.LMSProvider getProvider()
      Description copied from interface: LMSAdapter
      Returns the LMS provider handled by this adapter.
      Specified by:
      getProvider in interface LMSAdapter
      Returns:
      the provider enum value for this adapter
    • getCourses

      public Set<ImportedCourse> getCourses(String feed)
      Description copied from interface: LMSAdapter
      Parses course records from the given iCalendar feed content.
      Specified by:
      getCourses in interface LMSAdapter
      Parameters:
      feed - the raw iCalendar feed content
      Returns:
      imported courses extracted from the feed
    • getAssignments

      public Set<ImportedAssignment> getAssignments(String feed)
      Description copied from interface: LMSAdapter
      Parses assignment records from the given iCalendar feed content.
      Specified by:
      getAssignments in interface LMSAdapter
      Parameters:
      feed - the raw iCalendar feed content
      Returns:
      imported assignments extracted from the feed
    • supports

      public boolean supports(String feed)
      Description copied from interface: LMSAdapter
      Determines whether this adapter can parse the given feed content.
      Specified by:
      supports in interface LMSAdapter
      Parameters:
      feed - the raw iCalendar feed content
      Returns:
      true if this adapter supports the feed format