More content refactoring (WIP, barely builds)

This commit is contained in:
Stephan
2017-11-07 19:49:14 +01:00
parent 6ce23ee8fd
commit 09f499d5d6
90 changed files with 2706 additions and 2769 deletions

View File

@@ -3,30 +3,49 @@
namespace Umbraco.Core.Models
{
/// <summary>
/// The <c>IContent</c> states of a content version.
/// The states of a content item.
/// </summary>
public enum PublishedState
{
// when a content version is loaded, its state is one of those two:
// when a content item is loaded, its state is one of those two:
/// <summary>
/// The version is published.
/// The content item is published.
/// </summary>
Published,
/// <summary>
/// The version is not published.
/// The content item is not published.
/// </summary>
/// <remarks>Also: the version is being saved, in order to register changes
/// made to an unpublished version of the content.</remarks>
Unpublished,
// legacy - remove
[Obsolete("kill!", true)]
Saved,
// when it is saved, its state can also be one of those:
// fixme
// what we can do is:
// - save changes to unpublished data (update current version)
// - save changes resulting from a publish (spawn a version)
// - save changes resulting from unpublishing (spawn a version)
//
// ContentRepository.CreateVersion
// only if uDocument.Published already, and Publishing
// ie updating what's already published
// creates a new uContentVersion, uDocumentVersion
// by copying everything from the existing (current) ones
// becomes the current ones
// then
// move all non-published uPropertyData to the new version
// create uPropertyData for new published values
// update/return the content w/new version
//
// saving is just updating draft
// publishing is described above
// un-publishing is ...
// also create a version to remember what was published
// and then on the new version, there is no 'new published values'
/// <summary>
/// The version is being saved, in order to register changes made to a published content.
/// </summary>