
org.jreleaser.maven.plugin.S3 Maven / Gradle / Ivy
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2020-2022 The JReleaser authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jreleaser.maven.plugin;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author Andres Almiray
* @since 0.8.0
*/
public class S3 extends AbstractUploader {
public static final String TYPE = "s3";
private final Map headers = new LinkedHashMap<>();
private String region;
private String bucket;
private String path;
protected String downloadUrl;
private String endpoint;
private String accessKeyId;
private String secretKey;
private String sessionToken;
public S3() {
super(TYPE);
}
void setAll(S3 s3) {
super.setAll(s3);
this.region = s3.region;
this.bucket = s3.bucket;
this.path = s3.path;
this.downloadUrl = s3.downloadUrl;
this.endpoint = s3.endpoint;
this.accessKeyId = s3.accessKeyId;
this.secretKey = s3.secretKey;
this.sessionToken = s3.sessionToken;
setHeaders(s3.headers);
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getBucket() {
return bucket;
}
public void setBucket(String bucket) {
this.bucket = bucket;
}
public String getAccessKeyId() {
return accessKeyId;
}
public void setAccessKeyId(String accessKeyId) {
this.accessKeyId = accessKeyId;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public String getSessionToken() {
return sessionToken;
}
public void setSessionToken(String sessionToken) {
this.sessionToken = sessionToken;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
public String getEndpoint() {
return endpoint;
}
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
public Map getHeaders() {
return headers;
}
public void setHeaders(Map headers) {
this.headers.putAll(headers);
}
public void addHeaders(Map headers) {
this.headers.putAll(headers);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy