--- nfo/perl/libs/OEF/Script/AbstractFeeder.pm 2003/02/14 14:18:36 1.3 +++ nfo/perl/libs/OEF/Script/AbstractFeeder.pm 2003/02/22 16:53:42 1.5 @@ -1,9 +1,16 @@ #!/usr/bin/perl ## -------------------------------------------------------------------------------- -## $Id: AbstractFeeder.pm,v 1.3 2003/02/14 14:18:36 joko Exp $ +## $Id: AbstractFeeder.pm,v 1.5 2003/02/22 16:53:42 joko Exp $ ## -------------------------------------------------------------------------------- ## $Log: AbstractFeeder.pm,v $ +## Revision 1.5 2003/02/22 16:53:42 joko +## minor update: debugging +## +## Revision 1.4 2003/02/20 21:11:15 joko +## renamed module +## modified runtime namespace hierarchy +## ## Revision 1.3 2003/02/14 14:18:36 joko ## + new get-/setter-methods ## @@ -25,7 +32,7 @@ #use base 'OEF::Component::Task'; use base qw( DesignPattern::Object - DesignPattern::Object::Logger + DesignPattern::Logger ); @@ -126,12 +133,16 @@ $self->_before_run(); $self->prepare(); #$self->tellWhatIAmDoing(); + #$self->_tellWhatIWillDo(); $self->sync(); } sub prepare { my $self = shift; + #print Dumper($self->{opt}); + #exit; + # TODO: # - move this to Data::Transfer::Sync::checkOptions!!! # - use 'syncable'??? @@ -172,6 +183,9 @@ # is api-version specified? my $sync_version = $self->{opt}->{sv}; $sync_version ||= 'V1'; + #$sync_version = 'V2'; + + #print "version: $sync_version", "\n"; # create a new synchronization object my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version, __parent => $self ); @@ -180,14 +194,21 @@ #print Dumper($self); #print Dumper($self); #exit; - + + # checks + if (!$self->{app}->{storage}->{$self->{opt}->{source}}) { + $logger->critical("Sync source storage handle undefined!"); + } + if (!$self->{app}->{storage}->{$self->{opt}->{target}}) { + $logger->critical("Sync target storage handle undefined!"); + } # configure the synchronization-object $sync->configure( source => { storage => { #handle => $mapiStorage, - handle => $self->{app}->{$self->{opt}->{source}}, + handle => $self->{app}->{storage}->{$self->{opt}->{source}}, #isIdentAuthority => $self->{app}->{config}->{{$self->{opt}->{source}}, #isChecksumAuthority => 1, #writeProtected => 1, @@ -196,7 +217,7 @@ target => { storage => { #handle => $ldapStorage, - handle => $self->{app}->{$self->{opt}->{target}}, + handle => $self->{app}->{storage}->{$self->{opt}->{target}}, #idAuthority => 1, #isChecksumAuthority => 1, #isWriteProtected => 0,