using System; using System.Collections.Generic; using Umbraco.Core; using Umbraco.Core.Models.PublishedContent; namespace Umbraco.Web.Routing { public interface IPublishedUrlProvider { /// /// Gets or sets the provider url mode. /// UrlMode Mode { get; set; } /// /// Gets the url of a published content. /// /// The published content identifier. /// The url mode. /// A culture. /// The current absolute url. /// The url for the published content. string GetUrl(Guid id, UrlMode mode = UrlMode.Default, string culture = null, Uri current = null); /// /// Gets the url of a published content. /// /// The published content identifier. /// The url mode. /// A culture. /// The current absolute url. /// The url for the published content. string GetUrl(int id, UrlMode mode = UrlMode.Default, string culture = null, Uri current = null); /// /// Gets the url of a published content. /// /// The published content. /// The url mode. /// A culture. /// The current absolute url. /// The url for the published content. /// /// The url is absolute or relative depending on mode and on current. /// If the published content is multi-lingual, gets the url for the specified culture or, /// when no culture is specified, the current culture. /// If the provider is unable to provide a url, it returns "#". /// string GetUrl(IPublishedContent content, UrlMode mode = UrlMode.Default, string culture = null, Uri current = null); string GetUrlFromRoute(int id, string route, string culture); /// /// Gets the other urls of a published content. /// /// The published content id. /// The other urls for the published content. /// /// Other urls are those that GetUrl would not return in the current context, but would be valid /// urls for the node in other contexts (different domain for current request, umbracoUrlAlias...). /// The results depend on the current url. /// IEnumerable GetOtherUrls(int id); /// /// Gets the other urls of a published content. /// /// The published content id. /// The current absolute url. /// The other urls for the published content. /// /// Other urls are those that GetUrl would not return in the current context, but would be valid /// urls for the node in other contexts (different domain for current request, umbracoUrlAlias...). /// IEnumerable GetOtherUrls(int id, Uri current); /// /// Gets the url of a media item. /// /// /// /// /// /// /// string GetMediaUrl(Guid id, UrlMode mode = UrlMode.Default, string culture = null, string propertyAlias = Constants.Conventions.Media.File, Uri current = null); /// /// Gets the url of a media item. /// /// The published content. /// The property alias to resolve the url from. /// The url mode. /// The variation language. /// The current absolute url. /// The url for the media. /// /// The url is absolute or relative depending on mode and on current. /// If the media is multi-lingual, gets the url for the specified culture or, /// when no culture is specified, the current culture. /// If the provider is unable to provide a url, it returns . /// string GetMediaUrl(IPublishedContent content, UrlMode mode = UrlMode.Default, string culture = null, string propertyAlias = Constants.Conventions.Media.File, Uri current = null); } }