public abstract class AbstractPushStrategy extends AbstractCommonPushStrategy<PushOptions>
Constructor and Description |
---|
AbstractPushStrategy(StringSet extensions,
String fileExtension) |
Modifier and Type | Method and Description |
---|---|
protected String |
docNameToFilename(String docName) |
abstract Set<String> |
findDocNames(File srcDir,
com.google.common.collect.ImmutableList<String> includes,
com.google.common.collect.ImmutableList<String> excludes,
boolean useDefaultExclude,
boolean caseSensitive,
boolean excludeLocaleFilenames) |
StringSet |
getExtensions() |
String |
getFileExtension() |
String[] |
getSrcFiles(File srcDir,
com.google.common.collect.ImmutableList<String> includes,
com.google.common.collect.ImmutableList<String> excludes,
boolean excludeLocaleFilenames,
boolean useDefaultExclude,
boolean isCaseSensitive)
Scan srcDir to return a list of all source files.
|
void |
init() |
boolean |
isTransOnly()
Indicates if this strategy must work without access to source files.
|
abstract Resource |
loadSrcDoc(File sourceDir,
String docName) |
abstract void |
visitTranslationResources(String docName,
Resource srcDoc,
PushCommand.TranslationResourcesVisitor visitor) |
getOpts, getSrcFiles, setPushOptions
public abstract Set<String> findDocNames(File srcDir, com.google.common.collect.ImmutableList<String> includes, com.google.common.collect.ImmutableList<String> excludes, boolean useDefaultExclude, boolean caseSensitive, boolean excludeLocaleFilenames) throws IOException
IOException
public abstract Resource loadSrcDoc(File sourceDir, String docName) throws IOException
IOException
public abstract void visitTranslationResources(String docName, Resource srcDoc, PushCommand.TranslationResourcesVisitor visitor) throws IOException
IOException
public boolean isTransOnly()
public String[] getSrcFiles(File srcDir, com.google.common.collect.ImmutableList<String> includes, com.google.common.collect.ImmutableList<String> excludes, boolean excludeLocaleFilenames, boolean useDefaultExclude, boolean isCaseSensitive)
srcDir
- base directory in which to find source filesincludes
- empty to find all source files, non-empty to find only the
documents in this listexcludes
- 'excludes' patterns configured by the userexcludeLocaleFilenames
- adds entries to excludes to ignore any file with a locale id
suffix before the file extension.useDefaultExclude
- true to also exclude a set of default excludes for common temp
file and source control filenamesisCaseSensitive
- case sensitive search for includes and excludes optionspublic StringSet getExtensions()
public String getFileExtension()
public void init()
Copyright © 2017 Zanata Project. All rights reserved.