Class TranslationProviderServer
Represents server-provided access to translation memories and provides related administrative and maintenance services.
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class TranslationProviderServer
Constructors
TranslationProviderServer(Uri, bool, string, string)
Creates a new translation provider server.
Declaration
public TranslationProviderServer(Uri serverUri, bool useWindowsAuthentication, string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
Uri | serverUri | The URI of the server. This is of the form http://servername:port. |
bool | 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.
|
string | userName | When using custom authentication or basic Windows authentication, the user name of the user. Pass
to use integrated Windows authentication(see useWindowsAuthentication ).
|
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 |
---|---|---|
Uri | serverUri | The URI of the server. This is of the form http://servername:port. |
string | userName | |
string | authToken | |
DateTime | expirationDate |
Properties
IsTranslationAndAnalysisServiceSupported
Check if the server has Translation and Analysis Service support.
Declaration
public bool IsTranslationAndAnalysisServiceSupported { get; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
Uri
Gets the URI that was used to connect to this server.
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
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 |
---|---|---|
Guid | id | The container id. |
Returns
Type | Description |
---|---|
TranslationMemoryContainer | The container, or null if no container with given id exists. |
Exceptions
Type | Condition |
---|---|
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 |
---|---|---|
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 |
---|---|
ArgumentNullException | Thrown when |
GetContainers()
Gets all translation memory containers managed by this translation provider server.
Declaration
public ReadOnlyCollection<TranslationMemoryContainer> GetContainers()
Returns
Type | Description |
---|---|
ReadOnlyCollectionTranslationMemoryContainer | 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 |
---|---|---|
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 |
---|---|
ArgumentNullException | Thrown when |
GetDatabaseServer(string)
Obtains a representation of an existing database server.
Declaration
public DatabaseServer GetDatabaseServer(string path)
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|
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 |
---|---|
ReadOnlyCollectionDatabaseServer | 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 |
---|---|---|
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 |
---|---|
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 |
---|---|---|
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 |
---|---|
ArgumentNullException | Thrown when |
GetFieldsTemplates(bool)
Gets all the fields templates available on this server.
Declaration
public ReadOnlyCollection<ServerBasedFieldsTemplate> GetFieldsTemplates(bool includeTmSpecific = true)
Parameters
Type | Name | Description |
---|---|---|
bool | includeTmSpecific |
Returns
Type | Description |
---|---|
ReadOnlyCollectionServerBasedFieldsTemplate | 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 |
---|---|---|
Guid | id | The language resources template ID. |
Returns
Type | Description |
---|---|
ServerBasedLanguageResourcesTemplate | The language resource group template, or |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
GetLanguageResourcesTemplate(string)
Gets the language resources template with the specified path.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The language resources template path. |
Returns
Type | Description |
---|---|
ServerBasedLanguageResourcesTemplate | The language resource group template, or |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
GetLanguageResourcesTemplates(bool)
Gets all the language resources templates available on this server.
Declaration
public ReadOnlyCollection<ServerBasedLanguageResourcesTemplate> GetLanguageResourcesTemplates(bool includeTmSpecific = true)
Parameters
Type | Name | Description |
---|---|---|
bool | includeTmSpecific |
Returns
Type | Description |
---|---|
ReadOnlyCollectionServerBasedLanguageResourcesTemplate | 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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|
ReadOnlyCollectionServerBasedTranslationMemory | 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 |
---|---|---|
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 |
---|---|
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 |
---|---|---|
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 |
---|---|
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 |
---|---|---|
string | path | |
TranslationMemoryProperties | additionalProperties |
Returns
Type | Description |
---|---|
ServerBasedTranslationMemory |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
Release()
Calls endpoint to release Translation Provider CALs
Declaration
public void Release()