本文整理汇总了Java中com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java BuildConfiguration类的具体用法?Java BuildConfiguration怎么用?Java BuildConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BuildConfiguration类属于com.atlassian.bamboo.ww2.actions.build.admin.create包,在下文中一共展示了BuildConfiguration类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addDefaultValues
import com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration; //导入依赖的package包/类
@Override
public void addDefaultValues(@NotNull BuildConfiguration buildConfiguration) {
Plan plan = planManager.getPlanByKey(PlanKeys.getPlanKey(buildConfiguration.getString("buildKey")));
RepositoryDefinition repo = Iterables.find(ghReposFrom(plan), DEFAULT_REPO_PREDICATE, null);
buildConfiguration.setProperty(CONFIG_KEY, repo == null
? ImmutableList.of()
: ImmutableList.of(repo.getId()));
}
示例2: populateContextForEdit
import com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration; //导入依赖的package包/类
@Override
protected void populateContextForEdit(@NotNull Map<String, Object> context,
@NotNull BuildConfiguration buildConfiguration,
Plan plan) {
context.put("gitHubRepositories", Iterables.toArray(ghReposFrom(plan),
RepositoryDefinition.class));
}
示例3: prepareConfigObject
import com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration; //导入依赖的package包/类
@Override
public void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration) {
if (buildConfiguration.containsKey(CONFIG_KEY)) {
buildConfiguration.setProperty(CONFIG_KEY,
toList(buildConfiguration.getProperty(CONFIG_KEY)));
}
}
示例4: validate
import com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration; //导入依赖的package包/类
@NotNull
@Override
public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration) {
ErrorCollection errors = super.validate(buildConfiguration);
String url = buildConfiguration.getString(WEB_REPOSITORY_URL, "");
if (url.isEmpty()) {
errors.addError("webRepositoryUrl", "This field is required");
} else if (!UrlUtils.verifyHierachicalURI(url)) {
errors.addError("webRepositoryUrl", "This is not a valid URL");
}
return errors;
}
示例5: validCheckstyleURL
import com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration; //导入依赖的package包/类
/**
* @param configuration The build plan configuration
* @return null if the url is valid, the error message if is invalid
*/
public static String validCheckstyleURL( BuildConfiguration configuration )
{
if ( configuration.getBoolean( CHECKSTYLE_EXISTS )
&& StringUtils.isNotBlank( configuration.getString( CheckStyleTaskConfigurator.CHECKSTYLE_SITE_URL ) ) )
{
String url = configuration.getString( CheckStyleTaskConfigurator.CHECKSTYLE_SITE_URL );
return validHttpURL( url );
}
// Else it's valid
return null;
}
示例6: isConfigurationMissing
import com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration; //导入依赖的package包/类
@Override
public boolean isConfigurationMissing(@NotNull final BuildConfiguration buildConfiguration) {
return !buildConfiguration.containsKey(CONFIG_KEY);
}