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

org.jboss.pnc.bpm.model.RepositoryManagerResultRest Maven / Gradle / Ivy

The newest version!
/**
 * JBoss, Home of Professional Open Source.
 * Copyright 2014-2022 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * 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
 *
 * http://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.jboss.pnc.bpm.model;

import lombok.AllArgsConstructor;
import org.jboss.pnc.model.Artifact;
import org.jboss.pnc.spi.coordinator.CompletionStatus;
import org.jboss.pnc.spi.repositorymanager.RepositoryManagerResult;

import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

/**
 * @author Matej Lazar
 */
@AllArgsConstructor
@XmlRootElement(name = "repositoryManagerResult")
public class RepositoryManagerResultRest implements Serializable {
    private List builtArtifacts;
    private List dependencies;
    private String buildContentId;
    private CompletionStatus completionStatus;

    public RepositoryManagerResultRest() {
    }

    public List getBuiltArtifacts() {
        return builtArtifacts;
    }

    public List getDependencies() {
        return dependencies;
    }

    public String getBuildContentId() {
        return buildContentId;
    }

    public CompletionStatus getCompletionStatus() {
        return completionStatus;
    }

    @Override
    public String toString() {
        return "RepositoryManagerResultRest{" + "builtArtifacts=" + builtArtifacts + ", dependencies=" + dependencies
                + ", buildContentId='" + buildContentId + '\'' + ", completionStatus=" + completionStatus + '}';
    }

    public String toStringLimited() {
        return "RepositoryManagerResultRest{" + "buildContentId='" + buildContentId + '\'' + ", completionStatus="
                + completionStatus + '}';
    }

    public static class GenericRepositoryManagerResult implements RepositoryManagerResult {
        private final List builtArtifacts;
        private final List dependencies;
        private final String buildContentId;
        private final CompletionStatus status;

        public GenericRepositoryManagerResult(
                List builtArtifacts,
                List dependencies,
                String buildContentId,
                CompletionStatus status) {
            this.builtArtifacts = builtArtifacts;
            this.dependencies = dependencies;
            this.buildContentId = buildContentId;
            this.status = status;
        }

        @Override
        public List getBuiltArtifacts() {
            return builtArtifacts;
        }

        @Override
        public List getDependencies() {
            return dependencies;
        }

        @Override
        public String getBuildContentId() {
            return buildContentId;
        }

        @Override
        public CompletionStatus getCompletionStatus() {
            return status;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy