org.zanata.client.commands.push
Class PushCommand

java.lang.Object
  extended by org.zanata.client.commands.ConfigurableCommand<O>
      extended by org.zanata.client.commands.ConfigurableProjectCommand<O>
          extended by org.zanata.client.commands.PushPullCommand<PushOptions>
              extended by org.zanata.client.commands.push.PushCommand
All Implemented Interfaces:
ZanataCommand

public class PushCommand
extends PushPullCommand<PushOptions>

Author:
Sean Flanigan sflaniga@redhat.com

Nested Class Summary
static interface PushCommand.TranslationResourcesVisitor
           
 
Field Summary
 
Fields inherited from class org.zanata.client.commands.PushPullCommand
eTagCache, PROJECT_TYPE_OFFLINE_PO, sourceDocResource, translationResources, uri
 
Fields inherited from class org.zanata.client.commands.ConfigurableProjectCommand
PROJECT_TYPE_FILE, PROJECT_TYPE_GETTEXT, PROJECT_TYPE_PROPERTIES, PROJECT_TYPE_PUBLICAN, PROJECT_TYPE_UTF8_PROPERTIES, PROJECT_TYPE_XLIFF, PROJECT_TYPE_XML
 
Constructor Summary
PushCommand(PushOptions opts)
           
PushCommand(PushOptions opts, ZanataProxyFactory factory, ISourceDocResource sourceDocResource, ITranslatedDocResource translationResources, URI uri)
           
 
Method Summary
protected  List<String> getObsoleteDocNamesForProjectIterationFromServer()
          gets doc list from server, returns a list of qualified doc names from obsolete modules, or from no module.
static void logOptions(org.slf4j.Logger logger, PushOptions opts)
           
 void run()
          Executes the command, using the parameters which have been previously set.
 List<org.zanata.rest.dto.resource.TranslationsResource> splitIntoBatch(org.zanata.rest.dto.resource.TranslationsResource doc, int maxBatchSize)
          Split TranslationsResource into List<TranslationsResource> according to maxBatchSize, but only if mergeType=AUTO
 
Methods inherited from class org.zanata.client.commands.PushPullCommand
belongsToCurrentModule, confirmWithUser, debug, expectYes, getDocListForProjectIterationFromServer, getLocaleMapList, getQualifiedDocNamesForCurrentModuleFromServer, loadETagCache, qualifiedDocName, storeETagCache, unqualifiedDocName
 
Methods inherited from class org.zanata.client.commands.ConfigurableProjectCommand
getProjectType
 
Methods inherited from class org.zanata.client.commands.ConfigurableCommand
deprecate, getDeprecationMessage, getName, getOpts, getRequestFactory, isDeprecated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushCommand

public PushCommand(PushOptions opts)

PushCommand

public PushCommand(PushOptions opts,
                   ZanataProxyFactory factory,
                   ISourceDocResource sourceDocResource,
                   ITranslatedDocResource translationResources,
                   URI uri)
Method Detail

logOptions

public static void logOptions(org.slf4j.Logger logger,
                              PushOptions opts)

run

public void run()
         throws Exception
Description copied from interface: ZanataCommand
Executes the command, using the parameters which have been previously set. This method must be called after initConfig().

Throws:
Exception

getObsoleteDocNamesForProjectIterationFromServer

protected List<String> getObsoleteDocNamesForProjectIterationFromServer()
gets doc list from server, returns a list of qualified doc names from obsolete modules, or from no module.


splitIntoBatch

public List<org.zanata.rest.dto.resource.TranslationsResource> splitIntoBatch(org.zanata.rest.dto.resource.TranslationsResource doc,
                                                                              int maxBatchSize)
Split TranslationsResource into List<TranslationsResource> according to maxBatchSize, but only if mergeType=AUTO

Parameters:
doc -
maxBatchSize -
Returns:
list of TranslationsResource, each containing up to maxBatchSize TextFlowTargets


Copyright © 2013 Zanata Project. All Rights Reserved.