///
/// Copyright © 2003-2008 JetBrains s.r.o.
/// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder).
///
namespace JetBrains.Omea.OpenAPI
{
///
/// Manage rules which control automatic removal of resources given the special
/// conditions and exceptions from newsgroups, feeds, or deleted resources view.
///
/// 530
public interface IExpirationRuleManager
{
///
/// Create and register an expiration rule for specified folders.
///
/// A list of folder resources (e.g. Newsgroups or RSSFeeds) which
/// will be monitored for resources deletion.
/// Control the number of resources in the folder under monitoring. If set to meaningful
/// value (not -1) then time period exceptions are not used.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
/// A resource for the registered rule.
IResource RegisterRule( IResourceList folders, int count, IResource[] exceptions, IResource[] actions );
///
/// Create and register an expiration rule for specified folder resource type. This default rule will
/// be applied by default to all such folders.
///
/// A resource representing "resource type" for a folder objects.
/// Folders of this type will be monitored for resources deletion.
/// Control the number of resources in the folder under monitoring. If set to meaningful
/// value (not -1) then time period exceptions are not used.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
/// A resource for the registered rule.
IResource RegisterRule( IResource baseType, int count, IResource[] exceptions, IResource[] actions );
///
/// Create and register an expiration rule for deleted items of specified resource type. This default rule will
/// be applied by default to all such resources.
///
/// A resource representing "resource type". Deleted resources of this type
/// will be monitored for deletion.
/// Control the number of resources in the folder under monitoring. If set to meaningful
/// value (not -1) then time period exceptions are not used.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
/// A resource for the registered rule.
IResource RegisterRuleForDeletedItems( IResource baseType, int count, IResource[] exceptions, IResource[] actions );
///
/// Create and register an expiration rule for specified folders.
///
/// A list of folder resources (e.g. Newsgroups or RSSFeeds) which
/// will be monitored for resources deletion.
/// A list of conditions which must be satisfied for resources to be deleted.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
/// A resource for the registered rule.
IResource RegisterRule( IResourceList folders, IResource[] conditions, IResource[] exceptions, IResource[] actions );
///
/// Create and register an expiration rule for specified folder resource type. This default rule will
/// be applied by default to all such folders.
///
/// A resource representing "resource type" for a folder objects.
/// Folders of this type will be monitored for resources deletion.
/// A list of conditions which must be satisfied for resources to be deleted.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
/// A resource for the registered rule.
IResource RegisterRule( IResource baseType, IResource[] conditions, IResource[] exceptions, IResource[] actions );
///
/// Create and register an expiration rule for deleted items of specified resource type. This default rule will
/// be applied by default to all such resources.
///
/// A resource representing "resource type". Deleted resources of this type
/// will be monitored for deletion.
/// A list of conditions which must be satisfied for resources to be deleted.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
/// A resource for the registered rule.
IResource RegisterRuleForDeletedItems( IResource baseType, IResource[] conditions, IResource[] exceptions, IResource[] actions );
///
/// Register an existing expiration rule for specified folders.
/// No new resource is created; this method is required by RulesManager operational contract.
///
/// A resource for an existing expiration rule.
/// A list of folder resources (e.g. Newsgroups or RSSFeeds) which
/// will be monitored for resources deletion.
/// A list of conditions which must be satisfied for resources to be deleted.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
void ReregisterRule( IResource baseRes, IResourceList folders, IResource[] conditions, IResource[] exceptions, IResource[] actions );
///
/// Register an existing expiration rule for specified folder resource type. This default rule will
/// be applied by default to all such folders.
/// No new resource is created; this method is required by RulesManager operational contract.
///
/// A resource for an existing expiration rule.
/// A resource representing "resource type" for a folder objects.
/// Folders of this type will be monitored for resources deletion.
/// A list of conditions which must be satisfied for resources to be deleted.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
void ReregisterRule( IResource baseRes, IResource baseType, IResource[] conditions, IResource[] exceptions, IResource[] actions );
///
/// Register an existing expiration rule for deleted items of specified resource type. This default rule will
/// be applied by default to all such resources.
/// No new resource is created; this method is required by RulesManager operational contract.
///
/// A resource for an existing expiration rule.
/// A resource representing "resource type". Deleted resources of this type
/// will be monitored for deletion.
/// A list of conditions which must be satisfied for resources to be deleted.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
void ReregisterRuleForDeletedItems( IResource baseRes, IResource baseType, IResource[] conditions, IResource[] exceptions, IResource[] actions );
///
/// Register an existing expiration rule for specified folders.
/// No new resource is created; this method is required by RulesManager operational contract.
///
/// A resource for an existing expiration rule.
/// A list of folder resources (e.g. Newsgroups or RSSFeeds) which
/// will be monitored for resources deletion.
/// Control the number of resources in the folder under monitoring. If set to meaningful
/// value (not -1) then time period exceptions are not used.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
void ReregisterRule( IResource baseRes, IResourceList folders, int count, IResource[] exceptions, IResource[] actions );
///
/// Register an existing expiration rule for specified folder resource type. This default rule will
/// be applied by default to all such folders.
/// No new resource is created; this method is required by RulesManager operational contract.
///
/// A resource for an existing expiration rule.
/// A resource representing "resource type" for a folder objects.
/// Folders of this type will be monitored for resources deletion.
/// Control the number of resources in the folder under monitoring. If set to meaningful
/// value (not -1) then time period exceptions are not used.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
void ReregisterRule( IResource baseRes, IResource baseType, int count, IResource[] exceptions, IResource[] actions );
///
/// Register an existing expiration rule for deleted items of specified resource type. This default rule will
/// be applied by default to all such resources.
/// No new resource is created; this method is required by RulesManager operational contract.
///
/// A resource for an existing expiration rule.
/// A resource representing "resource type". Deleted resources of this type
/// will be monitored for deletion.
/// Control the number of resources in the folder under monitoring. If set to meaningful
/// value (not -1) then time period exceptions are not used.
/// A list of exceptions which must be satisfied for resources to be deleted.
/// A list of actions to be performed over the matched resources.
void ReregisterRuleForDeletedItems( IResource baseRes, IResource baseType, int count, IResource[] exceptions, IResource[] actions );
///
/// Delete an expiration rule.
///
/// Name of the expiration rule.
void UnregisterRule( string name );
///
/// Rename a rule.
///
/// A resource representing a rule (returned by RegisterRule method).
/// New name for a resource.
/// Throws ArgumentException object if the rule with the new name already exists.
/// 548
void RenameRule( IResource rule, string newName );
///
/// Register a resource type for which the deletion monitoring will be performed.
///
/// Id of link which connects base resources and their containers (e.g. feed posts with feeds).
/// A resource type for container resources (e.g. Feeds for feed posts).
/// A resource type for base resources.
void RegisterResourceType( int linkId, string containerType, string itemType );
}
}