--- nfo/perl/libs/Data/Transfer/Sync/API/V1.pm 2003/02/09 05:04:32 1.1 +++ nfo/perl/libs/Data/Transfer/Sync/API/V1.pm 2003/02/11 09:52:02 1.2 @@ -1,6 +1,6 @@ ## ------------------------------------------------------------------------- ## -## $Id: V1.pm,v 1.1 2003/02/09 05:04:32 joko Exp $ +## $Id: V1.pm,v 1.2 2003/02/11 09:52:02 joko Exp $ ## ## Copyright (c) 2002, 2003 Andreas Motl ## @@ -8,6 +8,9 @@ ## ## ------------------------------------------------------------------------- ## $Log: V1.pm,v $ +## Revision 1.2 2003/02/11 09:52:02 joko +## + backward compatibility, some fixes +## ## Revision 1.1 2003/02/09 05:04:32 joko ## + initial commit ## @@ -44,10 +47,10 @@ } # check - do we have a mapping? - if (!$self->{options}->{details}) { - $logger->warning( __PACKAGE__ . "->checkOptions: Error while resolving resource metadata - no 'fieldmap' could be determined."); - $result = 0; - } + #if (!$self->{options}->{details}) { + # $logger->warning( __PACKAGE__ . "->checkOptions: Error while resolving resource metadata - no 'fieldmap' could be determined."); + # $result = 0; + #} # TODO: extend! @@ -196,15 +199,23 @@ $logger->debug( __PACKAGE__ . "->options_to_V2"); + # trace + #print Dumper($map); + # move the 'target' address $map->{target} = { address => $map->{target} }; + $map->{source} = { address => $map->{source} }; - $map->{source}->{ident} = $map->{source_ident}; + $map->{source}->{ident} = $map->{source_ident} if $map->{source_ident}; delete $map->{source_ident}; - $map->{source}->{type} = $map->{source_type}; - delete $map->{source_type}; + $map->{source}->{callbacks}->{read} = $map->{source_callbacks_read} if $map->{source_callbacks_read}; + delete $map->{source_callbacks_read}; + $map->{source}->{callbacks}->{write} = $map->{source_callbacks_write} if $map->{source_callbacks_write}; + delete $map->{source_callbacks_write}; + $map->{source}->{filter} = $map->{source_filter} if $map->{source_filter}; + delete $map->{source_filter}; - $map->{target}->{ident} = $map->{target_ident}; + $map->{target}->{ident} = $map->{target_ident} if $map->{target_ident}; delete $map->{target_ident}; }