Class SyncService

java.lang.Object
com.nicholasalfonso.lato.service.SyncService

@Service public class SyncService extends Object
Service for synchronizing course and assignment data from LMS providers via iCalendar feeds.
  • Constructor Details

    • SyncService

      public SyncService(IntegrationRepository integrationRepository, ICSDownloader iCSDownloader, LMSAdapterRegistry lMSAdapterRegistry, CourseRepository courseRepository, AssignmentRepository assignmentRepository)
      Creates the sync service with required repositories and adapter registry.
      Parameters:
      integrationRepository - repository for integration access
      iCSDownloader - downloader for iCalendar feed retrieval
      lMSAdapterRegistry - registry for LMS adapter resolution
      courseRepository - repository for course persistence
      assignmentRepository - repository for assignment persistence
  • Method Details

    • syncUserIntegrations

      @Transactional public void syncUserIntegrations(User user)
      Synchronizes all LMS integrations for the given user.
      Parameters:
      user - the user whose integrations should be synced
    • syncIntegration

      @Transactional public ImportedResponse syncIntegration(Integration integration)
      Synchronizes a single LMS integration with the LMS provider.
      Parameters:
      integration - the integration to sync
      Returns:
      response containing imported courses and assignments
    • updateAssignments

      public Set<ImportedAssignment> updateAssignments(Integration integration, Set<ImportedAssignment> importedAssignments)
      Updates the assignments for a given integration.
      Parameters:
      integration - The integration for which to update assignments.
      importedAssignments - The set of imported assignments to update.
      Returns:
      The updated set of imported assignments.