Class BoardsApi

  • All Implemented Interfaces:
    org.gitlab4j.models.Constants

    public class BoardsApi
    extends AbstractApi
    This class implements the client side API for the GitLab Issue Boards API calls. NOTE: If a user is not a member of a group and the group is private, a GET request on that group will result to a 404 status code.
    See Also:
    GitLab Issue Boards API Documentaion
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.gitlab4j.models.Constants

        org.gitlab4j.models.Constants.ActionType, org.gitlab4j.models.Constants.ApplicationScope, org.gitlab4j.models.Constants.ArchiveFormat, org.gitlab4j.models.Constants.AutoDevopsDeployStrategy, org.gitlab4j.models.Constants.BuildGitStrategy, org.gitlab4j.models.Constants.CommitBuildState, org.gitlab4j.models.Constants.ContributorOrderBy, org.gitlab4j.models.Constants.DefaultBranchProtectionLevel, org.gitlab4j.models.Constants.DeploymentOrderBy, org.gitlab4j.models.Constants.DeploymentStatus, org.gitlab4j.models.Constants.DeployTokenScope, org.gitlab4j.models.Constants.Encoding, org.gitlab4j.models.Constants.EpicOrderBy, org.gitlab4j.models.Constants.EventScope, org.gitlab4j.models.Constants.GroupOrderBy, org.gitlab4j.models.Constants.GroupSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.ImpersonationState, org.gitlab4j.models.Constants.IssueOrderBy, org.gitlab4j.models.Constants.IssueScope, org.gitlab4j.models.Constants.IssueState, org.gitlab4j.models.Constants.JobScope, org.gitlab4j.models.Constants.LineType, org.gitlab4j.models.Constants.MergeRequestOrderBy, org.gitlab4j.models.Constants.MergeRequestScope, org.gitlab4j.models.Constants.MergeRequestSearchIn, org.gitlab4j.models.Constants.MergeRequestState, org.gitlab4j.models.Constants.MilestoneState, org.gitlab4j.models.Constants.PackageOrderBy, org.gitlab4j.models.Constants.PackageStatus, org.gitlab4j.models.Constants.PipelineOrderBy, org.gitlab4j.models.Constants.PipelineScope, org.gitlab4j.models.Constants.PipelineSource, org.gitlab4j.models.Constants.ProjectAccessTokenScope, org.gitlab4j.models.Constants.ProjectCreationLevel, org.gitlab4j.models.Constants.ProjectOrderBy, org.gitlab4j.models.Constants.ProjectSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SortOrder, org.gitlab4j.models.Constants.SquashOption, org.gitlab4j.models.Constants.StateEvent, org.gitlab4j.models.Constants.SubgroupCreationLevel, org.gitlab4j.models.Constants.TagOrderBy, org.gitlab4j.models.Constants.TargetType, org.gitlab4j.models.Constants.TodoAction, org.gitlab4j.models.Constants.TodoState, org.gitlab4j.models.Constants.TodoType, org.gitlab4j.models.Constants.TokenType
    • Field Summary

      • Fields inherited from interface org.gitlab4j.models.Constants

        NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
    • Constructor Summary

      Constructors 
      Constructor Description
      BoardsApi​(GitLabApi gitLabApi)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.gitlab4j.api.models.Board createBoard​(java.lang.Object projectIdOrPath, java.lang.String name)
      Creates a new Issue Board.
      org.gitlab4j.api.models.BoardList createBoardList​(java.lang.Object projectIdOrPath, java.lang.Long boardId, java.lang.Long labelId)
      Creates a new Issue Board list.
      void deleteBoard​(java.lang.Object projectIdOrPath, java.lang.Long boardId)
      Soft deletes an existing Issue Board.
      void deleteBoardList​(java.lang.Object projectIdOrPath, java.lang.Long boardId, java.lang.Long listId)
      Soft deletes an existing Issue Board list.
      org.gitlab4j.api.models.Board getBoard​(java.lang.Object projectIdOrPath, java.lang.Long boardId)
      Get a single issue board.
      org.gitlab4j.api.models.BoardList getBoardList​(java.lang.Object projectIdOrPath, java.lang.Long boardId, java.lang.Long listId)
      Get a single issue board list.
      java.util.List<org.gitlab4j.api.models.BoardList> getBoardLists​(java.lang.Object projectIdOrPath, java.lang.Long boardId)
      Get a list of the board’s lists.
      Pager<org.gitlab4j.api.models.BoardList> getBoardLists​(java.lang.Object projectIdOrPath, java.lang.Long boardId, int itemsPerPage)
      Get a Pager of the board’s lists.
      java.util.List<org.gitlab4j.api.models.BoardList> getBoardLists​(java.lang.Object projectIdOrPath, java.lang.Long boardId, int page, int perPage)
      Get a list of the board’s lists for the specified project to using the specified page and per page setting.
      java.util.List<org.gitlab4j.api.models.Board> getBoards​(java.lang.Object projectIdOrPath)
      Lists Issue Boards in the given project.
      Pager<org.gitlab4j.api.models.Board> getBoards​(java.lang.Object projectIdOrPath, int itemsPerPage)
      Get a Pager of all issue boards for the specified project.
      java.util.List<org.gitlab4j.api.models.Board> getBoards​(java.lang.Object projectIdOrPath, int page, int perPage)
      Get all issue boards for the specified project using the specified page and per page setting
      java.util.stream.Stream<org.gitlab4j.api.models.BoardList> getBoardsListsStream​(java.lang.Object projectIdOrPath, java.lang.Long boardId)
      Get a Stream of the board’s lists.
      java.util.stream.Stream<org.gitlab4j.api.models.Board> getBoardsStream​(java.lang.Object projectIdOrPath)
      Get a Stream of all issue boards for the specified project.
      java.util.Optional<org.gitlab4j.api.models.Board> getOptionalBoard​(java.lang.Object projectIdOrPath, java.lang.Long boardId)
      Get an issue board as an Optional instance.
      java.util.Optional<org.gitlab4j.api.models.BoardList> getOptionalBoardList​(java.lang.Object projectIdOrPath, java.lang.Long boardId, java.lang.Long listId)
      Get a single issue board list as an Optional instance.
      org.gitlab4j.api.models.BoardList updateBoard​(java.lang.Object projectIdOrPath, java.lang.Long boardId, java.lang.String name, java.lang.Long assigneeId, java.lang.Long milestoneId, java.lang.String labels, java.lang.Integer weight)
      Updates an existing Issue Board.
      org.gitlab4j.api.models.BoardList updateBoardList​(java.lang.Object projectIdOrPath, java.lang.Long boardId, java.lang.Long listId, java.lang.Integer position)
      Updates an existing Issue Board list.
      • Methods inherited from class java.lang.Object

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

      • BoardsApi

        public BoardsApi​(GitLabApi gitLabApi)
    • Method Detail

      • getBoards

        public java.util.List<org.gitlab4j.api.models.Board> getBoards​(java.lang.Object projectIdOrPath)
                                                                throws GitLabApiException
        Lists Issue Boards in the given project.
        GitLab Endpoint: GET /projects/:id/boards
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        Returns:
        a list of project's issue boards
        Throws:
        GitLabApiException - if any exception occurs
      • getBoards

        public java.util.List<org.gitlab4j.api.models.Board> getBoards​(java.lang.Object projectIdOrPath,
                                                                       int page,
                                                                       int perPage)
                                                                throws GitLabApiException
        Get all issue boards for the specified project using the specified page and per page setting
        GitLab Endpoint: GET /projects/:id/boards
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        page - the page to get
        perPage - the number of items per page
        Returns:
        a list of project's Boards in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getBoards

        public Pager<org.gitlab4j.api.models.Board> getBoards​(java.lang.Object projectIdOrPath,
                                                              int itemsPerPage)
                                                       throws GitLabApiException
        Get a Pager of all issue boards for the specified project.
        GitLab Endpoint: GET /projects/:id/boards
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        itemsPerPage - the number of items per page
        Returns:
        a Pager of project's issue boards
        Throws:
        GitLabApiException - if any exception occurs
      • getBoardsStream

        public java.util.stream.Stream<org.gitlab4j.api.models.Board> getBoardsStream​(java.lang.Object projectIdOrPath)
                                                                               throws GitLabApiException
        Get a Stream of all issue boards for the specified project.
        GitLab Endpoint: GET /projects/:id/boards
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        Returns:
        a Stream of project's issue boards
        Throws:
        GitLabApiException - if any exception occurs
      • getBoard

        public org.gitlab4j.api.models.Board getBoard​(java.lang.Object projectIdOrPath,
                                                      java.lang.Long boardId)
                                               throws GitLabApiException
        Get a single issue board.
        GitLab Endpoint: GET /projects/:id/boards/:board_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        Returns:
        a Board instance for the specified board ID
        Throws:
        GitLabApiException - if any exception occurs
      • getOptionalBoard

        public java.util.Optional<org.gitlab4j.api.models.Board> getOptionalBoard​(java.lang.Object projectIdOrPath,
                                                                                  java.lang.Long boardId)
        Get an issue board as an Optional instance.
        GitLab Endpoint: GET /projects/:id/boards/:board_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        Returns:
        the Board instance for the specified board ID as an Optional instance
      • createBoard

        public org.gitlab4j.api.models.Board createBoard​(java.lang.Object projectIdOrPath,
                                                         java.lang.String name)
                                                  throws GitLabApiException
        Creates a new Issue Board.

        NOTE: This is only available in GitLab EE

        GitLab Endpoint: POST /projects/:id/boards
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        name - the name for the new board
        Returns:
        the created Board instance
        Throws:
        GitLabApiException - if any exception occurs
      • updateBoard

        public org.gitlab4j.api.models.BoardList updateBoard​(java.lang.Object projectIdOrPath,
                                                             java.lang.Long boardId,
                                                             java.lang.String name,
                                                             java.lang.Long assigneeId,
                                                             java.lang.Long milestoneId,
                                                             java.lang.String labels,
                                                             java.lang.Integer weight)
                                                      throws GitLabApiException
        Updates an existing Issue Board.

        NOTE: This is only available in GitLab EE

        GitLab Endpoint: PUT /projects/:id/boards/:board_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
        boardId - the ID of the board, required
        name - the new name of the board, optional (can be null)
        assigneeId - the assignee the board should be scoped to, optional (can be null)
        milestoneId - the milestone the board should be scoped to, optional (can be null)
        labels - a comma-separated list of label names which the board should be scoped to, optional (can be null)
        weight - the weight range from 0 to 9, to which the board should be scoped to, optional (can be null)
        Returns:
        the updated Board instance
        Throws:
        GitLabApiException - if any exception occurs
      • deleteBoard

        public void deleteBoard​(java.lang.Object projectIdOrPath,
                                java.lang.Long boardId)
                         throws GitLabApiException
        Soft deletes an existing Issue Board.

        NOTE: This is only available in GitLab EE

        GitLab Endpoint: DELETE /projects/:id/boards/:board_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        Throws:
        GitLabApiException - if any exception occurs
      • getBoardLists

        public java.util.List<org.gitlab4j.api.models.BoardList> getBoardLists​(java.lang.Object projectIdOrPath,
                                                                               java.lang.Long boardId)
                                                                        throws GitLabApiException
        Get a list of the board’s lists. Does not include open and closed lists.
        GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        Returns:
        a list of the issue board's lists
        Throws:
        GitLabApiException - if any exception occurs
      • getBoardLists

        public java.util.List<org.gitlab4j.api.models.BoardList> getBoardLists​(java.lang.Object projectIdOrPath,
                                                                               java.lang.Long boardId,
                                                                               int page,
                                                                               int perPage)
                                                                        throws GitLabApiException
        Get a list of the board’s lists for the specified project to using the specified page and per page setting. Does not include open and closed lists.
        GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        page - the page to get
        perPage - the number of Boards per page
        Returns:
        a list of the issue board's lists in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getBoardLists

        public Pager<org.gitlab4j.api.models.BoardList> getBoardLists​(java.lang.Object projectIdOrPath,
                                                                      java.lang.Long boardId,
                                                                      int itemsPerPage)
                                                               throws GitLabApiException
        Get a Pager of the board’s lists. Does not include open and closed lists.
        GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        itemsPerPage - the number of Board instances that will be fetched per page
        Returns:
        a Pager of the issue board's lists
        Throws:
        GitLabApiException - if any exception occurs
      • getBoardsListsStream

        public java.util.stream.Stream<org.gitlab4j.api.models.BoardList> getBoardsListsStream​(java.lang.Object projectIdOrPath,
                                                                                               java.lang.Long boardId)
                                                                                        throws GitLabApiException
        Get a Stream of the board’s lists. Does not include open and closed lists.
        GitLab Endpoint: GET /projects/:id/boards/:board_id/lists
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        Returns:
        a Stream of the issue board's lists
        Throws:
        GitLabApiException - if any exception occurs
      • getBoardList

        public org.gitlab4j.api.models.BoardList getBoardList​(java.lang.Object projectIdOrPath,
                                                              java.lang.Long boardId,
                                                              java.lang.Long listId)
                                                       throws GitLabApiException
        Get a single issue board list.
        GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        listId - the ID of the board lists to get
        Returns:
        a BoardList instance for the specified board ID and list ID
        Throws:
        GitLabApiException - if any exception occurs
      • getOptionalBoardList

        public java.util.Optional<org.gitlab4j.api.models.BoardList> getOptionalBoardList​(java.lang.Object projectIdOrPath,
                                                                                          java.lang.Long boardId,
                                                                                          java.lang.Long listId)
        Get a single issue board list as an Optional instance.
        GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        listId - the ID of the board lists to get
        Returns:
        a BoardList instance for the specified board ID and list ID as an Optional instance
      • createBoardList

        public org.gitlab4j.api.models.BoardList createBoardList​(java.lang.Object projectIdOrPath,
                                                                 java.lang.Long boardId,
                                                                 java.lang.Long labelId)
                                                          throws GitLabApiException
        Creates a new Issue Board list.
        GitLab Endpoint: POST /projects/:id/boards/:board_id/lists
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        labelId - the ID of the label
        Returns:
        the created BoardList instance
        Throws:
        GitLabApiException - if any exception occurs
      • updateBoardList

        public org.gitlab4j.api.models.BoardList updateBoardList​(java.lang.Object projectIdOrPath,
                                                                 java.lang.Long boardId,
                                                                 java.lang.Long listId,
                                                                 java.lang.Integer position)
                                                          throws GitLabApiException
        Updates an existing Issue Board list. This call is used to change list position.
        GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        listId - the ID of the list
        position - the new position for the list
        Returns:
        the updated BoardList instance
        Throws:
        GitLabApiException - if any exception occurs
      • deleteBoardList

        public void deleteBoardList​(java.lang.Object projectIdOrPath,
                                    java.lang.Long boardId,
                                    java.lang.Long listId)
                             throws GitLabApiException
        Soft deletes an existing Issue Board list. Only for admins and project owners.
        GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id
        Parameters:
        projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
        boardId - the ID of the board
        listId - the ID of the list
        Throws:
        GitLabApiException - if any exception occurs