com.clarolab.bamboo.entities.BambooArtifact Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bamboo-rest-api-client Show documentation
Show all versions of bamboo-rest-api-client Show documentation
This library allows to extract information from projects, plans and builds on Bamboo
package com.clarolab.bamboo.entities;
import com.clarolab.bamboo.client.BambooApiClient;
import com.clarolab.bamboo.utils.UrlUtils;
import com.google.gson.annotations.SerializedName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.http.auth.AuthenticationException;
import java.io.IOException;
import java.net.URISyntaxException;
@Getter
@Setter
@ToString
public class BambooArtifact {
private BambooApiClient bambooApiClient;
@ToString.Include
private String name;
@ToString.Include
@SerializedName("producerJobKey")
private String jobKey;
@ToString.Include
private BambooLink link;
public String getContent() throws URISyntaxException, IOException, AuthenticationException {
return bambooApiClient.getHttpClient().get(UrlUtils.getEndpoint(link.getHref()).toString());
}
}