Class TranslationProviderServer
Represents server-provided access to translation memories and provides related administrative and maintenance services.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class TranslationProviderServer
Constructors
TranslationProviderServer(Uri, Boolean, String, String)
Creates a new translation provider server.
Declaration
public TranslationProviderServer(Uri serverUri, bool useWindowsAuthentication, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serverUri | The URI of the server. This is of the form http://servername:port. |
System.Boolean | useWindowsAuthentication | Whether to use Windows authentication. When set to , userName
and password have to be specified. When set to , either pass for userName
and password in order to log on as the currently logged on Windows user, or set userName
to a domain-qualified Windows user name and password to the matching password to log on using basic Windows authentication.
|
System.String | userName | When using custom authentication or basic Windows authentication, the user name of the user. Pass
to use integrated Windows authentication(see useWindowsAuthentication ).
|
System.String | password | When using custom authentication or basic Windows authentication the password of the user. Pass
to use integrated Windows authentication (see useWindowsAuthentication ).
|
TranslationProviderServer(Uri, String, String, DateTime)
Creates a new translation provider server.
Declaration
public TranslationProviderServer(Uri serverUri, string userName, string authToken, DateTime expirationDate)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serverUri | The URI of the server. This is of the form http://servername:port. |
System.String | userName | |
System.String | authToken | |
System.DateTime | expirationDate |
Properties
IsTranslationAndAnalysisServiceSupported
Check if the server has Translation and Analysis Service support.
Declaration
public bool IsTranslationAndAnalysisServiceSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTranslationMemoryLocationSupported
If the server version is OnPremiseRest/Cloud, returns a flag to indicate if the translation memory location is supported
Declaration
public bool IsTranslationMemoryLocationSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Uri
Gets the URI that was used to connect to this server.
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Methods
GetContainer(Guid)
Gets the TranslationMemoryContainer with the specified ID, or null if the container does not exist.
Declaration
public TranslationMemoryContainer GetContainer(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The container id. |
Returns
Type | Description |
---|---|
TranslationMemoryContainer | The container, or null if no container with given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetContainer(String)
Gets the TranslationMemoryContainer with the specified path, or null if the container does not exist.
Declaration
public TranslationMemoryContainer GetContainer(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the container |
Returns
Type | Description |
---|---|
TranslationMemoryContainer | The container, or null if no container with given path exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetContainers()
Gets all translation memory containers managed by this translation provider server.
Declaration
public ReadOnlyCollection<TranslationMemoryContainer> GetContainers()
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<TranslationMemoryContainer> | A read-only collection of translation memory containers. |
GetDatabaseServer(Guid)
Obtains a representation of an existing database server.
Declaration
public DatabaseServer GetDatabaseServer(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The database server id. |
Returns
Type | Description |
---|---|
DatabaseServer | The database server, or null if no database server with the given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetDatabaseServer(String)
Obtains a representation of an existing database server.
Declaration
public DatabaseServer GetDatabaseServer(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the database server (note that this is not the physical server name). |
Returns
Type | Description |
---|---|
DatabaseServer | The database server, or null if no database server with the given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetDatabaseServers()
Gets the database servers registered with this server for use as translation memory container hosts.
Declaration
public ReadOnlyCollection<DatabaseServer> GetDatabaseServers()
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<DatabaseServer> | A read-only collection of database servers registered with this server. |
GetFieldsTemplate(Guid)
Gets the fields template with the specified id
,
or null if no such fields template exists.
Declaration
public ServerBasedFieldsTemplate GetFieldsTemplate(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The fields template ID. |
Returns
Type | Description |
---|---|
ServerBasedFieldsTemplate | The fields template, or null if no fields template with given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetFieldsTemplate(String)
Gets the fields template with the specified path
,
or null if no such fields template exists.
Declaration
public ServerBasedFieldsTemplate GetFieldsTemplate(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The fields template path. |
Returns
Type | Description |
---|---|
ServerBasedFieldsTemplate | The fields template, or null if no fields template with given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetFieldsTemplates(Boolean)
Gets all the fields templates available on this server.
Declaration
public ReadOnlyCollection<ServerBasedFieldsTemplate> GetFieldsTemplates(bool includeTmSpecific = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeTmSpecific |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ServerBasedFieldsTemplate> | A read-only collection of fields templates. |
GetLanguageResourcesTemplate(Guid)
Gets the LanguageResourcesTemplate with the specified ID.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The language resources template ID. |
Returns
Type | Description |
---|---|
ServerBasedLanguageResourcesTemplate | The language resource group template, or |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetLanguageResourcesTemplate(String)
Gets the language resources template with the specified path.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The language resources template path. |
Returns
Type | Description |
---|---|
ServerBasedLanguageResourcesTemplate | The language resource group template, or |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetLanguageResourcesTemplates(Boolean)
Gets all the language resources templates available on this server.
Declaration
public ReadOnlyCollection<ServerBasedLanguageResourcesTemplate> GetLanguageResourcesTemplates(bool includeTmSpecific = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeTmSpecific |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ServerBasedLanguageResourcesTemplate> | A read-only collection of language resources templates. |
GetLicensingStatusInformation()
Gets the license status information for this translation provider server.
Declaration
public LicensingStatusInformation GetLicensingStatusInformation()
Returns
Type | Description |
---|---|
LicensingStatusInformation | A license status information object. |
GetScheduledTranslationMemoryExport(Guid)
Gets a scheduled translation memory export by export Id.
Declaration
public ScheduledServerTranslationMemoryExport GetScheduledTranslationMemoryExport(Guid exportId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | exportId |
Returns
Type | Description |
---|---|
ScheduledServerTranslationMemoryExport |
GetScheduledTranslationMemoryImport(Guid)
Gets a scheduled translation memory import by import Id.
Declaration
public ScheduledServerTranslationMemoryImport GetScheduledTranslationMemoryImport(Guid importId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | importId |
Returns
Type | Description |
---|---|
ScheduledServerTranslationMemoryImport |
GetTranslationMemories()
Returns a collection of all the server-based translation memories on this server.
Declaration
public ReadOnlyCollection<ServerBasedTranslationMemory> GetTranslationMemories()
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ServerBasedTranslationMemory> | A read-only collection of server-based translation memories. |
GetTranslationMemoriesByQuery(TranslationMemoryQuery)
Returns the paged collection of the server-based translation memories on this server.
Declaration
public PagedTranslationMemories GetTranslationMemoriesByQuery(TranslationMemoryQuery query)
Parameters
Type | Name | Description |
---|---|---|
TranslationMemoryQuery | query |
Returns
Type | Description |
---|---|
PagedTranslationMemories | A read-only paged collection of server-based translation memories. |
GetTranslationMemory(Guid, TranslationMemoryProperties)
Gets the translation memory with the corresponding unique id.
Declaration
public ServerBasedTranslationMemory GetTranslationMemory(Guid id, TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The translation memory's unique id. |
TranslationMemoryProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
ServerBasedTranslationMemory | The translation memory, or null if no translation memory with given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetTranslationMemory(String, TranslationMemoryProperties)
Gets the translation memory with the corresponding unique path. Gets a translation memory through its path.
Declaration
public ServerBasedTranslationMemory GetTranslationMemory(string path, TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The translation memory's name. |
TranslationMemoryProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
ServerBasedTranslationMemory | The translation memory, or null if no translation memory with given path exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetTranslationMemorySummary(String, TranslationMemoryProperties)
Gets the translation memory summary with the corresponding unique path. Gets a translation memory summary through its path. No template information is provided.
Declaration
public ServerBasedTranslationMemory GetTranslationMemorySummary(string path, TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
TranslationMemoryProperties | additionalProperties |
Returns
Type | Description |
---|---|
ServerBasedTranslationMemory |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
Release()
Calls endpoint to release Translation Provider CALs
Declaration
public void Release()