use of org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration in project legend-sdlc by finos.
the class TestGitLabServerRevisionApis method setUpRevisionApi.
/**
* Authenticates with OAuth2 and instantiate the test resource.
*/
private static void setUpRevisionApi() {
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);
GitLabEntityApi gitLabEntityApi = new GitLabEntityApi(gitLabMemberUserContext, backgroundTaskProcessor);
gitLabRevisionApiTestResource = new GitLabRevisionApiTestResource(gitLabWorkspaceApi, gitLabProjectApi, gitLabEntityApi, gitLabRevisionApi);
}
use of org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration in project legend-sdlc by finos.
the class TestGitLabServerWorkspaceApis method setUpWorkspaceApi.
/**
* Authenticates with OAuth2 and instantiate the test resource.
*/
private static void setUpWorkspaceApi() {
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);
GitLabEntityApi gitLabEntityApi = new GitLabEntityApi(gitLabMemberUserContext, backgroundTaskProcessor);
GitLabReviewApi gitLabCommitterReviewApi = new GitLabReviewApi(gitLabMemberUserContext);
GitLabReviewApi gitLabApproverReviewApi = new GitLabReviewApi(gitLabOwnerUserContext);
gitLabWorkspaceApiTestResource = new GitLabWorkspaceApiTestResource(gitLabWorkspaceApi, gitLabProjectApi, gitLabEntityApi, gitLabCommitterReviewApi, gitLabApproverReviewApi, gitLabMemberUserContext);
}
use of org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration in project legend-sdlc by finos.
the class AbstractBaseModule method resolveProjectStructureExtensionProvider.
private ProjectStructureExtensionProvider resolveProjectStructureExtensionProvider() {
ProjectStructureConfiguration projectStructureConfiguration = getConfiguration().getProjectStructureConfiguration();
if (projectStructureConfiguration != null) {
ProjectStructureExtensionProvider configuredProvider = projectStructureConfiguration.getProjectStructureExtensionProvider();
if (configuredProvider != null) {
return configuredProvider;
}
List<ProjectStructureExtension> extensions = projectStructureConfiguration.getProjectStructureExtensions();
if ((extensions != null) && !extensions.isEmpty()) {
return DefaultProjectStructureExtensionProvider.fromExtensions(extensions);
}
}
return new VoidProjectStructureExtensionProvider();
}
Aggregations