Ahh yes!
The dreadful state problem.
This is something that has been bothering me since the beginning and have not really tackled, but would welcome input, thoughts and pull requests
Basically, a content object has publishing state controlled by three factors:
isPublished : boolean (Marks that a content object is published)
publishedDate : date (Marks the date/time that this content object should be visible if published)
expiredDate : date (Marks the date/time that this content object should NOT be visible if published)
All these are in the BaseContent object, which means it is not versioned.So the 3 bits affect history.
So the problem gets complex when you have versioning involved. Because you need to somehow determine the last published version. Example:
version active
1 - false
2 - false
3 - active
If you see that, then version 3 is the active version and that’s the content we use. But only the last version is active right now. So we would have to somehow allow for:
1 - false
2 - false
3 - active
4 - false
5 - false
Because each save operation creates a history log. So somehow we must keep the active version until you publish the last versions. But then in the editor, you need to be able to recall the active version or the working version.
Anyways, you see were I am getting, it is more complex than that.
Luis Majano
CEO
Ortus Solutions, Corp
P/F: 1-888-557-8057
Direct: (909) 248-3408
ColdBox Platform: http://www.coldbox.org
ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox