Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Plugin upgrade and bug fixing

  • Loading branch information...
commit 11e5b04e748700e1b3b1fa4322589c5e3bcf4404 1 parent d06acb9
@eugeniosant eugeniosant authored
Showing with 71 additions and 53 deletions.
  1. +9 −0 ...lugin-jpwebmail/src/main/java/com/agiletec/plugins/jpwebmail/aps/system/services/webmail/WebMailConfig.java
  2. +1 −1  entando-plugin-jpwebmail/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/config/WebMailConfigAction.java
  3. +5 −1 entando-plugin-jpwebmail/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/config/package_en.properties
  4. +9 −5 entando-plugin-jpwebmail/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/config/package_it.properties
  5. +20 −11 ...il/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/webmail/message/helper/NewMessageActionHelper.java
  6. +1 −1  entando-plugin-jpwebmail/src/main/resources/spring/plugins/jpwebmail/apsadmin/jpwebmailActionsConfig.xml
  7. +1 −1  ...bmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/addressbook/addressBook.jsp
  8. +1 −1  ...c/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/addressbook/addressBookNotifier.jsp
  9. +1 −1  ...-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/inc/inc_folderInfo.jsp
  10. +1 −1  ...n-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/inc/inc_recipient.jsp
  11. +1 −1  ...o-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/newMessage.jsp
  12. +1 −1  ...-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/viewMessage.jsp
  13. +1 −1  ...plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/webmailInbox.jsp
  14. +1 −1  entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/showlets/jpwebmail_small.jsp
  15. +1 −1  entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/common/menu.jsp
  16. +4 −19 entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/common/template/subMenu.jsp
  17. +7 −0 entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/config/entryConfig.jsp
  18. +1 −1  ...plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/addressbook/addressBook.jsp
  19. +1 −1  ...pwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/addressbook/addressBookNotifier.jsp
  20. +1 −1  entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/inc/recipient.jsp
  21. +1 −1  entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/newMessage.jsp
  22. +1 −1  entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/noStore.jsp
  23. +1 −1  entando-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/viewMessage.jsp
