Class OrganizationLinkerService
java.lang.Object
edu.ucsb.cs156.frontiers.services.OrganizationLinkerService
-
Constructor Summary
ConstructorsConstructorDescriptionOrganizationLinkerService
(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) -
Method Summary
Modifier and TypeMethodDescriptiongetOrgName
(String installation_id) Provides the name of the organization attached to a particular installation IDReturns the URL for a redirect to install Frontiersvoid
unenrollOrganization
(Course course) Removes the Frontiers installation from the linked GitHub org
-
Constructor Details
-
OrganizationLinkerService
public OrganizationLinkerService(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
-
-
Method Details
-
getRedirectUrl
public String getRedirectUrl() throws NoSuchAlgorithmException, InvalidKeySpecException, com.fasterxml.jackson.core.JsonProcessingExceptionReturns the URL for a redirect to install Frontiers- Returns:
- URL to install Frontiers to an organization
- Throws:
NoSuchAlgorithmException
InvalidKeySpecException
com.fasterxml.jackson.core.JsonProcessingException
-
getOrgName
public String getOrgName(String installation_id) throws NoSuchAlgorithmException, InvalidKeySpecException, com.fasterxml.jackson.core.JsonProcessingException Provides the name of the organization attached to a particular installation ID- Parameters:
installation_id
- ID of the app installation- Returns:
- name of the organization attached to the installation
- Throws:
NoSuchAlgorithmException
InvalidKeySpecException
com.fasterxml.jackson.core.JsonProcessingException
-
unenrollOrganization
public void unenrollOrganization(Course course) throws NoSuchAlgorithmException, InvalidKeySpecException Removes the Frontiers installation from the linked GitHub org- Parameters:
course
- The entity for the course about to be deleted- Throws:
NoSuchAlgorithmException
InvalidKeySpecException
-