From bf1cb7b7211be5aeb8b7aa64ff64a497cc6ac799 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 3 Mar 2010 21:10:35 -0800 Subject: [PATCH] Aspect to Role renaming --- lib/WebGUI/Asset/MatrixListing.pm | 33 +------------------ lib/WebGUI/Asset/WikiPage.pm | 4 +-- lib/WebGUI/Asset/Wobject/Gallery.pm | 2 +- lib/WebGUI/Asset/Wobject/StoryArchive.pm | 2 +- lib/WebGUI/Asset/Wobject/StoryTopic.pm | 2 +- lib/WebGUI/Asset/Wobject/SyndicatedContent.pm | 2 +- lib/WebGUI/Asset/Wobject/WikiMaster.pm | 4 +-- 7 files changed, 9 insertions(+), 40 deletions(-) diff --git a/lib/WebGUI/Asset/MatrixListing.pm b/lib/WebGUI/Asset/MatrixListing.pm index d8db8d17f..f0f10c2ae 100644 --- a/lib/WebGUI/Asset/MatrixListing.pm +++ b/lib/WebGUI/Asset/MatrixListing.pm @@ -16,7 +16,6 @@ package WebGUI::Asset::MatrixListing; use strict; use Tie::IxHash; -#use base qw(WebGUI::AssetAspect::Comments WebGUI::Asset); use Moose; use WebGUI::Definition::Asset; extends 'WebGUI::Asset'; @@ -117,6 +116,7 @@ property lastUpdated => ( fieldType => 'hidden', ); +with 'WebGUI::Role::Asset::Comments'; use WebGUI::Utility; @@ -193,37 +193,6 @@ sub canEdit { } } -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -defines asset properties for MatrixListing instances. - -=head3 session - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my %properties; - tie %properties, 'Tie::IxHash'; - my $i18n = WebGUI::International->new($session, "Asset_MatrixListing"); - %properties = ( - ); - push(@{$definition}, { - className=>'WebGUI::Asset::MatrixListing', - properties=>\%properties - }); - return $class->next::method($session, $definition); -} - - #------------------------------------------------------------------- =head2 duplicate diff --git a/lib/WebGUI/Asset/WikiPage.pm b/lib/WebGUI/Asset/WikiPage.pm index 4d4b66940..7a36b3417 100644 --- a/lib/WebGUI/Asset/WikiPage.pm +++ b/lib/WebGUI/Asset/WikiPage.pm @@ -52,8 +52,8 @@ property isFeatured => ( ); with 'WebGUI::Role::Asset::AlwaysHidden'; -with 'WebGUI::AssetAspect::Subscribable'; -with 'WebGUI::AssetAspect::Comments'; +with 'WebGUI::Role::Asset::Subscribable'; +with 'WebGUI::Role::Asset::Comments'; use WebGUI::International; use WebGUI::Utility; diff --git a/lib/WebGUI/Asset/Wobject/Gallery.pm b/lib/WebGUI/Asset/Wobject/Gallery.pm index 081864533..c3a956242 100644 --- a/lib/WebGUI/Asset/Wobject/Gallery.pm +++ b/lib/WebGUI/Asset/Wobject/Gallery.pm @@ -320,7 +320,7 @@ property defaultFilesPerPage => ( label => [ 'defaultFilesPerPage label' , 'Asset_Gallery'], hoverHelp => [ 'defaultFilesPerPage description' , 'Asset_Gallery'], ); -with 'WebGUI::AssetAspect::RssFeed'; +with 'WebGUI::Role::Asset::RssFeed'; use JSON; diff --git a/lib/WebGUI/Asset/Wobject/StoryArchive.pm b/lib/WebGUI/Asset/Wobject/StoryArchive.pm index a43d8bec4..67e22a1eb 100644 --- a/lib/WebGUI/Asset/Wobject/StoryArchive.pm +++ b/lib/WebGUI/Asset/Wobject/StoryArchive.pm @@ -95,7 +95,7 @@ property approvalWorkflowId => ( label => ['approval workflow', 'Asset_StoryArchive'], hoverHelp => ['approval workflow help', 'Asset_StoryArchive'], ); -with 'WebGUI::AssetAspect::RssFeed'; +with 'WebGUI::Role::Asset::RssFeed'; use WebGUI::International; use WebGUI::Utility; diff --git a/lib/WebGUI/Asset/Wobject/StoryTopic.pm b/lib/WebGUI/Asset/Wobject/StoryTopic.pm index 97aac9cc4..7aea9a225 100644 --- a/lib/WebGUI/Asset/Wobject/StoryTopic.pm +++ b/lib/WebGUI/Asset/Wobject/StoryTopic.pm @@ -49,7 +49,7 @@ property storyTemplateId => ( namespace => 'Story', default => 'TbDcVLbbznPi0I0rxQf2CQ', ); -with 'WebGUI::AssetAspect::RssFeed'; +with 'WebGUI::Role::Asset::RssFeed'; use WebGUI::International; diff --git a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm index 40002d2fa..84a2aa447 100644 --- a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm +++ b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -71,7 +71,7 @@ property hasTerms => ( maxlength => 255, ); -with 'WebGUI::AssetAspect::RssFeed'; +with 'WebGUI::Role::Asset::RssFeed'; use WebGUI::Macro; use XML::FeedPP; diff --git a/lib/WebGUI/Asset/Wobject/WikiMaster.pm b/lib/WebGUI/Asset/Wobject/WikiMaster.pm index 56d4fb733..8cf7e4b55 100644 --- a/lib/WebGUI/Asset/Wobject/WikiMaster.pm +++ b/lib/WebGUI/Asset/Wobject/WikiMaster.pm @@ -181,8 +181,8 @@ property filterCode => ( label => ['filter code', 'Asset_WikiMaster'], hoverHelp => ['filter code description', 'Asset_WikiMaster'], ); -with 'WebGUI::AssetAspect::Subscribable'; -with 'WebGUI::AssetAspect::RssFeed'; +with 'WebGUI::Role::Asset::Subscribable'; +with 'WebGUI::Role::Asset::RssFeed'; use WebGUI::International; use WebGUI::Utility;