package com.atlassian.stash.internal.server;

import com.atlassian.bitbucket.server.ApplicationMode;
import com.atlassian.bitbucket.server.ApplicationModeSupplier;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class SimpleApplicationModeSupplier implements ApplicationModeSupplier {

    private ApplicationMode mode;

    public SimpleApplicationModeSupplier(@Nonnull ApplicationMode mode) {
        this.mode = requireNonNull(mode, "mode");
    }

    @Nonnull
    @Override
    public ApplicationMode getMode() {
        return mode;
    }

    public void setMode(ApplicationMode mode) {
        this.mode = requireNonNull(mode, "mode");
    }
}
