Package org.zanata.rest.client

Examples of org.zanata.rest.client.ZanataProxyFactory


            VersionInfo versionInfo = VersionUtility.getAPIVersionInfo();
            String baseUrl =
                    PropertiesHolder.getProperty(Constants.zanataInstance
                            .value());
            zanataProxyFactory =
                    new ZanataProxyFactory(new URI(baseUrl), username, apiKey,
                            versionInfo, false, false);
        } catch (URISyntaxException e) {
            throw Throwables.propagate(e);
        }
    }
View Full Code Here


        // New Account
        Account a =
                new Account("aacount2@localhost.com", "Sample Account",
                        "sampleaccount", "/9Se/pfHeUH8FJ4asBD6jQ==");

        ZanataProxyFactory proxyFactory =
                createClientProxyFactory(ADMIN, ADMIN_KEY);
        UnimplementedIAccountResource accountClient =
                super.createProxy(proxyFactory,
                        UnimplementedIAccountResource.class,
                        "/accounts/u/sampleaccount");
View Full Code Here

        // New Account
        Account a =
                new Account("aacount2@localhost.com", "Sample Account",
                        "sampleaccount", "/9Se/pfHeUH8FJ4asBD6jQ==");

        ZanataProxyFactory proxyFactory =
                createClientProxyFactory(TRANSLATOR, TRANSLATOR_KEY);
        UnimplementedIAccountResource accountClient =
                super.createProxy(proxyFactory,
                        UnimplementedIAccountResource.class,
                        "/accounts/u/sampleaccount");
View Full Code Here

     * @return A new instance of a proxy factory to create Rest API resources.
     */
    public final ZanataProxyFactory createClientProxyFactory(String username,
            String apiKey) {
        try {
            return new ZanataProxyFactory(new URI(getRestEndpointUrl()),
                    username, apiKey, new VersionInfo("Test", "Test"),
                    false, false) {
                @Override
                protected String getUrlPrefix() {
                    return ""; // No prefix for tests
View Full Code Here

TOP

Related Classes of org.zanata.rest.client.ZanataProxyFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.