Class TuleapApiClient
- java.lang.Object
-
- io.jenkins.plugins.tuleap_api.client.internals.TuleapApiClient
-
- All Implemented Interfaces:
AccessKeyApi
,GitApi
,ProjectApi
,PullRequestApi
,TestCampaignApi
,TuleapAuthorization
,UserApi
,UserGroupsApi
public class TuleapApiClient extends Object implements TuleapAuthorization, AccessKeyApi, UserApi, UserGroupsApi, ProjectApi, TestCampaignApi, GitApi, PullRequestApi
-
-
Field Summary
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.AccessKeyApi
ACCESS_KEY_API, ACCESS_KEY_SELF_ID
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.GitApi
BRANCHES, COMMITS, FILES, GIT_API, PULL_REQUEST, STATUSES, TREE
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.ProjectApi
PROJECT_API, PROJECT_GIT, PROJECT_GROUPS, PROJECT_MEMBER_OF_QUERY
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.PullRequestApi
PULL_REQUEST_API
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.TestCampaignApi
TEST_CAMPAIGN_API
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.TuleapAuthorization
AUTHORIZATION_HEADER
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.UserApi
USER_API, USER_MEMBERSHIP, USER_SELF_ID
-
Fields inherited from interface io.jenkins.plugins.tuleap_api.client.UserGroupsApi
USER_GROUPS_API
-
-
Constructor Summary
Constructors Constructor Description TuleapApiClient(TuleapConfiguration tuleapConfiguration, okhttp3.OkHttpClient client, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
-
-
-
Constructor Detail
-
TuleapApiClient
@Inject public TuleapApiClient(TuleapConfiguration tuleapConfiguration, okhttp3.OkHttpClient client, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
checkAccessKeyIsValid
public Boolean checkAccessKeyIsValid(Secret secret)
- Specified by:
checkAccessKeyIsValid
in interfaceAccessKeyApi
-
getAccessKeyScopes
public List<AccessKeyScope> getAccessKeyScopes(Secret secret)
- Specified by:
getAccessKeyScopes
in interfaceAccessKeyApi
-
getUserForAccessKey
public User getUserForAccessKey(Secret secret)
- Specified by:
getUserForAccessKey
in interfaceUserApi
-
getUserMembershipName
@Deprecated public List<UserGroup> getUserMembershipName(AccessToken accessToken)
Deprecated.Use getUserMembership() instead. If you still use this method you should update your Tuleap and use the getUserMembership() which is more efficent.- Specified by:
getUserMembershipName
in interfaceUserApi
-
getUserMembership
public List<UserGroup> getUserMembership(AccessToken accessToken)
- Specified by:
getUserMembership
in interfaceUserApi
-
getUserGroup
public UserGroup getUserGroup(String groupId, AccessToken accessToken)
- Specified by:
getUserGroup
in interfaceUserGroupsApi
-
getProjectByShortname
public Project getProjectByShortname(String shortname, AccessToken token) throws ProjectNotFoundException
- Specified by:
getProjectByShortname
in interfaceProjectApi
- Throws:
ProjectNotFoundException
-
getProjectById
public Project getProjectById(String projectId, TuleapAccessToken token)
- Specified by:
getProjectById
in interfaceProjectApi
-
getProjectUserGroups
public List<UserGroup> getProjectUserGroups(Integer projectId, AccessToken token)
- Specified by:
getProjectUserGroups
in interfaceProjectApi
-
getGitRepositories
public List<GitRepository> getGitRepositories(Integer projectId, TuleapAccessToken token)
- Specified by:
getGitRepositories
in interfaceProjectApi
-
getUserProjects
public List<Project> getUserProjects(TuleapAccessToken token)
- Specified by:
getUserProjects
in interfaceProjectApi
-
sendTTMResults
public void sendTTMResults(String campaignId, String buildUrl, List<String> results, Secret secret)
- Specified by:
sendTTMResults
in interfaceTestCampaignApi
-
sendBuildStatus
public void sendBuildStatus(String repositoryId, String commitReference, TuleapBuildStatus status, org.jenkinsci.plugins.plaincredentials.StringCredentials credentials)
- Specified by:
sendBuildStatus
in interfaceGitApi
-
sendBuildStatus
public void sendBuildStatus(String repositoryId, String commitReference, TuleapBuildStatus status, TuleapAccessToken token)
- Specified by:
sendBuildStatus
in interfaceGitApi
-
getCommit
public GitCommit getCommit(String repositoryId, String commitReference, TuleapAccessToken token)
-
getTree
public List<GitTreeContent> getTree(String repositoryId, String commitReference, String path, TuleapAccessToken token) throws TreeNotFoundException
- Specified by:
getTree
in interfaceGitApi
- Throws:
TreeNotFoundException
-
getFileContent
public GitFileContent getFileContent(String repositoryId, String commitReference, String path, TuleapAccessToken token) throws FileContentNotFoundException
- Specified by:
getFileContent
in interfaceGitApi
- Throws:
FileContentNotFoundException
-
getPullRequests
public List<GitPullRequest> getPullRequests(String repositoryId, TuleapAccessToken token)
- Specified by:
getPullRequests
in interfaceGitApi
-
getBranches
public List<GitBranch> getBranches(String repositoryId, TuleapAccessToken token)
- Specified by:
getBranches
in interfaceGitApi
-
getPullRequest
public PullRequest getPullRequest(String pullRequestId, TuleapAccessToken token)
- Specified by:
getPullRequest
in interfacePullRequestApi
-
-