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()
Initializes a new instance of the TranslationProviderServer class.
Declaration
public TranslationProviderServer()
Remarks
This is for in-line server side usage and assumes thet the SDL identity has been propagated to the calling Thread.
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | Thrown if the current thread's principal is invalid. |
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
DeleteBackgroundTask(Guid)
Deletes a background task.
Declaration
public void DeleteBackgroundTask(Guid taskId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | taskId | The unique identifier for the task to be deleted. |
DeleteBackgroundTasks(ICollection<Guid>)
Deletes a collection background tasks.
Declaration
public void DeleteBackgroundTasks(ICollection<Guid> tasksIdentities)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<System.Guid> | tasksIdentities | The unique identifiers for the tasks to be deleted. |
GetContainer(Guid, ContainerProperties)
Gets the TranslationMemoryContainer with the specified ID, or null if the container does not exist.
Declaration
public TranslationMemoryContainer GetContainer(Guid id, ContainerProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The container id. |
ContainerProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
TranslationMemoryContainer | The container, or null if no container with given id exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetContainer(String, ContainerProperties)
Gets the TranslationMemoryContainer with the specified path, or null if the container does not exist.
Declaration
public TranslationMemoryContainer GetContainer(string path, ContainerProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the container |
ContainerProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
TranslationMemoryContainer | The container, or null if no container with given path exists. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetContainers(ContainerProperties)
Gets all translation memory containers managed by this translation provider server.
Declaration
public ReadOnlyCollection<TranslationMemoryContainer> GetContainers(ContainerProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
ContainerProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<TranslationMemoryContainer> | A read-only collection of translation memory containers. |
GetDatabaseServer(Guid, DatabaseServerProperties)
Obtains a representation of an existing database server.
Declaration
public DatabaseServer GetDatabaseServer(Guid id, DatabaseServerProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The database server id. |
DatabaseServerProperties | additionalProperties | The additional related objects to retrieve. |
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, DatabaseServerProperties)
Obtains a representation of an existing database server.
Declaration
public DatabaseServer GetDatabaseServer(string path, DatabaseServerProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the database server (note that this is not the physical server name). |
DatabaseServerProperties | additionalProperties | The additional related objects to retrieve. |
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(DatabaseServerProperties)
Gets the database servers registered with this server for use as translation memory container hosts.
Declaration
public ReadOnlyCollection<DatabaseServer> GetDatabaseServers(DatabaseServerProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
DatabaseServerProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<DatabaseServer> | A read-only collection of database servers registered with this server. |
GetDefaultLanguageResources(CultureInfo)
Gets default language resources for the specified language from the server.
Declaration
public LanguageResourceBundle GetDefaultLanguageResources(CultureInfo language)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | language | The language for which to get the default language resources. |
Returns
Type | Description |
---|---|
LanguageResourceBundle | A LanguageResourceBundle instance, populated with the default language resources. Note that some default language resources might be null. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetDefaultLanguageResources(String)
Gets default language resources for the specified language code from the server.
Declaration
public LanguageResourceBundle GetDefaultLanguageResources(string languageCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | languageCode | The language code for which to get the default language resources. |
Returns
Type | Description |
---|---|
LanguageResourceBundle | A LanguageResourceBundle instance, populated with the default language resources. Note that some default language resources might be null. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetFieldsTemplate(Guid, FieldsTemplateProperties)
Gets the fields template with the specified id
,
or null if no such fields template exists.
Declaration
public ServerBasedFieldsTemplate GetFieldsTemplate(Guid id, FieldsTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The fields template ID. |
FieldsTemplateProperties | additionalProperties | The additional related objects to retrieve. |
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, FieldsTemplateProperties)
Gets the fields template with the specified path
,
or null if no such fields template exists.
Declaration
public ServerBasedFieldsTemplate GetFieldsTemplate(string path, FieldsTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The fields template path. |
FieldsTemplateProperties | additionalProperties | The additional related objects to retrieve. |
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(FieldsTemplateProperties, Boolean)
Gets all the fields templates available on this server.
Declaration
public ReadOnlyCollection<ServerBasedFieldsTemplate> GetFieldsTemplates(FieldsTemplateProperties additionalProperties, bool includeTmSpecific = true)
Parameters
Type | Name | Description |
---|---|---|
FieldsTemplateProperties | additionalProperties | |
System.Boolean | includeTmSpecific |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ServerBasedFieldsTemplate> | A read-only collection of fields templates. |
GetLanguageResourcesTemplate(Guid, LanguageResourcesTemplateProperties)
Gets the LanguageResourcesTemplate with the specified ID.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(Guid id, LanguageResourcesTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | The language resources template ID. |
LanguageResourcesTemplateProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
ServerBasedLanguageResourcesTemplate | The language resource group template, or |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetLanguageResourcesTemplate(String, LanguageResourcesTemplateProperties)
Gets the language resources template with the specified path.
Declaration
public ServerBasedLanguageResourcesTemplate GetLanguageResourcesTemplate(string path, LanguageResourcesTemplateProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The language resources template path. |
LanguageResourcesTemplateProperties | additionalProperties | The additional related objects to retrieve. |
Returns
Type | Description |
---|---|
ServerBasedLanguageResourcesTemplate | The language resource group template, or |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
GetLanguageResourcesTemplates(LanguageResourcesTemplateProperties, Boolean)
Gets all the language resources templates available on this server.
Declaration
public ReadOnlyCollection<ServerBasedLanguageResourcesTemplate> GetLanguageResourcesTemplates(LanguageResourcesTemplateProperties additionalProperties, bool includeTmSpecific = true)
Parameters
Type | Name | Description |
---|---|---|
LanguageResourcesTemplateProperties | additionalProperties | |
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 |
GetServerVersion()
Returns the version of the server.
Declaration
public ServerBasedTranslationMemoryVersion GetServerVersion()
Returns
Type | Description |
---|---|
ServerBasedTranslationMemoryVersion |
GetTranslationMemories(TranslationMemoryProperties)
Returns a collection of all the server-based translation memories on this server.
Declaration
public ReadOnlyCollection<ServerBasedTranslationMemory> GetTranslationMemories(TranslationMemoryProperties additionalProperties)
Parameters
Type | Name | Description |
---|---|---|
TranslationMemoryProperties | additionalProperties | The additional related objects to retrieve. |
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. |
GetTranslationMemoriesQueryFilters()
Gets all the available filters to be queried for translation memories.
Declaration
public TranslationMemoryQueryFilters GetTranslationMemoriesQueryFilters()
Returns
Type | Description |
---|---|
TranslationMemoryQueryFilters |
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 |