using System.Collections.Generic;
using Umbraco.Core.Models.Entities;
namespace Umbraco.Core.Models
{
///
/// Defines the base for a Content object with properties that
/// are shared between Content and Media.
///
public interface IContentBase : IUmbracoEntity
{
///
/// Integer Id of the default ContentType
///
int ContentTypeId { get; }
///
/// Gets the identifier of the writer.
///
int WriterId { get; set; }
///
/// Gets the version identifier.
///
int VersionId { get; }
///
/// List of properties, which make up all the data available for this Content object
///
/// Properties are loaded as part of the Content object graph
PropertyCollection Properties { get; set; }
///
/// List of PropertyGroups available on this Content object
///
/// PropertyGroups are kind of lazy loaded as part of the object graph
IEnumerable PropertyGroups { get; }
///
/// List of PropertyTypes available on this Content object
///
/// PropertyTypes are kind of lazy loaded as part of the object graph
IEnumerable PropertyTypes { get; }
///
/// Gets a value indicating whether the content entity has a property with the supplied alias.
///
/// Indicates that the content entity has a property with the supplied alias, but
/// not necessarily that the content has a value for that property. Could be missing.
bool HasProperty(string propertyTypeAlias);
///
/// Gets the value of a Property
///
object GetValue(string propertyTypeAlias, int? languageId = null, string segment = null, bool published = false);
///
/// Gets the typed value of a Property
///
TValue GetValue(string propertyTypeAlias, int? languageId = null, string segment = null, bool published = false);
///
/// Sets the (edited) value of a Property
///
void SetValue(string propertyTypeAlias, object value, int? languageId = null, string segment = null);
///
/// Gets a value indicating whether the content and all its properties values are valid.
///
Property[] ValidateAll();
///
/// Gets a value indicating whether the content and its properties values are valid.
///
Property[] Validate(int? languageId = null, string segment = null);
///
/// Gets a value indicating whether the content and its culture/any properties values are valid.
///
Property[] ValidateCulture(int? languageId = null);
}
}