
com.marklogic.client.dataservices.impl.InputOutputCallerImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-client-api Show documentation
Show all versions of marklogic-client-api Show documentation
The official MarkLogic Java client API.
The newest version!
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.dataservices.impl;
import com.marklogic.client.DatabaseClient;
import com.marklogic.client.io.marker.BufferableContentHandle;
import com.marklogic.client.io.marker.JSONWriteHandle;
final public class InputOutputCallerImpl extends IOCallerImpl {
public InputOutputCallerImpl(JSONWriteHandle apiDeclaration, HandleProvider handleProvider) {
super(apiDeclaration, handleProvider);
if (getInputParamdef() == null) {
throw new IllegalArgumentException("input parameter missing in endpoint: "+ getEndpointPath());
}
ReturndefImpl returndef = getReturndef();
if (returndef == null) {
throw new IllegalArgumentException("return required in endpoint: "+ getEndpointPath());
} else if (!returndef.isMultiple()) {
throw new IllegalArgumentException("return must be multiple in endpoint: "+ getEndpointPath());
}
}
public O[] arrayCall(DatabaseClient db, CallContextImpl callCtxt, BufferableContentHandle,?>[] input) {
return responseMultipleAsArray(makeRequest(db, callCtxt, input), callCtxt);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy