Search Results for

    Show / Hide Table of Contents

    Class DatabaseServer

    Represents a database server known in the system, which can serve as the host for one or more translation memory containers (TranslationMemoryContainer). A translation memory container is a database that contains one or more server-based translation memories.

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

    Constructors

    DatabaseServer(TranslationProviderServer)

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

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

    The translation provider server with which the database server should be registered.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when server is null.

    Properties

    AuthenticationType

    Gets or sets the type of authentication that is used when the application server communicates with this database server.

    Declaration
    public DatabaseServerAuthenticationType AuthenticationType { get; set; }
    Property Value
    Type Description
    DatabaseServerAuthenticationType
    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to set AuthenticationType of an entity that no longer exists.

    Containers

    Gets all the translation memory containers that are hosted on this database server.

    Declaration
    public ReadOnlyCollection<TranslationMemoryContainer> Containers { get; }
    Property Value
    Type Description
    ReadOnlyCollection<TranslationMemoryContainer>
    Remarks

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

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    Description

    Gets or sets the description of the database server.

    Declaration
    [StringLength(255, ErrorMessage = "Description too long!")]
    public string Description { get; set; }
    Property Value
    Type Description
    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.

    Id

    Gets the unique Id for this database server.

    Declaration
    public Guid Id { get; }
    Property Value
    Type Description
    Guid
    Remarks

    This is auto-generated by the system when the database server is created.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to get the unique ID of an entity that no longer exists.

    IsDeleted

    Returns

    true
    if this translation memory has been deleted.
    Declaration
    public bool IsDeleted { get; }
    Property Value
    Type Description
    bool

    IsDirty

    Returns

    true
    if this database server has unsaved changes.
    Declaration
    public bool IsDirty { get; }
    Property Value
    Type Description
    bool

    IsNewObject

    Gets a value indicating whether this instance is new object.

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

    true if this instance is new object; otherwise, false.

    LinkedResourceGroupPaths

    Gets or sets the collection of paths for the linked resource groups.

    Declaration
    public string[] LinkedResourceGroupPaths { get; set; }
    Property Value
    Type Description
    string[]

    Name

    Gets or sets the friendly name of the database server.

    Declaration
    [Required(ErrorMessage = "Required Field")]
    [RegularExpression("^[\\w\\s-']*", ErrorMessage = "Characters are not allowed.")]
    [StringLength(50, ErrorMessage = "Name too long!")]
    public string Name { get; set; }
    Property Value
    Type Description
    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
    string

    ParentResourceGroupName

    Gets or sets the parent resource group name.

    Declaration
    public string ParentResourceGroupName { get; set; }
    Property Value
    Type Description
    string

    ParentResourceGroupPath

    Gets the parent resource group path.

    Declaration
    public string ParentResourceGroupPath { get; set; }
    Property Value
    Type Description
    string

    Password

    Gets or sets the password for the user name specified in UserName that is used for authentication when the application server communicates with this database server.

    Declaration
    [Required(ErrorMessage = "Required Field")]
    [StringLength(50, ErrorMessage = "Password too long!")]
    public string Password { get; set; }
    Property Value
    Type Description
    string
    Remarks

    The password is only used when AuthenticationType is set to Database.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to set Password of an entity that no longer exists.

    ServerName

    Gets or sets the DNS name or IP address of this database server.

    Declaration
    [Required]
    [StringLength(255, ErrorMessage = "Server name too long!")]
    public string ServerName { get; set; }
    Property Value
    Type Description
    string
    Remarks

    This property can not be changed after the database server has been created.

    Exceptions
    Type Condition
    NullPropertyException

    Thrown when trying to set this property to null or an empty string.

    InvalidOperationException

    Thrown when trying to set this property after initial creation of the database server.

    ObjectDeletedException

    Thrown when trying to get/set ServerName of an entity that no longer exists.

    ServerType

    Gets or sets the database server type.

    Declaration
    [Required(ErrorMessage = "Required Field")]
    public DatabaseServerType ServerType { get; set; }
    Property Value
    Type Description
    DatabaseServerType
    Remarks

    This property can not be changed after the database server has been created.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to set ServerType of an entity that no longer exists.

    InvalidOperationException

    Thrown when trying to set this property after initial creation of the database server.

    TranslationProviderServer

    Gets the translation provider server on which this database server is registered.

    Declaration
    public TranslationProviderServer TranslationProviderServer { get; }
    Property Value
    Type Description
    TranslationProviderServer

    UserName

    Gets or sets the user name used for authentication together with the password specified in Password when the application server communicates with this database server.

    Declaration
    [Required(ErrorMessage = "Required Field")]
    [StringLength(50, ErrorMessage = "User Name too long!")]
    public string UserName { get; set; }
    Property Value
    Type Description
    string
    Remarks

    The user name is only used when AuthenticationType is set to Database.

    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when trying to set UserName of an entity that no longer exists.

    Methods

    Delete()

    Deletes this database server and all its containers from the system.

    Declaration
    public void Delete()
    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    ObjectNotSavedException

    Thrown when this object has not been initially saved yet.

    Equals(DatabaseServer)

    Indicates whether the current object is equal to another object of the same type.

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

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(object)

    Determines whether the specified object is equal to this instance.

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

    The object to compare with this instance.

    Returns
    Type Description
    bool

    true if the specified object is equal to this instance; otherwise, false.

    Overrides
    object.Equals(object)
    Exceptions
    Type Condition
    NullReferenceException

    The obj parameter is null.

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    object.GetHashCode()

    HasPermission(string)

    Gets whether this object has the permission with the specified name.

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

    The permission name.

    Returns
    Type Description
    bool
    true
    is the object has the specified permission.

    Save()

    Saves this database server.

    Declaration
    public void Save()
    Exceptions
    Type Condition
    ObjectDeletedException

    Thrown when this object has already been deleted.

    Events

    PropertyChanged

    Occurs when a property value changes.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler

    Implements

    IEditableObject
    INotifyPropertyChanged
    IEquatable<T>
    IPermissionCheck
    In this article
    • Constructors
      • DatabaseServer(TranslationProviderServer)
    • Properties
      • AuthenticationType
      • Containers
      • Description
      • Id
      • IsDeleted
      • IsDirty
      • IsNewObject
      • LinkedResourceGroupPaths
      • Name
      • ParentResourceGroupDescription
      • ParentResourceGroupName
      • ParentResourceGroupPath
      • Password
      • ServerName
      • ServerType
      • TranslationProviderServer
      • UserName
    • Methods
      • Delete()
      • Equals(DatabaseServer)
      • Equals(object)
      • GetHashCode()
      • HasPermission(string)
      • Save()
    • Events
      • PropertyChanged
    • Implements
    Back to top Generated by DocFX