Saving is better done in ContentManager because we must fire events to
signify a successful save, same as we do for delete/rename events.

The actual saving responsibility might be ContentManager's job; but I'm just suggesting that any state manipulation of the page, including saving it, should be done via methods in the WikiPage interface. Whether they delegate to ContentManager is a matter of taste.

The practical reason being that ContentManager is not stable and won't be for a while. I would like to keep it essentially private to the engine.

The idea is that e.g. plugin/filter writers don't have to learn a very complex, non-stable API to do the stuff that they do often. Like setting attributes and saving pages. This also means that within our code, we should rather use the preferred API than an "internal" API.

/Janne

Reply via email to