Package org.elasticsearch.action

Examples of org.elasticsearch.action.ActionRequestValidationException


        super.preferLocal(preferLocal);
        return this;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = super.validate();
        if (index == null) {
            validationException = addValidationError("index is missing", validationException);
        }
        if (type == null) {
            validationException = addValidationError("type is missing", validationException);
View Full Code Here


        this.listenerThreaded = listenerThreaded;
        return this;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = null;
        if (items.isEmpty()) {
            validationException = Actions.addValidationError("no documents to get", validationException);
        } else {
            for (int i = 0; i < items.size(); i++) {
                Item item = items.get(i);
View Full Code Here

        super(indices);
        this.queryHint = null;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = super.validate();
        if (querySource == null) {
            validationException = Actions.addValidationError("query is missing", validationException);
        }
        return validationException;
    }
View Full Code Here

    ShardDeleteRequest() {
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = super.validate();
        if (type == null) {
            addValidationError("type is missing", validationException);
        }
        if (id == null) {
            addValidationError("id is missing", validationException);
View Full Code Here

    public int searchFrom() {
        return this.searchFrom;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = null;
        if (index == null) {
            validationException = Actions.addValidationError("index is missing", validationException);
        }
        if (type == null) {
            validationException = Actions.addValidationError("type is missing", validationException);
View Full Code Here

        this.type = type;
        this.id = id;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = super.validate();
        if (type == null) {
            validationException = addValidationError("type is missing", validationException);
        }
        if (source == null) {
            validationException = addValidationError("source is missing", validationException);
View Full Code Here

        this.indices = indices;
        this.source = source;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = null;
        if (source == null && extraSource == null) {
            validationException = addValidationError("search source is missing", validationException);
        }
        return validationException;
    }
View Full Code Here

    public OpenIndexRequest(String index) {
        this.index = index;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = null;
        if (index == null) {
            validationException = addValidationError("index is missing", validationException);
        }
        return validationException;
    }
View Full Code Here

        this.indices = indices;
        this.settings = settings;
    }

    @Override public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = null;
        if (settings.getAsMap().isEmpty()) {
            validationException = addValidationError("no settings to update", validationException);
        }
        return validationException;
    }
View Full Code Here

    /**
     * Executes the underlying request after the request validation
     * @return the result of the execution
     */
    public Output execute() {
        ActionRequestValidationException validationException = request().validate();
        if (validationException != null) {
            throw validationException;
        }
        return responseToOutput(request, doExecute(request()).actionGet());
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.ActionRequestValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.