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

com.smartling.api.filetranslations.v2.FileTranslationsApiFactory Maven / Gradle / Ivy

The newest version!
package com.smartling.api.filetranslations.v2;

import com.smartling.api.v2.client.AbstractApiFactory;
import com.smartling.api.v2.client.ClientConfiguration;
import com.smartling.api.v2.client.ClientFactory;
import com.smartling.api.v2.client.DefaultClientConfiguration;
import com.smartling.api.v2.client.auth.AuthorizationRequestFilter;

public class FileTranslationsApiFactory extends AbstractApiFactory
{
    public FileTranslationsApiFactory()
    {
        super();
    }

    public FileTranslationsApiFactory(ClientFactory clientFactory)
    {
        super(clientFactory);
    }

    @Override
    protected Class getApiClass()
    {
        return FileTranslationsApi.class;
    }

    @Override
    public FileTranslationsApi buildApi(final AuthorizationRequestFilter authFilter, ClientConfiguration config)
    {
        ClientConfiguration filesConfig = DefaultClientConfiguration.builder()
            .baseUrl(config.getBaseUrl())
            .clientRequestFilters(config.getClientRequestFilters())
            .clientResponseFilters(config.getClientResponseFilters())
            .libNameVersionHolder(config.getLibNameVersionHolder())
            .httpClientConfiguration(config.getHttpClientConfiguration())
            .resteasyProviderFactory(config.getResteasyProviderFactory())
            .build();

        return super.buildApi(authFilter, filesConfig);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy