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

it.bz.opendatahub.alpinebits.validation.context.freerooms.InventoriesContext Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package it.bz.opendatahub.alpinebits.validation.context.freerooms;

/**
 * This class contains context information for InventoriesValidators.
 */
public final class InventoriesContext {

    private final String instance;
    private final HotelInvCountNotifContext hotelInvCountNotifContext;

    public InventoriesContext(String instance, HotelInvCountNotifContext hotelInvCountNotifContext) {
        this.instance = instance;

        // Assure that hotelInvCountNotifContext is never null
        this.hotelInvCountNotifContext = hotelInvCountNotifContext != null
                ? hotelInvCountNotifContext
                : new HotelInvCountNotifContext.Builder().build();
    }

    public String getInstance() {
        return instance;
    }

    public HotelInvCountNotifContext getHotelInvCountNotifContext() {
        return hotelInvCountNotifContext;
    }

    @Override
    public String toString() {
        return "InventoriesContext{" +
                "instance='" + instance + '\'' +
                ", hotelInvCountNotifContext=" + hotelInvCountNotifContext +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy