From 63ea2492d1b7676d5aae7c9dd7912ca78159c321 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 26 Mar 2011 13:44:35 +0000 Subject: many more BrowserObjects --- lib/DeWeave/BO/History.pm | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lib/DeWeave/BO/History.pm (limited to 'lib/DeWeave/BO/History.pm') diff --git a/lib/DeWeave/BO/History.pm b/lib/DeWeave/BO/History.pm new file mode 100644 index 0000000..3e9040e --- /dev/null +++ b/lib/DeWeave/BO/History.pm @@ -0,0 +1,49 @@ +package DeWeave::BO::History; +use Moose; +use namespace::autoclean; +use MooseX::Types::Moose qw(Str ArrayRef Int); +use MooseX::Types::Structured qw(Dict); + +extends 'DeWeave::EDO'; + +has histUri => ( + isa => Str, + required => 1, + is => 'ro', +); + +has title => ( + isa => Str, + required => 0, + is => 'ro', +); + +has visits => ( + isa => ArrayRef[Dict[date => Int, type => Int]], + required => 1, + is => 'ro', +); + +{ +my @visit_types=( + undef, + 'link', + 'typed', + 'bookmark', + 'embed', + 'redirect_permanent', + 'redirect_temporary', + 'download', + 'framed_link', +); +sub visit_type { + my ($self,$type_int) = @_; + + if ($type_int > 0 && $type_int < @visit_types) { + return $visit_types[$type_int]; + } + return undef; +} +} + +1; -- cgit v1.2.3