class S3PropertiesLocationHelper {

    public void validate(S3PropertiesLocation s3PropertiesLocation)
    {
        String bucketName = s3PropertiesLocation.getBucketName();
        String key = s3PropertiesLocation.getKey();

        Assert.hasText(bucketName, "S3 properties location bucket name must be specified.");
        Assert.hasText(key, "S3 properties location object key must be specified.");

        s3PropertiesLocation.setBucketName(bucketName.trim());
        s3PropertiesLocation.setKey(key.trim());
    }

}