Interface IMarkupSetService
Represents the markup API service.
Namespace: Relativity.Testing.Framework.Api.Services
Assembly: Relativity.Testing.Framework.Api.dll
Syntax
public interface IMarkupSetService
Examples
IMarkupSetService _markupSetService = relativityFacade.Resolve<IMarkupSetService>();
Methods
| Improve this Doc View SourceCreate(Int32, MarkupSet)
Creates the specified MarkupSet.
Declaration
MarkupSet Create(int workspaceId, MarkupSet entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to create the MarkupSet, or use -1 to indicate the admin-level context. |
MarkupSet | entity | The MarkupSet to create. |
Returns
Type | Description |
---|---|
MarkupSet | The MarkupSet entity. |
Examples
int workspaceArtifactID = 1234567;
var markupSet = new MarkupSet
{
Name = "Markup Set Name",
Order = 1,
RedactionText = "Redaction Text"
};
MarkupSet createdMarkupSet = _markupSetService.Create(workspaceArtifactID, markupSet);
|
Improve this Doc
View Source
Delete(Int32, Int32)
Deletes the MarkupSet by the specified ArtifactID.
Declaration
void Delete(int workspaceId, int entityId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to delete the MarkupSet, or use -1 to indicate the admin-level context. |
System.Int32 | entityId | The ArtifactID of the MarkupSet. |
Examples
int workspaceArtifactID = 1234567;
int markupSetArtifactID = 1235876;
_markupSetService.Delete(workspaceArtifactID, markupSetArtifactID);
|
Improve this Doc
View Source
Exists(Int32, Int32)
Determines whether the MarkupSet with the specified ArtifactID exists.
Declaration
bool Exists(int workspaceId, int entityId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to check if the MarkupSet exists, or use -1 to indicate the admin-level context. |
System.Int32 | entityId | The ArtifactID of the MarkupSet. |
Returns
Type | Description |
---|---|
System.Boolean | true if a MarkupSet exists; otherwise, false. |
Examples
int workspaceArtifactID = 1234567;
int markupSetArtifactID = 1235876;
bool markupSetExists = _markupSetService.Exists(workspaceArtifactID, markupSetArtifactID);
|
Improve this Doc
View Source
Get(Int32, Int32)
Gets the MarkupSet by the specified ArtifactID.
Declaration
MarkupSet Get(int workspaceId, int entityId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to get the MarkupSet, or use -1 to indicate the admin-level context. |
System.Int32 | entityId | The ArtifactID of the MarkupSet. |
Returns
Type | Description |
---|---|
MarkupSet | The MarkupSet entity or null. |
Examples
int workspaceArtifactID = 1234567;
int markupSetArtifactID = 1236575;
MarkupSet markupSet = _markupSetService.Get(workspaceArtifactID, markupSetArtifactID);
|
Improve this Doc
View Source
Get(Int32, String)
Gets the MarkupSet by the specified name.
Declaration
MarkupSet Get(int workspaceId, string entityName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to get the markup set, or use -1 to indicate the admin-level context. |
System.String | entityName | The name of the MarkupSet. |
Returns
Type | Description |
---|---|
MarkupSet | The MarkupSet entity or null. |
Examples
int workspaceArtifactID = 1234567;
string markupSetName = "Existing Markup Set Name";
MarkupSet markupSet = _markupSetService.Get(workspaceArtifactID, markupSetName);
|
Improve this Doc
View Source
Require(Int32, MarkupSet)
Requires the specified MarkupSet.
- If [ArtifactID](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Artifact.html#Relativity_Testing_Framework_Models_Artifact_ArtifactID) property of
entity
has positive value, gets [MarkupSet](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.MarkupSet.html) by ArtifactID and updates it. - If [Name](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.NamedArtifact.html#Relativity_Testing_Framework_Models_NamedArtifact_Name) property of
entity
has a value, gets [MarkupSet](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.MarkupSet.html) by name and updates it if it exists. - Otherwise creates a new [MarkupSet](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.MarkupSet.html).
Declaration
MarkupSet Require(int workspaceId, MarkupSet entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to require markup set. |
MarkupSet | entity | The MarkupSet to require. |
Returns
Type | Description |
---|---|
MarkupSet | The MarkupSet entity. |
Examples
This example shows how to update and get updated Markup Set by Require method with MarkupSet entity that has ArtifactID filled.
int workspaceArtifactID = 1234567;
int existingMarkupSetArtifactID = 1235876;
var markupSetToUpdate = new MarkupSet
{
ArtifactID = existingMarkupSetArtifactID,
Name = "Updated Markup Set Name",
Order = 1,
RedactionText = "Updated Redaction Text"
};
MarkupSet updatedMarkupSet = _markupSetService.Require(workspaceArtifactID, markupSetToUpdate);
This example shows how to update and get updated Markup Set by Require method with MarkupSet entity that has Name filled.
int workspaceArtifactID = 1234567;
var markupSetToUpdate = new MarkupSet
{
Name = "Existing Markup Set Name",
Order = 20,
RedactionText = "Updated Redaction Text"
};
MarkupSet updatedMarkupSet = _markupSetService.Require(workspaceArtifactID, markupSetToUpdate);
This example shows how to create and get new Markup Set by Require method with new MarkupSet entity (Name of the given Markup Set does not match any existing Markup Set in given workspace).
int workspaceArtifactID = 1234567;
var markupSetToCreate = new MarkupSet
{
Name = "Not Existing Markup Set Name",
Order = 34,
RedactionText = "Redaction Text"
};
MarkupSet createdMarkupSet = _markupSetService.Require(workspaceArtifactID, markupSetToCreate);
|
Improve this Doc
View Source
Update(Int32, MarkupSet)
Updates the specified MarkupSet.
Declaration
void Update(int workspaceId, MarkupSet entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | workspaceId | The ArtifactID of the workspace where you want to update the MarkupSet, or use -1 to indicate the admin-level context. |
MarkupSet | entity | The MarkupSet to update. |
Examples
int workspaceArtifactID = 1234567;
int markupSetArtifactID = 1236575;
MarkupSet markupSetToUpdate = _markupSetService.Get(workspaceArtifactID, markupSetArtifactID);
markupSetToUpdate.Name = "Updated Makup Set Name";
markupSetToUpdate.Order = 200;
markupSetToUpdate.RedactionText = "Updated Redaction Set";
_markupSetService.Update(workspaceArtifactID, markupSetToUpdate);