Search Results for

    Show / Hide Table of Contents

    Class ServerBasedFieldsTemplate

    Represents a fields template stored on the server. A fields template is a named collection of field definitions which can be applied to one or more translation memories (FieldsTemplate. Changes made to the fields template will be applied to all translation memories associated with it.

    Inheritance
    System.Object
    ServerBasedFieldsTemplate
    Implements
    IFieldsTemplate
    System.ComponentModel.INotifyPropertyChanged
    System.IEquatable<ServerBasedFieldsTemplate>
    System.ComponentModel.IEditableObject
    IPermissionCheck
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
    Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
    Syntax
    public class ServerBasedFieldsTemplate : IFieldsTemplate, INotifyPropertyChanged, IEquatable<ServerBasedFieldsTemplate>, IEditableObject, IPermissionCheck

    Constructors

    ServerBasedFieldsTemplate(TranslationProviderServer)

    Creates a new fields template. Note that you have to call Save() to persist the fields template, after setting all the required properties.

    Declaration
    public ServerBasedFieldsTemplate(TranslationProviderServer server)
    Parameters
    Type Name Description
    TranslationProviderServer server

    The translation provider server on which the fields template should be created.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when server is null.

    Properties

    CurrentFieldApplyOperation

    Gets the most recent scheduled field template apply operation; if any.

    Declaration
    public ScheduledFieldApplyOperation CurrentFieldApplyOperation { get; }
    Property Value
    Type Description
    ScheduledFieldApplyOperation

    Description

    Gets or sets the description of the fields 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/set description of an entity that no longer exists.

    FieldDefinitions

    Gets the fields definitions contained in this fields template.

    Declaration
    public FieldDefinitionCollection FieldDefinitions { get; }
    Property Value
    Type Description
    FieldDefinitionCollection
    Remarks

    If the list of fields definitions has been pre-loaded, the in-memory collection of fields definitions is returned, otherwise the list of fields definitions is retrieved from the server on-demand.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    Id

    Gets the unique id of the fields template. This is automatically generated by the system.

    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 fields template has unsaved changes.

    Declaration
    public bool IsDirty { get; }
    Property Value
    Type Description
    System.Boolean

    IsNewObject

    Returns

    true
    if this fields template has not been saved yet.

    Declaration
    public bool IsNewObject { get; }
    Property Value
    Type Description
    System.Boolean

    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 fields 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 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

    TranslationMemories

    Gets the collection of translation memories associated with this fields 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 the list of translation memories is retrieved from the server on-demand.

    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

    Methods

    Delete()

    Deletes this fields template from the system.

    Declaration
    public void Delete()
    Remarks

    If any translation memories are currently associated with the fields template, the fields 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(ServerBasedFieldsTemplate)

    Returns true if this fields template has the same Id as the specified fields template.

    Declaration
    public bool Equals(ServerBasedFieldsTemplate other)
    Parameters
    Type Name Description
    ServerBasedFieldsTemplate other

    A fields template to compare to.

    Returns
    Type Description
    System.Boolean

    True if this fields template has the same Id as the specified fields template.

    Equals(Object)

    Returns true if this fields template has the same Id as the specified fields template.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    A fields template to compare to.

    Returns
    Type Description
    System.Boolean

    True if this fields template has the same Id as the specified fields template.

    Overrides
    System.Object.Equals(System.Object)

    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
    System.Object.GetHashCode()

    HasPermission(String)

    Determines whether the specified permission has permission.

    Declaration
    public bool HasPermission(string permission)
    Parameters
    Type Name Description
    System.String permission

    The permission.

    Returns
    Type Description
    System.Boolean

    true if the specified permission has permission; otherwise, false.

    Save()

    Saves this fields template, including any changes to its field definitions.

    Declaration
    public void Save()
    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    Implements

    IFieldsTemplate
    System.ComponentModel.INotifyPropertyChanged
    System.IEquatable<T>
    System.ComponentModel.IEditableObject
    IPermissionCheck

    On this page

    • Constructors
      • ServerBasedFieldsTemplate(TranslationProviderServer)
    • Properties
      • CurrentFieldApplyOperation
      • Description
      • FieldDefinitions
      • Id
      • IsDeleted
      • IsDirty
      • IsNewObject
      • LinkedResourceGroupPaths
      • Name
      • ParentResourceGroupDescription
      • ParentResourceGroupName
      • ParentResourceGroupPath
      • TranslationMemories
      • TranslationProviderServer
    • Methods
      • Delete()
      • Equals(ServerBasedFieldsTemplate)
      • Equals(Object)
      • GetHashCode()
      • HasPermission(String)
      • Save()
    • Implements
    Back to top Generated by DocFX