Class ServerBasedLanguageResourcesTemplate
Represents a ILanguageResourcesTemplate which is stored on a server.
Inheritance
Implements
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class ServerBasedLanguageResourcesTemplate : ILanguageResourcesTemplate, ISupportPlaceables, IEquatable<ServerBasedLanguageResourcesTemplate>, IPermissionCheck
Constructors
ServerBasedLanguageResourcesTemplate(TranslationProviderServer)
Creates a new, empty language resources template.
Declaration
public ServerBasedLanguageResourcesTemplate(TranslationProviderServer server)
Parameters
Type | Name | Description |
---|---|---|
TranslationProviderServer | server | The server on which to create the language resources template. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
Properties
Description
Gets or sets the description of this language resources template.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Note that you have to call Save() to persists the change after setting this property.
Exceptions
Type | Condition |
---|---|
ObjectDeletedException | Thrown when trying to get or set the description of an entity that no longer exists. |
Id
Gets the unique ID of this language resources template.
Declaration
public Guid Id { get; }
Property Value
Type | Description |
---|---|
System.Guid |
IsDeleted
Returns
true
if this translation memory has been deleted.
Declaration
public bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDirty
Returns
true
if this language resources template has unsaved changes.
Declaration
public bool IsDirty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNewObject
Returns
true
if this language resources template has not been saved yet.
Declaration
public bool IsNewObject { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LanguageResourceBundles
Gets the language resources bundles contained in this template.
Declaration
public LanguageResourceBundleCollection LanguageResourceBundles { get; }
Property Value
Type | Description |
---|---|
LanguageResourceBundleCollection |
Remarks
Note that you have to call Save() to persist any changes made to language resources.
LinkedResourceGroupPaths
Gets the collection of paths for the linked resource groups.
Declaration
public string[] LinkedResourceGroupPaths { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
Name
Gets or sets the name of this language resources template.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Note that you have to call Save() to persists the change after setting this property.
Exceptions
Type | Condition |
---|---|
ObjectDeletedException | Thrown when trying to get or set the name of an entity that no longer exists. |
ParentResourceGroupDescription
Gets the parent resource group description.
Declaration
public string ParentResourceGroupDescription { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ParentResourceGroupName
Gets the parent resource group name.
Declaration
public string ParentResourceGroupName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ParentResourceGroupPath
Gets the parent resource group path.
Declaration
public string ParentResourceGroupPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Recognizers
Declaration
public BuiltinRecognizers Recognizers { get; set; }
Property Value
Type | Description |
---|---|
BuiltinRecognizers |
TokenizerFlags
Declaration
public TokenizerFlags? TokenizerFlags { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<TokenizerFlags> |
TranslationMemories
Gets the collection of translation memories associated with this language resources template.
Declaration
public ReadOnlyCollection<ServerBasedTranslationMemory> TranslationMemories { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ServerBasedTranslationMemory> |
Remarks
If the list of translation memories has been pre-loaded, the in-memory collection of translation memories is returned, otherwise returns null
Exceptions
Type | Condition |
---|---|
ObjectDeletedException | Thrown when this object has already been deleted. |
TranslationProviderServer
Gets the server.
Declaration
public TranslationProviderServer TranslationProviderServer { get; }
Property Value
Type | Description |
---|---|
TranslationProviderServer |
WordCountFlags
Declaration
public WordCountFlags? WordCountFlags { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<WordCountFlags> |
Methods
Delete()
Deletes this language resources template.
Declaration
public void Delete()
Remarks
If any translation memories are currently associated with the language resources template, the language resources of these translation memories will not be affected.
Exceptions
Type | Condition |
---|---|
ObjectDeletedException | Thrown when this object has already been deleted. |
ObjectNotSavedException | Thrown when this object has not been initially saved yet. |
Equals(ServerBasedLanguageResourcesTemplate)
Returns true if this template has the same Id as the specified template.
Declaration
public bool Equals(ServerBasedLanguageResourcesTemplate other)
Parameters
Type | Name | Description |
---|---|---|
ServerBasedLanguageResourcesTemplate | other | A template to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if this template has the same Id as the specified template. |
Equals(Object)
Returns true if this language resources template has the same Id as the specified language resources template.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | A language resources template to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if this language resources template has the same Id as the specified language resources template. |
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
HasPermission(String)
Gets whether this object has the permission with the specified name.
Declaration
public bool HasPermission(string permission)
Parameters
Type | Name | Description |
---|---|---|
System.String | permission | The permission name. |
Returns
Type | Description |
---|---|
System.Boolean | is the object has the specified permission.
|
Save()
Saves this language resources template, including any changes to its language resource bundles.
Declaration
public void Save()
Exceptions
Type | Condition |
---|---|
ObjectDeletedException | Thrown when this object has already been deleted. |