org.apache.camel.component.olingo4.internal.Olingo4ApiCollection Maven / Gradle / Ivy
The newest version!
/*
* Camel ApiCollection generated by camel-api-component-maven-plugin
*/
package org.apache.camel.component.olingo4.internal;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.camel.component.olingo4.Olingo4Configuration;
import org.apache.camel.component.olingo4.Olingo4AppEndpointConfiguration;
import org.apache.camel.support.component.ApiCollection;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodHelper;
/**
* Camel {@link ApiCollection} for Olingo4
*/
public final class Olingo4ApiCollection extends ApiCollection {
private Olingo4ApiCollection() {
final Map aliases = new HashMap<>();
final Map> apiHelpers = new EnumMap<>(Olingo4ApiName.class);
final Map, Olingo4ApiName> apiMethods = new HashMap<>();
List nullableArgs;
aliases.clear();
nullableArgs = Arrays.asList("queryParams", "endpointHttpHeaders", "edm", "responseHandler", "data");
apiHelpers.put(Olingo4ApiName.DEFAULT, new ApiMethodHelper<>(Olingo4AppApiMethod.class, aliases, nullableArgs));
apiMethods.put(Olingo4AppApiMethod.class, Olingo4ApiName.DEFAULT);
setApiHelpers(apiHelpers);
setApiMethods(apiMethods);
}
public Olingo4Configuration getEndpointConfiguration(Olingo4ApiName apiName) {
Olingo4Configuration result = null;
switch (apiName) {
case DEFAULT:
result = new Olingo4AppEndpointConfiguration();
break;
}
return result;
}
public static Olingo4ApiCollection getCollection() {
return Olingo4ApiCollectionHolder.INSTANCE;
}
private static final class Olingo4ApiCollectionHolder {
private static final Olingo4ApiCollection INSTANCE = new Olingo4ApiCollection();
}
}