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:
checkAccessKeyIsValidin interfaceAccessKeyApi
-
getAccessKeyScopes
public List<AccessKeyScope> getAccessKeyScopes(Secret secret)
- Specified by:
getAccessKeyScopesin interfaceAccessKeyApi
-
getUserForAccessKey
public User getUserForAccessKey(Secret secret)
- Specified by:
getUserForAccessKeyin 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:
getUserMembershipNamein interfaceUserApi
-
getUserMembership
public List<UserGroup> getUserMembership(AccessToken accessToken)
- Specified by:
getUserMembershipin interfaceUserApi
-
getUserGroup
public UserGroup getUserGroup(String groupId, AccessToken accessToken)
- Specified by:
getUserGroupin interfaceUserGroupsApi
-
getProjectByShortname
public Project getProjectByShortname(String shortname, AccessToken token) throws ProjectNotFoundException
- Specified by:
getProjectByShortnamein interfaceProjectApi- Throws:
ProjectNotFoundException
-
getProjectById
public Project getProjectById(String projectId, TuleapAccessToken token)
- Specified by:
getProjectByIdin interfaceProjectApi
-
getProjectUserGroups
public List<UserGroup> getProjectUserGroups(Integer projectId, AccessToken token)
- Specified by:
getProjectUserGroupsin interfaceProjectApi
-
getGitRepositories
public List<GitRepository> getGitRepositories(Integer projectId, TuleapAccessToken token)
- Specified by:
getGitRepositoriesin interfaceProjectApi
-
getUserProjects
public List<Project> getUserProjects(TuleapAccessToken token)
- Specified by:
getUserProjectsin interfaceProjectApi
-
sendTTMResults
public void sendTTMResults(String campaignId, String buildUrl, List<String> results, Secret secret)
- Specified by:
sendTTMResultsin interfaceTestCampaignApi
-
sendBuildStatus
public void sendBuildStatus(String repositoryId, String commitReference, TuleapBuildStatus status, org.jenkinsci.plugins.plaincredentials.StringCredentials credentials)
- Specified by:
sendBuildStatusin interfaceGitApi
-
sendBuildStatus
public void sendBuildStatus(String repositoryId, String commitReference, TuleapBuildStatus status, TuleapAccessToken token)
- Specified by:
sendBuildStatusin 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:
getTreein interfaceGitApi- Throws:
TreeNotFoundException
-
getFileContent
public GitFileContent getFileContent(String repositoryId, String commitReference, String path, TuleapAccessToken token) throws FileContentNotFoundException
- Specified by:
getFileContentin interfaceGitApi- Throws:
FileContentNotFoundException
-
getPullRequests
public List<GitPullRequest> getPullRequests(String repositoryId, TuleapAccessToken token)
- Specified by:
getPullRequestsin interfaceGitApi
-
getBranches
public List<GitBranch> getBranches(String repositoryId, TuleapAccessToken token)
- Specified by:
getBranchesin interfaceGitApi
-
getPullRequest
public PullRequest getPullRequest(String pullRequestId, TuleapAccessToken token)
- Specified by:
getPullRequestin interfacePullRequestApi
-
-