using System;
using System.Collections.Generic;
using Yavsc.Model.FrontOffice;
namespace Yavsc.Model.WorkFlow
{
///
/// Interface content provider.
/// Class Assertion: Statuses.Length >= FinalStatuses.Length.
///
public interface IContentProvider : IModule, IDisposable
{
///
/// Gets the different status labels.
/// 0 is the starting status. Each status is an integer and the 0-based index
/// of a string in this array.
///
/// The status labels.
string [] Statuses { get; }
///
/// Gets the final statuses.
///
/// The final statuses.
bool [] FinalStatuses { get; }
///
/// Gets the writting status changes.
///
/// The writting statuses.
/// Wrid.
StatusChange[] GetWrittingStatuses (long wrid);
///
/// Gets the estimate status changes.
///
/// The estimate statuses.
/// Estid.
StatusChange[] GetEstimateStatuses (long estid);
///
/// Creates the estimate.
///
/// The estimate.
/// Responsible.
/// Client.
/// Title.
/// Description.
Estimate CreateEstimate (string responsible, string client, string title, string description);
///
/// Add a line to the specified estimate by id,
/// using the specified desc, ucost, count and productid.
///
/// Estimate identifier.
/// Textual description for this line.
/// Unitary cost.
/// Cost multiplier.
/// Product identifier.
long Write (long estid, string desc, decimal ucost, int count, string productid);
///
/// Gets the estimate by identifier.
///
/// The estimate.
/// Estimid.
Estimate GetEstimate (long estimid);
///
/// Gets the estimates created by
/// or for the given user by user name.
///
/// The estimates.
/// user name.
Estimate [] GetEstimates(string username);
///
/// Gets the estimates.
///
/// The estimates.
/// Client.
/// Responsible.
Estimate [] GetEstimates(string client, string responsible);
///
/// Drops the writting.
///
/// Wrid.
void DropWritting (long wrid);
///
/// Drops the estimate.
///
/// Estid.
void DropEstimate (long estid);
///
/// Tags the writting.
///
/// Wrid.
/// Tag.
void TagWritting (long wrid,string tag);
///
/// Drops the tag writting.
///
/// Wrid.
/// Tag.
void DropWrittingTag (long wrid,string tag);
///
/// Updates the writting.
///
/// Wr.
void UpdateWritting (Writting wr);
///
/// Updates the estimate.
///
/// Estim.
void UpdateEstimate (Estimate estim);
///
/// Sets the writting status.
///
/// Wrtid.
/// Status.
/// Username.
void SetWrittingStatus (long wrtid,int status,string username);
///
/// Sets the estimate status.
///
/// Estid.
/// Status.
/// Username.
void SetEstimateStatus (long estid,int status,string username);
///
/// Registers the command.
///
/// The command id in db.
/// COM.
long RegisterCommand (Command com);
///
/// Gets the commands.
///
/// The commands.
/// Username.
CommandSet GetCommands (string username);
///
/// Gets the stock status.
///
/// The stock status.
/// Product reference.
StockStatus GetStockStatus (string productReference);
}
}