本文整理汇总了Java中com.atlassian.bamboo.utils.error.ErrorCollection类的典型用法代码示例。如果您正苦于以下问题:Java ErrorCollection类的具体用法?Java ErrorCollection怎么用?Java ErrorCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ErrorCollection类属于com.atlassian.bamboo.utils.error包,在下文中一共展示了ErrorCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
@Override
public void validate(final ActionParametersMap params, final ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
if (StringUtils.isEmpty(params.getString(DeployTaskConstants.STACK_NAME)))
{
errorCollection.addError(DeployTaskConstants.STACK_NAME, textProvider.getText("bamboo-opsworks.stack_name.required"));
}
if (StringUtils.isEmpty(params.getString(DeployTaskConstants.APP_NAME)))
{
errorCollection.addError(DeployTaskConstants.APP_NAME, textProvider.getText("bamboo-opsworks.app_name.required"));
}
if(StringUtils.isEmpty(params.getString(AWSConstants.ACCESS_KEY_ID))
&& !StringUtils.isEmpty(params.getString(AWSConstants.SECRET_ACCESS_KEY))) {
errorCollection.addError(AWSConstants.ACCESS_KEY_ID, textProvider.getText("bamboo-opsworks.access_key_id.required_with_secret"));
}
if(StringUtils.isEmpty(params.getString(AWSConstants.SECRET_ACCESS_KEY))
&& !StringUtils.isEmpty(params.getString(AWSConstants.ACCESS_KEY_ID))) {
errorCollection.addError(AWSConstants.SECRET_ACCESS_KEY, textProvider.getText("bamboo-opsworks.secret_access_key.required_with_access"));
}
}
示例2: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
public void validate(final ActionParametersMap params, final ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
this.validator.params = params;
this.validator.errorCollection = errorCollection;
this.errorCollection = errorCollection;
validator.validateZsUrl();
validator.validateApiKey();
validator.validateApiSecret();
validator.validateAppName();
validator.validateBaseUrl();
validator.validateZsVersion();
validateRetry(params.getString("retry"));
validateWaittime(params.getString("waittime"));
}
示例3: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
@Override
public void validate(final ActionParametersMap params, final ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
this.validator.params = params;
this.validator.errorCollection = errorCollection;
this.errorCollection = errorCollection;
validator.validateZsUrl();
validator.validateApiKey();
validator.validateApiSecret();
validator.validateAppName();
validator.validateBaseUrl();
validator.validateZsVersion();
validateRetry(params.getString("retry"));
validateWaittime(params.getString("waittime"));
}
示例4: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
/**
* Validate gui form when Saving params
*/
@Override
public void validate(ActionParametersMap params, ErrorCollection errorCollection) {
super.validate(params, errorCollection);
utils.getNotifier().notifyInfo("Validating BlazeMeter task settings before saving.");
final String selectedTest = Utils.cutTestType(params.getString(Constants.SETTINGS_SELECTED_TEST_ID));
fillErrorCollection(selectedTest, errorCollection);
if (errorCollection.hasAnyErrors()) {
return;
}
try {
if (StringUtils.isBlank(User.getUser(utils).getId())) {
errorCollection.addErrorMessage("Cannot load tests from BlazeMeter server. Invalid user key!");
} else {
//verify if the test still exists on BlazeMeter server
AbstractTest receivedTest = TestDetector.detectTest(utils, selectedTest);
if (receivedTest == null) {
errorCollection.addErrorMessage("Test '" + selectedTest + "' doesn't exits on BlazeMeter server.");
}
}
} catch (Exception e) {
errorCollection.addErrorMessage("Failed to get tests from BlazeMeter account: " + e.getMessage());
}
utils.getNotifier().notifyInfo("BlazeMeter task settings were validated and saved.");
}
示例5: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
public void validate(@NotNull ActionParametersMap params, @NotNull ErrorCollection errorCollection) {
super.validate(params, errorCollection);
final String directory = params.getString(xUnitParserTask.TEST_FILE_PATTERN);
if (StringUtils.isEmpty(directory))
{
errorCollection.addError(xUnitParserTask.TEST_FILE_PATTERN, i18nResolver.getText(xUnitParserTask.TEST_FILE_PATTERN + ".error"));
}
}
示例6: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
@Override
public void validate(ActionParametersMap params, ErrorCollection errorCollection) {
validateRequired(params, errorCollection, CFG_SELECTED_UTIL);
validateRequired(params, errorCollection, CFG_SELECTED_CRED);
validateRequired(params, errorCollection, CFG_APP_ID);
validateNumber(params, errorCollection, CFG_MAX_HIGH);
validateNumber(params, errorCollection, CFG_MAX_MEDIUM);
validateNumber(params, errorCollection, CFG_MAX_LOW);
}
示例7: checkValidationErrors
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
private void checkValidationErrors(final HubScanConfigFieldEnum field,
final ValidationResults result,
final ErrorCollection errorCollection) {
if (result.hasErrors()) {
final String message = result.getResultString(field);
errorCollection.addError(field.getKey(), message);
}
}
示例8: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的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;
}
示例9: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
@Override
public void validate(@NotNull ActionParametersMap params, @NotNull ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
if (StringUtils.isEmpty(params.getString(CheckStyleTaskConfigurator.CHECKSTYLE_PATH)))
{
errorCollection.addError(CheckStyleTaskConfigurator.CHECKSTYLE_PATH, "Please specify the directory containing the XML CheckStyle output files.");
}
}
示例10: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
public void validate(final ActionParametersMap params, final ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
this.validator.params = params;
this.validator.errorCollection = errorCollection;
validator.validateZsUrl();
validator.validateApiKey();
validator.validateApiSecret();
validator.validateAppName();
validator.validateBaseUrl();
validator.validateZsVersion();
validator.validateCustomZpkFilename();
}
示例11: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
public void validate(final ActionParametersMap params, final ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
this.validator.params = params;
this.validator.errorCollection = errorCollection;
validator.validateCustomZpkFilename();
}
示例12: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
public void validate(final ActionParametersMap params, final ErrorCollection errorCollection)
{
super.validate(params, errorCollection);
this.validator.params = params;
this.validator.errorCollection = errorCollection;
this.errorCollection = errorCollection;
validator.validateZsUrl();
validator.validateApiKey();
validator.validateApiSecret();
validator.validateAppName();
validator.validateZsVersion();
}
示例13: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
@Override
public void validate(@NotNull final ActionParametersMap params,
@NotNull final ErrorCollection errorCollection) {
super.validate(params, errorCollection);
final String hammerValue = params.getString("hammer");
if (StringUtils.isEmpty(hammerValue)) {
errorCollection.addError("hammer",
textProvider.getText("daticaldb.hammer.error"));
}
final String driversValue = params.getString("drivers");
if (StringUtils.isEmpty(driversValue)) {
errorCollection.addError("drivers",
textProvider.getText("daticaldb.drivers.error"));
}
final String projectDirValue = params.getString("projectDir");
if (StringUtils.isEmpty(projectDirValue)) {
errorCollection.addError("projectDir",
textProvider.getText("daticaldb.projectDir.error"));
}
final String commandValue = params.getString("projectDir");
if (StringUtils.isEmpty(commandValue)) {
errorCollection.addError("command",
textProvider.getText("daticaldb.command.error"));
}
}
示例14: fillErrorCollection
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
private void fillErrorCollection(String selectedTest, ErrorCollection errorCollection) {
if (StringUtils.isEmpty(selectedTest) | selectedTest.contains(CHECK_CREDENTIALS)) {
errorCollection.addErrorMessage(CHECK_CREDENTIALS + CHECK_TESTS);
}
if (selectedTest.contains(WORKSPACE)) {
errorCollection.addErrorMessage("Cannot save workspace as a test. Please, select correct test.");
}
if (selectedTest.contains(NO_TESTS)) {
errorCollection.addErrorMessage("No tests in current workspace. Please, select correct test.");
}
}
示例15: validate
import com.atlassian.bamboo.utils.error.ErrorCollection; //导入依赖的package包/类
@Override
public void validate(@NotNull final ActionParametersMap params, @NotNull final ErrorCollection errorCollection) {
super.validate(params, errorCollection);
// TextProvider textprovider = TextProviderUtils.getTextProvider();
I18nBean i18nBean = this.getI18nBean();
final String gradleTaskValue = params.getString("gradleTask");
if (StringUtils.isEmpty(gradleTaskValue)) {
// errorCollection.addError("gradleTask", textprovider.getText("gradle.task.error"));
errorCollection.addError("gradleTask", i18nBean.getText("gradle.task.error"));
}
}