Interface IBatchSetService
Represents the batch set API service.
Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IBatchSetService
  Examples
_batchSetService = relativityFacade.Resolve<IBatchSetService>()
  Methods
| Improve this Doc View SourceCreate(Int32, BatchSet)
Creates the specified batch set.
Declaration
BatchSet Create(int workspaceId, BatchSet entity)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace where you want to add the new batch set.  | 
      
| BatchSet | entity | The BatchSet entity to create.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchSet | The created BatchSet entity.  | 
      
Examples
var fieldService =  relativityFacade.Resolve<IFieldService>();
var workspaceId = 1015427;
keywordSearch = relativityFacade.Resolve<IKeywordSearchService>().Create(workspaceId, new KeywordSearch());
batchUnitField = fieldService.Get(workspaceId, "Custodian");
familyField = fieldService.Get(workspaceId, "Group Identifier");
reviewedField = fieldService.Get(workspaceId, "Classification Index");
var batchSet = new BatchSet
{
	Name = Randomizer.GetString(),
	BatchSize = 1500,
	BatchPrefix = Randomizer.GetString("BS", 3),
	DataSource = new NamedArtifact { ArtifactID = keywordSearch.ArtifactID},
	BatchUnitField = new NamedArtifact { ArtifactID = batchUnitField.ArtifactID},
	FamilyField = new NamedArtifact { ArtifactID = familyField.ArtifactID },
	ReviewedField = new NamedArtifact { ArtifactID = reviewedField.ArtifactID },
	AutoBatchSettings = new AutoBatchSettings
	{
		AutoCreateRateInMinutes = 10,
		MinimumBatchSize = 10
	}
};
BatchSet batchSet = _batchSetService.Create(workspaceId, batchSet);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Create(Int32, BatchSet, UserCredentials)
Creates the specified batch set.
Declaration
BatchSet Create(int workspaceId, BatchSet entity, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace where you want to add the new batch set.  | 
      
| BatchSet | entity | The BatchSet entity to create.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchSet | The created BatchSet entity.  | 
      
Examples
var fieldService =  relativityFacade.Resolve<IFieldService>();
var workspaceId = 1015427;
keywordSearch = relativityFacade.Resolve<IKeywordSearchService>().Create(workspaceId, new KeywordSearch());
batchUnitField = fieldService.Get(workspaceId, "Custodian");
familyField = fieldService.Get(workspaceId, "Group Identifier");
reviewedField = fieldService.Get(workspaceId, "Classification Index");
var batchSet = new BatchSet
{
	Name = Randomizer.GetString(),
	BatchSize = 1500,
	BatchPrefix = Randomizer.GetString("BS", 3),
	DataSource = new NamedArtifact { ArtifactID = keywordSearch.ArtifactID},
	BatchUnitField = new NamedArtifact { ArtifactID = batchUnitField.ArtifactID},
	FamilyField = new NamedArtifact { ArtifactID = familyField.ArtifactID },
	ReviewedField = new NamedArtifact { ArtifactID = reviewedField.ArtifactID },
	AutoBatchSettings = new AutoBatchSettings
	{
		AutoCreateRateInMinutes = 10,
		MinimumBatchSize = 10
	}
};
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchSet batchSet = _batchSetService.Create(workspaceId, batchSet, userCredentials);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  CreateBatches(Int32, Int32)
Runs create batches operation for a specific BatchSet.
Declaration
BatchProcessResult CreateBatches(int workspaceId, int entityId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of a workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of a batch set.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchProcessResult | 
  | 
      
Examples
var workspaceId = 1015427;
BatchProcessResult result = _batchSetService.CreateBatches(workspaceId, batchSetArtifactId);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  CreateBatches(Int32, Int32, UserCredentials)
Runs create batches operation for a specific BatchSet.
Declaration
BatchProcessResult CreateBatches(int workspaceId, int entityId, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of a workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of a batch set.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchProcessResult | 
  | 
      
Examples
var workspaceId = 1015427;
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchProcessResult result = _batchSetService.CreateBatches(workspaceId, batchSetArtifactId, userCredentials);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Delete(Int32, Int32)
Deletes the BatchSet with the specified ID.
Declaration
void Delete(int workspaceId, int entityId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of the batch set.  | 
      
Examples
var workspaceId = 1015427;
BatchSet updatedBatchSet = _batchSetService.Delete(workspaceId, batchSetId);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Delete(Int32, Int32, UserCredentials)
Deletes the BatchSet with the specified ID.
Declaration
void Delete(int workspaceId, int entityId, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of the batch set.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Examples
var workspaceId = 1015427;
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchSet updatedBatchSet = _batchSetService.Delete(workspaceId, batchSetId, userCredentials);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Exists(Int32, Int32)
Determines whether the BatchSet with the specified case artifact ID exists.
Declaration
bool Exists(int workspaceId, int entityId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of the batch set.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if a batch set exists; otherwise, false.  | 
      
Examples
var workspaceId = 1015427;
var batchSetExists = _batchSetService.Exists(workspaceId, batchSetArtifactId);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Exists(Int32, Int32, UserCredentials)
Determines whether the BatchSet with the specified case artifact ID exists.
Declaration
bool Exists(int workspaceId, int entityId, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of the batch set.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if a batch set exists; otherwise, false.  | 
      
Examples
var workspaceId = 1015427;
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchSet batchSet = _batchSetService.Exists(workspaceId, batchSetArtifactId, userCredentials);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Get(Int32, Int32)
Gets the BatchSet by the specified ID.
Declaration
BatchSet Get(int workspaceId, int entityId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace where you want to get the batch set.  | 
      
| System.Int32 | entityId | The Artifact ID of the batch set.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchSet | 
  | 
      
Examples
var workspaceId = 1015427;
BatchSet batchSet = _batchSetService.Get(workspaceId, batchSetArtifactId);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Get(Int32, Int32, UserCredentials)
Gets the BatchSet by the specified ID.
Declaration
BatchSet Get(int workspaceId, int entityId, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace where you want to get the batch set.  | 
      
| System.Int32 | entityId | The Artifact ID of the batch set.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchSet | 
  | 
      
Examples
var workspaceId = 1015427;
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchSet batchSet = _batchSetService.Get(workspaceId, batchSetArtifactId, userCredentials);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PurgeBatches(Int32, Int32)
Runs purge batches operation for a specific BatchSet.
Declaration
BatchProcessResult PurgeBatches(int workspaceId, int entityId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of a workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of a batch set.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchProcessResult | 
  | 
      
Examples
var workspaceId = 1015427;
BatchProcessResult result = _batchSetService.PurgeBatches(workspaceId, batchSetArtifactId);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PurgeBatches(Int32, Int32, UserCredentials)
Runs purge bathces operation for a specific BatchSet.
Declaration
BatchProcessResult PurgeBatches(int workspaceId, int entityId, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of a workspace.  | 
      
| System.Int32 | entityId | The Artifact ID of a batch set.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchProcessResult | 
  | 
      
Examples
var workspaceId = 1015427;
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchProcessResult result = _batchSetService.PurgeBatches(workspaceId, batchSetArtifactId, userCredentials);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Update(Int32, BatchSet)
Updates the specified BatchSet.
Declaration
BatchSet Update(int workspaceId, BatchSet entity)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace.  | 
      
| BatchSet | entity | The BatchSet entity to update.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchSet | Updated BatchSet entity.  | 
      
Examples
var workspaceId = 1015427;
BatchSet batchSetToUpdate = _batchSetService.Get(workspaceId, batchSetArtifactId);
batchSetToUpdate.BatchSize = 30;
BatchSet updatedBatchSet = _batchSetService.Update(workspaceId, batchSetToUpdate);
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Update(Int32, BatchSet, UserCredentials)
Updates the specified BatchSet.
Declaration
BatchSet Update(int workspaceId, BatchSet entity, UserCredentials userCredentials)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | workspaceId | The Artifact ID of the workspace.  | 
      
| BatchSet | entity | The BatchSet entity to update.  | 
      
| UserCredentials | userCredentials | User credentials to be used when perfroming action over Relativity Api.  | 
      
Returns
| Type | Description | 
|---|---|
| BatchSet | Updated BatchSet entity.  | 
      
Examples
var workspaceId = 1015427;
BatchSet batchSetToUpdate = _batchSetService.Get(workspaceId, batchSetArtifactId);
batchSetToUpdate.BatchSize = 30;
var userCredentials = new UserCredentials
{
	Username = "SomeUsername",
	Password = "SomePassword"
};
BatchSet updatedBatchSet = _batchSetService.Update(workspaceId, batchSetToUpdate, userCredentials);