public class CrowdinAPIHelper extends Object
| Constructor and Description |
|---|
CrowdinAPIHelper(AbstractCrowdinMojo _mojo) |
| Modifier and Type | Method and Description |
|---|---|
String |
addDirectory(String _dirName)
Calls the function http://crowdin.com/page/api/add-directory
|
String |
addFile(CrowdinFile _file)
Calls the function https://crowdin.com/page/api/add-file
|
String |
deleteFile(CrowdinFile _file)
Calls the function https://crowdin.com/page/api/delete-file
|
void |
downloadTranslations(File translationsFile) |
boolean |
elementExists(String _eltPath) |
String |
getProjectInfo()
Calls the function https://crowdin.com/page/api/info
|
String |
getTranslationStatus()
Calls the function https://crowdin.com/page/api/edit-project
|
String |
setApprovedOnlyOption()
Calls the function https://crowdin.com/page/api/edit-project
|
String |
updateFile(CrowdinFile _file)
Calls the function https://crowdin.com/page/api/update-file
|
String |
uploadTranslation(CrowdinTranslation _file,
boolean autoApprovedImported)
Calls the function https://crowdin.com/page/api/upload-translation
|
public CrowdinAPIHelper(AbstractCrowdinMojo _mojo)
public String addDirectory(String _dirName) throws org.apache.maven.plugin.MojoExecutionException
_dirName - the name of the directory to create (with path if the directory is nested)org.apache.maven.plugin.MojoExecutionExceptionpublic String addFile(CrowdinFile _file) throws org.apache.maven.plugin.MojoExecutionException
_file - the full path + name of the fileorg.apache.maven.plugin.MojoExecutionExceptionpublic String deleteFile(CrowdinFile _file) throws org.apache.maven.plugin.MojoExecutionException
_file - Crowdin fileorg.apache.maven.plugin.MojoExecutionExceptionpublic boolean elementExists(String _eltPath) throws org.apache.maven.plugin.MojoExecutionException
_eltPath - the full path of the file/folder to checkorg.apache.maven.plugin.MojoExecutionExceptionpublic String updateFile(CrowdinFile _file) throws org.apache.maven.plugin.MojoExecutionException
_file - the full path + name of the fileorg.apache.maven.plugin.MojoExecutionExceptionpublic String uploadTranslation(CrowdinTranslation _file, boolean autoApprovedImported) throws org.apache.maven.plugin.MojoExecutionException
_file - the full path + name of the translation fileorg.apache.maven.plugin.MojoExecutionExceptionpublic String getProjectInfo() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic void downloadTranslations(File translationsFile) throws org.apache.maven.plugin.MojoExecutionException, FileNotFoundException, IOException
translationsFile - the File that contains all translations if the request is successful, null otherwiseorg.apache.maven.plugin.MojoExecutionExceptionFileNotFoundExceptionIOExceptionpublic String setApprovedOnlyOption() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic String getTranslationStatus() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionCopyright © 2003–2018 eXo Platform SAS. All rights reserved.