Removes the AdditionalData properties for EntitySlim and moves them to real properties of IDocumentEntitySlim, renames PublishedCultureInfos to not be plural
This commit is contained in:
@@ -15,6 +15,8 @@ namespace Umbraco.Core.Models.Entities
|
||||
set => _cultureNames = value;
|
||||
}
|
||||
|
||||
public ContentVariation Variations { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Published { get; set; }
|
||||
|
||||
|
||||
@@ -25,18 +25,7 @@ namespace Umbraco.Core.Models.Entities
|
||||
/// Gets an entity representing "root".
|
||||
/// </summary>
|
||||
public static readonly IEntitySlim Root = new EntitySlim { Path = "-1", Name = "root", HasChildren = true };
|
||||
|
||||
/// <summary>
|
||||
/// Gets the AdditionalData key for culture names.
|
||||
/// </summary>
|
||||
public const string AdditionalCultureNames = "CultureNames";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the AdditionalData key for variations.
|
||||
/// </summary>
|
||||
public const string AdditionalVariations = "Variations";
|
||||
|
||||
|
||||
|
||||
// implement IEntity
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace Umbraco.Core.Models.Entities
|
||||
//fixme we need to supply more information than this and change this property name. This will need to include Published/Editor per variation since we need this information for the tree
|
||||
IReadOnlyDictionary<string, string> CultureNames { get; }
|
||||
|
||||
ContentVariation Variations { get; }
|
||||
|
||||
/// <summary>
|
||||
/// At least one variation is published
|
||||
/// </summary>
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
/// <summary>
|
||||
/// Gets culture infos for a culture.
|
||||
/// </summary>
|
||||
PublishedCultureInfos GetCulture(string culture = null);
|
||||
PublishedCultureInfo GetCulture(string culture = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets culture infos.
|
||||
@@ -132,7 +132,7 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
/// the cultures that are published. For a draft content, those that are 'available' ie
|
||||
/// have a non-empty content name.</para>
|
||||
/// </remarks>
|
||||
IReadOnlyDictionary<string, PublishedCultureInfos> Cultures { get; }
|
||||
IReadOnlyDictionary<string, PublishedCultureInfo> Cultures { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the content item (document, media...).
|
||||
|
||||
@@ -100,10 +100,10 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
public virtual string GetUrl(string culture = null) => _content.GetUrl(culture);
|
||||
|
||||
/// <inheritdoc />
|
||||
public PublishedCultureInfos GetCulture(string culture = null) => _content.GetCulture(culture);
|
||||
public PublishedCultureInfo GetCulture(string culture = null) => _content.GetCulture(culture);
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyDictionary<string, PublishedCultureInfos> Cultures => _content.Cultures;
|
||||
public IReadOnlyDictionary<string, PublishedCultureInfo> Cultures => _content.Cultures;
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual PublishedItemType ItemType => _content.ItemType;
|
||||
|
||||
@@ -6,12 +6,12 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
/// <summary>
|
||||
/// Contains culture specific values for <see cref="IPublishedContent"/>.
|
||||
/// </summary>
|
||||
public class PublishedCultureInfos
|
||||
public class PublishedCultureInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PublishedCultureInfos"/> class.
|
||||
/// Initializes a new instance of the <see cref="PublishedCultureInfo"/> class.
|
||||
/// </summary>
|
||||
public PublishedCultureInfos(string culture, string name, DateTime date)
|
||||
public PublishedCultureInfo(string culture, string name, DateTime date)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(culture)) throw new ArgumentNullOrEmptyException(nameof(culture));
|
||||
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentNullOrEmptyException(nameof(name));
|
||||
|
||||
Reference in New Issue
Block a user