Show / Hide Table of Contents

Interface IBatchService

Represents the batch API service.

Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IBatchService
Examples
_batchService = relativityFacade.Resolve<IBatchService>();

Methods

| Improve this Doc View Source

AssignToUser(Int32, Int32, Int32)

Assign a Batch to a user.

Declaration
void AssignToUser(int workspaceId, int batchId, int userId)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 batchId

The batch ID.

System.Int32 userId

The user ID.

Examples
var batch = _batchService.Get(1015427, batchArtifactId);
user = Facade.Resolve<IUserService>().Get(someUserId);
_batchService.AssignToUser(1015427, batch.ArtifactID, user.ArtifactID);
| Improve this Doc View Source

Checkin(Int32, Int32, Boolean)

Checks in the batch.

Declaration
void Checkin(int workspaceId, int batchId, bool isCompleted)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 batchId

The Artifact ID of the batch.

System.Boolean isCompleted

Indicator if Batch is completed or not.

When set to true - updates the batch status to Completed. The batch remains assigned to the current user.

When set to false - updates the batch status to empty string and removes the user assignment.

Examples
Facade.Resolve<IBatchService>().Checkin(workspaceArtifactId, batchArtifactID, true);
| Improve this Doc View Source

Checkout(Int32, Int32, Int32)

Checks out the batch.

Declaration
void Checkout(int workspaceId, int batchId, int userId)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 batchId

The Artifact ID of the batch.

System.Int32 userId

The Artifact ID for the user who should be assigned to the batch.

Examples
Facade.Resolve<IBatchService>().Checkout(workspaceArtifactId, batchArtifactID, userArtifactId);
| Improve this Doc View Source

Get(Int32, Int32)

Gets the batch by the specified ID.

Declaration
Batch 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.

System.Int32 entityId

The Artifact ID of the batch.

Returns
Type Description
Batch

The Batch entity or null.

Examples
Batch batch = _batchService.Get(1015427, batchArtifactId);
| Improve this Doc View Source

GetAll(Int32)

Gets all batches.

Declaration
Batch[] GetAll(int workspaceId)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace where you want to get all batches.

Returns
Type Description
Batch[]

The collection of Batches.

Examples
List<Batch> batches = _batchService.GetAll(1015427);
| Improve this Doc View Source

Query(Int32, Expression<Func<Batch, Object>>, Object)

Query the Batch by specified condition.

Declaration
Batch[] Query(int workspaceId, Expression<Func<Batch, object>> wherePropertySelector, object whereValue)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Linq.Expressions.Expression<System.Func<Batch, System.Object>> wherePropertySelector

The filter property selector.

System.Object whereValue

The filter property value.

Returns
Type Description
Batch[]

The array of Batches.

Examples
var matchingBatches = _batchService.Query(1015427, x => x.BatchSet, "Batch Set Name"); /// Finding batches from workspace with ID 1015427 that have BatchSet "Batch Set Name"
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX