public class ZanataProxyFactory extends Object implements ITranslationResourcesFactory
Constructor and Description |
---|
ZanataProxyFactory(URI base,
String username,
String apiKey,
org.zanata.rest.dto.VersionInfo clientApiVersion,
boolean logHttp,
boolean sslCertDisabled)
This will by default pass a null ClientExecutor to the ClientRequestFactory which in turn create default client executor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareToServerVersion(String version)
Compares a given version identifier with the server version.
|
protected org.zanata.rest.client.IVersionResource |
createIVersionResource() |
<T> T |
createProxy(Class<T> clazz)
Returns a client proxy, provided all information is on the proxied interface.
|
<T> T |
createProxy(Class<T> clazz,
URI baseUri) |
org.zanata.rest.client.IAccountResource |
getAccount(String username) |
URI |
getAccountURI(String username) |
org.zanata.rest.service.AsynchronousProcessResource |
getAsynchronousProcessResource() |
org.zanata.rest.service.CopyTransResource |
getCopyTransResource() |
org.zanata.rest.client.IFileResource |
getFileResource() |
org.zanata.rest.client.IGlossaryResource |
getGlossaryResource() |
URI |
getGlossaryResourceURI() |
org.zanata.rest.client.IProjectResource |
getProject(String proj) |
org.zanata.rest.client.IProjectIterationResource |
getProjectIteration(String proj,
String iter) |
URI |
getProjectIterationURI(String proj,
String iter) |
org.zanata.rest.client.IProjectsResource |
getProjects(URI uri) |
URI |
getProjectURI(String proj) |
URI |
getResourceURI(String projectSlug,
String versionSlug) |
org.zanata.rest.client.ISourceDocResource |
getSourceDocResource(String projectSlug,
String versionSlug) |
org.zanata.rest.service.StatisticsResource |
getStatisticsResource() |
org.zanata.rest.client.ITranslatedDocResource |
getTranslatedDocResource(String projectSlug,
String versionSlug) |
protected String |
getUrlPrefix() |
void |
registerPrefixInterceptor(Object interceptor) |
public ZanataProxyFactory(URI base, String username, String apiKey, org.zanata.rest.dto.VersionInfo clientApiVersion, boolean logHttp, boolean sslCertDisabled)
base
- base urlusername
- usernameapiKey
- api keyclientApiVersion
- client API versionlogHttp
- whether to log http outputsslCertDisabled
- whether to disable SSL certificate verificationprotected String getUrlPrefix()
public <T> T createProxy(Class<T> clazz)
Path
annotation.)clazz
- Client interface to proxy.ZanataProxyFactory#createProxy(Class, java.net.URI)}
public org.zanata.rest.client.IGlossaryResource getGlossaryResource()
public URI getGlossaryResourceURI()
public org.zanata.rest.client.IAccountResource getAccount(String username)
public org.zanata.rest.client.IProjectResource getProject(String proj)
public org.zanata.rest.client.IProjectIterationResource getProjectIteration(String proj, String iter)
public org.zanata.rest.client.IProjectsResource getProjects(URI uri)
public org.zanata.rest.client.ITranslatedDocResource getTranslatedDocResource(String projectSlug, String versionSlug)
getTranslatedDocResource
in interface ITranslationResourcesFactory
public org.zanata.rest.client.ISourceDocResource getSourceDocResource(String projectSlug, String versionSlug)
public org.zanata.rest.client.IFileResource getFileResource()
public org.zanata.rest.service.StatisticsResource getStatisticsResource()
public org.zanata.rest.service.CopyTransResource getCopyTransResource()
public org.zanata.rest.service.AsynchronousProcessResource getAsynchronousProcessResource()
public URI getResourceURI(String projectSlug, String versionSlug)
getResourceURI
in interface ITranslationResourcesFactory
public void registerPrefixInterceptor(Object interceptor)
interceptor
- ClientInterceptorRepositoryImpl.registerInterceptor(Object)
protected org.zanata.rest.client.IVersionResource createIVersionResource()
public int compareToServerVersion(String version)
version
- The version to against which to compare the server version.Copyright © 2013 Zanata Project. All rights reserved.