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

io.searchbox.snapshot.AbstractSnapshotRepositoryAction Maven / Gradle / Ivy

There is a newer version: 6.3.1
Show newest version
package io.searchbox.snapshot;

import io.searchbox.action.GenericResultAbstractAction;

/**
 * @author ckeser
 */
public abstract class AbstractSnapshotRepositoryAction extends GenericResultAbstractAction {

    private String repositories;

    protected AbstractSnapshotRepositoryAction(RepositoryBuilder builder) {
        super(builder);

        this.repositories = builder.getRepositories();
        setURI(buildURI());
    }

    @Override
    protected String buildURI() {
        return super.buildURI() + "/_snapshot/" + repositories;
    }

    public abstract static class RepositoryBuilder extends Builder {
        protected abstract String getRepositories();
    }

    public abstract static class SingleRepositoryBuilder extends RepositoryBuilder {
        private String repository;

        public SingleRepositoryBuilder(String repository) {
            this.repository = repository;
        }

        protected String getRepositories() {
            return repository;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy