/[cvs]/nfo/perl/libs/Data/Storage.pod
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage.pod

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

revision 1.1 by joko, Sun Jan 19 03:13:26 2003 UTC revision 1.2 by joko, Tue Feb 11 10:31:09 2003 UTC
# Line 17  Line 17 
17    
18  =head1 SYNOPSIS  =head1 SYNOPSIS
19    
20  =head2 BASIC ACCESS  =head2 ACCESS
21    
22  =head2 ADVANCED ACCESS    # connect to LDAP
23      my $ldapLocator = Data::Storage::Locator->new(
24    ... via inheritance:      ldap => {
25            type => "NetLDAP",
26      use Data::Storage;        dsn => "ldap:host=192.168.10.150;binddn='cn=root, o=netfrag.org, c=de';pass=secret",
27      my $proxyObj = new HttpProxy;        basedn => "o=netfrag.org, c=de",
28      $proxyObj->{url} = $url;        want_transactions => 0,
29      $proxyObj->{payload} = $content;        syncable => 1,
30      $self->{storage}->insert($proxyObj);      },
31          );
32      use Data::Storage;    my $ldapStorage = Data::Storage->new($ldapLocator);
33      my $proxyObj = HttpProxy->new(    $ldapStorage->connect();
34        url => $url,  
35        payload => $content,    # connect to MAPI
36      );    my $mapiLocator = Data::Storage::Locator->new(
37      $self->{storage}->insert($proxyObj);      outlook => {
38          type => "MAPI",
39          showProfileChooser => $self->{config}->get("mapi_showProfileChooser"),
40          ProfileName => $self->{config}->get("mapi_ProfileName"),
41          ProfilePass => $self->{config}->get("mapi_ProfilePass"),
42          syncable => 1,
43        },
44      );
45      my $mapiStorage = Data::Storage->new($mapiLocator);
46      $mapiStorage->connect();
47    
48    
49  =head2 SYNCHRONIZATION  =head2 SYNCHRONIZATION
50    
51      This functionality is (in the meanwhile) provided by the Data::Transfer::Sync module.
52    
53    =head3 proposal V1
54    
55    my $nodemapping = {    my $nodemapping = {
56      'LangText' => 'langtexts.csv',      'LangText' => 'langtexts.csv',
57      'Currency' => 'currencies.csv',      'Currency' => 'currencies.csv',
# Line 90  Line 103 
103      # create new sync object      # create new sync object
104      my $sync = Data::Transfer::Sync->new(      my $sync = Data::Transfer::Sync->new(
105        storages => {        storages => {
106          L => $self->{bizWorks}->{backend},          L => $self->{storage}->{backend},
107          R => $self->{bizWorks}->{resources},          R => $self->{storage}->{resources},
108        },        },
109        id_authorities        =>  [qw( L ) ],        id_authorities        =>  [qw( L ) ],
110        checksum_authorities  =>  [qw( L ) ],        checksum_authorities  =>  [qw( L ) ],
# Line 114  Line 127 
127    
128    }    }
129    
130    =head3 proposal V2
131    
132      # create a new synchronization object
133        my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version, __parent => $self );
134    
135      # configure the synchronization-object
136        $sync->configure(
137          source => {
138            storage => {
139              handle => $mapiStorage,
140              #isIdentAuthority => 1,
141              #isChecksumAuthority => 1,
142              #writeProtected => 1,
143            },
144          },
145          target => {
146            storage => {
147              handle => $ldapStorage,
148              #idAuthority => 1,
149              #isChecksumAuthority => 1,
150              #isWriteProtected => 0,
151            },
152          },
153          verbose => 1,
154        );
155    
156    
157  =head2 NOTE  =head2 NOTE
158    

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

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