Show / Hide Table of Contents

Interface IProductionService

Represents the production API service.

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

Methods

| Improve this Doc View Source

Create(Int32, Production)

Creates the specified Production.

Declaration
Production Create(int workspaceId, Production entity)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of the workspace where you want to add the new Production.

Production entity

The Production entity to create.

Returns
Type Description
Production

The created Production entity.

Examples

This example shows how to create Production witout setting properties - they will be set to default values.

int workspaceArtifactID = 1015427;
Production createdProduction = _productionService.Create(workspaceArtifactID, new Production());

This example shows how to create Production with some properties set.

int workspaceArtifactID = 1015427;
string fieldName = "Control Number";
var productionToCreate = new Production
{
	Name = "Test Production Name",
	Numbering = new ProductionNumbering
	{
		NumberingType = NumberingType.PageLevel,
		BatesPrefix = "Prefix",
		BatesSuffix = "Suffix",
		BatesStartNumber = 1,
		NumberOfDigitsForDocumentNumbering = 7,
		AttachmentRelationalField = new NamedArtifact { Name = string.Empty}
	}
	Headers = new ProductionHeaders
	{
		CenterHeader = new HeaderFooter { Type = HeaderFooterType.OriginalImageNumber }
	},
	Footers = new ProductionFooters
	{
		LeftFooter = new HeaderFooter { Type = HeaderFooterType.Field, Field = new NamedArtifact { Name = fieldName } },
		CenterFooter = new HeaderFooter { Type = HeaderFooterType.FreeText, FreeText = Randomizer.GetString() },
		RightFooter = new HeaderFooter { Type = HeaderFooterType.AdvancedFormatting, AdvancedFormatting = fieldName }
	}
};
Production createdProduction = _productionService.Create(workspaceArtifactID, productionToCreate);
| Improve this Doc View Source

Delete(Int32, Int32)

Delete the Production by the specified ArtifactID.

Declaration
void Delete(int workspaceId, int entityId)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of the workspace.

System.Int32 entityId

The ArtifactID of the Production.

Examples
int workspaceArtifactID = 1015427;
int existingProductionArtifactID = 101353;
_productionService.Delete(workspaceArtifactID, existingProductionArtifactID);
| Improve this Doc View Source

Exists(Int32, Int32)

Determines whether the production with the specified ArtifactID exists.

Declaration
bool Exists(int workspaceId, int entityId)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of the workspace.

System.Int32 entityId

The ArtifactID of the Production.

Returns
Type Description
System.Boolean

true if a production exists; otherwise, false.

Examples
int workspaceArtifactID = 1015427;
int productionArtifactID = 101353;
bool productionExists = _productionService.Exists(workspaceArtifactID, productionArtifactID);
| Improve this Doc View Source

Get(Int32, Int32)

Gets the Production by the specified ArtifactID.

Declaration
Production Get(int workspaceId, int entityId)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of the workspace where you want to get the Production.

System.Int32 entityId

The ArtifactID of the Production.

Returns
Type Description
Production

The Production entity or null.

Examples
int workspaceArtifactID = 1015427;
int existingProductionArtifactID = 101353;
Production production = _productionService.Get(workspaceArtifactID, existingProductionArtifactID);
| Improve this Doc View Source

Get(Int32, String)

Gets the production by the specified name.

Declaration
Production Get(int workspaceId, string entityName)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of the workspace where you want to get the Production.

System.String entityName

The Namwe of the production.

Returns
Type Description
Production

The Production entity or null.

Examples
int workspaceArtifactID = 1015427;
string existingProductionName = "Test Production Name";
Production production = _productionService.Get(workspaceArtifactID, existingProductionName);
| Improve this Doc View Source

GetAll(Int32)

Gets all Productions.

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

The ArtifactID of the workspace where you want to get the all Productions.

Returns
Type Description
Production[]

The collection of Production entities.

Examples
int workspaceArtifactID = 1015427;
Production[] productions = _productionService.GetAll(workspaceArtifactID);
| Improve this Doc View Source

GetStatus(Int32, Int32)

Gets status of a specific Production.

Declaration
ProductionStatus GetStatus(int workspaceId, int entityId)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of a workspace.

System.Int32 entityId

The ArtifactID of a Production.

Returns
Type Description
ProductionStatus

Returns status of a specific Production.

Examples
int workspaceArtifactID = 1015427;
int existingProductionArtifactID = 101353;
ProductionStatus productionStatus = _productionService.GetStatus(workspaceArtifactID, existingProductionArtifactID);
| Improve this Doc View Source

Run(Int32, Int32, Int32)

Runs a specific Production.

Declaration
void Run(int workspaceId, int entityId, int timeout = 120)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of a workspace.

System.Int32 entityId

The ArtifactID of a Production.

System.Int32 timeout

Time in seconds to wait for "Produced" status. Default is 120.

Examples
int workspaceArtifactID = 1015427;
int existingProductionArtifactID = 101353;
_productionService.Run(workspaceArtifactID, existingProductionArtifactID, 80);
| Improve this Doc View Source

Stage(Int32, Int32, Int32)

Stages a specific Production.

Declaration
void Stage(int workspaceId, int entityId, int seconds = 60)
Parameters
Type Name Description
System.Int32 workspaceId

The ArtifactID of a workspace.

System.Int32 entityId

The ArtifactID of a Production.

System.Int32 seconds

Time in seconds to wait for "Staged" status. Default is 60.

Examples
int workspaceArtifactID = 1015427;
int existingProductionArtifactID = 101353;
_productionService.Stage(workspaceArtifactID, existingProductionArtifactID, 100);
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX