--- nfo/perl/libs/OEF/Script/AbstractFeeder.pm 2003/02/09 16:27:06 1.1 +++ nfo/perl/libs/OEF/Script/AbstractFeeder.pm 2003/02/11 09:48:57 1.2 @@ -1,9 +1,13 @@ #!/usr/bin/perl ## -------------------------------------------------------------------------------- -## $Id: AbstractFeeder.pm,v 1.1 2003/02/09 16:27:06 joko Exp $ +## $Id: AbstractFeeder.pm,v 1.2 2003/02/11 09:48:57 joko Exp $ ## -------------------------------------------------------------------------------- ## $Log: AbstractFeeder.pm,v $ +## Revision 1.2 2003/02/11 09:48:57 joko +## - moved notice output out of this module +## + some fixes +## ## Revision 1.1 2003/02/09 16:27:06 joko ## + initial commit ## @@ -105,52 +109,10 @@ my $self = shift; $self->_before_run(); $self->prepare(); - $self->tellWhatIAmDoing(); + #$self->tellWhatIAmDoing(); $self->sync(); } -my $c_string_default = ''; -sub c_string { - my $value = shift; - $value ||= "[$c_string_default]"; - return $value; -} - -sub tellWhatIAmDoing { - my $self = shift; - - $c_string_default = 'n/a'; - my $source = c_string($self->{opt}->{'source'}); - my $source_node = c_string($self->{opt}->{'source-node'}); - my $source_type = c_string($self->{opt}->{'source-type'}); - my $target = c_string($self->{opt}->{'target'}); - my $target_node = c_string($self->{opt}->{'target-node'}); - my $target_type = c_string($self->{opt}->{'target-type'}); - - my $mapping_module = c_string($self->{opt}->{'mapping-module'}); - my $mode = uc c_string($self->{opt}->{'mode'}); - - my $ql = "$mode INTO $source NODE $source_node TYPE $source_type SELECT NODE $target_node TYPE $target_type FROM $target USING MODULE $mapping_module;"; - #$logger->notice( __PACKAGE__ . ": $ql" ); - $logger->notice( $ql ); - - return; - - my $actioning = ucfirst $self->{opt}->{'action'} . 'ing'; - - # FIXME: this is weird! - my $long = <notice( __PACKAGE__ . ": $long" ); - -} - sub prepare { my $self = shift; @@ -196,10 +158,13 @@ $sync_version ||= 'V1'; # create a new synchronization object - my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version ); + my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version, __parent => $self ); # trace #print Dumper($self); + #print Dumper($self); + #exit; + # configure the synchronization-object $sync->configure( @@ -207,20 +172,30 @@ storage => { #handle => $mapiStorage, handle => $self->{app}->{$self->{opt}->{source}}, - writeProtected => 1, + #isIdentAuthority => $self->{app}->{config}->{{$self->{opt}->{source}}, + #isChecksumAuthority => 1, + #writeProtected => 1, }, }, target => { storage => { #handle => $ldapStorage, handle => $self->{app}->{$self->{opt}->{target}}, - idAuthority => 1, - isChecksumAuthority => 1, - writeProtected => 0, + #idAuthority => 1, + #isChecksumAuthority => 1, + #isWriteProtected => 0, }, }, verbose => 1, ); + + # TODO: +=pod + $sync->configure( + 'source.storage.handle' => ..., + 'target.storage.handle' => ..., + ); +=cut # trace #print Dumper($sync);