using System;
using System.Runtime.Serialization;
namespace Umbraco.Core.Models
{
///
/// Defines a Content object
///
public interface IContent : IContentBase
{
///
/// Gets or sets the template used by the Content.
/// This is used to override the default one from the ContentType.
///
ITemplate Template { get; set; }
///
/// Boolean indicating whether the Content is Published or not
///
bool Published { get; }
///
/// Language of the data contained within this Content object.
///
///
/// Left internal until multilingual support is implemented.
///
string Language { get; set; }
///
/// Gets or Sets the date the Content should be released and thus be published
///
DateTime? ReleaseDate { get; set; }
///
/// Gets or Sets the date the Content should expire and thus be unpublished
///
DateTime? ExpireDate { get; set; }
///
/// Id of the user who wrote/updated the Content
///
int WriterId { get; set; }
///
/// Gets the ContentType used by this content object
///
IContentType ContentType { get; }
///
/// Gets the current status of the Content
///
ContentStatus Status { get; }
///
/// Changes the for the current content object
///
/// New ContentType for this content
/// Leaves PropertyTypes intact after change
void ChangeContentType(IContentType contentType);
///
/// Changes the for the current content object and removes PropertyTypes,
/// which are not part of the new ContentType.
///
/// New ContentType for this content
/// Boolean indicating whether to clear PropertyTypes upon change
void ChangeContentType(IContentType contentType, bool clearProperties);
///
/// Changes the Published state of the content object
///
/// Boolean indicating whether content is published (true) or unpublished (false)
void ChangePublishedState(bool isPublished);
///
/// Changes the Trashed state of the content object
///
/// Boolean indicating whether content is trashed (true) or not trashed (false)
///
void ChangeTrashedState(bool isTrashed, int parentId = -1);
}
}