de.mklinger.qetcher.client.QetcherClientBuilders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qetcher-client-bundle Show documentation
Show all versions of qetcher-client-bundle Show documentation
Qetcher Java client, OSGi bundle, minimal dependencies
package de.mklinger.qetcher.client;
import java.io.File;
import java.nio.file.Path;
import de.mklinger.commons.httpclient.BodyProviders;
import de.mklinger.qetcher.client.impl.InputConversionFileBuilderImpl;
import de.mklinger.qetcher.client.impl.InputJobBuilderImpl;
import de.mklinger.qetcher.client.impl.QetcherClientBuilderImpl;
/**
* @author Marc Klinger - mklinger[at]mklinger[dot]de
*/
public class QetcherClientBuilders {
public static QetcherClient.Builder client() {
return new QetcherClientBuilderImpl();
}
public static InputConversionFile.Builder inputFile() {
return new InputConversionFileBuilderImpl();
}
public static InputConversionFile.Builder inputFileFor(final File inputFile) {
return inputFileFor(inputFile.toPath());
}
public static InputConversionFile.Builder inputFileFor(final Path inputFile) {
return new InputConversionFileBuilderImpl()
.filename(inputFile.getFileName().toString())
.bodyProvider(BodyProviders.fromFile(inputFile));
}
public static InputJob.Builder job() {
return new InputJobBuilderImpl();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy