/*
Kooboo is a content management system based on ASP.NET MVC framework. Copyright 2009 Yardi Technology Limited.
This program is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program.
If not, see http://www.kooboo.com/gpl3/.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Everest.Library.Versioning{
public interface IVersioning
{
/// <summary>
/// Checkouts the specified UUID.
/// </summary>
/// <param name="uuid">The UUID.</param>
IVersionItem Checkout(IVersionable o, string user, string comment);
/// <summary>
/// Checkouts the specified UUID.
/// </summary>
/// <param name="uuid">The UUID.</param>
/// <param name="user">The user.</param>
/// <param name="comment">The comment.</param>
/// <returns></returns>
IVersionItem Checkout(Guid uuid, string user, string comment);
/// <summary>
/// Checkins the specified versionable.
/// </summary>
/// <param name="versionable">The versionable.</param>
/// <returns></returns>
IVersionItem Checkin(IVersionable o, string user, string comment);
/// <summary>
/// Reverts the specified UUID to the revision.
/// </summary>
/// <param name="uuid">The UUID.</param>
/// <param name="user">The user.</param>
/// <param name="revision">The revision.</param>
/// <param name="comment">The comment.</param>
/// <returns></returns>
IVersionItem Revert(Guid uuid, string user, int revision, string comment);
/// <summary>
/// Gets the versions.
/// </summary>
/// <param name="uuid">The UUID.</param>
/// <returns></returns>
IEnumerable<IVersionItem> GetVersions(Guid uuid);
/// <summary>
/// Gets the version.
/// </summary>
/// <param name="uuid">The UUID.</param>
/// <param name="revision">The revision.</param>
/// <returns></returns>
IVersionItem GetVersion(Guid uuid, int revision);
/// <summary>
/// Compares the specified UUID.
/// Default to compare to the last revision.
/// </summary>
/// <param name="uuid">The UUID.</param>
/// <param name="revision">The revision.</param>
/// <returns></returns>
IComparison Compare(Guid uuid, int revision);
/// <summary>
/// Compares the specified UUID.
/// Default to compare to the last revision.
/// </summary>
/// <param name="uuid">The UUID.</param>
/// <param name="sourceRevision">The source revision.</param>
/// <param name="toRevision">To revision.</param>
/// <returns></returns>
IComparison Compare(Guid uuid, int sourceRevision, int toRevision);
/// <summary>
/// Clears the version.
/// </summary>
/// <param name="uuid">The UUID.</param>
void ClearVersions(Guid uuid);
}
}
|