Show / Hide Table of Contents

Interface ISearchProviderService

Represents the search provider API service.

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

Methods

| Improve this Doc View Source

Create(Int32, SearchProvider)

Creates the specified search provider.

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

The Artifact ID of the workspace where you want to add the new search provider.

SearchProvider entity

The entity to create.

Returns
Type Description
SearchProvider

The created entity.

Examples
int workspaceID = 1234567;
var searchProvider = new SearchProvider
{
    Name = "SomeName",
    Order = 200
};
SearchProvider createdSearchProvider = _searchProviderService.Create(workspaceID, searchProvider);
| Improve this Doc View Source

Delete(Int32, Int32)

Deletes the search provider by ID.

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

The Artifact ID of the workspace where you want to delete the search provider.

System.Int32 entityId

The artifact ID of the search provider.

Examples
int workspaceID = 1234567;
int searchProviderID = 654321;

_searchProviderService.Delete(workspaceID, searchProviderID);
| Improve this Doc View Source

Get(Int32, Int32)

Gets the search provider by the specified ID.

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

The Artifact ID of the workspace where you want to get search provider.

System.Int32 entityId

The artifact ID of the search provider.

Returns
Type Description
SearchProvider

The KeywordSearch entity or null.

Examples
int workspaceID = 1234567;
int searchProviderID = 654321;

SearchProvider searchProvider = _searchProviderService.Get(workspaceID, searchProviderID);
| Improve this Doc View Source

Get(Int32, String)

Gets the search provider by the specified name.

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

The Artifact ID of the workspace where you want to get search provider.

System.String entityName

The name of the search provider.

Returns
Type Description
SearchProvider

The SearchProvider entity or null.

Examples
int workspaceID = 1234567;
int searchProviderName = "searchProviderName";

SearchProvider searchProvider = _searchProviderService.Get(workspaceID, searchProviderName);
| Improve this Doc View Source

GetDependencies(Int32, Int32)

Gets the list of dependencies.

Declaration
List<Dependency> GetDependencies(int workspaceId, int entityId)
Parameters
Type Name Description
System.Int32 workspaceId

The workspace ID.

System.Int32 entityId

The entity ID.

Returns
Type Description
System.Collections.Generic.List<Dependency>

The list of dependencies.

Examples
int workspaceID = 1234567;
int searchProviderID = 654321;

List<Dependency> dependencies = _searchProviderService.GetDependencies(workspaceID, searchProviderID);
| Improve this Doc View Source

Require(Int32, SearchProvider)

Requires the specified search provider.

  1. 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 entity by ID and updates it.
  2. 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 entity by name and updates it if it exists.
  3. Otherwise creates a new entity using Relativity.Testing.Framework.Api.Strategies.ICreateWorkspaceEntityStrategy`1.
Declaration
SearchProvider Require(int workspaceId, SearchProvider entity)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace where you want to require search provider.

SearchProvider entity

The entity to require.

Returns
Type Description
SearchProvider

The SearchProvider entity or null.

Examples
int workspaceID = 1234567;
var searchProvider = new SearchProvider
{
    Name = "SomeName",
    Order = 200
};

SearchProvider result = _searchProviderService.Require(workspaceID, searchProvider);
| Improve this Doc View Source

Update(Int32, SearchProvider)

Updates the specified search provider.

Declaration
void Update(int workspaceId, SearchProvider entity)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace where you want to update search provider.

SearchProvider entity

The entity to update.

Examples
int workspaceID = 1234567;
int searchProviderID = 654321;

SearchProvider searchProvider = _searchProviderService.Get(workspaceID, searchProviderID);
searchProvider.Name = "New name";
searchProvider.Order = 10;

_searchProviderService.Update(workspaceID, searchProvider);
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX