2010-01-20 01:19:16 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Orchard.Core.Common.Models;
|
2010-01-15 23:44:22 +00:00
|
|
|
|
|
|
|
|
|
namespace Orchard.Core.Common.Services {
|
|
|
|
|
public interface IRoutableService : IDependency {
|
2010-01-20 01:19:16 +00:00
|
|
|
|
void FillSlug<TModel>(TModel model) where TModel : RoutableAspect;
|
|
|
|
|
void FillSlug<TModel>(TModel model, Func<string, string> generateSlug) where TModel : RoutableAspect;
|
2010-01-15 23:44:22 +00:00
|
|
|
|
string GenerateUniqueSlug(string slugCandidate, IEnumerable<string> existingSlugs);
|
2010-04-20 16:09:13 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns any content item of the specified content type with similar slugs
|
|
|
|
|
/// </summary>
|
|
|
|
|
string[] 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>
|
|
|
|
|
void ProcessSlug(RoutableAspect part);
|
|
|
|
|
|
2010-01-15 23:44:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|