--- nfo/perl/libs/Data/Storage.pod 2003/01/19 03:13:26 1.1 +++ nfo/perl/libs/Data/Storage.pod 2003/02/11 10:31:09 1.2 @@ -17,28 +17,41 @@ =head1 SYNOPSIS -=head2 BASIC ACCESS +=head2 ACCESS -=head2 ADVANCED ACCESS - - ... via inheritance: - - use Data::Storage; - my $proxyObj = new HttpProxy; - $proxyObj->{url} = $url; - $proxyObj->{payload} = $content; - $self->{storage}->insert($proxyObj); - - use Data::Storage; - my $proxyObj = HttpProxy->new( - url => $url, - payload => $content, - ); - $self->{storage}->insert($proxyObj); + # connect to LDAP + my $ldapLocator = Data::Storage::Locator->new( + ldap => { + type => "NetLDAP", + dsn => "ldap:host=192.168.10.150;binddn='cn=root, o=netfrag.org, c=de';pass=secret", + basedn => "o=netfrag.org, c=de", + want_transactions => 0, + syncable => 1, + }, + ); + my $ldapStorage = Data::Storage->new($ldapLocator); + $ldapStorage->connect(); + + # connect to MAPI + my $mapiLocator = Data::Storage::Locator->new( + outlook => { + type => "MAPI", + showProfileChooser => $self->{config}->get("mapi_showProfileChooser"), + ProfileName => $self->{config}->get("mapi_ProfileName"), + ProfilePass => $self->{config}->get("mapi_ProfilePass"), + syncable => 1, + }, + ); + my $mapiStorage = Data::Storage->new($mapiLocator); + $mapiStorage->connect(); =head2 SYNCHRONIZATION + This functionality is (in the meanwhile) provided by the Data::Transfer::Sync module. + +=head3 proposal V1 + my $nodemapping = { 'LangText' => 'langtexts.csv', 'Currency' => 'currencies.csv', @@ -90,8 +103,8 @@ # create new sync object my $sync = Data::Transfer::Sync->new( storages => { - L => $self->{bizWorks}->{backend}, - R => $self->{bizWorks}->{resources}, + L => $self->{storage}->{backend}, + R => $self->{storage}->{resources}, }, id_authorities => [qw( L ) ], checksum_authorities => [qw( L ) ], @@ -114,6 +127,32 @@ } +=head3 proposal V2 + + # create a new synchronization object + my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version, __parent => $self ); + + # configure the synchronization-object + $sync->configure( + source => { + storage => { + handle => $mapiStorage, + #isIdentAuthority => 1, + #isChecksumAuthority => 1, + #writeProtected => 1, + }, + }, + target => { + storage => { + handle => $ldapStorage, + #idAuthority => 1, + #isChecksumAuthority => 1, + #isWriteProtected => 0, + }, + }, + verbose => 1, + ); + =head2 NOTE