Show / Hide Table of Contents

Interface ITabService

Represents the tab API service for interacting with Tabs.

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

Methods

| Improve this Doc View Source

Create(Int32, Tab)

Creates the specified tab.

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

The Artifact ID of the workspace where you want to add the new tab, or use -1 to indicate the admin-level context.

Tab entity

The Tab to create.

Returns
Type Description
Tab

The created Tab.

Examples
int workspaceArtifactID = -1;
Tab tab = _tabService.Create(workspaceArtifactID, new Tab());
int workspaceArtifactID = 1234567;
Tab tab = new Tab
{
    Name = "MySpecialTab",
    LinkType = TabLinkType.Parent
};
Tab tab = _tabService.Create(workspaceArtifactID, tab);
| Improve this Doc View Source

Delete(Int32, Int32)

Deletes the Tab 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 tab, or use -1 to indicate the admin-level context.

System.Int32 entityId

The artifact ID of the Tab.

Examples
int workspaceArtifactID = 1234567;
_tabService.Delete(workspaceArtifactID, tab.ArtifactId);
| Improve this Doc View Source

Get(Int32, Int32)

Gets the Tab by the specified ID.

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

The Artifact ID of the workspace where you want to get the tab, or use -1 to indicate the admin-level context.

System.Int32 entityId

The artifact ID of the Tab.

Returns
Type Description
Tab

The Tab entity.

Examples
int workspaceArtifactID = 1234567;
Tab tab = _tabService.Get(workspaceArtifactID, tab.ArtifactId);
| Improve this Doc View Source

Get(Int32, String)

Gets the Tab by the specified name.

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

The Artifact ID of the workspace where you want to get the tab, or use -1 to indicate the admin-level context.

System.String entityName

The name of the tab.

Returns
Type Description
Tab

The Tab entity.

Examples
int workspaceArtifactID = 1234567;
Tab tab = _tabService.Get(workspaceArtifactID, "MyTabName");
| Improve this Doc View Source

GetAdminLevelMetadata()

Gets the Meta with admin-level metadata about admin and system tabs.

Declaration
Meta GetAdminLevelMetadata()
Returns
Type Description
Meta

The Meta entity.

Examples
Meta meta = _tabService.GetAdminLevelMetadata();
| Improve this Doc View Source

GetAllForNavigation(Int32)

Retrieves a list of tabs with information about each tab that the calling user can navigate to in a specific workspace.

Declaration
List<Tab> GetAllForNavigation(int workspaceId)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace that you want to retrieve tabs navigation information for.

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

List of Tab entities.

Examples
int workspaceArtifactID = 1234567;
List<Tab> result = _tabService.GetAllForNavigation(workspaceArtifactID);
| Improve this Doc View Source

GetAvailableObjectTypes(Int32)

Retrieves a list of all object types in a workspace available for creating or updating a tab.

Declaration
List<ObjectType> GetAvailableObjectTypes(int workspaceId)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace that you want to retrieve available object types for.

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

List of ObjectType.

Examples
int workspaceArtifactID = 1234567;
List<ObjectType> result = _tabService.GetAvailableObjectTypes(workspaceArtifactID);
| Improve this Doc View Source

GetEligibleParents(Int32)

Retrieves a list of parent tabs, which can be associated with a tab for adding or updating it.

Declaration
List<TabEligibleParent> GetEligibleParents(int workspaceId)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace that you want to retrieve parent tabs for.

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

List of TabEligibleParent entities.

Examples
int workspaceArtifactID = 1234567;
List<TabEligibleParentV1> result = _tabService.GetEligibleParents(workspaceArtifactID);
| Improve this Doc View Source

GetTabsOrder(Int32)

Gets current order of the tabs in a workspace.

Declaration
List<Tab> GetTabsOrder(int workspaceId)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace that you want to retrieve tabs order for.

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

Ordered list of Tabs. Only basic information and Order fields are filled.

Examples
int workspaceArtifactID = 1234567;
List<Tab> = _tabService.GetTabsOrder(workspaceArtifactID);
| Improve this Doc View Source

Require(Int32, Tab)

Requires the specified tab.

  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 have a value, gets entity by name and updates it if it exists.
  3. Otherwise creates a new [Tab](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Tab.html).
Declaration
Tab Require(int workspaceId, Tab entity)
Parameters
Type Name Description
System.Int32 workspaceId

The Artifact ID of the workspace where you want to require tab, or use -1 to indicate the admin-level context.

Tab entity

The Tab to require.

Returns
Type Description
Tab

The Tab required.

Examples

In this example, the tab does not exist, so it will be created.

int workspaceArtifactID = 1234567;
Tab tab = new Tab
{
    Name = "MySpecialTab",
    LinkType = TabLinkType.Parent
};
Tab tab = _tabService.Require(workspaceArtifactID, tab);

However, if the tab did exist, it would be updated to match the definition.

| Improve this Doc View Source

Update(Int32, Tab)

Updates the specified Tab.

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

The Artifact ID of the workspace where you want to update the tab, or use -1 to indicate the admin-level context.

Tab entity

The Tab to update. Must include the ArtifactID of the Tab in the model.

Examples
int workspaceArtifactID = 1234567;
Tab tab = _tabService.Get(workspaceArtifactID, "MyTabName");

tab.Name = "AnotherName"

_tabService.Update(workspaceArtifactID, tab);
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX