Package net.sf.basedb.core.data
Class FileServerData
- java.lang.Object
-
- net.sf.basedb.core.data.BasicData
-
- net.sf.basedb.core.data.OwnedData
-
- net.sf.basedb.core.data.SharedData
-
- net.sf.basedb.core.data.CommonData
-
- net.sf.basedb.core.data.FileServerData
-
- All Implemented Interfaces:
IdentifiableData
,NameableData
,OwnableData
,RemovableData
,ShareableData
public class FileServerData extends CommonData
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:
- Developer documentation: Files and directories
- Last modified
- $Date: 2018-04-09 15:23:53 +0200 (må, 09 apr 2018) $
- Hibernate: class
- table="`FileServers`" lazy="true"
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
clientCertificate
private String
clientPassword
private String
connectionManagerFactory
private Set<FileData>
files
static int
FINGERPRINT_LENGTH
private String
fingerprintType
private String
host
static int
MAX_CERTIFICATE_LENGTH
static int
MAX_CONNECTION_MANAGER_FACTORY_LENGTH
static int
MAX_FORMAT_LENGTH
static int
MAX_HOST_LENGTH
static int
MAX_PASSWORD_LENGTH
static int
MAX_PRIVATE_KEY_LENGTH
static int
MAX_ROOT_PATH_LENGTH
static int
MAX_USERNAME_LENGTH
private String
password
private String
rootPath
private byte[]
serverCertificate
private String
sshFingerprint
private byte[]
sshPrivateKey
private String
sshPrivateKeyFormat
private String
sshPrivateKeyPassword
private String
username
-
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
-
Constructor Summary
Constructors Constructor Description FileServerData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getClientCertificate()
Get the client certificate that we need to send to the server to make the server accept our connection.String
getClientCertificatePassword()
Get the password that is used to unlock the client certificate.String
getConnectionManagerFactory()
Get the ID of the connection manager factory that should be used to retreieve the file contents and metadata.(package private) Set<FileData>
getFiles()
This is the inverse end.String
getFingerprintType()
Get the type of SSH fingerprint.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)String
getPassword()
Get the password that is used to login to the server.String
getRootPath()
Get the root path that must be added to all URI:s using this file server.byte[]
getServerCertificate()
Get the public server certificate indicating that we should trust https connections to the server.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.byte[]
getSshPrivateKey()
Get the SSH private key that we need to send to the server to make the server accept our connection.String
getSshPrivateKeyFormat()
Get the private key format.String
getSshPrivateKeyPassword()
Get the password that is used to unlock the SSH private key.String
getUsername()
Get the username that is used to login to the server.void
setClientCertificate(byte[] clientCertificate)
void
setClientCertificatePassword(String clientPassword)
void
setConnectionManagerFactory(String connectionManagerFactory)
(package private) void
setFiles(Set<FileData> files)
void
setFingerprintType(String fingerprintType)
void
setHost(String host)
void
setPassword(String password)
void
setRootPath(String rootPath)
void
setServerCertificate(byte[] serverCertificate)
void
setSshFingerprint(String sshFingerprint)
void
setSshPrivateKey(byte[] sshPrivateKey)
void
setSshPrivateKeyFormat(String sshPrivateKeyFormat)
void
setSshPrivateKeyPassword(String sshPrivateKeyPassword)
void
setUsername(String username)
-
Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, getName, getRemovedBy, setDescription, setName, setRemovedBy
-
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
-
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
-
-
-
-
Field Detail
-
MAX_CONNECTION_MANAGER_FACTORY_LENGTH
public static final int MAX_CONNECTION_MANAGER_FACTORY_LENGTH
- See Also:
- Constant Field Values
-
connectionManagerFactory
private String connectionManagerFactory
-
MAX_HOST_LENGTH
public static final int MAX_HOST_LENGTH
- See Also:
- Constant Field Values
-
host
private String host
-
MAX_USERNAME_LENGTH
public static final int MAX_USERNAME_LENGTH
- See Also:
- Constant Field Values
-
username
private String username
-
MAX_PASSWORD_LENGTH
public static final int MAX_PASSWORD_LENGTH
- See Also:
- Constant Field Values
-
password
private String password
-
MAX_ROOT_PATH_LENGTH
public static final int MAX_ROOT_PATH_LENGTH
- See Also:
- Constant Field Values
-
rootPath
private String rootPath
-
FINGERPRINT_LENGTH
public static final int FINGERPRINT_LENGTH
- See Also:
- Constant Field Values
-
sshFingerprint
private String sshFingerprint
-
fingerprintType
private String fingerprintType
-
MAX_PRIVATE_KEY_LENGTH
public static final int MAX_PRIVATE_KEY_LENGTH
- See Also:
- Constant Field Values
-
sshPrivateKey
private byte[] sshPrivateKey
-
sshPrivateKeyPassword
private String sshPrivateKeyPassword
-
MAX_FORMAT_LENGTH
public static final int MAX_FORMAT_LENGTH
- See Also:
- Constant Field Values
-
sshPrivateKeyFormat
private String sshPrivateKeyFormat
-
MAX_CERTIFICATE_LENGTH
public static final int MAX_CERTIFICATE_LENGTH
- See Also:
- Constant Field Values
-
serverCertificate
private byte[] serverCertificate
-
clientCertificate
private byte[] clientCertificate
-
clientPassword
private String clientPassword
-
-
Method Detail
-
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
@PropertyPathProtected public String 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 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 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
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 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 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:
FileData.getFileServer()
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`fileserver_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.FileData"
-
-