|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gentics.api.portalnode.connector.CRSync
public class CRSync
CRSync synchronizes two given ContentRepositories based on two CNDatasources.
CRSync tries this by only syncing the changes.
If an intelligent sync is not possible, CRSync syncs the complete source
repository to the target repository completly overwriting the target
repository.
More help is available in the command line help (CRSync -help).
Constructor Summary | |
---|---|
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). |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CRSync(Datasource source, WriteableDatasource target, String rule) throws NodeException
source
- source datasourcetarget
- target datasourcerule
- optional rule to restrict sync'ed objects
NodeException
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 targetDS
DatasourceException
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 them
DatasourceException
- no source or target datasource givenMethod Detail |
---|
public 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 wrong
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |