Search in sources :

Example 1 with GitLabProjectConfigurationApi

use of org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApi in project legend-sdlc by finos.

the class IntegrationTestGitLabProjectConfigurationApis method setUpProjectConfigurationApi.

/**
 * Authenticates with OAuth2 and instantiate the test resource.
 */
private static void setUpProjectConfigurationApi() {
    GitLabUserContext gitLabMemberUserContext = prepareGitLabMemberUserContext();
    GitLabUserContext gitLabOwnerUserContext = prepareGitLabOwnerUserContext();
    GitLabConfiguration gitLabConfig = GitLabConfiguration.newGitLabConfiguration(null, null, null, null, null);
    ProjectStructureConfiguration projectStructureConfig = ProjectStructureConfiguration.emptyConfiguration();
    GitLabProjectApi gitLabProjectApi = new GitLabProjectApi(gitLabConfig, gitLabOwnerUserContext, projectStructureConfig, null, null, backgroundTaskProcessor, null);
    GitLabRevisionApi gitLabRevisionApi = new GitLabRevisionApi(gitLabMemberUserContext, backgroundTaskProcessor);
    GitLabWorkspaceApi gitLabWorkspaceApi = new GitLabWorkspaceApi(gitLabMemberUserContext, gitLabRevisionApi, backgroundTaskProcessor);
    GitLabProjectConfigurationApi gitLabProjectConfigurationApi = new GitLabProjectConfigurationApi(gitLabMemberUserContext, projectStructureConfig, projectStructureConfig.getProjectStructureExtensionProvider(), backgroundTaskProcessor, null);
    gitLabProjectConfigurationApiTestResource = new GitLabProjectConfigurationApiTestResource(gitLabWorkspaceApi, gitLabProjectApi, gitLabProjectConfigurationApi);
}
Also used : GitLabWorkspaceApi(org.finos.legend.sdlc.server.gitlab.api.GitLabWorkspaceApi) GitLabConfiguration(org.finos.legend.sdlc.server.gitlab.GitLabConfiguration) GitLabRevisionApi(org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApi) GitLabProjectConfigurationApiTestResource(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApiTestResource) GitLabProjectApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi) GitLabUserContext(org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext) GitLabProjectConfigurationApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApi) ProjectStructureConfiguration(org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)

Example 2 with GitLabProjectConfigurationApi

use of org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApi in project legend-sdlc by finos.

the class TestGitLabServerProjectConfigurationApis method setUpProjectConfigurationApi.

/**
 * Authenticates with OAuth2 and instantiate the test resource.
 */
private static void setUpProjectConfigurationApi() {
    GitLabUserContext gitLabMemberUserContext = prepareGitLabMemberUserContext();
    GitLabUserContext gitLabOwnerUserContext = prepareGitLabOwnerUserContext();
    GitLabConfiguration gitLabConfig = GitLabConfiguration.newGitLabConfiguration(null, null, null, null, GitLabConfiguration.NewProjectVisibility.PRIVATE);
    ProjectStructureConfiguration projectStructureConfig = ProjectStructureConfiguration.emptyConfiguration();
    GitLabProjectApi gitLabProjectApi = new GitLabProjectApi(gitLabConfig, gitLabOwnerUserContext, projectStructureConfig, null, gitLabConfig, backgroundTaskProcessor, null);
    GitLabRevisionApi gitLabRevisionApi = new GitLabRevisionApi(gitLabMemberUserContext, backgroundTaskProcessor);
    GitLabWorkspaceApi gitLabWorkspaceApi = new GitLabWorkspaceApi(gitLabMemberUserContext, gitLabRevisionApi, backgroundTaskProcessor);
    GitLabProjectConfigurationApi gitLabProjectConfigurationApi = new GitLabProjectConfigurationApi(gitLabMemberUserContext, projectStructureConfig, projectStructureConfig.getProjectStructureExtensionProvider(), backgroundTaskProcessor, null);
    gitLabProjectConfigurationApiTestResource = new GitLabProjectConfigurationApiTestResource(gitLabWorkspaceApi, gitLabProjectApi, gitLabProjectConfigurationApi);
}
Also used : GitLabWorkspaceApi(org.finos.legend.sdlc.server.gitlab.api.GitLabWorkspaceApi) GitLabConfiguration(org.finos.legend.sdlc.server.gitlab.GitLabConfiguration) GitLabRevisionApi(org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApi) GitLabProjectConfigurationApiTestResource(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApiTestResource) GitLabProjectApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi) GitLabUserContext(org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext) GitLabProjectConfigurationApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApi) ProjectStructureConfiguration(org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)

Aggregations

GitLabConfiguration (org.finos.legend.sdlc.server.gitlab.GitLabConfiguration)2 GitLabProjectApi (org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi)2 GitLabProjectConfigurationApi (org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApi)2 GitLabProjectConfigurationApiTestResource (org.finos.legend.sdlc.server.gitlab.api.GitLabProjectConfigurationApiTestResource)2 GitLabRevisionApi (org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApi)2 GitLabWorkspaceApi (org.finos.legend.sdlc.server.gitlab.api.GitLabWorkspaceApi)2 GitLabUserContext (org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext)2 ProjectStructureConfiguration (org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)2