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

io.helidon.build.licensing.model.AttributionDocument Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2020, 2022 Oracle and/or its affiliates.
 *
 * 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 io.helidon.build.licensing.model;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * Attribution document.
 */
@XmlRootElement(name = "attribution-document")
@XmlAccessorType(XmlAccessType.FIELD)
public class AttributionDocument {

    @XmlElementWrapper(name = "dependencies")
    @XmlElement(name = "dependency")
    private List dependencies = new ArrayList<>();

    @XmlElementWrapper(name = "licenses")
    @XmlElement(name = "license")
    private List licenses = new ArrayList<>();

    @Override
    public String toString() {
        return "AttributionDocument{" + "dependencies=" + dependencies + "}";
    }

    /**
     * Set dependencies.
     *
     * @param dependencies list of dependencies to add.
     */
    public void setDependencies(List dependencies) {
        this.dependencies = dependencies;
    }

    /**
     * Set licenses.
     *
     * @param licenses set list of licenses to add.
     */
    public void setLicenses(List licenses) {
        this.licenses = licenses;
    }

    /**
     * Get Dependencies.
     *
     * @return Dependencies
     */
    public List getDependencies() {
        return dependencies;
    }

    /**
     * Add one dependency.
     *
     * @param dependency add a single dependency.
     */
    @SuppressWarnings("unused")
    public void addDependency(AttributionDependency dependency) {
        this.dependencies.add(dependency);
    }

    /**
     * Get licenses.
     *
     * @return licenses
     */
    public List getLicenses() {
        return licenses;
    }

    /**
     * Add one license.
     *
     * @param license license to add.
     */
    public void addLicense(AttributionLicense license) {
        this.licenses.add(license);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy