2016-05-26 17:12:04 +02:00
|
|
|
|
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
|
|
|
|
{
|
2013-03-20 16:01:49 -01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets content identified by a route.
|
|
|
|
|
|
/// </summary>
|
2013-03-31 18:47:25 -02:00
|
|
|
|
/// <param name="preview">A value indicating whether to consider unpublished content.</param>
|
2013-03-20 16:01:49 -01:00
|
|
|
|
/// <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>
|
2016-05-26 17:12:04 +02:00
|
|
|
|
/// <para>The value of <paramref name="preview"/> overrides defaults.</para>
|
2013-03-20 16:01:49 -01:00
|
|
|
|
/// </remarks>
|
2016-05-26 17:12:04 +02:00
|
|
|
|
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
|
|
|
|
|
2013-03-19 17:51:55 -01:00
|
|
|
|
/// <summary>
|
2013-03-20 16:01:49 -01:00
|
|
|
|
/// Gets the route for a content identified by its unique identifier.
|
2013-03-19 17:51:55 -01:00
|
|
|
|
/// </summary>
|
2013-03-31 18:47:25 -02:00
|
|
|
|
/// <param name="preview">A value indicating whether to consider unpublished content.</param>
|
2013-03-20 16:01:49 -01:00
|
|
|
|
/// <param name="contentId">The content unique identifier.</param>
|
|
|
|
|
|
/// <returns>The route.</returns>
|
2016-05-26 17:12:04 +02:00
|
|
|
|
/// <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
|
|
|
|
}
|
|
|
|
|
|
}
|