/[cvs]/nfo/perl/scripts/outlook2ldap/bin/feed.pl
ViewVC logotype

Diff of /nfo/perl/scripts/outlook2ldap/bin/feed.pl

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

revision 1.1 by joko, Sat Jan 18 18:20:45 2003 UTC revision 1.4 by janosch, Thu Jan 23 14:44:35 2003 UTC
# Line 4  Line 4 
4  ##    $Id$  ##    $Id$
5  ##    --------------------------------------------------------------------------------  ##    --------------------------------------------------------------------------------
6  ##    $Log$  ##    $Log$
7    ##    Revision 1.4  2003/01/23 14:44:35  janosch
8    ##    Updated lib Path and some ini Fields
9    ##
10    ##    Revision 1.3  2003/01/20 16:29:48  joko
11    ##    + new mechanism to pass configuration-metadata to Torus:
12    ##    >     process => Torus->new(
13    ##    >       config_metadata => { file => '../etc/syncOutlookContacts.ini' },
14    ##    >     )
15    ##       and stuff ....
16    ##
17    ##    Revision 1.2  2003/01/19 03:34:59  joko
18    ##    + new command-line-arguments
19    ##
20  ##    Revision 1.1  2003/01/18 18:20:45  joko  ##    Revision 1.1  2003/01/18 18:20:45  joko
21  ##    + initial check-in  ##    + initial check-in
22  ##  ##
# Line 20  BEGIN { Line 33  BEGIN {
33    #require "$Bin/use_libs.pl";    #require "$Bin/use_libs.pl";
34  }  }
35    
36    use Tie::IxHash;
37    
38  use lib qw( ../libs ../etc C:\home\amo\develop\netfrag.org\nfo\perl\libs );  
39    use lib qw( ../libs ../etc );
40    use org::netfrag::preambel;
41  use Torus::Logger;  use Torus::Logger;
42  use Torus::Core;  use Torus::Core;
43    
# Line 43  my $logger = Log::Dispatch::Config->inst Line 59  my $logger = Log::Dispatch::Config->inst
59    my $bizWorks;    my $bizWorks;
60    $context->set(    $context->set(
61      app => $bizWorks,      app => $bizWorks,
62      process => Torus::Core->new(),      process => Torus->new(
63          config_metadata => { file => '../etc/syncOutlookContacts.ini' },
64        ),
65      logger => $logger,      logger => $logger,
66      config => { mappings => { 'LdapAddress' => 'xyz' } },      #config => { mappings => { 'LdapAddress' => 'xyz' } },
67        
68    );    );
69  #print Dumper($context);    #print Dumper($context);  
70  #print Dumper($context->{process}->{bizWorks}->{backend});  #print Dumper($context->{process}->{bizWorks}->{backend});
# Line 109  sub getoptions { Line 128  sub getoptions {
128    
129    GetOptions(    GetOptions(
130      'source=s' => \$self->{opt}->{source},      'source=s' => \$self->{opt}->{source},
131      'node=s' => \$self->{opt}->{node},      'source-type=s' => \$self->{opt}->{'source-type'},
132        'source-node=s' => \$self->{opt}->{'source-node'},
133      'target=s' => \$self->{opt}->{target},      'target=s' => \$self->{opt}->{target},
134        'target-node=s' => \$self->{opt}->{'target-node'},
135      'action=s' => \$self->{opt}->{action},      'action=s' => \$self->{opt}->{action},
136      'mapping=s' => \$self->{opt}->{mapping},      'mapping-module=s' => \$self->{opt}->{'mapping-module'},
137      'prepare' => \$self->{opt}->{prepare},      'prepare' => \$self->{opt}->{prepare},
138      'fresh' => \$self->{opt}->{fresh},      'fresh' => \$self->{opt}->{fresh},
139      'help' => \&usage,      'help' => \&usage,
# Line 177  sub run { Line 198  sub run {
198        $erase = 1;        $erase = 1;
199        #$import = 1;        #$import = 1;
200      }      }
201      $self->{process}->startSync({  
202        source => $self->{opt}->{source},  
203        source_node => $self->{opt}->{node},  #print Dumper($self->{opt});
204        target => $self->{opt}->{target},  #exit;
205        mode => $mode,  
206        erase => $erase,      my %syncConfig;
207        import => $import,      tie %syncConfig, 'Tie::IxHash';
208        mapping => $self->{opt}->{mapping},      %syncConfig = (
209        prepare => $self->{opt}->{prepare},        map => {
210      });          moduleName => $self->{opt}->{'mapping-module'},
211          },
212          source => {
213            dbKey => $self->{opt}->{source},
214            nodeType => $self->{opt}->{'source-type'},
215            nodeName => $self->{opt}->{'source-node'},
216          },
217          target => {
218            dbKey => $self->{opt}->{target},
219            nodeName => $self->{opt}->{'target-node'},
220          },
221          process => {
222            mode => $mode,
223            erase => $erase,
224            import => $import,
225            prepare => $self->{opt}->{prepare},
226          },
227          metadata => {
228            config => $self->{config_metadata},
229          }
230        );
231    
232    #print Dumper(\%syncConfig);
233    
234        $self->{process}->startSync( \%syncConfig );
235    
236  =pod  =pod
237    } else {    } else {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

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