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

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

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

revision 1.8 by joko, Thu Mar 27 15:31:15 2003 UTC revision 1.10 by joko, Wed Jun 25 23:03:57 2003 UTC
# Line 1  Line 1 
1    ## -------------------------------------------------------------------------
2    ##
3  ##    $Id$  ##    $Id$
4  ##  ##
5  ##    Copyright (c) 2002  Andreas Motl <andreas.motl@ilo.de>  ##    Copyright (c) 2002  Andreas Motl <andreas.motl@ilo.de>
6  ##  ##
7  ##    See COPYRIGHT section in pod text below for usage and distribution rights.  ##    See COPYRIGHT section in pod text below for usage and distribution rights.
8  ##  ##
9  ##    ----------------------------------------------------------------------------------------  ## -------------------------------------------------------------------------
10  ##    $Log$  ##    $Log$
11    ##    Revision 1.10  2003/06/25 23:03:57  joko
12    ##    no debugging
13    ##
14    ##    Revision 1.9  2003/05/13 08:17:52  joko
15    ##    buildAttributeMap now propagates error
16    ##
17  ##    Revision 1.8  2003/03/27 15:31:15  joko  ##    Revision 1.8  2003/03/27 15:31:15  joko
18  ##    fixes to modules regarding new namespace(s) below Data::Mungle::*  ##    fixes to modules regarding new namespace(s) below Data::Mungle::*
19  ##  ##
# Line 66  Line 74 
74  ##    + minor cosmetics for logging  ##    + minor cosmetics for logging
75  ##  ##
76  ##    Revision 1.2  2002/12/01 04:43:25  joko  ##    Revision 1.2  2002/12/01 04:43:25  joko
77  ##    + mapping deatil entries may now be either an ARRAY or a HASH  ##    + mapping detail entries may now be either an ARRAY or a HASH
78  ##    + erase flag is used now (for export-operations)  ##    + erase flag is used now (for export-operations)
79  ##    + expressions to refer to values inside deep nested structures  ##    + expressions to refer to values inside deep nested structures
80  ##    - removed old mappingV2-code  ##    - removed old mappingV2-code
# Line 78  Line 86 
86  ##  ##
87  ##    Revision 1.1  2002/10/10 03:44:21  cvsjoko  ##    Revision 1.1  2002/10/10 03:44:21  cvsjoko
88  ##    + new  ##    + new
89  ##    ----------------------------------------------------------------------------------------  ## -------------------------------------------------------------------------
90    
91    
92  package Data::Transfer::Sync::Core;  package Data::Transfer::Sync::Core;
# Line 98  use Hash::Serializer; Line 106  use Hash::Serializer;
106  use Data::Mungle::Compare::Struct qw( getDifference isEmpty );  use Data::Mungle::Compare::Struct qw( getDifference isEmpty );
107  use Data::Storage::Container;  use Data::Storage::Container;
108  use DesignPattern::Object;  use DesignPattern::Object;
109  use libdb qw( quotesql );  use shortcuts::database qw( quotesql );
110    
111  # get logger instance  # get logger instance
112  my $logger = Log::Dispatch::Config->instance;  my $logger = Log::Dispatch::Config->instance;
# Line 177  sub _run { Line 185  sub _run {
185    # get reference to node list from convenient method provided by CORE-HANDLE    # get reference to node list from convenient method provided by CORE-HANDLE
186    $results ||= $self->_getNodeList('source');    $results ||= $self->_getNodeList('source');
187    
188      #print Dumper($results);
189    
190    # checkpoint: do we actually have a list to iterate through?    # checkpoint: do we actually have a list to iterate through?
191    if (!$results || !@{$results}) {    if (!$results || !@{$results}) {
192      $logger->notice( __PACKAGE__ . "->_run: No nodes to synchronize." );      $logger->notice( __PACKAGE__ . "->_run: No nodes to synchronize." );
# Line 342  sub _run { Line 352  sub _run {
352        $tc->{skip}++;        $tc->{skip}++;
353        print "s" if $self->{verbose};        print "s" if $self->{verbose};
354        next;        next;
         
355      }      }
356    
357      # first reaction on entry-status: continue with next entry if the current is already "in sync"      # first reaction on entry-status: continue with next entry if the current is already "in sync"
# Line 352  sub _run { Line 361  sub _run {
361      }      }
362    
363      # build map to actually transfer the data from source to target      # build map to actually transfer the data from source to target
364      $self->buildAttributeMap();      if (!$self->buildAttributeMap()) {
365          #$logger->warning( __PACKAGE__ . "->_run: Attribute Map could not be created. Will not insert or modify node.");
366          $tc->{skip}++;
367          print "e" if $self->{verbose};
368          next;
369        }
370    
371      # trace      # trace
372        #print Dumper($self->{node}); exit;        #print Dumper($self->{node}); exit;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

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