Interface IProductionDataSourceService
Represents the production data source API service.
Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IProductionDataSourceService
Examples
IProductionDataSourceService _productionDataSourceService = RelativityFacade.Resolve<IProductionDataSourceService>();
Methods
| Improve this Doc View SourceCreate(Int32, Int32, ProductionDataSource)
Creates the specified production data source.
Declaration
ProductionDataSource Create(int workspaceId, int productionId, ProductionDataSource entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the Workspace. |
System.Int32 | productionId | The Artifact ID of the Production. |
ProductionDataSource | entity | The ProductionDataSource to create. |
Returns
Type | Description |
---|---|
ProductionDataSource | The created data source entity. |
Examples
int workspaceID = 123456;
Production _production = Facade.Resolve<ICreateWorkspaceEntityStrategy<Production>>()
.Create(workspaceID, new Production());
KeywordSearch _keywordSearch = Facade.Resolve<ICreateWorkspaceEntityStrategy<KeywordSearch>>()
.Create(workspaceID, new KeywordSearch());
ProductionDataSource toCreate = new ProductionDataSource
{
Name = "Some name",
ProductionId = _production.ArtifactID,
ProductionType = ProductionType.NativesOnly,
SavedSearch = new NamedArtifact { ArtifactID = _keywordSearch.ArtifactID },
UseImagePlaceholder = UseImagePlaceholderOption.NeverUseImagePlaceholder
};
ProductionDataSource result = _productionDataSourceService.Create(workspaceID, _production.ArtifactID, toCreate);
|
Improve this Doc
View Source
Delete(Int32, Int32)
Delete the production data source by the specified artifact 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 ProductionDataSource. |
Examples
int workspaceID = 123456;
int productionDataSourceID = 198715;
_productionDataSourceService.Delete(workspaceID, productionDataSourceID);
|
Improve this Doc
View Source
Exists(Int32, Int32)
Determines whether the production data source 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 ProductionDataSource. |
Returns
Type | Description |
---|---|
System.Boolean | true if a production data source exists; otherwise, false. |
Examples
int workspaceID = 123456;
int productionDataSourceID = 198715;
bool result = _productionDataSourceService.Exists(workspaceID, productionDataSourceID);
|
Improve this Doc
View Source
Get(Int32, Int32)
Gets the production data source by the specified workspace ID and production set ID.
Declaration
ProductionDataSource Get(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 ProductionDataSource. |
Returns
Type | Description |
---|---|
ProductionDataSource | The entity. |
Examples
int workspaceID = 123456;
int productionDataSourceID = 198715;
ProductionDataSource productionDataSource = _productionDataSourceService.Get(workspaceID, productionDataSourceID);
|
Improve this Doc
View Source
GetDefaultFieldValues(Int32)
Retrieves default field values for a data source.
Declaration
ProductionDataSourceDefaultValues GetDefaultFieldValues(int workspaceId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the Workspace. |
Returns
Type | Description |
---|---|
ProductionDataSourceDefaultValues | Default values for a data source as ProductionDataSourceDefaultValues object. |
Examples
int workspaceID = 123456;
ProductionDataSourceDefaultValues defaultValues = _productionDataSourceService.GetDefaultFieldValues(workspaceID);
|
Improve this Doc
View Source
Update(Int32, Int32, ProductionDataSource)
Updates the specified production data source.
Declaration
void Update(int workspaceId, int productionId, ProductionDataSource entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the Workspace. |
System.Int32 | productionId | The Artifact ID of the Production. |
ProductionDataSource | entity | The ProductionDataSource to update. |
Examples
int workspaceID = 123456;
int productionDataSourceID = 198715;
ProductionDataSource toUpdate = _productionDataSourceService.Get(workspaceID, productionDataSourceID);
toUpdate.Name = "New name";
_productionDataSourceService.Update(workspaceID, toUpdate.ProductionId, toUpdate);