3.0.4: 2012-03-05

net.sf.basedb.core.data
Class FileServerData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.OwnedData
          extended by net.sf.basedb.core.data.SharedData
              extended by net.sf.basedb.core.data.CommonData
                  extended by 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: 2011-10-21 13:15:41 +0200 (Fri, 21 Oct 2011) $
Hibernate: class
table="`FileServers`" lazy="true"

Field Summary
private  byte[] clientCertificate
           
private  String clientPassword
           
private  String connectionManagerFactory
           
private  Set<FileData> files
           
private  String host
           
static int MAX_CERTIFICATE_LENGTH
           
static int MAX_CONNECTION_MANAGER_FACTORY_LENGTH
           
static int MAX_HOST_LENGTH
           
static int MAX_PASSWORD_LENGTH
           
static int MAX_USERNAME_LENGTH
           
private  String password
           
private  byte[] serverCertificate
           
private  String username
           
 
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Constructor Summary
FileServerData()
           
 
Method Summary
 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 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.
 byte[] getServerCertificate()
          Get the public server certificate indicating that we should trust https connections to the server.
 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 setHost(String host)
           
 void setPassword(String password)
           
 void setServerCertificate(byte[] serverCertificate)
           
 void setUsername(String username)
           
 
Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, getName, isRemoved, setDescription, setName, setRemoved
 
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
 
Methods inherited from class net.sf.basedb.core.data.OwnedData
getOwner, setOwner
 
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_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

files

private Set<FileData> files
Constructor Detail

FileServerData

public FileServerData()
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

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)

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

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

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"

setFiles

void setFiles(Set<FileData> files)

3.0.4: 2012-03-05