View
9 ...c/main/java/com/agiletec/plugins/jpwebmail/aps/system/services/webmail/WebMailConfig.java
@@ -129,6 +129,13 @@ public void setImapProtocol(String imapProtocol) {
this._imapProtocol = imapProtocol;
}
+ public String getTempDiskRootFolder() {
+ return _tempDiskRootFolder;
+ }
+ public void setTempDiskRootFolder(String tempDiskRootFolder) {
+ this._tempDiskRootFolder = tempDiskRootFolder;
+ }
+
public String getTrashFolderName() {
return _trashFolderName;
}
@@ -191,6 +198,8 @@ public void setCertificateDebugOnConsole(boolean certificateDebugOnConsole) {
private boolean _debug;
private boolean _smtpJapsUserAuth;
+ private String _tempDiskRootFolder;
+
private String _trashFolderName;
private String _sentFolderName;
View
2  ...ail/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/config/WebMailConfigAction.java
@@ -68,7 +68,7 @@ public void setConfig(WebMailConfig config) {
this._config = config;
}
- public IWebMailManager getWebMailManager() {
+ protected IWebMailManager getWebMailManager() {
return _webMailManager;
}
public void setWebMailManager(IWebMailManager webMailManager) {
View
6 ...ebmail/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/config/package_en.properties
@@ -17,12 +17,14 @@ label.smtpUserName=Username
label.smtpPassword=Password
label.smtpPort=Port
label.debug=Debug
-label.smtpJapsUserAuth=jAPS User Authentication
+label.smtpJapsUserAuth=Entando User Authentication
label.folders=Special Folder names
label.trashFolderName=Trash Bin
label.sentFolderName=Sent Mail
+label.tempDiskRootFolder=Temp Disk Root Folder
+
title.webMail.config=Web Mail Configuration
note.config.savedConfirmation=Configuration successfully saved
@@ -50,3 +52,5 @@ config.smtpJapsUserAuth=jAPS User Authentication
config.trashFolderName=Trash Bin Folder
config.sentFolderName=Sent Mail Folder
+
+config.tempDiskRootFolder=Temp Disk Root Folder
View
14 ...ebmail/src/main/java/com/agiletec/plugins/jpwebmail/apsadmin/config/package_it.properties
@@ -1,4 +1,4 @@
-jpwebmail.intro=In questa sezione hai la possibilità di configurare il servizio di Webmail.
+jpwebmail.intro=In questa sezione hai la possibilit\u00e0 di configurare il servizio di Webmail.
label.domainName=Dominio
label.certificates=Controllo Certificati
@@ -18,19 +18,21 @@ label.smtpUserName=Username
label.smtpPassword=Password
label.smtpPort=Porta
label.debug=Debug
-label.smtpJapsUserAuth=Autenticazione utente jAPS
+label.smtpJapsUserAuth=Autenticazione utente Entando
label.folders=Nomi Cartelle speciali
label.trashFolderName=Cestino
label.sentFolderName=Posta Inviata
+label.tempDiskRootFolder=Percorso disco Cartella Temporanea
+
title.webMail.config=Configurazione Web Mail
note.config.savedConfirmation=Configurazione salvata correttamente
#VALIDATION LABELS
-requiredstring=${getText(fieldName)} è richiesto.
-Errors.certificatePath.required=Il Path Directory Certificati obbligatorio se è abilitato il controllo.
-Errors.certificatePath.notValid=Path Directory Certificati non è una directory esistente.
+requiredstring=${getText(fieldName)} \u00e8 richiesto.
+Errors.certificatePath.required=Il Path Directory Certificati obbligatorio se \u00e8 abilitato il controllo.
+Errors.certificatePath.notValid=Path Directory Certificati non \u00e8 una directory esistente.
config.domainName=Dominio
config.certificateEnable=Controllo Certificati
@@ -51,3 +53,5 @@ config.smtpJapsUserAuth=Autenticazione utente jAPS
config.trashFolderName=Cartella Cestino
config.sentFolderName=Cartella Posta Inviata
+
+config.tempDiskRootFolder=Percorso disco Cartella Temporanea
View
31 ...om/agiletec/plugins/jpwebmail/apsadmin/webmail/message/helper/NewMessageActionHelper.java
@@ -35,6 +35,7 @@
import com.agiletec.aps.system.exception.ApsSystemException;
import com.agiletec.aps.system.services.user.UserDetails;
import com.agiletec.plugins.jpwebmail.aps.system.JpwebmailSystemConstants;
+import com.agiletec.plugins.jpwebmail.aps.system.services.webmail.IWebMailManager;
/**
* @version 1.0
@@ -127,23 +128,31 @@ public void deleteUserWebMailTempDirectory(UserDetails currentUser) {
}
public String getUserWebMailDiskRootFolder(UserDetails currentUser) {
- String root = this.getTempRootFolder();
- String userFolder = root+File.separator+currentUser.getUsername();
- File dir = new File(userFolder);
- if (!dir.exists() || !dir.isDirectory()) {
- dir.mkdirs();
+ try {
+ String root = this.getTempRootFolder();
+ String userFolder = root+File.separator+currentUser.getUsername();
+ File dir = new File(userFolder);
+ if (!dir.exists() || !dir.isDirectory()) {
+ dir.mkdirs();
+ }
+ return userFolder;
+ } catch (Throwable t) {
+ throw new RuntimeException("Error creating temp folder ", t);
}
- return userFolder;
}
- protected String getTempRootFolder() {
- return _tempRootFolder;
+ protected String getTempRootFolder() throws Throwable {
+ return this.getWebMailManager().loadConfig().getTempDiskRootFolder();
+ }
+
+ protected IWebMailManager getWebMailManager() {
+ return _webMailManager;
}
- public void setTempRootFolder(String tempRootFolder) {
- this._tempRootFolder = tempRootFolder;
+ public void setWebMailManager(IWebMailManager webMailManager) {
+ this._webMailManager = webMailManager;
}
- private String _tempRootFolder;
+ private IWebMailManager _webMailManager;
private static final String EMAIL_REGEXP = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)" + "*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")" + "@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])";
View
2  ...jpwebmail/src/main/resources/spring/plugins/jpwebmail/apsadmin/jpwebmailActionsConfig.xml
@@ -18,7 +18,7 @@
<bean id="jpwebmailNewMessageActionHelper"
class="com.agiletec.plugins.jpwebmail.apsadmin.webmail.message.helper.NewMessageActionHelper" >
- <property name="tempRootFolder" ><jee:jndi-lookup jndi-name="java:comp/env/jpwebmailTempDiskRootFolder" /></property>
+ <property name="webMailManager" ref="jpwebmailWebMailManager" />
</bean>
<bean id="jpwebmailWebMailAction" scope="prototype"
View
2  ...app/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/addressbook/addressBook.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/addressbook/addressBookNotifier.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...n/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/inc/inc_folderInfo.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib prefix="webmail" uri="/webmail-core" %>
View
2  ...in/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/inc/inc_recipient.jsp
@@ -1,4 +1,4 @@
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="webmail" uri="/webmail-core" %>
<webmail:addressComponents ctxName="fromAddress" fullAddressString="${getFromAddress}" roundTo="20" defaultValue="${labelEmpty}" />
View
2  .../src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/newMessage.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/viewMessage.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...rc/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/internalservlet/webmail/webmailInbox.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/aps/jsp/showlets/jpwebmail_small.jsp
@@ -1,6 +1,6 @@
<%@ taglib prefix="wp" uri="/aps-core" %>
<%@ taglib prefix="webmail" uri="/webmail-core" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<wp:headInfo type="CSS" info="../../plugins/jpwebmail/static/css/webmail.css" />
<div class="webmailIntro">
<p><wp:i18n key="jpwebmail_SERVICE_INTRO" /></p>
View
2  ...o-plugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/common/menu.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<s:set name="currentFolder" value="currentFolder" />
View
23 ...ebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/common/template/subMenu.jsp
@@ -1,30 +1,15 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib prefix="wp" uri="/aps-core" %>
-<%--
-<wp:ifauthorized permission="superuser" var="isAdmin" />
-
-<c:choose>
- <c:when test="${isAdmin}">
-<li class="openmenu"><a href="#" rel="fagiano_jpwebmail" id="fagiano_menu_jpwebmail" class="subMenuToggler" ><s:text name="jpwebmail.admin.menu" /></a>
- <ul class="menuToggler" id="fagiano_jpwebmail">
- <li><a href="<s:url action="intro" namespace="/do/jpwebmail/WebMail" />" ><s:text name="jpwebmail.admin.submenu.webmail" /></a></li>
- <li><a href="<s:url action="edit" namespace="/do/jpwebmail/Config" />" ><s:text name="jpwebmail.admin.submenu.config" /></a></li>
- </ul>
-</li>
- </c:when>
- <c:otherwise>
-<li><a href="<s:url action="intro" namespace="/do/jpwebmail/WebMail" />" ><s:text name="jpwebmail.admin.menu" /></a></li>
- </c:otherwise>
-</c:choose>
- --%>
-
<wp:ifauthorized permission="superuser">
<li class="openmenu"><a href="#" rel="fagiano_jpwebmail" id="fagiano_menu_jpwebmail" class="subMenuToggler" ><s:text name="jpwebmail.admin.menu" /></a>
<div id="fagiano_jpwebmail" class="menuToggler"><div class="menuToggler-1"><div class="menuToggler-2">
<ul>
+ <%--
+ <li><a href="<s:url action="intro" namespace="/do/jpwebmail/WebMail" />" ><s:text name="jpwebmail.admin.submenu.webmail" /></a></li>
+ --%>
<li><a href="<s:url action="edit" namespace="/do/jpwebmail/Config" />" ><s:text name="jpwebmail.admin.menu.config" /></a></li>
</ul>
</div></div></div>
View
7 ...n-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/config/entryConfig.jsp
@@ -102,6 +102,13 @@
<wpsf:textfield useTabindexAutoIncrement="true" name="config.sentFolderName" id="config.sentFolderName" cssClass="text" />
</p>
</fieldset>
+ <fieldset>
+ <legend><s:text name="label.tempDiskRootFolder" /></legend>
+ <p>
+ <label for="config.tempDiskRootFolder" class="basic-mint-label"><s:text name="label.tempDiskRootFolder" />:</label>
+ <wpsf:textfield useTabindexAutoIncrement="true" name="config.tempDiskRootFolder" id="config.tempDiskRootFolder" cssClass="text" />
+ </p>
+ </fieldset>
<p class="centerText">
<wpsf:submit useTabindexAutoIncrement="true" value="%{getText('label.save')}" cssClass="button"/>
</p>
View
2  ...rc/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/addressbook/addressBook.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/addressbook/addressBookNotifier.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...pwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/inc/recipient.jsp
@@ -1,4 +1,4 @@
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="webmail" uri="/webmail-core" %>
<webmail:addressComponents ctxName="fromAddress" fullAddressString="${getFromAddress}" roundTo="20" defaultValue="${labelEmpty}" />
View
2  ...n-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/newMessage.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
View
2  ...ugin-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/noStore.jsp
@@ -1,4 +1,4 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<p>UTENTE &#32;<c:out value="${sessionScope.currentUser}"/> PRIVO DI WEB MAIL</p>
View
2  ...-jpwebmail/src/main/webapp/WEB-INF/plugins/jpwebmail/apsadmin/jsp/webmail/viewMessage.jsp
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="c" http://java.sun.com/jsp/jstl/core %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/aps-core" prefix="wp" %>
<%@ taglib uri="/apsadmin-core" prefix="wpsa" %>
<%@ taglib uri="/apsadmin-form" prefix="wpsf" %>
Please sign in to comment.
Something went wrong with that request. Please try again.