// Path: src/main/java/eu/luminis/elastic/SingleClusterRestClientFactoryBean.java
// public static final String DEFAULT_CLUSTER_NAME = "default-cluster";


import static eu.luminis.elastic.SingleClusterRestClientFactoryBean.DEFAULT_CLUSTER_NAME;
package eu.luminis.elastic.index;


/**
 * Wrapper for the {@code IndexService} without the option to work with multiple clusters. Only the default cluster
 * is available.
 */
public class SingleClusterIndexService {
    private IndexService indexService;


    /**
     * Default constructor
     *
     * @param indexService wrapped index service
     */
    public SingleClusterIndexService(IndexService indexService) {
        this.indexService = indexService;
    }

    /**
     * Checks if the cluster with the provided cluster name contains an index with the provided index name
     *
     * @param indexName The name of the index to check for existence
     * @return True if the index exists in the cluster with the provided name
     */
    public Boolean indexExist(String indexName) {
// Path: src/main/java/eu/luminis/elastic/SingleClusterRestClientFactoryBean.java
// public static final String DEFAULT_CLUSTER_NAME = "default-cluster";


// Path: src/main/java/eu/luminis/elastic/index/SingleClusterIndexService.java
import static eu.luminis.elastic.SingleClusterRestClientFactoryBean.DEFAULT_CLUSTER_NAME;

package eu.luminis.elastic.index;


/**
 * Wrapper for the {@code IndexService} without the option to work with multiple clusters. Only the default cluster
 * is available.
 */
public class SingleClusterIndexService {
    private IndexService indexService;


    /**
     * Default constructor
     *
     * @param indexService wrapped index service
     */
    public SingleClusterIndexService(IndexService indexService) {
        this.indexService = indexService;
    }

    /**
     * Checks if the cluster with the provided cluster name contains an index with the provided index name
     *
     * @param indexName The name of the index to check for existence
     * @return True if the index exists in the cluster with the provided name
     */
    public Boolean indexExist(String indexName) {
        return indexService.indexExist(DEFAULT_CLUSTER_NAME, indexName);