6 |
## |
## |
7 |
## ---------------------------------------------------------------------------------------- |
## ---------------------------------------------------------------------------------------- |
8 |
## $Log$ |
## $Log$ |
9 |
|
## Revision 1.6 2003/02/14 12:58:47 joko |
10 |
|
## + re-enabled the erase-mechanism |
11 |
|
## |
12 |
## Revision 1.5 2003/02/11 05:26:04 joko |
## Revision 1.5 2003/02/11 05:26:04 joko |
13 |
## + sub _tellWhatIWillDo |
## + sub _tellWhatIWillDo |
14 |
## + re-enabled "branch to execution path for special targets" mechanism |
## + re-enabled "branch to execution path for special targets" mechanism |
151 |
my $self = shift; |
my $self = shift; |
152 |
my $args = shift; |
my $args = shift; |
153 |
|
|
154 |
|
$logger->notice( "========================== " . __PACKAGE__ . "->syncNodes =============="); |
155 |
$logger->debug( __PACKAGE__ . "->syncNodes: starting" ); |
$logger->debug( __PACKAGE__ . "->syncNodes: starting" ); |
156 |
|
|
157 |
#print Dumper($self); |
#print Dumper($self); |
160 |
#print Dumper($self->{options}); |
#print Dumper($self->{options}); |
161 |
$self->_prepareOptions(); |
$self->_prepareOptions(); |
162 |
|
|
163 |
#print Dumper($self->{options}); |
# trace |
164 |
|
#print Dumper($self->{options}); |
165 |
|
#exit; |
166 |
|
|
167 |
if (!$self->checkOptions()) { |
if (!$self->checkOptions()) { |
168 |
$logger->critical( __PACKAGE__ . "->syncNodes: 'Data::Transfer::Sync::checkOptions' failed."); |
$logger->critical( __PACKAGE__ . "->syncNodes: 'Data::Transfer::Sync::checkOptions' failed."); |
185 |
# hash to sum up results |
# hash to sum up results |
186 |
# TODO: re-implement! (sync-statistics???) |
# TODO: re-implement! (sync-statistics???) |
187 |
|
|
188 |
|
#print Dumper($self->{options}->{process}); |
189 |
|
|
190 |
# detect synchronization method to determine which optical symbol (directed arrow) to use |
# detect synchronization method to determine which optical symbol (directed arrow) to use |
191 |
my $mode = $self->{args}->{mode}; # V1 |
my $mode = $self->{args}->{mode}; # V1 |
192 |
$mode ||= $self->{options}->{process}->{mode}; # V2 |
$mode ||= $self->{options}->{process}->{mode}; # V2 |
227 |
#print Dumper($self->{__bridge}); |
#print Dumper($self->{__bridge}); |
228 |
# just take the global application instance and |
# just take the global application instance and |
229 |
# throw it into the context of the mapping module - this is heavy! ;-) (but again, who cares...) |
# throw it into the context of the mapping module - this is heavy! ;-) (but again, who cares...) |
230 |
# TODO: handle this more abstract *sometimes* |
# TODO: handle this more abstract *sometime* |
231 |
#$self->{options}->{handler}->($self->{__bridge}->{parent}->{app}, $self->{options}); |
#$self->{options}->{handler}->($self->{__bridge}->{parent}->{app}, $self->{options}); |
232 |
$self->{options}->{handler}->($self->{__bridge}->{parent}->{process}, $self->{options}); |
$self->{options}->{handler}->($self->{__bridge}->{parent}->{process}, $self->{options}); |
233 |
|
|
528 |
|
|
529 |
# import flag means: prepare the source node to be syncable |
# import flag means: prepare the source node to be syncable |
530 |
# this is useful if there are e.g. no "ident" or "checksum" columns yet inside a DBI like (row-based) storage |
# this is useful if there are e.g. no "ident" or "checksum" columns yet inside a DBI like (row-based) storage |
531 |
if ($self->{args}->{prepare}) { |
if ($self->{options}->{process}->{prepare}) { |
532 |
$self->_prepareNode_MetaProperties('source'); |
$self->_prepareNode_MetaProperties('source'); |
533 |
$self->_prepareNode_DummyIdent('source'); |
$self->_prepareNode_DummyIdent('source'); |
534 |
#return; |
#return; |
537 |
|
|
538 |
# erase flag means: erase the target |
# erase flag means: erase the target |
539 |
#if ($opts->{erase}) { |
#if ($opts->{erase}) { |
540 |
if ($self->{args}->{erase}) { |
if ($self->{options}->{process}->{erase}) { |
541 |
# TODO: move this method to the scope of the synchronization core and wrap it around different handlers |
# TODO: move this method to the scope of the synchronization core and wrap it around different handlers |
542 |
#print "ERASE", "\n"; |
#print "ERASE", "\n"; |
543 |
$self->_erase_all('target'); |
$self->_erase_all('target'); |