test_class.file: aws-elasticbeanstalk-common/src/test/java/jetbrains/buildServer/runner/elasticbeanstalk/ParametersValidatorTest.java
test_class.identifier: ParametersValidatorTest
test_class.superclass: extends BaseTestCase
test_case.body: @Test
    public void s3_bucket_slashes() {
      then(validate(S3_BUCKET_NAME_PARAM, "abra/kadabra")).as("Must detect slashes in s3 bucket name").
          containsEntry(S3_BUCKET_NAME_PARAM, "S3 bucket mustn't contain / characters. For addressing folders use S3 object key parameter");
    }
test_case.class_method_signature: ParametersValidatorTest.s3_bucket_slashes()
test_case.full_signature: @Test public void s3_bucket_slashes()
test_case.identifier: s3_bucket_slashes
test_case.invocations: containsEntry as then validate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void s3_bucket_slashes()
focal_class.file: aws-elasticbeanstalk-common/src/main/java/jetbrains/buildServer/runner/elasticbeanstalk/ParametersValidator.java
focal_class.identifier: ParametersValidator
focal_class.class_method_signature: ParametersValidator.validateRuntime(@NotNull Map<String, String> runnerParams, @NotNull Map<String, String> configParams, @NotNull File checkoutDir)
focal_class.full_signature: @NotNull static Map<String, String> validateRuntime(@NotNull Map<String, String> runnerParams, @NotNull Map<String, String> configParams, @NotNull File checkoutDir)
focal_class.identifier: validateRuntime
focal_class.modifiers: @NotNull static
focal_class.parameters: (@NotNull Map<String, String> runnerParams, @NotNull Map<String, String> configParams, @NotNull File checkoutDir)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> validateRuntime(@NotNull Map<String, String> runnerParams, @NotNull Map<String, String> configParams, @NotNull File checkoutDir)
focal_class.class_method_signature: ParametersValidator.validateSettings(@NotNull Map<String, String> params)
focal_class.full_signature: @NotNull static Map<String, String> validateSettings(@NotNull Map<String, String> params)
focal_class.identifier: validateSettings
focal_class.modifiers: @NotNull static
focal_class.parameters: (@NotNull Map<String, String> params)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> validateSettings(@NotNull Map<String, String> params)
focal_class.class_method_signature: ParametersValidator.validate(@NotNull Map<String, String> runnerParams, boolean runtime)
focal_class.full_signature: private static Map<String, String> validate(@NotNull Map<String, String> runnerParams, boolean runtime)
focal_class.identifier: validate
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Map<String, String> runnerParams, boolean runtime)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> validate(@NotNull Map<String, String> runnerParams, boolean runtime)
focal_class.class_method_signature: ParametersValidator.validatePositiveInteger(@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.full_signature: private static void validatePositiveInteger(@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.identifier: validatePositiveInteger
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.return: void
focal_class.signature: void validatePositiveInteger(@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.class_method_signature: ParametersValidator.validateS3Key(@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.full_signature: private static void validateS3Key(@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.identifier: validateS3Key
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.return: void
focal_class.signature: void validateS3Key(@NotNull Map<String, String> invalids, @NotNull String param, @NotNull String key, @NotNull String name, boolean runtime)
focal_class.class_method_signature: ParametersValidator.isReference(@NotNull String param, boolean runtime)
focal_class.full_signature: private static boolean isReference(@NotNull String param, boolean runtime)
focal_class.identifier: isReference
focal_class.modifiers: private static
focal_class.parameters: (@NotNull String param, boolean runtime)
focal_class.return: boolean
focal_class.signature: boolean isReference(@NotNull String param, boolean runtime)
focal_method.body: private static Map<String, String> validate(@NotNull Map<String, String> runnerParams, boolean runtime) {
      final Map<String, String> invalids = new HashMap<String, String>();
  
      invalids.putAll(AWSCommonParams.validate(runnerParams, !runtime));
  
      final String s3BucketName = runnerParams.get(S3_BUCKET_NAME_PARAM);
      if (StringUtil.isEmptyOrSpaces(s3BucketName)) {
        invalids.put(S3_BUCKET_NAME_PARAM, S3_BUCKET_NAME_LABEL + " mustn't be empty");
      } else if (s3BucketName.contains("/")) {
        invalids.put(S3_BUCKET_NAME_PARAM, S3_BUCKET_NAME_LABEL + " mustn't contain / characters. For addressing folders use " + S3_OBJECT_KEY_LABEL + " parameter");
      }
  
      final String s3ObjectKey = runnerParams.get(S3_OBJECT_KEY_PARAM);
      if (StringUtil.isEmptyOrSpaces(s3ObjectKey)) {
        invalids.put(S3_OBJECT_KEY_PARAM, S3_OBJECT_KEY_LABEL + " mustn't be empty");
      } else {
        validateS3Key(invalids, s3ObjectKey, S3_OBJECT_KEY_PARAM, S3_OBJECT_KEY_LABEL, runtime);
      }
  
      if (StringUtil.isEmptyOrSpaces(runnerParams.get(ENV_NAME_PARAM))) {
        invalids.put(ENV_NAME_PARAM, ENV_NAME_LABEL + " mustn't be empty");
      }
  
      if (StringUtil.isEmptyOrSpaces(runnerParams.get(APP_NAME_PARAM))) {
        invalids.put(APP_NAME_PARAM, APP_NAME_LABEL + " mustn't be empty");
      }
  
      if (StringUtil.isEmptyOrSpaces(runnerParams.get(APP_VERSION_PARAM))) {
        invalids.put(APP_VERSION_PARAM, APP_VERSION_LABEL + " mustn't be empty");
      }
  
      if (isDeploymentWaitEnabled(runnerParams)) {
        final String waitTimeoutSec = runnerParams.get(WAIT_TIMEOUT_SEC_PARAM);
        if (StringUtil.isEmptyOrSpaces(waitTimeoutSec)) {
          invalids.put(WAIT_TIMEOUT_SEC_PARAM, WAIT_TIMEOUT_SEC_LABEL + " mustn't be empty");
        } else {
          validatePositiveInteger(invalids, waitTimeoutSec, WAIT_TIMEOUT_SEC_PARAM, WAIT_TIMEOUT_SEC_LABEL, runtime);
        }
      }
  
      return invalids;
    }
focal_method.class_method_signature: ParametersValidator.validate(@NotNull Map<String, String> runnerParams, boolean runtime)
focal_method.full_signature: private static Map<String, String> validate(@NotNull Map<String, String> runnerParams, boolean runtime)
focal_method.identifier: validate
focal_method.invocations: putAll validate get isEmptyOrSpaces put contains put get isEmptyOrSpaces put validateS3Key isEmptyOrSpaces get put isEmptyOrSpaces get put isEmptyOrSpaces get put isDeploymentWaitEnabled get isEmptyOrSpaces put validatePositiveInteger
focal_method.modifiers: private static
focal_method.parameters: (@NotNull Map<String, String> runnerParams, boolean runtime)
focal_method.return: Map<String, String>
focal_method.signature: Map<String, String> validate(@NotNull Map<String, String> runnerParams, boolean runtime)