2018-06-29 19:52:40 +02:00
|
|
|
|
using System.Globalization;
|
|
|
|
|
|
using Umbraco.Core.Models;
|
|
|
|
|
|
using Umbraco.Core.Models.PublishedContent;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.PublishedCache
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IPublishedContentCache : IPublishedCache
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets content identified by a route.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="preview">A value indicating whether to consider unpublished content.</param>
|
|
|
|
|
|
/// <param name="route">The route</param>
|
|
|
|
|
|
/// <param name="hideTopLevelNode">A value forcing the HideTopLevelNode setting.</param>
|
|
|
|
|
|
/// <returns>The content, or null.</returns>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// <para>A valid route is either a simple path eg <c>/foo/bar/nil</c> or a root node id and a path, eg <c>123/foo/bar/nil</c>.</para>
|
|
|
|
|
|
/// <para>If <param name="hideTopLevelNode" /> is <c>null</c> then the settings value is used.</para>
|
|
|
|
|
|
/// <para>The value of <paramref name="preview"/> overrides defaults.</para>
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
IPublishedContent GetByRoute(bool preview, string route, bool? hideTopLevelNode = null, string culture = null);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets content identified by a route.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="route">The route</param>
|
|
|
|
|
|
/// <param name="hideTopLevelNode">A value forcing the HideTopLevelNode setting.</param>
|
|
|
|
|
|
/// <returns>The content, or null.</returns>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// <para>A valid route is either a simple path eg <c>/foo/bar/nil</c> or a root node id and a path, eg <c>123/foo/bar/nil</c>.</para>
|
|
|
|
|
|
/// <para>If <param name="hideTopLevelNode" /> is <c>null</c> then the settings value is used.</para>
|
|
|
|
|
|
/// <para>Considers published or unpublished content depending on defaults.</para>
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
IPublishedContent GetByRoute(string route, bool? hideTopLevelNode = null, string culture = null);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the route for a content identified by its unique identifier.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="preview">A value indicating whether to consider unpublished content.</param>
|
|
|
|
|
|
/// <param name="contentId">The content unique identifier.</param>
|
|
|
|
|
|
/// <returns>The route.</returns>
|
|
|
|
|
|
/// <remarks>The value of <paramref name="preview"/> overrides defaults.</remarks>
|
|
|
|
|
|
string GetRouteById(bool preview, int contentId, string culture = null);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the route for a content identified by its unique identifier.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="contentId">The content unique identifier.</param>
|
|
|
|
|
|
/// <returns>The route.</returns>
|
|
|
|
|
|
/// <remarks>Considers published or unpublished content depending on defaults.</remarks>
|
|
|
|
|
|
string GetRouteById(int contentId, string culture = null);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|