Interface IRedirectUrlService
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IRedirectUrlService : IServiceMethods
View SourceDelete(Guid)
Deletes a redirect URL.
Declaration
void Delete(Guid id)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | id | The redirect URL identifier. | 
Delete(IRedirectUrl)
Deletes a redirect URL.
Declaration
void Delete(IRedirectUrl redirectUrl)Parameters
| Type | Name | Description | 
|---|---|---|
| IRedirectUrl | redirectUrl | The redirect URL to delete. | 
DeleteAll()
Deletes all redirect URLs.
Declaration
void DeleteAll()DeleteContentRedirectUrls(Guid)
Deletes all redirect URLs for a given content.
Declaration
void DeleteContentRedirectUrls(Guid contentKey)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | contentKey | The content unique key. | 
GetAllRedirectUrls(Int32, Int32, out Int64)
Gets all redirect URLs.
Declaration
virtual IEnumerable<IRedirectUrl> GetAllRedirectUrls(int skip, int take, out long total)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | skip | Amount to skip. | 
| System.Int32 | take | Amount to take. | 
| System.Int64 | total | The total count of redirect URLs. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IRedirectUrl> | The redirect URLs. | 
GetAllRedirectUrls(Int32, Int64, Int32, out Int64)
Gets all redirect URLs below a given content item.
Declaration
IEnumerable<IRedirectUrl> GetAllRedirectUrls(int rootContentId, long pageIndex, int pageSize, out long total)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | rootContentId | The content unique identifier. | 
| System.Int64 | pageIndex | The page index. | 
| System.Int32 | pageSize | The page size. | 
| System.Int64 | total | The total count of redirect URLs. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IRedirectUrl> | The redirect URLs. | 
GetAllRedirectUrls(Int64, Int32, out Int64)
Gets all redirect URLs.
Declaration
IEnumerable<IRedirectUrl> GetAllRedirectUrls(long pageIndex, int pageSize, out long total)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int64 | pageIndex | The page index. | 
| System.Int32 | pageSize | The page size. | 
| System.Int64 | total | The total count of redirect URLs. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IRedirectUrl> | The redirect URLs. | 
GetContentRedirectUrls(Guid)
Gets all redirect URLs for a content item.
Declaration
IEnumerable<IRedirectUrl> GetContentRedirectUrls(Guid contentKey)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | contentKey | The content unique key. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IRedirectUrl> | All redirect URLs for the content item. | 
GetMostRecentRedirectUrl(String)
Gets the most recent redirect URLs corresponding to an Umbraco redirect URL route.
Declaration
IRedirectUrl GetMostRecentRedirectUrl(string url)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | url | The Umbraco redirect URL route. | 
Returns
| Type | Description | 
|---|---|
| IRedirectUrl | The most recent redirect URLs corresponding to the route. | 
GetMostRecentRedirectUrl(String, String)
Gets the most recent redirect URLs corresponding to an Umbraco redirect URL route.
Declaration
IRedirectUrl GetMostRecentRedirectUrl(string url, string culture)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | url | The Umbraco redirect URL route. | 
| System.String | culture | The culture of the request. | 
Returns
| Type | Description | 
|---|---|
| IRedirectUrl | The most recent redirect URLs corresponding to the route. | 
GetMostRecentRedirectUrlAsync(String, String)
Gets the most recent redirect URLs corresponding to an Umbraco redirect URL route.
Declaration
virtual Task<IRedirectUrl> GetMostRecentRedirectUrlAsync(string url, string culture)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | url | The Umbraco redirect URL route. | 
| System.String | culture | The culture of the request. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<IRedirectUrl> | The most recent redirect URLs corresponding to the route. | 
Register(String, Guid, String)
Registers a redirect URL.
Declaration
void Register(string url, Guid contentKey, string culture = null)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | url | The Umbraco URL route. | 
| Guid | contentKey | The content unique key. | 
| System.String | culture | The culture. | 
Remarks
Is a proper Umbraco route eg /path/to/foo or 123/path/tofoo.
SearchRedirectUrls(String, Int32, Int32, out Int64)
Searches for all redirect URLs that contain a given search term in their URL property.
Declaration
virtual IEnumerable<IRedirectUrl> SearchRedirectUrls(string searchTerm, int skip, int take, out long total)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | searchTerm | The term to search for. | 
| System.Int32 | skip | Amount to skip. | 
| System.Int32 | take | Amount to take. | 
| System.Int64 | total | The total count of redirect URLs. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IRedirectUrl> | The redirect URLs. | 
SearchRedirectUrls(String, Int64, Int32, out Int64)
Searches for all redirect URLs that contain a given search term in their URL property.
Declaration
IEnumerable<IRedirectUrl> SearchRedirectUrls(string searchTerm, long pageIndex, int pageSize, out long total)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | searchTerm | The term to search for. | 
| System.Int64 | pageIndex | The page index. | 
| System.Int32 | pageSize | The page size. | 
| System.Int64 | total | The total count of redirect URLs. | 
Returns
| Type | Description | 
|---|---|
| IEnumerable<IRedirectUrl> | The redirect URLs. |