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

io.searchbox.core.Delete Maven / Gradle / Ivy

package io.searchbox.core;

import io.searchbox.action.BulkableAction;
import io.searchbox.action.SingleResultAbstractDocumentTargetedAction;

/**
 * @author Dogukan Sonmez
 * @author cihat keser
 */
public class Delete extends SingleResultAbstractDocumentTargetedAction implements BulkableAction {

    protected Delete(Builder builder) {
        super(builder);
        setURI(buildURI());
    }

    @Override
    public String getRestMethodName() {
        return "DELETE";
    }

    @Override
    public String getPathToResult() {
        return "ok";
    }

    @Override
    public String getBulkMethodName() {
        return "delete";
    }

    public static class Builder extends SingleResultAbstractDocumentTargetedAction.Builder {

        public Builder(String id) {
            this.id(id);
        }

        public Delete build() {
            return new Delete(this);
        }

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy