Class FileServerData

All Implemented Interfaces:
AnnotatableData, IdentifiableData, LoggableData, NameableData, OwnableData, RemovableData, ShareableData

public class FileServerData extends AnnotatedData
File entries that are external files can be linked to a file server. This contains information about username/password and/or SSL keys that are required to access the server.
Since:
2.16
Author:
Nicklas
See Also:
Last modified
$Date: 2023-06-05 09:18:49 +0200 (Mon, 05 Jun 2023) $
Hibernate: class
table="`FileServers`" lazy="true"
  • Field Details

    • MAX_CONNECTION_MANAGER_FACTORY_LENGTH

      public static final int MAX_CONNECTION_MANAGER_FACTORY_LENGTH
      See Also:
    • connectionManagerFactory

      private String connectionManagerFactory
    • MAX_HOST_LENGTH

      public static final int MAX_HOST_LENGTH
      See Also:
    • host

      private String host
    • MAX_USERNAME_LENGTH

      public static final int MAX_USERNAME_LENGTH
      See Also:
    • username

      private String username
    • MAX_PASSWORD_LENGTH

      public static final int MAX_PASSWORD_LENGTH
      See Also:
    • password

      private String password
    • MAX_ROOT_PATH_LENGTH

      public static final int MAX_ROOT_PATH_LENGTH
      See Also:
    • rootPath

      private String rootPath
    • FINGERPRINT_LENGTH

      public static final int FINGERPRINT_LENGTH
      See Also:
    • sshFingerprint

      private String sshFingerprint
    • fingerprintType

      private String fingerprintType
    • MAX_PRIVATE_KEY_LENGTH

      public static final int MAX_PRIVATE_KEY_LENGTH
      See Also:
    • sshPrivateKey

      private byte[] sshPrivateKey
    • sshPrivateKeyPassword

      private String sshPrivateKeyPassword
    • MAX_FORMAT_LENGTH

      public static final int MAX_FORMAT_LENGTH
      See Also:
    • sshPrivateKeyFormat

      private String sshPrivateKeyFormat
    • MAX_CERTIFICATE_LENGTH

      public static final int MAX_CERTIFICATE_LENGTH
      See Also:
    • serverCertificate

      private byte[] serverCertificate
    • clientCertificate

      private byte[] clientCertificate
    • clientPassword

      private String clientPassword
    • files

      private Set<FileData> files
  • Constructor Details

    • FileServerData

      public FileServerData()
  • Method Details

    • getConnectionManagerFactory

      public String getConnectionManagerFactory()
      Get the ID of the connection manager factory that should be used to retreieve the file contents and metadata. If null auto-detection is used to find a suitable connection manager factory.
      Since:
      3.0
      Hibernate: property
      column="`cm_factory`" type="string" length="255" not-null="false"
    • setConnectionManagerFactory

      public void setConnectionManagerFactory(String connectionManagerFactory)
    • getHost

      public String getHost()
      Get the name:port of the actual host to use for all files using this server (overrides the host specified in the file url)
      Since:
      3.0
      Hibernate: property
      column="`host`" type="string" length="255" not-null="false"
    • setHost

      public void setHost(String host)
    • getUsername

      public String getUsername()
      Get the username that is used to login to the server. If null no login is required.
      Hibernate: property
      column="`username`" type="string" length="255" not-null="false"
    • setUsername

      public void setUsername(String username)
    • getPassword

      Get the password that is used to login to the server.
      Hibernate: property
      column="`password`" type="string" length="255" not-null="false"
    • setPassword

      public void setPassword(String password)
    • getRootPath

      public String getRootPath()
      Get the root path that must be added to all URI:s using this file server.
      Since:
      3.3
      Hibernate: property
      column="`root_path`" type="string" length="255" not-null="false"
    • setRootPath

      public void setRootPath(String rootPath)
    • getSshFingerprint

      public String getSshFingerprint()
      Get the fingerprint of the SSH public key for the server that must be verified when (if) it is accessed via the SSH protocol.
      Since:
      3.3
      Hibernate: property
      column="`ssh_fingerprint`" type="string" length="47" not-null="false"
    • setSshFingerprint

      public void setSshFingerprint(String sshFingerprint)
    • getFingerprintType

      public String getFingerprintType()
      Get the type of SSH fingerprint.
      Since:
      3.11
      Hibernate: property
      column="`ssh_fingerprint_type`" type="string" length="255" not-null="false"
    • setFingerprintType

      public void setFingerprintType(String fingerprintType)
    • getSshPrivateKey

      @PropertyPathProtected @LoggableWithoutValues public byte[] getSshPrivateKey()
      Get the SSH private key that we need to send to the server to make the server accept our connection.
      Since:
      3.13
      Hibernate: property
      column="`ssh_private_key`" type="binary" length="65535" not-null="false"
    • setSshPrivateKey

      public void setSshPrivateKey(byte[] sshPrivateKey)
    • getSshPrivateKeyPassword

      @PropertyPathProtected @LoggableWithoutValues public String getSshPrivateKeyPassword()
      Get the password that is used to unlock the SSH private key.
      Since:
      3.13
      Hibernate: property
      column="`ssh_private_key_password`" type="string" length="255" not-null="false"
    • setSshPrivateKeyPassword

      public void setSshPrivateKeyPassword(String sshPrivateKeyPassword)
    • getSshPrivateKeyFormat

      public String getSshPrivateKeyFormat()
      Get the private key format.
      Since:
      3.13
      Hibernate: property
      column="`ssh_private_key_format`" type="string" length="255" not-null="false"
    • setSshPrivateKeyFormat

      public void setSshPrivateKeyFormat(String sshPrivateKeyFormat)
    • getServerCertificate

      @LoggableWithoutValues public byte[] getServerCertificate()
      Get the public server certificate indicating that we should trust https connections to the server.
      Hibernate: property
      column="`server_certificate`" type="binary" length="65535" not-null="false"
    • setServerCertificate

      public void setServerCertificate(byte[] serverCertificate)
    • getClientCertificate

      @PropertyPathProtected @LoggableWithoutValues public byte[] getClientCertificate()
      Get the client certificate that we need to send to the server to make the server accept our connection.
      Hibernate: property
      column="`client_certificate`" type="binary" length="65535" not-null="false"
    • setClientCertificate

      public void setClientCertificate(byte[] clientCertificate)
    • getClientCertificatePassword

      @PropertyPathProtected @LoggableWithoutValues public String getClientCertificatePassword()
      Get the password that is used to unlock the client certificate.
      Hibernate: property
      column="`client_password`" type="string" length="255" not-null="false"
    • setClientCertificatePassword

      public void setClientCertificatePassword(String clientPassword)
    • getFiles

      Set<FileData> getFiles()
      This is the inverse end.
      See Also:
      Hibernate: set
      lazy="true" inverse="true"
      Hibernate: collection-key
      column="`fileserver_id`"
      Hibernate: collection-one-to-many
      class="net.sf.basedb.core.data.FileData"
    • setFiles

      void setFiles(Set<FileData> files)