[Bps-public-commit] r11719 - in Prophet/trunk: . lib/Prophet/Replica

jesse at bestpractical.com jesse at bestpractical.com
Sun Apr 13 21:31:44 EDT 2008


Author: jesse
Date: Sun Apr 13 21:31:44 2008
New Revision: 11719

Added:
   Prophet/trunk/lib/Prophet/Replica/FS.pm
Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Replica.pm

Log:
 r29654 at 31b:  jesse | 2008-04-13 21:25:45 -0400
 * Adding a sketch of a fs replica type's api


Modified: Prophet/trunk/lib/Prophet/Replica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica.pm	(original)
+++ Prophet/trunk/lib/Prophet/Replica.pm	Sun Apr 13 21:31:44 2008
@@ -238,7 +238,6 @@
     my $self      = shift;
     my $changeset = shift;
 
-    Carp::cluck;
     $self->begin_edit;
     $self->record_changeset($changeset);
 

Added: Prophet/trunk/lib/Prophet/Replica/FS.pm
==============================================================================
--- (empty file)
+++ Prophet/trunk/lib/Prophet/Replica/FS.pm	Sun Apr 13 21:31:44 2008
@@ -0,0 +1,71 @@
+use warnings;
+use strict;
+
+package Prophet::Replica::FS;
+use base qw/Prophet::Replica/;
+
+
+use constant scheme => 'svn';
+
+sub setup {
+
+} 
+
+sub state_handle { return shift }  #XXX TODO better way to handle this?
+sub uuid {
+    my $self = shift;
+}
+sub most_recent_changeset {
+    my $self = shift;
+}
+sub fetch_changeset {
+    my ($self,$changeset_id) = validate_pos(@_,1,1);
+
+    my $changeset = Prophet::ChangeSet->new(); #
+    return $changeset; # a Prophet::ChangeSet
+}
+sub record_changeset_integration {
+    my ($self, $changeset) = validate_pos( @_, 1, { isa => 'Prophet::ChangeSet' } );
+
+    $self->_set_original_source_metadata($changeset);
+    return $self->SUPER::record_changeset_integration($changeset);
+}
+sub begin_edit {
+}
+sub commit_edit {
+}
+sub create_record {
+    my %args = validate( @_, { uuid => 1, props => 1, type => 1 } );
+
+}
+sub delete_record {
+    my $self = shift;
+    my %args = validate( @_, { uuid => 1, type => 1 } );
+}
+sub set_record_props {
+    my $self = shift;
+    my %args = validate( @_, { uuid => 1, props => 1, type => 1 } );
+
+}
+sub get_record_props {
+    my $self = shift;
+    my %args = validate( @_, { uuid => 1, type => 1 } );
+}
+sub record_exists {
+    my $self = shift;
+    my %args = validate( @_, { uuid => 1, type => 1, root => undef } );
+}
+sub list_records {
+    my $self = shift;
+    my %args = validate( @_ => { type => 1 } );
+}
+sub list_types {
+    my $self = shift;
+}
+sub type_exists {
+    my $self = shift;
+    my %args = validate( @_, { type => 1, root => undef } );
+}
+
+
+ 1;



More information about the Bps-public-commit mailing list