Class PullController


  • @RestController("pullController")
    @RequestMapping(path="api/pull",
                    produces="application/json")
    public class PullController
    extends org.apereo.cas.mgmt.controller.AbstractVersionControlController
    Controller to handle pull requests.
    Since:
    6.0
    • Field Summary

      • Fields inherited from class org.apereo.cas.mgmt.controller.AbstractVersionControlController

        casUserProfileFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      PullController​(org.apereo.cas.mgmt.factory.RepositoryFactory repositoryFactory, org.apereo.cas.mgmt.authentication.CasUserProfileFactory casUserProfileFactory, org.apereo.cas.configuration.CasManagementConfigurationProperties managementProperties, org.apereo.cas.notifications.CommunicationsManager communicationsManager)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void acceptChange​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apereo.cas.mgmt.domain.BranchActionData acception)
      Method will merge the submitted pull request into the services-repo.
      java.util.List<org.apereo.cas.mgmt.domain.BranchData> branches​(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, boolean[] options)
      Method will create a list of branches that have been submitted by users to be merged into the services-repo.
      void rejectChange​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apereo.cas.mgmt.domain.BranchActionData rejection)
      Method will mark the submitted pull request as being rejected by an admin.
      • Methods inherited from class org.apereo.cas.mgmt.controller.AbstractVersionControlController

        isAdministrator, isAdministrator, isUser, isUser
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PullController

        public PullController​(org.apereo.cas.mgmt.factory.RepositoryFactory repositoryFactory,
                              org.apereo.cas.mgmt.authentication.CasUserProfileFactory casUserProfileFactory,
                              org.apereo.cas.configuration.CasManagementConfigurationProperties managementProperties,
                              org.apereo.cas.notifications.CommunicationsManager communicationsManager)
    • Method Detail

      • branches

        @PostMapping
        public java.util.List<org.apereo.cas.mgmt.domain.BranchData> branches​(javax.servlet.http.HttpServletResponse response,
                                                                              javax.servlet.http.HttpServletRequest request,
                                                                              @RequestBody
                                                                              boolean[] options)
                                                                       throws org.apereo.cas.mgmt.exception.VersionControlException
        Method will create a list of branches that have been submitted by users to be merged into the services-repo.
        Parameters:
        response - - HttpServletResponse
        request - - HttpsServletRequest
        options - - List of Branch statuses filter the returned branches by
        Returns:
        - List of BranchData
        Throws:
        org.apereo.cas.mgmt.exception.VersionControlException - - failed
      • acceptChange

        @PostMapping(value="/accept",
                     consumes="application/json")
        @ResponseStatus(OK)
        public void acceptChange​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 @RequestBody
                                 org.apereo.cas.mgmt.domain.BranchActionData acception)
                          throws org.apereo.cas.mgmt.exception.VersionControlException
        Method will merge the submitted pull request into the services-repo.
        Parameters:
        request - - HttpServletRequest
        response - - HttpServletResponse
        acception - - BranchActionData
        Throws:
        org.apereo.cas.mgmt.exception.VersionControlException - - failed
      • rejectChange

        @PostMapping(value="/reject",
                     consumes="application/json")
        public void rejectChange​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 @RequestBody
                                 org.apereo.cas.mgmt.domain.BranchActionData rejection)
                          throws org.apereo.cas.mgmt.exception.VersionControlException
        Method will mark the submitted pull request as being rejected by an admin.
        Parameters:
        request - - HttpServletRequest
        response - - HttpServletResponse
        rejection - - BranchActionData
        Throws:
        org.apereo.cas.mgmt.exception.VersionControlException - - failed