All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarolab.bamboo.entities.BambooArtifact Maven / Gradle / Ivy

Go to download

This library allows to extract information from projects, plans and builds on Bamboo

There is a newer version: 1.8
Show newest version
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());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy