using System;
using System.Collections.Generic;
using Umbraco.Core.Models.EntityBase;
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 Guid Id of the Content's Version
///
Guid Version { 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; }
///
/// Indicates whether the content object has a property with the supplied alias
///
/// Alias of the PropertyType
/// True if Property with given alias exists, otherwise False
bool HasProperty(string propertyTypeAlias);
///
/// Gets the value of a Property
///
/// Alias of the PropertyType
/// Value as an
object GetValue(string propertyTypeAlias);
///
/// Gets the value of a Property
///
/// Type of the value to return
/// Alias of the PropertyType
/// Value as a
TPassType GetValue(string propertyTypeAlias);
///
/// Sets the value of a Property
///
/// Alias of the PropertyType
/// Value to set for the Property
void SetValue(string propertyTypeAlias, object value);
///
/// Boolean indicating whether the content and its properties are valid
///
/// True if content is valid otherwise false
bool IsValid();
///
/// 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 = -20);
}
}