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

org.apache.camel.component.olingo2.internal.Olingo2ApiCollection Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version

/*
 * Camel ApiCollection generated by camel-api-component-maven-plugin
 */
package org.apache.camel.component.olingo2.internal;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import org.apache.camel.component.olingo2.Olingo2Configuration;
import org.apache.camel.component.olingo2.Olingo2AppEndpointConfiguration;

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 Olingo2
 */
public final class Olingo2ApiCollection extends ApiCollection {

    private static Olingo2ApiCollection collection;

    private Olingo2ApiCollection() {
        final Map aliases = new HashMap();
        final Map> apiHelpers = new HashMap<>();
        final Map, Olingo2ApiName> apiMethods = new HashMap<>();

        List nullableArgs;

        aliases.clear();
        nullableArgs = Arrays.asList("queryParams", "endpointHttpHeaders", "edm", "responseHandler");
        apiHelpers.put(Olingo2ApiName.DEFAULT, new ApiMethodHelper(Olingo2AppApiMethod.class, aliases, nullableArgs));
        apiMethods.put(Olingo2AppApiMethod.class, Olingo2ApiName.DEFAULT);

        setApiHelpers(apiHelpers);
        setApiMethods(apiMethods);
    }

    public Olingo2Configuration getEndpointConfiguration(Olingo2ApiName apiName) {
        Olingo2Configuration result = null;
        switch (apiName) {
            case DEFAULT:
                result = new Olingo2AppEndpointConfiguration();
                break;
        }
        return result;
    }

    public static synchronized Olingo2ApiCollection getCollection() {
        if (collection == null) {
            collection = new Olingo2ApiCollection();
        }
        return collection;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy