--- nfo/perl/libs/OEF/Script/AbstractFeeder.pm 2003/02/11 09:48:57 1.2 +++ nfo/perl/libs/OEF/Script/AbstractFeeder.pm 2003/02/20 21:11:15 1.4 @@ -1,9 +1,16 @@ #!/usr/bin/perl ## -------------------------------------------------------------------------------- -## $Id: AbstractFeeder.pm,v 1.2 2003/02/11 09:48:57 joko Exp $ +## $Id: AbstractFeeder.pm,v 1.4 2003/02/20 21:11:15 joko Exp $ ## -------------------------------------------------------------------------------- ## $Log: AbstractFeeder.pm,v $ +## 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 +## ## Revision 1.2 2003/02/11 09:48:57 joko ## - moved notice output out of this module ## + some fixes @@ -22,12 +29,13 @@ #use base 'OEF::Component::Task'; use base qw( DesignPattern::Object - DesignPattern::Object::Logger + DesignPattern::Logger ); use Data::Dumper; use Getopt::Long; +use Data::Transfer::Sync; # get logger instance @@ -52,7 +60,7 @@ exit; } -sub getoptions { +sub readoptions { my $self = shift; GetOptions( @@ -71,6 +79,18 @@ ); } +sub getoptions { + my $self = shift; + return $self->{opt}; +} + +sub setoptions { + my $self = shift; + my $options = shift; + # FIXME: is this really true? + $self->{opt} = $options; +} + sub getoptions_old { my $self = shift; GetOptions( @@ -164,14 +184,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, @@ -180,7 +207,7 @@ target => { storage => { #handle => $ldapStorage, - handle => $self->{app}->{$self->{opt}->{target}}, + handle => $self->{app}->{storage}->{$self->{opt}->{target}}, #idAuthority => 1, #isChecksumAuthority => 1, #isWriteProtected => 0,