public class CRSync extends Object
Constructor and Description |
---|
CRSync(Datasource source,
WriteableDatasource target,
String rule)
Initialize the sync with source and target datasource, leave flags to
default values (false).
|
CRSync(Datasource source,
WriteableDatasource target,
String rule,
boolean test,
boolean allowEmpty,
boolean allowAlterTable,
boolean delete,
boolean sourceTransaction,
boolean targetTransaction,
int batchSize,
CRSyncModifier modifier)
Initialize the sync with source and target datasource.
|
CRSync(Datasource source,
WriteableDatasource target,
String rule,
boolean test,
boolean allowEmpty,
boolean allowAlterTable,
boolean delete,
int batchSize)
Initialize the sync with source and target datasource, leave flags to
default values (false).
|
Modifier and Type | Method and Description |
---|---|
String |
doSync()
Do the sync
|
static void |
main(String[] args)
Read the commandline parameters and start the sync.
|
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.
|
void |
setUseLobStreams(boolean useLobStreams) |
public CRSync(Datasource source, WriteableDatasource target, String rule) throws NodeException
source
- source datasourcetarget
- target datasourcerule
- optional rule to restrict sync'ed objectsNodeException
public CRSync(Datasource source, WriteableDatasource target, String rule, boolean test, boolean allowEmpty, boolean allowAlterTable, boolean delete, int batchSize) throws DatasourceException
source
- source datasourcetarget
- target datasourcerule
- optional rule to restrict sync'ed objectstest
- test - only simulate the changesallowEmpty
- allow empty Source-RepositoryallowAlterTable
- allow structural changes to contentrepositorydelete
- remove all objects not matching the given rule in targetDSDatasourceException
public CRSync(Datasource source, WriteableDatasource target, String rule, boolean test, boolean allowEmpty, boolean allowAlterTable, boolean delete, boolean sourceTransaction, boolean targetTransaction, int batchSize, CRSyncModifier modifier) throws DatasourceException
source
- source datasourcetarget
- target datasourcerule
- optional rule to restrict sync'ed objectstest
- test - only simulate the changesallowEmpty
- allow empty Source-RepositoryallowAlterTable
- allow structural changes to contentrepositorydelete
- remove all objects not matching the given rule in targetDSsourceTransaction
- use transactions in source databasetargetTransaction
- use transactions in target databasebatchSize
- batch size (maximum number of objects to be synced at once)modifier
- modify objects before storing themDatasourceException
- no source or target datasource givenpublic static void main(String[] args)
public void setObsoletionCheckBatchSize(int batchSize)
batchSize
- new batchsizepublic void setIgnoreOptimized(boolean ignoreOptimized)
ignoreOptimized
- true when optimized flags shall be ignored, false if notpublic void setUseLobStreams(boolean useLobStreams)
public String doSync() throws NodeException, SQLException
NodeException
- when something went wrongSQLException
Copyright © 2014 Gentics Software GmbH. All Rights Reserved.