Files
Orchard/src/Orchard.Web/Core/Common/Services/IRoutableService.cs
Renaud Paquay 632fb4c863 Fix bug 16417.
See http://orchard.codeplex.com/WorkItem/View.aspx?WorkItemId=16417

We considering the list of conflicting slug, we should ignore the current
content item...

--HG--
branch : dev
2010-05-13 13:01:58 -07:00

28 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using Orchard.Core.Common.Models;
namespace Orchard.Core.Common.Services {
public interface IRoutableService : IDependency {
void FillSlug<TModel>(TModel model) where TModel : RoutableAspect;
void FillSlug<TModel>(TModel model, Func<string, string> generateSlug) where TModel : RoutableAspect;
string GenerateUniqueSlug(string slugCandidate, IEnumerable<string> existingSlugs);
/// <summary>
/// Returns any content item of the specified content type with similar slugs
/// </summary>
IEnumerable<RoutableAspect> GetSimilarSlugs(string contentType, string slug);
/// <summary>
/// Validates the given slug
/// </summary>
bool IsSlugValid(string slug);
/// <summary>
/// Defines the slug of a RoutableAspect and validate its unicity
/// </summary>
/// <returns>True if the slug has been created, False if a conflict occured</returns>
bool ProcessSlug(RoutableAspect part);
}
}