provide and preserve aperture information
[scpubgit/DX.git] / lib / DX / ActionBuilder / Normal.pm
index 089c956..8b3096e 100644 (file)
@@ -2,12 +2,17 @@ package DX::ActionBuilder::Normal;
 
 use DX::Action::SetValue;
 use DX::Action::AddValue;
+use DX::Utils qw(:event_types);
 use DX::Class;
 
 with 'DX::Role::ActionBuilder';
 
 has target_path => (is => 'ro', required => 1);
 
+sub aperture_for_set_value {
+  [ [ VALUE_SET ,=> @{$_[0]->target_path} ] ]
+}
+
 sub action_for_set_value {
   my ($self, $value) = @_;
   DX::Action::SetValue->new(
@@ -16,6 +21,11 @@ sub action_for_set_value {
   );
 }
 
+sub aperture_for_add_member {
+  my ($self, $at) = @_;
+  [ [ VALUE_EXISTS ,=> @{$self->target_path}, $at ] ]
+}
+
 sub action_for_add_member {
   my ($self, $at, $value) = @_;
   my $ab = $self->specialize_for_member($at);