/[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.3 by joko, Mon Jan 20 16:29:48 2003 UTC
# Line 4  Line 4 
4  ##    $Id$  ##    $Id$
5  ##    --------------------------------------------------------------------------------  ##    --------------------------------------------------------------------------------
6  ##    $Log$  ##    $Log$
7    ##    Revision 1.3  2003/01/20 16:29:48  joko
8    ##    + new mechanism to pass configuration-metadata to Torus:
9    ##    >     process => Torus->new(
10    ##    >       config_metadata => { file => '../etc/syncOutlookContacts.ini' },
11    ##    >     )
12    ##       and stuff ....
13    ##
14    ##    Revision 1.2  2003/01/19 03:34:59  joko
15    ##    + new command-line-arguments
16    ##
17  ##    Revision 1.1  2003/01/18 18:20:45  joko  ##    Revision 1.1  2003/01/18 18:20:45  joko
18  ##    + initial check-in  ##    + initial check-in
19  ##  ##
# Line 20  BEGIN { Line 30  BEGIN {
30    #require "$Bin/use_libs.pl";    #require "$Bin/use_libs.pl";
31  }  }
32    
33    use Tie::IxHash;
34    
35    
36  use lib qw( ../libs ../etc C:\home\amo\develop\netfrag.org\nfo\perl\libs );  use lib qw( ../libs ../etc C:\home\amo\develop\netfrag.org\nfo\perl\libs );
37  use Torus::Logger;  use Torus::Logger;
# Line 43  my $logger = Log::Dispatch::Config->inst Line 55  my $logger = Log::Dispatch::Config->inst
55    my $bizWorks;    my $bizWorks;
56    $context->set(    $context->set(
57      app => $bizWorks,      app => $bizWorks,
58      process => Torus::Core->new(),      process => Torus->new(
59          config_metadata => { file => '../etc/syncOutlookContacts.ini' },
60        ),
61      logger => $logger,      logger => $logger,
62      config => { mappings => { 'LdapAddress' => 'xyz' } },      #config => { mappings => { 'LdapAddress' => 'xyz' } },
63        
64    );    );
65  #print Dumper($context);    #print Dumper($context);  
66  #print Dumper($context->{process}->{bizWorks}->{backend});  #print Dumper($context->{process}->{bizWorks}->{backend});
# Line 109  sub getoptions { Line 124  sub getoptions {
124    
125    GetOptions(    GetOptions(
126      'source=s' => \$self->{opt}->{source},      'source=s' => \$self->{opt}->{source},
127      'node=s' => \$self->{opt}->{node},      'source-type=s' => \$self->{opt}->{'source-type'},
128        'source-node=s' => \$self->{opt}->{'source-node'},
129      'target=s' => \$self->{opt}->{target},      'target=s' => \$self->{opt}->{target},
130        'target-node=s' => \$self->{opt}->{'target-node'},
131      'action=s' => \$self->{opt}->{action},      'action=s' => \$self->{opt}->{action},
132      'mapping=s' => \$self->{opt}->{mapping},      'mapping-module=s' => \$self->{opt}->{'mapping-module'},
133      'prepare' => \$self->{opt}->{prepare},      'prepare' => \$self->{opt}->{prepare},
134      'fresh' => \$self->{opt}->{fresh},      'fresh' => \$self->{opt}->{fresh},
135      'help' => \&usage,      'help' => \&usage,
# Line 177  sub run { Line 194  sub run {
194        $erase = 1;        $erase = 1;
195        #$import = 1;        #$import = 1;
196      }      }
197      $self->{process}->startSync({  
198        source => $self->{opt}->{source},  
199        source_node => $self->{opt}->{node},  #print Dumper($self->{opt});
200        target => $self->{opt}->{target},  #exit;
201        mode => $mode,  
202        erase => $erase,      my %syncConfig;
203        import => $import,      tie %syncConfig, 'Tie::IxHash';
204        mapping => $self->{opt}->{mapping},      %syncConfig = (
205        prepare => $self->{opt}->{prepare},        map => {
206      });          moduleName => $self->{opt}->{'mapping-module'},
207          },
208          source => {
209            dbKey => $self->{opt}->{source},
210            nodeType => $self->{opt}->{'source-type'},
211            nodeName => $self->{opt}->{'source-node'},
212          },
213          target => {
214            dbKey => $self->{opt}->{target},
215            nodeName => $self->{opt}->{'target-node'},
216          },
217          process => {
218            mode => $mode,
219            erase => $erase,
220            import => $import,
221            prepare => $self->{opt}->{prepare},
222          },
223          metadata => {
224            config => $self->{config_metadata},
225          }
226        );
227    
228    #print Dumper(\%syncConfig);
229    
230        $self->{process}->startSync( \%syncConfig );
231    
232  =pod  =pod
233    } else {    } else {

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

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