Files
Umbraco-CMS/src/Umbraco.Web/PublishedCache/IPublishedContentCache.cs

53 lines
2.7 KiB
C#
Raw Normal View History

using Umbraco.Core.Models;
2014-04-02 11:22:38 +02:00
using Umbraco.Core.Models.PublishedContent;
2013-02-05 06:31:13 -01:00
namespace Umbraco.Web.PublishedCache
{
2013-04-10 14:02:16 -02:00
public interface IPublishedContentCache : IPublishedCache
2013-02-05 06:31:13 -01:00
{
/// <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);
/// <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);
2013-02-05 06:31:13 -01:00
/// <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);
/// <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);
2013-02-05 06:31:13 -01:00
}
}