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.9 2003/05/13 08:17:52 joko |
12 |
|
## buildAttributeMap now propagates error |
13 |
|
## |
14 |
|
## Revision 1.8 2003/03/27 15:31:15 joko |
15 |
|
## fixes to modules regarding new namespace(s) below Data::Mungle::* |
16 |
|
## |
17 |
## Revision 1.7 2003/02/21 08:01:11 joko |
## Revision 1.7 2003/02/21 08:01:11 joko |
18 |
## debugging, logging |
## debugging, logging |
19 |
## renamed module |
## renamed module |
71 |
## + minor cosmetics for logging |
## + minor cosmetics for logging |
72 |
## |
## |
73 |
## Revision 1.2 2002/12/01 04:43:25 joko |
## Revision 1.2 2002/12/01 04:43:25 joko |
74 |
## + mapping deatil entries may now be either an ARRAY or a HASH |
## + mapping detail entries may now be either an ARRAY or a HASH |
75 |
## + erase flag is used now (for export-operations) |
## + erase flag is used now (for export-operations) |
76 |
## + expressions to refer to values inside deep nested structures |
## + expressions to refer to values inside deep nested structures |
77 |
## - removed old mappingV2-code |
## - removed old mappingV2-code |
83 |
## |
## |
84 |
## Revision 1.1 2002/10/10 03:44:21 cvsjoko |
## Revision 1.1 2002/10/10 03:44:21 cvsjoko |
85 |
## + new |
## + new |
86 |
## ---------------------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
87 |
|
|
88 |
|
|
89 |
package Data::Transfer::Sync::Core; |
package Data::Transfer::Sync::Core; |
100 |
|
|
101 |
#use misc::HashExt; |
#use misc::HashExt; |
102 |
use Hash::Serializer; |
use Hash::Serializer; |
103 |
use Data::Compare::Struct qw( getDifference isEmpty ); |
use Data::Mungle::Compare::Struct qw( getDifference isEmpty ); |
104 |
use Data::Storage::Container; |
use Data::Storage::Container; |
105 |
use DesignPattern::Object; |
use DesignPattern::Object; |
106 |
use libdb qw( quotesql ); |
use shortcuts::database qw( quotesql ); |
107 |
|
|
108 |
# get logger instance |
# get logger instance |
109 |
my $logger = Log::Dispatch::Config->instance; |
my $logger = Log::Dispatch::Config->instance; |
347 |
$tc->{skip}++; |
$tc->{skip}++; |
348 |
print "s" if $self->{verbose}; |
print "s" if $self->{verbose}; |
349 |
next; |
next; |
|
|
|
350 |
} |
} |
351 |
|
|
352 |
# 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" |
356 |
} |
} |
357 |
|
|
358 |
# build map to actually transfer the data from source to target |
# build map to actually transfer the data from source to target |
359 |
$self->buildAttributeMap(); |
if (!$self->buildAttributeMap()) { |
360 |
|
#$logger->warning( __PACKAGE__ . "->_run: Attribute Map could not be created. Will not insert or modify node."); |
361 |
|
$tc->{skip}++; |
362 |
|
print "e" if $self->{verbose}; |
363 |
|
next; |
364 |
|
} |
365 |
|
|
366 |
# trace |
# trace |
367 |
#print Dumper($self->{node}); exit; |
#print Dumper($self->{node}); exit; |