org.zanata.client.commands.pull
Class GettextPullStrategy
java.lang.Object
org.zanata.client.commands.pull.AbstractPullStrategy
org.zanata.client.commands.pull.AbstractGettextPullStrategy
org.zanata.client.commands.pull.GettextPullStrategy
- All Implemented Interfaces:
- PullStrategy
public class GettextPullStrategy
- extends AbstractGettextPullStrategy
- Author:
- Sean Flanigan sflaniga@redhat.com
|
Method Summary |
File |
getTransFileToWrite(String docName,
LocaleMapping localeMapping)
Provides the file reference that will be used to write a Translation file
for a given Resource. |
org.zanata.common.io.FileDetails |
writeTransFile(org.zanata.rest.dto.resource.Resource doc,
String docName,
LocaleMapping locMapping,
org.zanata.rest.dto.resource.TranslationsResource targetDoc)
pre: docWithLocalName.getName() must match docName if docWithLocalName is not null |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GettextPullStrategy
public GettextPullStrategy(PullOptions opts)
getTransFileToWrite
public File getTransFileToWrite(String docName,
LocaleMapping localeMapping)
- Description copied from interface:
PullStrategy
- Provides the file reference that will be used to write a Translation file
for a given Resource. Ideally, this method should be used by concrete
implementations of the strategy to write the file.
- Parameters:
docName - may be null if needsDocToWriteTrans() returns falselocaleMapping - Locale mapping to use.
- Returns:
- A File reference (might not exist physically) to which a Translation
Resource will be written.
writeTransFile
public org.zanata.common.io.FileDetails writeTransFile(org.zanata.rest.dto.resource.Resource doc,
String docName,
LocaleMapping locMapping,
org.zanata.rest.dto.resource.TranslationsResource targetDoc)
throws IOException
- Description copied from interface:
PullStrategy
- pre: docWithLocalName.getName() must match docName if docWithLocalName is not null
- Parameters:
doc - may be null if needsDocToWriteTrans() returns falsedocName - may be null if needsDocToWriteTrans() returns false
- Returns:
- Details of the file that was written. May be null if the Strategy cannot provide details.
- Throws:
IOException
Copyright © 2013 Zanata Project. All Rights Reserved.