mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4192 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4197 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4205 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4206 . svn resolved root\projects\repository\source\java\org\alfresco\filesys\server\config\ServerConfiguration.java svn revert root\projects\repository\config\alfresco\version.properties svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4219 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4224 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4631 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,6 +23,9 @@ import java.net.NetworkInterface;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.IllegalCharsetNameException;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
import java.util.ArrayList;
|
||||
@@ -315,6 +318,10 @@ public class ServerConfiguration extends AbstractLifecycleBean
|
||||
|
||||
private int m_ftpDebug;
|
||||
|
||||
// FTP character set
|
||||
|
||||
private String m_ftpCharSet;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// NFS specific configuration parameters
|
||||
//
|
||||
@@ -1660,6 +1667,29 @@ public class ServerConfiguration extends AbstractLifecycleBean
|
||||
|
||||
setFTPDebug(ftpDbg);
|
||||
}
|
||||
|
||||
// Check if a character set has been specified
|
||||
|
||||
elem = config.getConfigElement( "charSet");
|
||||
if ( elem != null) {
|
||||
|
||||
try {
|
||||
|
||||
// Validate the character set name
|
||||
|
||||
Charset.forName( elem.getValue());
|
||||
|
||||
// Set the FTP character set
|
||||
|
||||
setFTPCharacterSet( elem.getValue());
|
||||
}
|
||||
catch ( IllegalCharsetNameException ex) {
|
||||
throw new AlfrescoRuntimeException("Illegal character set name, " + elem.getValue());
|
||||
}
|
||||
catch ( UnsupportedCharsetException ex) {
|
||||
throw new AlfrescoRuntimeException("Unsupported character set name, " + elem.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3639,6 +3669,16 @@ public class ServerConfiguration extends AbstractLifecycleBean
|
||||
m_ftpBindAddress = addr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the FTP character set
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public final String getFTPCharacterSet()
|
||||
{
|
||||
return m_ftpCharSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the FTP server port to use for incoming connections, -1 indicates disable the FTP server
|
||||
*
|
||||
@@ -3688,6 +3728,16 @@ public class ServerConfiguration extends AbstractLifecycleBean
|
||||
{
|
||||
m_ftpDebug = dbg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the FTP character set
|
||||
*
|
||||
* @param charSet String
|
||||
*/
|
||||
public final void setFTPCharacterSet( String charSet)
|
||||
{
|
||||
m_ftpCharSet = charSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the NFS server is enabled
|
||||
|
Reference in New Issue
Block a user