|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PullStrategy
Strategy for converting documents from Zanata to a local file type. Every implementation must have a public constructor which accepts PullOptions.
| Method Summary | |
|---|---|
org.zanata.rest.StringSet |
getExtensions()
Which extensions (eg gettext, comment) does this strategy need to fetch from the server? |
File |
getTransFileToWrite(String docName,
LocaleMapping localeMapping)
Provides the file reference that will be used to write a Translation file for a given Resource. |
boolean |
isTransOnly()
Indicates if this strategy must work without access to source files. |
boolean |
needsDocToWriteTrans()
Does this strategy need the source document (Resource) when writing translations? |
void |
writeSrcFile(org.zanata.rest.dto.resource.Resource docWithLocalName)
|
org.zanata.common.io.FileDetails |
writeTransFile(org.zanata.rest.dto.resource.Resource docWithLocalName,
String docName,
LocaleMapping localeMapping,
org.zanata.rest.dto.resource.TranslationsResource targetDoc)
pre: docWithLocalName.getName() must match docName if docWithLocalName is not null |
| Method Detail |
|---|
org.zanata.rest.StringSet getExtensions()
boolean isTransOnly()
boolean needsDocToWriteTrans()
File getTransFileToWrite(String docName,
LocaleMapping localeMapping)
docName - may be null if needsDocToWriteTrans() returns falselocaleMapping - Locale mapping to use.
void writeSrcFile(org.zanata.rest.dto.resource.Resource docWithLocalName)
throws IOException
docWithLocalName -
IOException
org.zanata.common.io.FileDetails writeTransFile(org.zanata.rest.dto.resource.Resource docWithLocalName,
String docName,
LocaleMapping localeMapping,
org.zanata.rest.dto.resource.TranslationsResource targetDoc)
throws IOException
docWithLocalName - may be null if needsDocToWriteTrans() returns falsedocName - may be null if needsDocToWriteTrans() returns falselocaleMapping - targetDoc -
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||