Removing some obsolete install/feature state code

Changing blog/page slug updater to use orchard shell events interface
Changing default role/permission to use feature install event
Renaming state manager/provider to be consistent with other components

--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-05-28 14:01:10 -07:00
parent 13f44990ca
commit 52ef9f3c8c
22 changed files with 77 additions and 163 deletions

View File

@@ -1,12 +1,12 @@
using System.Linq;
using JetBrains.Annotations;
using Orchard.Blogs.Services;
using Orchard.Environment.Extensions;
using Orchard.Environment;
using Orchard.Tasks;
namespace Orchard.Blogs.Routing {
[UsedImplicitly]
public class BlogSlugConstraintUpdator : ExtensionManagerEvents, IBackgroundTask {
public class BlogSlugConstraintUpdator : IOrchardShellEvents, IBackgroundTask {
private readonly IBlogSlugConstraint _blogSlugConstraint;
private readonly IBlogService _blogService;
@@ -14,14 +14,15 @@ namespace Orchard.Blogs.Routing {
_blogSlugConstraint = blogSlugConstraint;
_blogService = blogService;
}
public override void Activated(ExtensionEventContext context) {
if (context.Extension.Descriptor.Name == "Orchard.Blogs") {
Refresh();
}
void IOrchardShellEvents.Activated() {
Refresh();
}
public void Sweep() {
void IOrchardShellEvents.Terminating() {
}
void IBackgroundTask.Sweep() {
Refresh();
}