com.gentics.api.portalnode.connector
Class MCCRSync

java.lang.Object
  extended by com.gentics.api.portalnode.connector.MCCRSync

public class MCCRSync
extends java.lang.Object

Command line tool to synchronize two multichannelling aware content repositories.


Nested Class Summary
protected  class MCCRSync.SyncCount
          Counter for synchronized objects
 
Constructor Summary
MCCRSync(MultichannellingDatasource source, WritableMultichannellingDatasource target, boolean test, boolean allowEmpty, boolean allowAlterTable, boolean sourceTransaction, boolean targetTransaction, int batchSize, CRSyncModifier modifier)
          Initialize the sync with source and target datasource.
 
Method Summary
 java.lang.String doSync()
          Do the sync
static void main(java.lang.String[] args)
          Start the sync process with the given command line arguments
 void setIgnoreOptimized(boolean ignoreOptimized)
          Set the flag for ignoring the optimized flag of attributetypes
 void setObsoletionCheckBatchSize(int batchSize)
          Set the batchsize for the obsoletion check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCCRSync

public MCCRSync(MultichannellingDatasource source,
                WritableMultichannellingDatasource target,
                boolean test,
                boolean allowEmpty,
                boolean allowAlterTable,
                boolean sourceTransaction,
                boolean targetTransaction,
                int batchSize,
                CRSyncModifier modifier)
         throws DatasourceException
Initialize the sync with source and target datasource. For details see commandline help (-help).

Parameters:
source - source datasource
target - target datasource
test - test - only simulate the changes
allowEmpty - allow empty Source-Repository
allowAlterTable - allow structural changes to contentrepository
sourceTransaction - use transactions in source database
targetTransaction - use transactions in target database
batchSize - batch size (maximum number of objects to be synced at once)
modifier - modify objects before storing them
Throws:
DatasourceException - no source or target datasource given
Method Detail

main

public static void main(java.lang.String[] args)
Start the sync process with the given command line arguments

Parameters:
args - command line arguments

setObsoletionCheckBatchSize

public void setObsoletionCheckBatchSize(int batchSize)
Set the batchsize for the obsoletion check.

Parameters:
batchSize - new batchsize

setIgnoreOptimized

public void setIgnoreOptimized(boolean ignoreOptimized)
Set the flag for ignoring the optimized flag of attributetypes

Parameters:
ignoreOptimized - true when optimized flags shall be ignored, false if not

doSync

public java.lang.String doSync()
                        throws NodeException,
                               java.sql.SQLException
Do the sync

Returns:
informational message (how many objects were sync'ed)
Throws:
NodeException - when something went wrong
java.sql.SQLException


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.