using System;
using System.Collections.Generic;
using System.Globalization;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
namespace Umbraco.Web.Routing
{
public interface IPublishedRequest
{
///
/// Gets the cleaned up inbound Uri used for routing.
///
/// The cleaned up Uri has no virtual directory, no trailing slash, no .aspx extension, etc.
Uri Uri { get; }
///
/// Gets a value indicating whether the Umbraco Backoffice should ignore a collision for this request.
///
bool IgnorePublishedContentCollisions { get; }
///
/// Gets a value indicating the requested content.
///
IPublishedContent PublishedContent { get; }
///
/// Gets a value indicating whether the current published content has been obtained
/// from the initial published content following internal redirections exclusively.
///
/// Used by PublishedContentRequestEngine.FindTemplate() to figure out whether to
/// apply the internal redirect or not, when content is not the initial content.
bool IsInternalRedirect { get; }
///
/// Gets the template assigned to the request (if any)
///
ITemplate Template { get; }
///
/// Gets the content request's domain.
///
/// Is a DomainAndUri object ie a standard Domain plus the fully qualified uri. For example,
/// the Domain may contain "example.com" whereas the Uri will be fully qualified eg "http://example.com/".
DomainAndUri Domain { get; }
///
/// Gets the content request's culture.
///
CultureInfo Culture { get; }
///
/// Gets the url to redirect to, when the content request triggers a redirect.
///
string RedirectUrl { get; }
///
/// Gets the content request http response status code.
///
/// Does not actually set the http response status code, only registers that the response
/// should use the specified code. The code will or will not be used, in due time.
int? ResponseStatusCode { get; }
///
/// Gets a list of Extensions to append to the Response.Cache object.
///
IReadOnlyList CacheExtensions { get; }
///
/// Gets a dictionary of Headers to append to the Response object.
///
IReadOnlyDictionary Headers { get; }
///
/// Gets a value indicating if the no-cache value should be added to the Cache-Control header
///
bool SetNoCacheHeader { get; }
}
}