Package com.logicaldoc.web.service
Class SettingServiceImpl
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
-
- com.google.gwt.user.server.rpc.RemoteServiceServlet
-
- com.logicaldoc.web.service.AbstractRemoteService
-
- com.logicaldoc.web.service.SettingServiceImpl
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService,com.google.gwt.user.server.rpc.SerializationPolicyProvider,SettingService,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class SettingServiceImpl extends AbstractRemoteService implements SettingService
Implementation of the SettingService- Since:
- 6.0
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.SettingService
SettingService.Instance
-
-
Constructor Summary
Constructors Constructor Description SettingServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GUIParameter[]loadConverterParameters(String converter)Loads the parameters of a specified converterGUIEmailSettingsloadEmailSettings()Loads email settings (SMTP connection)GUIParameter[]loadGUISettings()Load the GUI settingsGUIParameter[]loadProtocolSettings()Loads web services, webDav and other protocol settingsGUIParameter[]loadSettings()Loads the complete settings setGUIParameter[]loadSettingsByNames(String[] names)Loads a set of settings valuesGUIParameter[]loadWebserviceStats(Long tenantId)Loads the usage stats of the webserviceString[]removeStorage(int storageId)Tries to delete a storage and fails in case at least one folder is using it and also if the storage is marked as the default write onevoidsaveEmailSettings(GUIEmailSettings settings)Saves email settings (SMTP connection)voidsaveExtensionAliases(String extension, String aliases)Persists new aliases for the given extensionvoidsaveFirewallSettings(GUIParameter[] settings)Saves settings related to the firewallvoidsaveRegistration(String name, String email, String organization, String website)Saves the registration settingsvoidsaveSettings(GUIParameter[] settings)Saves settingsvoidsaveStorageSettings(GUIParameter[] settings)Saves settings related to the storagebooleantestEmail(String email)Tests the SMTP connectionbooleantestStorage(int id)Tests a storage (read/write access)-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
-
-
-
-
Method Detail
-
loadEmailSettings
public GUIEmailSettings loadEmailSettings() throws ServerException
Description copied from interface:SettingServiceLoads email settings (SMTP connection)- Specified by:
loadEmailSettingsin interfaceSettingService- Returns:
- the mail server settings
- Throws:
ServerException- an error happened in the server application
-
saveEmailSettings
public void saveEmailSettings(GUIEmailSettings settings) throws ServerException
Description copied from interface:SettingServiceSaves email settings (SMTP connection)- Specified by:
saveEmailSettingsin interfaceSettingService- Parameters:
settings- the SMTP settings- Throws:
ServerException- an error happened in the server application
-
loadSettings
public GUIParameter[] loadSettings() throws ServerException
Description copied from interface:SettingServiceLoads the complete settings set- Specified by:
loadSettingsin interfaceSettingService- Returns:
- all the settings
- Throws:
ServerException- an error happened in the server application
-
loadProtocolSettings
public GUIParameter[] loadProtocolSettings() throws ServerException
Description copied from interface:SettingServiceLoads web services, webDav and other protocol settings- Specified by:
loadProtocolSettingsin interfaceSettingService- Returns:
- the protocol settings
- Throws:
ServerException- an error happened in the server application
-
saveSettings
public void saveSettings(GUIParameter[] settings) throws ServerException
Description copied from interface:SettingServiceSaves settings- Specified by:
saveSettingsin interfaceSettingService- Parameters:
settings- the settings to save- Throws:
ServerException- an error happened in the server application
-
saveFirewallSettings
public void saveFirewallSettings(GUIParameter[] settings) throws ServerException
Description copied from interface:SettingServiceSaves settings related to the firewall- Specified by:
saveFirewallSettingsin interfaceSettingService- Parameters:
settings- the firewall settings- Throws:
ServerException- an error happened in the server application
-
saveStorageSettings
public void saveStorageSettings(GUIParameter[] settings) throws ServerException
Description copied from interface:SettingServiceSaves settings related to the storage- Specified by:
saveStorageSettingsin interfaceSettingService- Parameters:
settings- the storage settings- Throws:
ServerException- an error happened in the server application
-
removeStorage
public String[] removeStorage(int storageId) throws ServerException
Description copied from interface:SettingServiceTries to delete a storage and fails in case at least one folder is using it and also if the storage is marked as the default write one- Specified by:
removeStoragein interfaceSettingService- Parameters:
storageId- identifier of the storage to remove- Returns:
- list of paths using the storage
- Throws:
ServerException- an error happened in the server application
-
loadSettingsByNames
public GUIParameter[] loadSettingsByNames(String[] names) throws ServerException
Description copied from interface:SettingServiceLoads a set of settings values- Specified by:
loadSettingsByNamesin interfaceSettingService- Parameters:
names- The setting names to be retrieved- Returns:
- The array of settings
- Throws:
ServerException- an error happened in the server application
-
loadGUISettings
public GUIParameter[] loadGUISettings() throws ServerException
Description copied from interface:SettingServiceLoad the GUI settings- Specified by:
loadGUISettingsin interfaceSettingService- Returns:
- the User Interface settings
- Throws:
ServerException- an error happened in the server application
-
testEmail
public boolean testEmail(String email) throws ServerException
Description copied from interface:SettingServiceTests the SMTP connection- Specified by:
testEmailin interfaceSettingService- Parameters:
email- email address to test(it will receive a test message)- Returns:
- True only if the email was sent
- Throws:
ServerException- an error happened in the server application
-
testStorage
public boolean testStorage(int id) throws ServerExceptionDescription copied from interface:SettingServiceTests a storage (read/write access)- Specified by:
testStoragein interfaceSettingService- Parameters:
id- identifier of the storage to test- Returns:
- True only if the storage has read/write permission
- Throws:
ServerException- an error happened in the server application
-
saveRegistration
public void saveRegistration(String name, String email, String organization, String website) throws ServerException
Description copied from interface:SettingServiceSaves the registration settings- Specified by:
saveRegistrationin interfaceSettingService- Parameters:
name- person nameemail- email contactorganization- organization namewebsite- the corporate website- Throws:
ServerException- an error happened in the server application
-
loadConverterParameters
public GUIParameter[] loadConverterParameters(String converter) throws ServerException
Description copied from interface:SettingServiceLoads the parameters of a specified converter- Specified by:
loadConverterParametersin interfaceSettingService- Parameters:
converter- name of the converter- Returns:
- the configuration parameters of the converter
- Throws:
ServerException- an error happened in the server application
-
saveExtensionAliases
public void saveExtensionAliases(String extension, String aliases) throws ServerException
Description copied from interface:SettingServicePersists new aliases for the given extension- Specified by:
saveExtensionAliasesin interfaceSettingService- Parameters:
extension- the main file extensionaliases- comma-separated set of aliases- Throws:
ServerException- an error happened in the server application
-
loadWebserviceStats
public GUIParameter[] loadWebserviceStats(Long tenantId) throws ServerException
Description copied from interface:SettingServiceLoads the usage stats of the webservice- Specified by:
loadWebserviceStatsin interfaceSettingService- Parameters:
tenantId- identifier of the tenant to consider- Returns:
- all the stats
- Throws:
ServerException- an error happened in the server application
-
-