Files
Umbraco-CMS/src/Umbraco.Core/Models/IContent.cs
Shannon 50f4bbdd1e U4-8569 Saving a member type changes the UniqueId of custom properties
This fixes the member property type UniqueID SQL and mapping.
This ensures that the main repositories fully assert/compare all fetched properties.
2016-06-07 12:20:10 +02:00

89 lines
3.1 KiB
C#

using System;
using System.ComponentModel;
using System.Diagnostics;
using Umbraco.Core.Persistence.Mappers;
namespace Umbraco.Core.Models
{
/// <summary>
/// Defines a Content object
/// </summary>
public interface IContent : IContentBase
{
/// <summary>
/// Gets or sets the template used by the Content.
/// This is used to override the default one from the ContentType.
/// </summary>
ITemplate Template { get; set; }
/// <summary>
/// Boolean indicating whether the Content is Published or not
/// </summary>
bool Published { get; }
[Obsolete("This will be removed in future versions")]
[EditorBrowsable(EditorBrowsableState.Never)]
string Language { get; set; }
/// <summary>
/// Gets or Sets the date the Content should be released and thus be published
/// </summary>
DateTime? ReleaseDate { get; set; }
/// <summary>
/// Gets or Sets the date the Content should expire and thus be unpublished
/// </summary>
DateTime? ExpireDate { get; set; }
/// <summary>
/// Id of the user who wrote/updated the Content
/// </summary>
int WriterId { get; set; }
/// <summary>
/// Gets the ContentType used by this content object
/// </summary>
IContentType ContentType { get; }
/// <summary>
/// Gets the current status of the Content
/// </summary>
ContentStatus Status { get; }
/// <summary>
/// Changes the <see cref="IContentType"/> for the current content object
/// </summary>
/// <param name="contentType">New ContentType for this content</param>
/// <remarks>Leaves PropertyTypes intact after change</remarks>
void ChangeContentType(IContentType contentType);
/// <summary>
/// Changes the <see cref="IContentType"/> for the current content object and removes PropertyTypes,
/// which are not part of the new ContentType.
/// </summary>
/// <param name="contentType">New ContentType for this content</param>
/// <param name="clearProperties">Boolean indicating whether to clear PropertyTypes upon change</param>
void ChangeContentType(IContentType contentType, bool clearProperties);
/// <summary>
/// Changes the Published state of the content object
/// </summary>
void ChangePublishedState(PublishedState state);
/// <summary>
/// Creates a deep clone of the current entity with its identity/alias and it's property identities reset
/// </summary>
/// <returns></returns>
IContent DeepCloneWithResetIdentities();
/// <summary>
/// Gets a value indicating whether the content has a published version.
/// </summary>
bool HasPublishedVersion { get; }
/// <summary>
/// Gets the unique identifier of the published version, if any.
/// </summary>
Guid PublishedVersionGuid { get; }
}
}