当前位置: 首页>>代码示例>>Java>>正文


Java ErrorCollection类代码示例

本文整理汇总了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"));
	}
}
 
开发者ID:KabbageInc,项目名称:bamboo-opsworks,代码行数:25,代码来源:DeployTaskConfigurator.java

示例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"));
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:18,代码来源:RollbackTaskConfigurator.java

示例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"));
    
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:20,代码来源:DeploymentCheckTaskConfigurator.java

示例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.");
}
 
开发者ID:Blazemeter,项目名称:blazemeter-bamboo-plugin,代码行数:28,代码来源:ConfigTask.java

示例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"));
    }
}
 
开发者ID:wwwlicious,项目名称:wwwlicious.bamboo.xunit,代码行数:10,代码来源:xUnitParserConfigurator.java

示例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);
}
 
开发者ID:AppSecDev,项目名称:asoc-bamboo-plugin,代码行数:10,代码来源:SASTScanTaskConfigurator.java

示例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);
    }
}
 
开发者ID:blackducksoftware,项目名称:hub-bamboo,代码行数:10,代码来源:HubScanTaskConfigurator.java

示例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;
}
 
开发者ID:zero1zero,项目名称:bamboo-gitlab-plugin,代码行数:13,代码来源:GitLabWebRepositoryViewer.java

示例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.");
    }
}
 
开发者ID:javiergutites,项目名称:bamboo-checkstyle-plugin,代码行数:11,代码来源:CheckStyleTaskConfigurator.java

示例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();
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:16,代码来源:DeploymentTaskConfigurator.java

示例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();
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:10,代码来源:PackagingTaskConfigurator.java

示例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();
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:15,代码来源:StatisticsTaskConfigurator.java

示例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"));
	}
	
}
 
开发者ID:Datical,项目名称:DaticalDB4Bamboo,代码行数:32,代码来源:DaticalDBTaskConfigurator.java

示例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.");
    }
}
 
开发者ID:Blazemeter,项目名称:blazemeter-bamboo-plugin,代码行数:12,代码来源:ConfigTask.java

示例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"));
        }
    }
 
开发者ID:bschramke,项目名称:bamboo_plugin_gradlew,代码行数:14,代码来源:GradleTaskConfigurator.java


注:本文中的com.atlassian.bamboo.utils.error.ErrorCollection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。