Interface IProductionPlaceholderService
Represents the production placeholder API service.
Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IProductionPlaceholderService
Examples
IProductionPlaceholderService _productionPlaceholderService = RelativityFacade.Resolve<IProductionPlaceholderService>();
Methods
| Improve this Doc View SourceCreate(Int32, ProductionPlaceholder)
Creates the specified production placeholder.
Declaration
ProductionPlaceholder Create(int workspaceId, ProductionPlaceholder entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the workspace. |
ProductionPlaceholder | entity | The placeholder entity to create. |
Returns
Type | Description |
---|---|
ProductionPlaceholder | The created production placeholder source entity. |
Examples
int workspaceID = 123456;
string fileName = "file_name.jpg";
string filePath = $"path/to/file/catalog/{fileName}";
string fileContent = Convert.ToBase64String(File.ReadAllBytes(filePath));
var productionPlaceholder = new ProductionPlaceholder
{
Name = "Placeholder name",
PlaceholderType = PlaceholderType.Image,
FileName = fileName,
FileData = fileContent
};
ProductionPlaceholder result = _productionPlaceholderService.Create(workspaceID, productionPlaceholder);
|
Improve this Doc
View Source
Delete(Int32, Int32)
Delete the production placeholder 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 production placeholder. |
Examples
int workspaceID = 123456;
int productionPlaceholderID = 654321;
_productionPlaceholderService.Delete(workspaceID, productionPlaceholderID);
|
Improve this Doc
View Source
Exists(Int32, Int32)
Determines whether the production placeholder 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 production placeholder. |
Returns
Type | Description |
---|---|
System.Boolean | true if a production placeholder exists; otherwise, false. |
Examples
int workspaceID = 123456;
int productionPlaceholderID = 654321;
bool result = _productionPlaceholderService.Exists(workspaceID, productionPlaceholderID);
|
Improve this Doc
View Source
Get(Int32, Int32)
Gets the production placeholder by the specified ID.
Declaration
ProductionPlaceholder Get(int workspaceId, int entityId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the workspace where you want to get the production placeholder. |
System.Int32 | entityId | The Artifact ID of the production placeholder. |
Returns
Type | Description |
---|---|
ProductionPlaceholder | The ProductionPlaceholder entity or null. |
Examples
int workspaceID = 123456;
int productionPlaceholderID = 654321;
ProductionPlaceholder result = _productionPlaceholderService.Get(workspaceID, productionPlaceholderID);
|
Improve this Doc
View Source
GetDefaultFieldValues(Int32)
Retrieve default field values for a placeholder.
Declaration
DefaultFieldValue<NamedArtifact> GetDefaultFieldValues(int workspaceId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the workspace. |
Returns
Type | Description |
---|---|
DefaultFieldValue<NamedArtifact> |
Examples
int workspaceID = 123456;
DefaultFieldValue<NamedArtifact> result = _productionPlaceholderService.GetDefaultFieldValues(workspaceID);
|
Improve this Doc
View Source
Update(Int32, ProductionPlaceholder)
Updates the specified production placeholder.
Declaration
void Update(int workspaceId, ProductionPlaceholder entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The Artifact ID of the workspace where you want to update the production placeholder. |
ProductionPlaceholder | entity | The entity to update. |
Examples
int workspaceID = 123456;
int productionPlaceholderID = 654321;
ProductionPlaceholder toUpdate = _productionPlaceholderService.Get(workspaceID, productionPlaceholderID);
toUpdate.CustomText = "Updated Text";
_productionPlaceholderService.Update(workspaceID, toUpdate);