Class UCSBCurriculumService

java.lang.Object
edu.ucsb.cs156.courses.services.UCSBCurriculumService

@Service public class UCSBCurriculumService extends Object
Service object that wraps the UCSB Academic Curriculum API
  • Field Details

  • Constructor Details

    • UCSBCurriculumService

      public UCSBCurriculumService(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
  • Method Details

    • getJSON

      public String getJSON(String subjectArea, String quarter, String courseLevel)
    • getConvertedSections

      public List<ConvertedSection> getConvertedSections(String subjectArea, String quarter, String courseLevel) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getSectionJSON

      public String getSectionJSON(String subjectArea, String quarter, String courseLevel) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getSubjectsJSON

      public String getSubjectsJSON()
    • getSection

      public String getSection(String enrollCode, String quarter)
      This method retrieves exactly one section matching the enrollCode and quarter arguments, if such a section exists.
    • getAllSections

      public String getAllSections(String enrollCode, String quarter)
      This method retrieves all of the sections related to a certain enroll code. For example, if the enrollCode is for a discussion section, the lecture section and all related discussion sections will also be returned.
    • getJSONbyQtrEnrollCd

      public String getJSONbyQtrEnrollCd(String quarter, String enrollCd)