/[cvs]/nfo/perl/libs/Data/Transfer/Sync/API.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Transfer/Sync/API.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by joko, Tue Feb 11 05:26:04 2003 UTC revision 1.6 by joko, Fri Feb 14 12:58:47 2003 UTC
# Line 6  Line 6 
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
# Line 148  sub syncNodes { Line 151  sub syncNodes {
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);
# Line 156  sub syncNodes { Line 160  sub syncNodes {
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.");
# Line 179  sub syncNodes { Line 185  sub syncNodes {
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
# Line 219  sub syncNodes { Line 227  sub syncNodes {
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                
# Line 520  sub _prepare_sync { Line 528  sub _prepare_sync {
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;
# Line 529  sub _prepare_sync { Line 537  sub _prepare_sync {
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');

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed