package com.nju.edu.gitlab; import com.nju.edu.gitlab.dto.commit.CommitActionForm; import com.nju.edu.gitlab.dto.member.AccessLevelForm; import com.nju.edu.gitlab.dto.project.VisibilityForm; import com.nju.edu.gitlab.vo.*; import com.nju.edu.gitlab.vo.commit.CommitVO; import org.gitlab4j.api.GitLabApiException; import java.util.List; import java.util.Set; public interface SeecoderGitlabApi{ public GitlabUserVO createGitlabUser(int userId,String username, String password, String email) throws SeecoderGitlabException; public boolean changePassword(int userId,String password) throws SeecoderGitlabException; public boolean deleteUser(int userId) throws SeecoderGitlabException; public String getUserEmail(int userId) throws SeecoderGitlabException; public GitlabGroup createGroup(String groupName) throws SeecoderGitlabException; public boolean addMember(int groupId, int userId, AccessLevelForm accessLevel) throws SeecoderGitlabException; public ProjectVO createProject(String projectName,VisibilityForm visibility) throws SeecoderGitlabException; public ProjectVO createPrivateProject(String projectName,VisibilityForm visibility, Integer userId) throws SeecoderGitlabException; public Integer forkProject(int projectId, int userId) throws SeecoderGitlabException; public Integer forkGroupProject(int projectId,int groupId) throws SeecoderGitlabException; public Set compare(int projectId, String fromBash, String toBash) throws SeecoderGitlabException; public boolean addWebHook(int projectId,String url,boolean doPushEvents,boolean doIssueEvents,boolean doMergeRequestsEvents) throws SeecoderGitlabException; public boolean archiveProject(int projectId) throws SeecoderGitlabException; public String getProjectFile(int projectId, String branch,String path) throws SeecoderGitlabException; public String getProjectRawFile(int projectId,String commitOrBranchName,String path) throws SeecoderGitlabException; public CommitVO createCommit(int projectId, String branch,String commitMessage,String email,String username,List actions) throws SeecoderGitlabException; public List getAllCommitMessage(int projectId, String commitHash) throws SeecoderGitlabException; public List getProjectBranches(int projectId) throws SeecoderGitlabException; public boolean addAuthorization(int projectId, int userId, AccessLevelForm accessLevel) throws GitLabApiException, SeecoderGitlabException; public List getAllProjectsByUserId(int userId) throws SeecoderGitlabException; public List getJoinedUserByProject(int projectId) throws SeecoderGitlabException; }