Class SubmitController


  • @RestController("submitController")
    @RequestMapping(path="api/submit",
                    produces="application/json")
    public class SubmitController
    extends java.lang.Object
    Controller to handle submit requests.
    Since:
    6.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void revertSubmit​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String branchName)
      Method will revert a submitted pull request from a user's repository if it has been rejected by an admin.
      void submitPull​(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, java.lang.String msg)
      Method commits the working dir of the user and creates a submit branch that is made into a pull request.
      java.util.List<org.apereo.cas.mgmt.domain.BranchData> submits​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Method will create and return a list of branches that have been submitted as pull request by users.
      • Methods inherited from class java.lang.Object

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

      • SubmitController

        public SubmitController()
    • Method Detail

      • submitPull

        @PostMapping
        public void submitPull​(javax.servlet.http.HttpServletResponse response,
                               javax.servlet.http.HttpServletRequest request,
                               @RequestBody
                               java.lang.String msg)
        Method commits the working dir of the user and creates a submit branch that is made into a pull request.
        Parameters:
        response - - HttpServletResponse
        request - - HttpServletRequest
        msg - - message from user
      • submits

        @GetMapping
        public java.util.List<org.apereo.cas.mgmt.domain.BranchData> submits​(javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
        Method will create and return a list of branches that have been submitted as pull request by users.
        Parameters:
        request - - HttpServletRequest
        response - - HttpServletResponse
        Returns:
        - List of BranchData
      • revertSubmit

        @GetMapping("revert/{bracnch}")
        @ResponseStatus(OK)
        public void revertSubmit​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 @PathVariable
                                 java.lang.String branchName)
        Method will revert a submitted pull request from a user's repository if it has been rejected by an admin.
        Parameters:
        request - - HttpServletRequest
        response - - HttpServletResponse
        branchName - - Name of the pull requet