Files
Umbraco-CMS/src/Umbraco.Core/Models/IContent.cs
Shannon Deminick 75d218d2e3 Updated how mappers for persistence work with the MapperFor attribute and have made BaseMapper public but have
kept all properties, etc.. internal just so that they can be found so we don't have to register them.
Updates unit test to ensure the plugin manager is init'd properly with the 'false' override. Ensures that the base
db test also initializes the plugin manager properly.
2013-03-13 01:09:29 +04:00

76 lines
2.6 KiB
C#

using System;
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; }
/// <summary>
/// Language of the data contained within this Content object.
/// </summary>
/// <remarks>
/// Left internal until multilingual support is implemented.
/// </remarks>
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);
}
}