本文整理汇总了Java中jetbrains.buildServer.serverSide.SProject类的典型用法代码示例。如果您正苦于以下问题:Java SProject类的具体用法?Java SProject怎么用?Java SProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SProject类属于jetbrains.buildServer.serverSide包,在下文中一共展示了SProject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: build
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static ProjectMsTeamsNotificationsBean build(MsTeamsNotificationProjectSettings projSettings, SProject project, MsTeamsNotificationMainSettings mainSettings){
ProjectMsTeamsNotificationsBean bean = new ProjectMsTeamsNotificationsBean();
List<SBuildType> projectBuildTypes = TeamCityIdResolver.getOwnBuildTypes(project);
bean.projectId = TeamCityIdResolver.getInternalProjectId(project);
bean.msTeamsNotificationList = new LinkedHashMap<String, MsTeamsnotificationConfigAndBuildTypeListHolder>();
/* Create a "new" config with blank stuff so that clicking the "new" button has a bunch of defaults to load in */
MsTeamsNotificationConfig newBlankConfig = new MsTeamsNotificationConfig("", true, new BuildState().setAllEnabled(), true, true, null, true, true);
newBlankConfig.setUniqueKey("new");
/* And add it to the list */
addMsTeamsNotificationConfigHolder(bean, projectBuildTypes, newBlankConfig, mainSettings);
/* Iterate over the rest of the msteamsnotifications in this project and add them to the json config */
for (MsTeamsNotificationConfig config : projSettings.getMsTeamsNotificationsAsList()){
addMsTeamsNotificationConfigHolder(bean, projectBuildTypes, config, mainSettings);
}
return bean;
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:22,代码来源:ProjectMsTeamsNotificationsBean.java
示例2: getReposList
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
private List<DebRepositoryConfigProjectAndStatsWrapper> getReposList() {
List<DebRepositoryConfigProjectAndStatsWrapper> configs = new ArrayList<>();
for (DebRepositoryConfiguration config : myDebRepositoryConfigurationManager.getAllConfigurations()) {
SProject project = myBuildServer.getProjectManager().findProjectById(config.getProjectId());
boolean permissioned = AuthUtil.hasPermissionToManageProject(mySecurityContext.getAuthorityHolder(), project.getProjectId());
configs.add(
new DebRepositoryConfigProjectAndStatsWrapper(project,
config,
myDebRepositoryManager.getRepositoryStatistics(
config,
StringUtils.getDebRepoUrl(
myServer.getRootUrl(),
config.getRepoName(),
config.isRestricted())
),
permissioned)
);
}
return configs;
}
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:21,代码来源:DebRepoListingPageController.java
示例3: build
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static EditDebRepositoryBean build(@NotNull ProjectManager projectManager, @NotNull final DebRepositoryConfiguration repoConfig, @NotNull SProject sproject) {
EditDebRepositoryBean bean = new EditDebRepositoryBean(repoConfig, sproject);
for (DebRepositoryBuildTypeConfig btConfig : repoConfig.getBuildTypes()) {
SBuildType sBuildType = projectManager.findBuildTypeById(btConfig.getBuildTypeId());
if (sBuildType != null) {
List<FilterAndBuildType> filterAndBuildTypes = new ArrayList<>();
for (Filter f : btConfig.getDebFilters()) {
filterAndBuildTypes.add(new FilterAndBuildType(sBuildType.getBuildTypeId(), f));
}
bean.filtersAndBuildTypes.put(new BuildTypeData(sBuildType.getExternalId(),
sBuildType.getName(),
sBuildType.getProjectExternalId(),
sBuildType.getProjectName(),
sBuildType.getFullName()
),
filterAndBuildTypes);
}
}
bean.defaultAllArchitectures = repoConfig.getDefaultArchitecturesRepresentedByAll();
bean.allArchitectures = repoConfig.getArchitecturesRepresentedByAll();
return bean;
}
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:23,代码来源:EditDebRepositoryBean.java
示例4: getPackageStoresForBuildType
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@Override
public List<DebPackageStore> getPackageStoresForBuildType(String buildTypeid) throws NonExistantRepositoryException {
SBuildType sBuildType = myProjectManager.findBuildTypeById(buildTypeid);
List<SProject> projectPathList = this.myProjectManager.findProjectById(sBuildType.getProjectId()).getProjectPath();
List<DebPackageStore> stores = new ArrayList<>();
//Collections.reverse(projectPathList);
for (SProject sProject : projectPathList) {
for (DebRepositoryConfiguration meta : repositoryMetaData.values()){
if (meta.getProjectId().equals(sProject.getProjectId()) && meta.containsBuildType(buildTypeid)){
if (repositories.containsKey(meta.getUuid())){
stores.add(repositories.get(meta.getUuid()));
} else {
throw new NonExistantRepositoryException();
}
}
}
}
return stores;
}
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:20,代码来源:DebRepositoryManagerImpl.java
示例5: editServer
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@NotNull
@Override
public SQSActionResult editServer(@NotNull SProject project, @NotNull SQSInfo sqsInfo) {
SQSInfo init = mySQSManagerProjectFeatures.getServer(project, sqsInfo.getId());
if (init == null) {
init = mySQSManagerImpl.getServer(project, sqsInfo.getId());
if (init != null) {
migrate(project, sqsInfo);
return new SQSActionResult(init, sqsInfo, "SonarQube Server '" + sqsInfo.getName() + "' updated and moved to project features");
} else {
return new SQSActionResult(null, null, "Cannot edit: SonarQube Server with id '" + sqsInfo.getId() + "' was not found", true);
}
} else {
return mySQSManagerProjectFeatures.editServer(project, sqsInfo);
}
}
开发者ID:JetBrains,项目名称:TeamCity.SonarQubePlugin,代码行数:17,代码来源:MigratingSQSManager.java
示例6: removeServerInfo
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
private SQSInfo removeServerInfo(@NotNull final HttpServletRequest request,
@NotNull final SProject project,
@NotNull final Element ajaxResponse) throws IOException {
final String serverinfoId = getServerInfoId(request);
if (serverinfoId == null) {
ajaxResponse.setAttribute("error", "ID is not set");
} else {
final SQSManager.SQSActionResult result = mySqsManager.removeServer(project, serverinfoId);
if (!result.isError()) {
ajaxResponse.setAttribute("status", result.getReason());
return result.getBeforeAction();
} else {
ajaxResponse.setAttribute("error", result.getReason());
}
}
return null;
}
开发者ID:JetBrains,项目名称:TeamCity.SonarQubePlugin,代码行数:18,代码来源:ManageSQSActionController.java
示例7: fillModel
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void fillModel(@NotNull final HttpServletRequest request,
@NotNull final BuildTypeForm form,
@NotNull final Map model) {
SProject project = form.getProject();
final List<SQSInfo> availableServers = mySqsManager.getAvailableServers(project);
model.put("servers", availableServers);
final String sonarServer = getSonarServer(form);
if (Util.isEmpty(sonarServer)) {
model.put("showSelectServer", Boolean.TRUE);
} else if (mySqsManager.getServer(form.getProject(), sonarServer) == null) {
model.put("showUnknownServer", Boolean.TRUE);
}
model.put("project", form.getProject());
}
开发者ID:JetBrains,项目名称:TeamCity.SonarQubePlugin,代码行数:18,代码来源:EditSQRRunType.java
示例8: setUp
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
myRoot = mock(SProject.class);
when(myRoot.getProjectId()).thenReturn(myRootProjectId);
when(myRoot.getParentProject()).thenReturn(null);
myProject = mock(SProject.class);
when(myProject.getProjectId()).thenReturn(myProjectId);
when(myProject.getParentProject()).thenReturn(myRoot);
mySettingsManager = mock(ProjectSettingsManager.class);
myServerInfo = mockSQSInfo(mySettingsManager, myServerId, myProjectId);
myRootServerInfo = mockSQSInfo(mySettingsManager, myRootServerId, myRootProjectId);
}
开发者ID:JetBrains,项目名称:TeamCity.SonarQubePlugin,代码行数:17,代码来源:SQSManagerTest.java
示例9: ProjectMonitorViewState
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public ProjectMonitorViewState(SProject project, UserGroup userGroup, PiazzaConfiguration piazzaConfiguration, PiazzaProjectSettings projectSettings, SUser user) {
this.project = project;
this.piazzaConfiguration = piazzaConfiguration;
this.projectSettings = projectSettings;
builds = new ArrayList<>();
for (SBuildType buildType : project.getBuildTypes()) {
if (hasAtLeastOneBuild(buildType)) {
if (buildType.isAllowExternalStatus()) {
builds.add(new BuildTypeMonitorViewState(buildType, userGroup, piazzaConfiguration.isShowOnFailureOnly()));
}
}
}
for (BuildTypeMonitorViewState build : builds) {
committers.addAll(build.getCommitters());
}
featureBranchesView = new FeatureBranchesMonitorViewState(project, projectSettings, getOrderedBuildTypesOfProjectAndSubprojects(project, user));
}
开发者ID:timomeinen,项目名称:team-piazza,代码行数:21,代码来源:ProjectMonitorViewState.java
示例10: doHandle
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@Override
protected ModelAndView doHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) throws Exception {
SProject project = getProject(request);
if (project != null) {
PiazzaProjectSettings projectSettings = (PiazzaProjectSettings) projectSettingsManager.getSettings(project.getProjectId(), PiazzaProjectSettings.PROJECT_SETTINGS_NAME);
projectSettings.setShowFeatureBranches(getShowFeatureBranchesValueFromView(request));
projectSettings.setMaxNumberOfFeatureBranchesToShow(getMaxNumberOfFeatureBranchesFromView(request));
projectSettings.setMaxAgeInDaysOfFeatureBranches(getMaxAgeInDaysOfFeatureBranchesFromView(request));
updateConfiguration(request, project);
} else {
addPiazzaMessage(request, "Save failed: project not found");
}
return null;
}
开发者ID:timomeinen,项目名称:team-piazza,代码行数:17,代码来源:ProjectConfigurationController.java
示例11: build
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static ProjectSlackNotificationsBean build(SlackNotificationProjectSettings projSettings, SProject project, SlackNotificationMainSettings mainSettings){
ProjectSlackNotificationsBean bean = new ProjectSlackNotificationsBean();
List<SBuildType> projectBuildTypes = TeamCityIdResolver.getOwnBuildTypes(project);
bean.projectId = TeamCityIdResolver.getInternalProjectId(project);
bean.slackNotificationList = new LinkedHashMap<String, SlacknotificationConfigAndBuildTypeListHolder>();
/* Create a "new" config with blank stuff so that clicking the "new" button has a bunch of defaults to load in */
SlackNotificationConfig newBlankConfig = new SlackNotificationConfig("", "", "", true, new BuildState().setAllEnabled(), true, true, null, true, true);
newBlankConfig.setUniqueKey("new");
/* And add it to the list */
addSlackNotificationConfigHolder(bean, projectBuildTypes, newBlankConfig, mainSettings);
/* Iterate over the rest of the slacknotifications in this project and add them to the json config */
for (SlackNotificationConfig config : projSettings.getSlackNotificationsAsList()){
addSlackNotificationConfigHolder(bean, projectBuildTypes, config, mainSettings);
}
return bean;
}
开发者ID:PeteGoo,项目名称:tcSlackBuildNotifier,代码行数:22,代码来源:ProjectSlackNotificationsBean.java
示例12: ProjectMonitorViewState
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public ProjectMonitorViewState(SProject project, UserGroup userGroup, PiazzaConfiguration configuration, PiazzaProjectSettings projectSettings, SUser user) {
this.project = project;
this.projectSettings = projectSettings;
builds = new ArrayList<>();
for (SBuildType buildType : project.getBuildTypes()) {
if (hasAtLeastOneBuild(buildType)) {
if (buildType.isAllowExternalStatus()) {
builds.add(new BuildTypeMonitorViewState(buildType, userGroup, configuration.isShowOnFailureOnly()));
}
}
}
for (BuildTypeMonitorViewState build : builds) {
committers.addAll(build.getCommitters());
}
featureBranchesView = new FeatureBranchesMonitorViewState(project, projectSettings, user.getOrderedBuildTypes(project));
}
开发者ID:mironych,项目名称:Team-Piazza,代码行数:20,代码来源:ProjectMonitorViewState.java
示例13: getProjectId
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static String getProjectId(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getProjectId();
}
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:9,代码来源:TeamCityIdResolver.java
示例14: getExternalProjectId
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static String getExternalProjectId(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getProjectId();
}
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:9,代码来源:TeamCityIdResolver.java
示例15: getExternalProjectIdOrNull
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static String getExternalProjectIdOrNull(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:9,代码来源:TeamCityIdResolver.java
示例16: findProjectById
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
/**
* Finds a TeamCity project in the ProjectManager by ProjectId.
* Uses findProjectByExternalId() if available, otherwise uses findProjectById()
* @param TeamCity projectManager instance
* @param projectId string
* @return TeamCity Project Config object
*/
public static SProject findProjectById(ProjectManager projectManager, String projectId) {
try {
return projectManager.findProjectByExternalId(projectId);
} catch (NoSuchMethodError ex){
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return projectManager.findProjectById(projectId);
}
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:16,代码来源:TeamCityIdResolver.java
示例17: getOwnBuildTypes
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
/**
* Finds builds that belong the referenced project. Uses new method getOwnBuildTypes() if available.
* Does not find builds in sub-projects.
* @param project
* @return List of BuildTypes corresponding to what is configured in the project.
*/
public static List<SBuildType> getOwnBuildTypes(SProject project) {
try {
return project.getOwnBuildTypes();
} catch (NoSuchMethodError ex){
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getBuildTypes();
}
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:15,代码来源:TeamCityIdResolver.java
示例18: newInstance
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
public static ProjectAndBuildMsTeamsnotificationsBean newInstance (SProject project, MsTeamsNotificationProjectSettings settings, SBuildType sBuild) {
ProjectAndBuildMsTeamsnotificationsBean bean = new ProjectAndBuildMsTeamsnotificationsBean();
bean.project = project;
bean.msteamsNotificationProjectSettings = settings;
bean.projectMsTeamsnotifications = settings.getProjectMsTeamsNotificationsAsList();
bean.buildMsTeamsnotifications = new ArrayList<BuildMsTeamsnotificationsBean>();
if (sBuild != null && sBuild.getProjectId().equals(project.getProjectId())){
bean.buildMsTeamsnotifications.add(new BuildMsTeamsnotificationsBean(sBuild, settings.getBuildMsTeamsNotificationsAsList(sBuild)));
}
return bean;
}
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:14,代码来源:ProjectAndBuildMsTeamsnotificationsBean.java
示例19: getTabTitle
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@NotNull
@Override
public String getTabTitle(@NotNull final HttpServletRequest request) {
final SProject currentProject = getProject(request);
if (currentProject == null) {
return TAB_TITLE;
}
final List<DebRepositoryConfiguration> repoConfigs = myDebRepositoryConfigManager.getConfigurationsForProject(currentProject.getProjectId());
if (repoConfigs.isEmpty()) {
return TAB_TITLE;
}
return TAB_TITLE + " (" + repoConfigs.size() + ")";
}
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:14,代码来源:DebRepoProjectSettingsTab.java
示例20: fillModel
import jetbrains.buildServer.serverSide.SProject; //导入依赖的package包/类
@Override
public void fillModel(@NotNull final Map<String, Object> model, @NotNull final HttpServletRequest request) {
final SProject currentProject = getProject(request);
if (currentProject == null) {
return;
}
Map<SProject, List<DebRepositoryConfigAndStatsWrapper>> reposMap = getServersMap(currentProject);
model.put("repositoriesMap", reposMap);
model.put("projectId", currentProject.getExternalId());
model.put("userHasPermissionManagement", AuthUtil.hasPermissionToManageProject(mySecurityContext.getAuthorityHolder(), currentProject.getProjectId()));
}
开发者ID:tcplugins,项目名称:tcDebRepository,代码行数:12,代码来源:DebRepoProjectSettingsTab.java
注:本文中的jetbrains.buildServer.serverSide.SProject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论