001/*
002 * JDrupes Builder
003 * Copyright (C) 2026 Michael N. Lipp
004 * 
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
017 */
018
019package org.jdrupes.builder.bnd;
020
021import java.nio.file.Path;
022import java.util.Optional;
023import org.jdrupes.builder.api.FaultAware;
024import org.jdrupes.builder.api.Project;
025import org.jdrupes.builder.api.Resource;
026
027/// Provides the results from a baseline evaluation.
028///
029public interface BndBaselineEvaluation extends Resource, FaultAware {
030
031    /// The project.
032    ///
033    /// @return the project
034    ///
035    Project project();
036
037    /// The bundle symbolic name name of the baselined jar.
038    ///
039    /// @return the name
040    ///
041    @Override
042    Optional<String> name();
043
044    /// The path of the baselined jar.
045    ///
046    /// @return the path
047    ///
048    Path bundlePath();
049
050    /// If set, indicates that baselining failed because the artifact
051    /// to use as baseline was not found.
052    ///
053    /// @return true, if successful
054    ///
055    boolean baselineArtifactMissing();
056
057    /// If set, indicates that a mismatch was detected.
058    ///
059    /// @return true, if successful
060    ///
061    boolean mismatch();
062
063    /// If there is a mismatch, the reason for
064    /// the mismatch.
065    ///
066    /// @return the reason
067    ///
068    Optional<String> reason();
069
070    /// The location where the report can be found.
071    ///
072    /// @return the path
073    ///
074    Path reportLocation();
075}