Sfoglia il codice sorgente

align

feature/allineamento-sorgenti
E-A 2 anni fa
parent
commit
99d4757f46
  1. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/persistence/AuditEventPersistenceImpl.java
  2. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/details_column.jsp
  3. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/relations_column.jsp
  4. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/detail.jsp
  5. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view.jsp
  6. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view_list.jsp
  7. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/edit.jsp
  8. 1
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/view.jsp
  9. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-hook.xml
  10. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateFunzionarioException.java
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicatePrenotazioneException.java
  12. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateProfessionistaException.java
  13. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchDisponibilitaException.java
  14. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchFunzionarioException.java
  15. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchPrenotazioneException.java
  16. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchProfessionistaException.java
  17. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/SlotNotAvailableException.java
  18. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/DisponibilitaImpl.java
  19. 2
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/FunzionarioImpl.java
  20. 13
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/PrenotazioneImpl.java
  21. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/ProfessionistaImpl.java
  22. 10
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java
  23. 46
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaServiceImpl.java
  24. 2
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioLocalServiceImpl.java
  25. 48
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioServiceImpl.java
  26. 50
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/PrenotazioneServiceImpl.java
  27. 3
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java
  28. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/init.jsp
  29. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp
  30. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp
  31. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita_action.jsp
  32. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/view.jsp
  33. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/init.jsp
  34. 1
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/view.jsp
  35. 2
      liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/companyconfig/portlet/CompanyConfigurationPortlet.java
  36. 1
      liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/init.jsp
  37. 8
      liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/view.jsp
  38. 1
      liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/init.jsp
  39. 2
      liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/liferay-hook.xml
  40. 1
      liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/init.jsp
  41. 1
      liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp
  42. 2
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/service.xml
  43. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java
  44. 4
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/portlet/NotificatorPortlet.java
  45. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java
  46. 14
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java
  47. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationLogPersistenceImpl.java
  48. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationMailPersistenceImpl.java
  49. 6
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java
  50. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp
  51. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/edit_notification.jsp
  52. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/init.jsp
  53. 1
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/view.jsp
  54. 2
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-hook.xml
  55. 10
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-portlet.xml
  56. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml
  57. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenImpl.java
  58. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoLogImpl.java
  59. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeImpl.java
  60. 4
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceImpl.java
  61. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskImpl.java
  62. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskInstanceTokenImpl.java
  63. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstancePersistenceImpl.java
  64. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstanceTokenPersistenceImpl.java
  65. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoLogPersistenceImpl.java
  66. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoNodePersistenceImpl.java
  67. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskAssignmentInstancePersistenceImpl.java
  68. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskInstanceTokenPersistenceImpl.java
  69. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskPersistenceImpl.java
  70. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/liferay-hook.xml
  71. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service.xml
  72. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormDefinitionLinkImpl.java
  73. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormLogImpl.java
  74. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormTemplateLinkImpl.java
  75. 7
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/portlet/WorkflowFormAdminPortletControlPanelEntry.java
  76. 29
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormDefinitionLinkLocalServiceImpl.java
  77. 16
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormLogLocalServiceImpl.java
  78. 11
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormTemplateLinkLocalServiceImpl.java
  79. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/init.jsp
  80. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/edit_form_definition_link.jsp
  81. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/form_definition_link_action.jsp
  82. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/init.jsp
  83. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/select_workflow_definition.jsp
  84. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/edit_form_template_link.jsp
  85. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/form_template_link_action.jsp
  86. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/template_toolbar.jsp
  87. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/view_form_template_links.jsp
  88. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/toolbar.jsp
  89. 1
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/view.jsp
  90. 2
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-hook.xml
  91. 2
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java
  92. 5
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java
  93. 1
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/html/init.jsp
  94. 1
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/view.jsp
  95. 2
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-hook.xml
  96. 2
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml
  97. 3
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/messaging/MailManagerMessageListener.java
  98. 20
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailAttachmentLocalServiceImpl.java
  99. 172
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailLocalServiceImpl.java
  100. 30
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailTemplateLocalServiceImpl.java
  101. Some files were not shown because too many files have changed in this diff Show More

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/persistence/AuditEventPersistenceImpl.java

@ -43,7 +43,6 @@ import it.tref.liferay.portos.audit.NoSuchAuditEventException;
import it.tref.liferay.portos.audit.model.AuditEvent; import it.tref.liferay.portos.audit.model.AuditEvent;
import it.tref.liferay.portos.audit.model.impl.AuditEventImpl; import it.tref.liferay.portos.audit.model.impl.AuditEventImpl;
import it.tref.liferay.portos.audit.model.impl.AuditEventModelImpl; import it.tref.liferay.portos.audit.model.impl.AuditEventModelImpl;
import it.tref.liferay.portos.audit.service.persistence.AuditEventPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/details_column.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.TextFormatter"%> <%@page import="com.liferay.portal.kernel.util.TextFormatter"%>
<%@page import="com.liferay.portal.kernel.json.JSONArray"%> <%@page import="com.liferay.portal.kernel.json.JSONArray"%>
<%@page import="it.tref.liferay.portos.audit.model.AuditEvent"%> <%@page import="it.tref.liferay.portos.audit.model.AuditEvent"%>

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/relations_column.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.TextFormatter"%> <%@page import="com.liferay.portal.kernel.util.TextFormatter"%>
<%@page import="com.liferay.portal.kernel.json.JSONArray"%> <%@page import="com.liferay.portal.kernel.json.JSONArray"%>
<%@page import="it.tref.liferay.portos.audit.model.AuditEvent"%> <%@page import="it.tref.liferay.portos.audit.model.AuditEvent"%>

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/detail.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%> <%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%>
<%@page import="com.liferay.portal.security.permission.ActionKeys"%> <%@page import="com.liferay.portal.security.permission.ActionKeys"%>

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%> <%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%>
<%@page import="com.liferay.portal.security.permission.ActionKeys"%> <%@page import="com.liferay.portal.security.permission.ActionKeys"%>

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view_list.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%> <%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%>
<%@page import="com.liferay.portal.security.permission.ActionKeys"%> <%@page import="com.liferay.portal.security.permission.ActionKeys"%>

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/edit.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/html/init.jsp" %> <%@ include file="/html/init.jsp" %>

1
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/view.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/html/init.jsp" %> <%@ include file="/html/init.jsp" %>

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-hook.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook> <hook>

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateFunzionarioException.java

@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class DuplicateFunzionarioException extends PortalException { public class DuplicateFunzionarioException extends PortalException {
public DuplicateFunzionarioException() { public DuplicateFunzionarioException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicatePrenotazioneException.java

@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class DuplicatePrenotazioneException extends PortalException { public class DuplicatePrenotazioneException extends PortalException {
public DuplicatePrenotazioneException() { public DuplicatePrenotazioneException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateProfessionistaException.java

@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class DuplicateProfessionistaException extends PortalException { public class DuplicateProfessionistaException extends PortalException {
public DuplicateProfessionistaException() { public DuplicateProfessionistaException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchDisponibilitaException.java

@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class NoSuchDisponibilitaException extends NoSuchModelException { public class NoSuchDisponibilitaException extends NoSuchModelException {
public NoSuchDisponibilitaException() { public NoSuchDisponibilitaException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchFunzionarioException.java

@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class NoSuchFunzionarioException extends NoSuchModelException { public class NoSuchFunzionarioException extends NoSuchModelException {
public NoSuchFunzionarioException() { public NoSuchFunzionarioException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchPrenotazioneException.java

@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class NoSuchPrenotazioneException extends NoSuchModelException { public class NoSuchPrenotazioneException extends NoSuchModelException {
public NoSuchPrenotazioneException() { public NoSuchPrenotazioneException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchProfessionistaException.java

@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class NoSuchProfessionistaException extends NoSuchModelException { public class NoSuchProfessionistaException extends NoSuchModelException {
public NoSuchProfessionistaException() { public NoSuchProfessionistaException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/SlotNotAvailableException.java

@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException;
/** /**
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class SlotNotAvailableException extends PortalException { public class SlotNotAvailableException extends PortalException {
public SlotNotAvailableException() { public SlotNotAvailableException() {

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/DisponibilitaImpl.java

@ -20,7 +20,6 @@ package it.tref.portos.calendar.appointments.model.impl;
* *
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class DisponibilitaImpl extends DisponibilitaBaseImpl { public class DisponibilitaImpl extends DisponibilitaBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a disponibilita model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a disponibilita model instance

2
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/FunzionarioImpl.java

@ -22,7 +22,6 @@ import com.liferay.portal.kernel.util.StringPool;
* *
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class FunzionarioImpl extends FunzionarioBaseImpl { public class FunzionarioImpl extends FunzionarioBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a funzionario model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a funzionario model instance
@ -30,7 +29,6 @@ public class FunzionarioImpl extends FunzionarioBaseImpl {
*/ */
public FunzionarioImpl() {} public FunzionarioImpl() {}
@Override
public String getFullDescription() { public String getFullDescription() {
return getNome() + StringPool.SPACE + getCognome(); return getNome() + StringPool.SPACE + getCognome();
} }

13
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/PrenotazioneImpl.java

@ -24,7 +24,6 @@ import org.apache.commons.lang.time.DateUtils;
* *
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class PrenotazioneImpl extends PrenotazioneBaseImpl { public class PrenotazioneImpl extends PrenotazioneBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a prenotazione model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a prenotazione model instance
@ -32,9 +31,17 @@ public class PrenotazioneImpl extends PrenotazioneBaseImpl {
*/ */
public PrenotazioneImpl() {} public PrenotazioneImpl() {}
@Override
public boolean isExpired(Date now) { public boolean isExpired(Date now) {
return now.after(getStartDate()) || DateUtils.isSameDay(now, getStartDate()); if (now.after(getStartDate())) {
return true;
}
if (DateUtils.isSameDay(now, getStartDate())) {
return true;
}
return false;
} }
} }

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/ProfessionistaImpl.java

@ -20,7 +20,6 @@ package it.tref.portos.calendar.appointments.model.impl;
* *
* @author 3F Consulting + Manifattura Web Group s.r.l. * @author 3F Consulting + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class ProfessionistaImpl extends ProfessionistaBaseImpl { public class ProfessionistaImpl extends ProfessionistaBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a professionista model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a professionista model instance

10
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java

@ -316,10 +316,10 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase
List<Disponibilita> results = disponibilitaPersistence.findWithDynamicQuery(dynamicQuery); List<Disponibilita> results = disponibilitaPersistence.findWithDynamicQuery(dynamicQuery);
return results; return results;
}
} }
public List<Disponibilita> findByFunzionario_StartDate(long funzionarioId, Date date, long presidio) throws SystemException {
Date start = DateUtils.truncate(date, Calendar.DAY_OF_MONTH); Date start = DateUtils.truncate(date, Calendar.DAY_OF_MONTH);
Date end = DateUtils.addHours(start, 22); Date end = DateUtils.addHours(start, 22);
DynamicQuery dynamicQuery = dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
@ -373,8 +373,8 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase
boolean isDirigenteGenerale = RoleLocalServiceUtil.hasUserRole(user.getUserId(), dirigenteGenerale.getRoleId()); boolean isDirigenteGenerale = RoleLocalServiceUtil.hasUserRole(user.getUserId(), dirigenteGenerale.getRoleId());
if (isDirigenteGenerale) { if (isDirigenteGenerale) {
List<Organization> orgs =
List<Organization> orgs = OrganizationLocalServiceUtil.getOrganizations(-1, -1); OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (Organization organization : orgs) { for (Organization organization : orgs) {
if (organization.getParentOrganization() != null) { if (organization.getParentOrganization() != null) {
orgIds.add(organization.getOrganizationId()); orgIds.add(organization.getOrganizationId());
@ -428,8 +428,8 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase
boolean isDirigenteGenerale = RoleLocalServiceUtil.hasUserRole(user.getUserId(), dirigenteGenerale.getRoleId()); boolean isDirigenteGenerale = RoleLocalServiceUtil.hasUserRole(user.getUserId(), dirigenteGenerale.getRoleId());
if (isDirigenteGenerale) { if (isDirigenteGenerale) {
List<Organization> orgs =
List<Organization> orgs = OrganizationLocalServiceUtil.getOrganizations(-1, -1); OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (Organization organization : orgs) { for (Organization organization : orgs) {
if (organization.getParentOrganization() != null) { if (organization.getParentOrganization() != null) {
orgIds.add(organization.getOrganizationId()); orgIds.add(organization.getOrganizationId());

46
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaServiceImpl.java

@ -11,6 +11,7 @@ package it.tref.portos.calendar.appointments.service.impl;
import it.tref.portos.calendar.appointments.model.Disponibilita; import it.tref.portos.calendar.appointments.model.Disponibilita;
import it.tref.portos.calendar.appointments.model.Funzionario; import it.tref.portos.calendar.appointments.model.Funzionario;
import it.tref.portos.calendar.appointments.model.Prenotazione; import it.tref.portos.calendar.appointments.model.Prenotazione;
import it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil;
import it.tref.portos.calendar.appointments.service.base.DisponibilitaServiceBaseImpl; import it.tref.portos.calendar.appointments.service.base.DisponibilitaServiceBaseImpl;
import java.text.ParseException; import java.text.ParseException;
@ -37,6 +38,7 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
/** /**
* The implementation of the disponibilita remote service. * The implementation of the disponibilita remote service.
@ -61,7 +63,6 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl {
private static Log _log = LogFactoryUtil.getLog(DisponibilitaServiceImpl.class); private static Log _log = LogFactoryUtil.getLog(DisponibilitaServiceImpl.class);
@Override
public Disponibilita addDisponibilita(long userId, long funzionarioId, Date startDate, Date endDate, long presidio, public Disponibilita addDisponibilita(long userId, long funzionarioId, Date startDate, Date endDate, long presidio,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
@ -69,7 +70,6 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl {
serviceContext); serviceContext);
} }
@Override
public List<Disponibilita> addDisponibilitaGenerale(long presidio, long userId, Date dataInizioDisponibilita, public List<Disponibilita> addDisponibilitaGenerale(long presidio, long userId, Date dataInizioDisponibilita,
Date dataFineDisponibilita, String giornoSettimana, String oraInizioDisponibilita, Date dataFineDisponibilita, String giornoSettimana, String oraInizioDisponibilita,
String oraFineDisponibilita, ServiceContext serviceContext) throws SystemException, PortalException { String oraFineDisponibilita, ServiceContext serviceContext) throws SystemException, PortalException {
@ -87,9 +87,7 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl {
return listDisponibilita; return listDisponibilita;
} }
@Override public String verifyDisponibilitaByDateHour(String presidio, String date,String[] oreInizio, String idFunzionario) throws SystemException, ParseException {
public String verifyDisponibilitaByDateHour(String presidio, String date, String[] oreInizio, String idFunzionario)
throws SystemException, ParseException {
JSONObject json = JSONFactoryUtil.createJSONObject(); JSONObject json = JSONFactoryUtil.createJSONObject();
JSONArray array = JSONFactoryUtil.createJSONArray(); JSONArray array = JSONFactoryUtil.createJSONArray();
@ -101,9 +99,18 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl {
String oraInizio = oreInizio[i]; String oraInizio = oreInizio[i];
jsonFiglio.put("ora", oraInizio); jsonFiglio.put("ora", oraInizio);
Date dateVerify = formatDateTime(oraInizio, dateVerifyTemp); Date dateVerify = formatDateTime(oraInizio, dateVerifyTemp);
List<Prenotazione> lista = prenotazioneLocalService.findByDateHourFunzionario(dateVerify,
Long.parseLong(idFunzionario), org.getGroupId());
jsonFiglio.put("disponibile", lista.isEmpty()); List<Prenotazione> lista =
PrenotazioneLocalServiceUtil.findByDateHourFunzionario(
dateVerify, Long.parseLong(idFunzionario), org.getGroupId());
if(lista.isEmpty()){
jsonFiglio.put("disponibile", true);
} else {
jsonFiglio.put("disponibile", false);
}
array.put(jsonFiglio); array.put(jsonFiglio);
} }
json.put("slot", array); json.put("slot", array);
@ -117,22 +124,31 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl {
Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio));
List<User> userDefinitivo = new ArrayList<User>(); List<User> userDefinitivo = new ArrayList<User>();
try { try {
if(organization != null){ if(organization != null){
List<User> users = userLocalService.getOrganizationUsers(Long.valueOf(presidio)); List<User> users = UserLocalServiceUtil.getOrganizationUsers(Long.valueOf(presidio));
for (User user : users) { for (User user : users) {
Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto");
Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(),
"portos_calendario"); Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_calendario");
if (!userLocalService.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())) {
boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), if(!UserLocalServiceUtil.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())){
organization.getGroupId(), portosIstruttore.getRoleId());
boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(
user.getUserId(), organization.getGroupId(), portosIstruttore.getRoleId());
if(isIstruttore){ if(isIstruttore){
userDefinitivo.add(user); userDefinitivo.add(user);
} }
} }
} }
} }
} catch (NumberFormatException | PortalException | SystemException e) {
} catch (NumberFormatException | SystemException e) {
_log.error(e,e);
} catch (PortalException e) {
_log.error(e,e); _log.error(e,e);
} }

2
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioLocalServiceImpl.java

@ -40,7 +40,6 @@ public class FunzionarioLocalServiceImpl extends FunzionarioLocalServiceBaseImpl
* service. * service.
*/ */
@Override
public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia, public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
@ -75,7 +74,6 @@ public class FunzionarioLocalServiceImpl extends FunzionarioLocalServiceBaseImpl
return this.deleteFunzionario(funzionario); return this.deleteFunzionario(funzionario);
} }
@Override
public List<Funzionario> findByPresidio(String presidio) throws SystemException { public List<Funzionario> findByPresidio(String presidio) throws SystemException {
return funzionarioPersistence.findByPresidio(presidio); return funzionarioPersistence.findByPresidio(presidio);

48
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioServiceImpl.java

@ -8,7 +8,6 @@
package it.tref.portos.calendar.appointments.service.impl; package it.tref.portos.calendar.appointments.service.impl;
import it.tref.liferay.portos.bo.shared.util.Constants;
import it.tref.portos.calendar.appointments.model.Funzionario; import it.tref.portos.calendar.appointments.model.Funzionario;
import it.tref.portos.calendar.appointments.service.base.FunzionarioServiceBaseImpl; import it.tref.portos.calendar.appointments.service.base.FunzionarioServiceBaseImpl;
@ -23,7 +22,6 @@ import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.Organization; import com.liferay.portal.model.Organization;
import com.liferay.portal.model.Role; import com.liferay.portal.model.Role;
@ -32,6 +30,8 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.Constants;
/** /**
* The implementation of the funzionario remote service. * The implementation of the funzionario remote service.
@ -55,37 +55,43 @@ public class FunzionarioServiceImpl extends FunzionarioServiceBaseImpl {
private static Log _log = LogFactoryUtil.getLog(FunzionarioServiceImpl.class); private static Log _log = LogFactoryUtil.getLog(FunzionarioServiceImpl.class);
@Override
public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia, public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
return funzionarioLocalService.addFunzionario(userId, nome, cognome, presidio, tipologia, serviceContext); return funzionarioLocalService.addFunzionario(userId, nome, cognome, presidio, tipologia, serviceContext);
} }
@Override
public String getFunzionariByPresidio(String presidio) { public String getFunzionariByPresidio(String presidio) {
JSONArray json = JSONFactoryUtil.createJSONArray(); JSONArray json = JSONFactoryUtil.createJSONArray();
try { try {
Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio));
if(organization != null){ if(organization != null){
List<User> users = userLocalService.getOrganizationUsers(Long.valueOf(presidio));
List<User> users = UserLocalServiceUtil.getOrganizationUsers(Long.valueOf(presidio));
//Bug 32935
Collections.sort(users, new UserComparator()); Collections.sort(users, new UserComparator());
for (User user : users) { for (User user : users) {
Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto");
Role portosGeologo = RoleLocalServiceUtil.getRole(organization.getCompanyId(),
Constants.ROLE_NAME_GEOLOGO); Role portosGeologo = RoleLocalServiceUtil.getRole(organization.getCompanyId(), Constants.ROLE_NAME_GEOLOGO);
Role portosCalendario = RoleLocalServiceUtil.getRole(organization.getCompanyId(),
"portos_calendario"); Role portosCalendario = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_calendario");
Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(),
Constants.ROLE_NAME_ISTRUTTORE); Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), Constants.ROLE_NAME_ISTRUTTORE);
if (!userLocalService.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())) {
boolean isCalendario = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), if(!UserLocalServiceUtil.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())){
organization.getGroupId(), portosCalendario.getRoleId());
boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), boolean isCalendario = UserGroupRoleLocalServiceUtil.hasUserGroupRole(
organization.getGroupId(), portosIstruttore.getRoleId()); user.getUserId(), organization.getGroupId(), portosCalendario.getRoleId());
boolean isGeologo = userLocalService.hasRoleUser(portosGeologo.getRoleId(),
user.getUserId()); boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(
user.getUserId(), organization.getGroupId(), portosIstruttore.getRoleId());
boolean isGeologo = UserLocalServiceUtil.hasRoleUser(portosGeologo.getRoleId(), user.getUserId());
if(isCalendario){ if(isCalendario){
JSONObject jsonFunzionario = JSONFactoryUtil.createJSONObject(); JSONObject jsonFunzionario = JSONFactoryUtil.createJSONObject();
jsonFunzionario.put("id", user.getUserId()); jsonFunzionario.put("id", user.getUserId());
@ -96,14 +102,16 @@ public class FunzionarioServiceImpl extends FunzionarioServiceBaseImpl {
} else if(isGeologo){ } else if(isGeologo){
jsonFunzionario.put("tipologia", "Geologo"); jsonFunzionario.put("tipologia", "Geologo");
} else { } else {
jsonFunzionario.put("tipologia", StringPool.BLANK); jsonFunzionario.put("tipologia", "");
} }
json.put(jsonFunzionario); json.put(jsonFunzionario);
} }
} }
} }
} }
} catch (NumberFormatException | PortalException | SystemException e) { } catch (NumberFormatException | SystemException e) {
_log.error(e,e);
} catch (PortalException e) {
_log.error(e,e); _log.error(e,e);
} }
return json.toString(); return json.toString();

50
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/PrenotazioneServiceImpl.java

@ -10,6 +10,7 @@ package it.tref.portos.calendar.appointments.service.impl;
import it.tref.portos.calendar.appointments.SlotNotAvailableException; import it.tref.portos.calendar.appointments.SlotNotAvailableException;
import it.tref.portos.calendar.appointments.model.Prenotazione; import it.tref.portos.calendar.appointments.model.Prenotazione;
import it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil;
import it.tref.portos.calendar.appointments.service.base.PrenotazioneServiceBaseImpl; import it.tref.portos.calendar.appointments.service.base.PrenotazioneServiceBaseImpl;
import java.text.ParseException; import java.text.ParseException;
@ -34,6 +35,7 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
/** /**
* The implementation of the prenotazione remote service. * The implementation of the prenotazione remote service.
@ -57,7 +59,7 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl {
private static Log _log = LogFactoryUtil.getLog(PrenotazioneServiceImpl.class); private static Log _log = LogFactoryUtil.getLog(PrenotazioneServiceImpl.class);
@Override //Product Backlog Item 32934
public void addPrenotazione(long userId, long funzionarioId, long professionistaId, Date startDate, Date endDate, public void addPrenotazione(long userId, long funzionarioId, long professionistaId, Date startDate, Date endDate,
String descrizione, String telefono, String email, long presidio, ServiceContext serviceContext) String descrizione, String telefono, String email, long presidio, ServiceContext serviceContext)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -69,11 +71,10 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl {
descrizione, telefono, email, presidio, serviceContext); descrizione, telefono, email, presidio, serviceContext);
} }
@Override
public void updatePrenotazione(long prenotazioneId, long userId, Date startDate, Date endDate, String descrizione, public void updatePrenotazione(long prenotazioneId, long userId, Date startDate, Date endDate, String descrizione,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
Prenotazione prenotazione = prenotazioneLocalService.fetchPrenotazione(prenotazioneId); Prenotazione prenotazione = PrenotazioneLocalServiceUtil.fetchPrenotazione(prenotazioneId);
if (prenotazione.getUserId() != userId) { if (prenotazione.getUserId() != userId) {
throw new SystemException("error.calendar.appointments.prenotazione.not.allowed.update " + prenotazioneId throw new SystemException("error.calendar.appointments.prenotazione.not.allowed.update " + prenotazioneId
+ " user " + userId); + " user " + userId);
@ -81,36 +82,49 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl {
prenotazioneLocalService.updatePrenotazione(prenotazioneId, startDate, endDate, descrizione, serviceContext); prenotazioneLocalService.updatePrenotazione(prenotazioneId, startDate, endDate, descrizione, serviceContext);
} }
@Override
public void deletePrenotazione(long prenotazioneId, long userId) throws SystemException, PortalException { public void deletePrenotazione(long prenotazioneId, long userId) throws SystemException, PortalException {
Prenotazione prenotazione = PrenotazioneLocalServiceUtil.fetchPrenotazione(prenotazioneId);
//Product Backlog Item 32933
// if (prenotazione.getUserId() != userId) {
// throw new SystemException("error.calendar.appointments.prenotazione.not.allowed.update " + prenotazioneId
// + " user " + userId);
// }
prenotazioneLocalService.deletePrenotazione(prenotazioneId); prenotazioneLocalService.deletePrenotazione(prenotazioneId);
} }
@Override public String getPrenotazioniByDate(String presidio, String date, String userId) throws SystemException, ParseException {
public String getPrenotazioniByDate(String presidio, String date, String userId) throws SystemException,
ParseException {
long loggetUserId = Long.parseLong(userId); long loggetUserId = Long.parseLong(userId);
Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio));
List<User> userDefinitivo = new ArrayList<User>(); List<User> userDefinitivo = new ArrayList<User>();
try { try {
if(organization != null){ if(organization != null){
List<User> users = userLocalService.getOrganizationUsers(Long.valueOf(presidio)); List<User> users = UserLocalServiceUtil.getOrganizationUsers(Long.valueOf(presidio));
for (User user : users) { for (User user : users) {
Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto");
Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(),
"portos_calendario"); Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_calendario");
if (!userLocalService.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())) {
boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), if(!UserLocalServiceUtil.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())){
organization.getGroupId(), portosIstruttore.getRoleId());
boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(
user.getUserId(), organization.getGroupId(), portosIstruttore.getRoleId());
if(isIstruttore){ if(isIstruttore){
userDefinitivo.add(user); userDefinitivo.add(user);
} }
} }
} }
} }
} catch (NumberFormatException | PortalException | SystemException e) {
} catch (NumberFormatException | SystemException e) {
_log.error(e,e);
} catch (PortalException e) {
_log.error(e,e); _log.error(e,e);
} }
@ -132,7 +146,9 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl {
jsonPrenotazione.put("idPrenotazione", prenotazione.getPrenotazioneId()); jsonPrenotazione.put("idPrenotazione", prenotazione.getPrenotazioneId());
jsonPrenotazione.put("inizio", sdf.format(prenotazione.getStartDate())); jsonPrenotazione.put("inizio", sdf.format(prenotazione.getStartDate()));
jsonPrenotazione.put("fine", sdf.format(prenotazione.getEndDate())); jsonPrenotazione.put("fine", sdf.format(prenotazione.getEndDate()));
User richiedente = userLocalService.fetchUser(prenotazione.getProfessionistaId());
User richiedente = UserLocalServiceUtil.fetchUser(prenotazione.getProfessionistaId());
if(loggetUserId == prenotazione.getProfessionistaId()){ if(loggetUserId == prenotazione.getProfessionistaId()){
jsonPrenotazione.put("visible", true); jsonPrenotazione.put("visible", true);
} else { } else {
@ -154,7 +170,8 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl {
private boolean canSeeFullInformations(long loggetUserId) throws SystemException { private boolean canSeeFullInformations(long loggetUserId) throws SystemException {
boolean canDo = false; boolean canDo = false;
User user = userLocalService.fetchUser(loggetUserId);
User user = UserLocalServiceUtil.fetchUser(loggetUserId);
if(user != null){ if(user != null){
Group siteBO = GroupLocalServiceUtil.fetchGroup(user.getCompanyId(), "Portos BackOffice"); Group siteBO = GroupLocalServiceUtil.fetchGroup(user.getCompanyId(), "Portos BackOffice");
boolean isBoUser = GroupLocalServiceUtil.hasUserGroup(user.getUserId(), siteBO.getGroupId()); boolean isBoUser = GroupLocalServiceUtil.hasUserGroup(user.getUserId(), siteBO.getGroupId());
@ -165,7 +182,6 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl {
return canDo; return canDo;
} }
@Override
public boolean isSlotAvailable(long funzionarioId, Date startDate, Date endDate) throws SystemException { public boolean isSlotAvailable(long funzionarioId, Date startDate, Date endDate) throws SystemException {
return prenotazioneLocalService.getAvailableSlotByStartDate_EndDate(funzionarioId, startDate, endDate) == 0; return prenotazioneLocalService.getAvailableSlotByStartDate_EndDate(funzionarioId, startDate, endDate) == 0;

3
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java

@ -5,6 +5,7 @@ import it.tref.portos.calendar.appointments.model.Prenotazione;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -13,6 +14,8 @@ import java.util.regex.Pattern;
import javax.mail.internet.AddressException; import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
import org.apache.log4j.net.TelnetAppender;
import com.liferay.mail.service.MailServiceUtil; import com.liferay.mail.service.MailServiceUtil;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.mail.MailMessage; import com.liferay.portal.kernel.mail.MailMessage;

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/init.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%> <%@page import="java.util.ArrayList"%>
<%@page import="com.liferay.portal.model.Role"%> <%@page import="com.liferay.portal.model.Role"%>
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%> <%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil"%> <%@page import="it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> <%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Organization"%> <%@page import="com.liferay.portal.model.Organization"%>

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> <%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%>
<%@page import="com.liferay.portal.model.Organization"%> <%@page import="com.liferay.portal.model.Organization"%>
<%@page import="it.tref.portos.calendar.appointments.service.DisponibilitaLocalServiceUtil"%> <%@page import="it.tref.portos.calendar.appointments.service.DisponibilitaLocalServiceUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita_action.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.portos.calendar.appointments.model.Disponibilita"%> <%@page import="it.tref.portos.calendar.appointments.model.Disponibilita"%>
<%@ include file="/html/calendar_appointments/init.jsp" %> <%@ include file="/html/calendar_appointments/init.jsp" %>

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/view.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%> <%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%>
<%@ include file="/html/calendar_appointments/init.jsp" %> <%@ include file="/html/calendar_appointments/init.jsp" %>
<% <%

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/init.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.text.Format"%> <%@page import="java.text.Format"%>
<%@page import="com.liferay.portal.kernel.util.FastDateFormatFactoryUtil"%> <%@page import="com.liferay.portal.kernel.util.FastDateFormatFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/view.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% <%
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved.

2
liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/companyconfig/portlet/CompanyConfigurationPortlet.java

@ -2,8 +2,6 @@ package it.tref.liferay.portos.companyconfig.portlet;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.model.Company; import com.liferay.portal.model.Company;
import com.liferay.portal.service.CompanyLocalServiceUtil; import com.liferay.portal.service.CompanyLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;

1
liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/init.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/html/init.jsp" %> <%@include file="/html/init.jsp" %>
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> <%@page import="com.liferay.portal.kernel.util.ParamUtil"%>

8
liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/view.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="javax.portlet.PortletURL"%> <%@page import="javax.portlet.PortletURL"%>
<%@page import="javax.portlet.PortletRequest"%> <%@page import="javax.portlet.PortletRequest"%>
<%@page import="com.liferay.portal.util.PortletKeys"%> <%@page import="com.liferay.portal.util.PortletKeys"%>
@ -16,12 +17,9 @@ companyCustomFieldsURL.setParameter("modelResource", Company.class.getName());
<div class="separator"></div> <div class="separator"></div>
<aui:form name="fm" action="<%=saveCustomFieldsURL.toString() %>"> <aui:form name="fm" action="<%=saveCustomFieldsURL.toString() %>">
<aui:fieldset> <aui:fieldset>
<liferay-ui:custom-attribute-list <liferay-ui:custom-attribute-list className="<%= Company.class.getName() %>"
className="<%= Company.class.getName() %>"
classPK="<%= (company != null) ? company.getCompanyId() : 0 %>" classPK="<%= (company != null) ? company.getCompanyId() : 0 %>"
editable="<%= true %>" editable="true" label="true" />
label="<%= true %>"
/>
</aui:fieldset> </aui:fieldset>
<aui:button type="submit" value="btn-save-custom-fields"></aui:button> <aui:button type="submit" value="btn-save-custom-fields"></aui:button>
</aui:form> </aui:form>

1
liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/init.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

2
liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/liferay-hook.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook> <hook>

1
liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/init.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%> <%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.liferay.portlet.PortletURLUtil"%> <%@page import="com.liferay.portlet.PortletURLUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.util.PortalUtil"%> <%@page import="com.liferay.portal.util.PortalUtil"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.util.StringPool"%> <%@page import="com.liferay.portal.kernel.util.StringPool"%>

2
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/service.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd"> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">
<service-builder package-path="it.tref.liferay.portos.deployalert"> <service-builder package-path="it.tref.liferay.portos.deployalert">
<author>Matteo</author> <author>Matteo</author>

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java

@ -8,6 +8,7 @@ import com.liferay.portlet.BaseControlPanelEntry;
public class DeployAlertControl extends BaseControlPanelEntry { public class DeployAlertControl extends BaseControlPanelEntry {
@Override
public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet)
throws Exception { throws Exception {

4
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/portlet/NotificatorPortlet.java

@ -13,10 +13,6 @@ import it.tref.liferay.portos.deployalert.service.NotificationMailLocalServiceUt
import javax.portlet.ActionRequest; import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse; import javax.portlet.ActionResponse;
/**
* Portlet implementation class AdminDeployNotificatorPortlet
*/
public class NotificatorPortlet extends MVCPortlet { public class NotificatorPortlet extends MVCPortlet {
public void addNotification(ActionRequest request, ActionResponse response) throws PortalException, SystemException { public void addNotification(ActionRequest request, ActionResponse response) throws PortalException, SystemException {

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java

@ -35,6 +35,7 @@ import java.util.Date;
*/ */
public class NotificationLogLocalServiceImpl extends NotificationLogLocalServiceBaseImpl { public class NotificationLogLocalServiceImpl extends NotificationLogLocalServiceBaseImpl {
@Override
public NotificationLog addNotification(String nomePlugin, String tipo) throws SystemException, PortalException { public NotificationLog addNotification(String nomePlugin, String tipo) throws SystemException, PortalException {
Date now = new Date(); Date now = new Date();

14
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java

@ -44,6 +44,7 @@ import java.util.List;
*/ */
public class NotificationMailLocalServiceImpl extends NotificationMailLocalServiceBaseImpl { public class NotificationMailLocalServiceImpl extends NotificationMailLocalServiceBaseImpl {
@Override
public NotificationMail addNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext) public NotificationMail addNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
@ -75,6 +76,7 @@ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServi
} }
} }
@Override
public NotificationMail updateNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext, public NotificationMail updateNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext,
long notificationId) throws SystemException, PortalException { long notificationId) throws SystemException, PortalException {
@ -89,10 +91,10 @@ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServi
return notification; return notification;
} }
@Override
public List<NotificationMail> findNotifications(long companyId, int start, int end) throws SystemException { public List<NotificationMail> findNotifications(long companyId, int start, int end) throws SystemException {
// return notificationMailPersistence.findBycompanyId(companyId, start, end); DynamicQuery query = dynamicQuery();
DynamicQuery query = notificationMailLocalService.dynamicQuery();
query.addOrder(OrderFactoryUtil.asc("nomePlugin")); query.addOrder(OrderFactoryUtil.asc("nomePlugin"));
List<NotificationMail> notifications = null; List<NotificationMail> notifications = null;
try { try {
@ -103,30 +105,30 @@ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServi
return notifications; return notifications;
} }
@Override
public List<NotificationMail> findNotifications(long companyId) throws SystemException { public List<NotificationMail> findNotifications(long companyId) throws SystemException {
return notificationMailPersistence.findBycompanyId(companyId); return notificationMailPersistence.findBycompanyId(companyId);
} }
@Override
public int getNotificationCount(long companyId) throws SystemException { public int getNotificationCount(long companyId) throws SystemException {
return notificationMailPersistence.countBycompanyId(companyId); return notificationMailPersistence.countBycompanyId(companyId);
} }
@Override
public List<NotificationMail> findNotifications(long companyId, String servletContextName) throws SystemException { public List<NotificationMail> findNotifications(long companyId, String servletContextName) throws SystemException {
DynamicQuery dynamicQuery = notificationMailLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
if (Validator.isNull(servletContextName)) { if (Validator.isNull(servletContextName)) {
Disjunction or = RestrictionsFactoryUtil.disjunction(); Disjunction or = RestrictionsFactoryUtil.disjunction();
or.add(RestrictionsFactoryUtil.isNull("nomePlugin")); or.add(RestrictionsFactoryUtil.isNull("nomePlugin"));
or.add(RestrictionsFactoryUtil.eq("nomePlugin", StringPool.BLANK)); or.add(RestrictionsFactoryUtil.eq("nomePlugin", StringPool.BLANK));
dynamicQuery.add(or); dynamicQuery.add(or);
} else { } else {
dynamicQuery.add(RestrictionsFactoryUtil.eq("nomePlugin", servletContextName)); dynamicQuery.add(RestrictionsFactoryUtil.eq("nomePlugin", servletContextName));
} }
return notificationMailPersistence.findWithDynamicQuery(dynamicQuery); return notificationMailPersistence.findWithDynamicQuery(dynamicQuery);
} }
} }

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationLogPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.deployalert.NoSuchNotificationLogException;
import it.tref.liferay.portos.deployalert.model.NotificationLog; import it.tref.liferay.portos.deployalert.model.NotificationLog;
import it.tref.liferay.portos.deployalert.model.impl.NotificationLogImpl; import it.tref.liferay.portos.deployalert.model.impl.NotificationLogImpl;
import it.tref.liferay.portos.deployalert.model.impl.NotificationLogModelImpl; import it.tref.liferay.portos.deployalert.model.impl.NotificationLogModelImpl;
import it.tref.liferay.portos.deployalert.service.persistence.NotificationLogPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationMailPersistenceImpl.java

@ -45,6 +45,7 @@ import it.tref.liferay.portos.deployalert.NoSuchNotificationMailException;
import it.tref.liferay.portos.deployalert.model.NotificationMail; import it.tref.liferay.portos.deployalert.model.NotificationMail;
import it.tref.liferay.portos.deployalert.model.impl.NotificationMailImpl; import it.tref.liferay.portos.deployalert.model.impl.NotificationMailImpl;
import it.tref.liferay.portos.deployalert.model.impl.NotificationMailModelImpl; import it.tref.liferay.portos.deployalert.model.impl.NotificationMailModelImpl;
import it.tref.liferay.portos.deployalert.service.persistence.NotificationMailPersistence;
import java.io.Serializable; import java.io.Serializable;

6
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java

@ -1,5 +1,11 @@
package it.tref.liferay.portos.deployalert.util; package it.tref.liferay.portos.deployalert.util;
import it.tref.liferay.portos.deployalert.constants.MailConstants;
import it.tref.liferay.portos.mailmanager.shared.messaging.util.MailManagerUtil;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.json.JSONObject;

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/edit_notification.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@ include file="/html/notificator/init.jsp"%> <%@ include file="/html/notificator/init.jsp"%>

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/init.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/html/init.jsp"%> <%@ include file="/html/init.jsp"%>
<%@ page <%@ page
import="it.tref.liferay.portos.deployalert.service.NotificationMailLocalServiceUtil"%> import="it.tref.liferay.portos.deployalert.service.NotificationMailLocalServiceUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/view.jsp

@ -1,3 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/html/notificator/init.jsp"%> <%@ include file="/html/notificator/init.jsp"%>
<aui:button-row> <aui:button-row>

2
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-hook.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook> <hook>

10
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-portlet.xml

@ -2,10 +2,18 @@
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd"> <!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
<liferay-portlet-app> <liferay-portlet-app>
<portlet> <portlet>
<portlet-name>1</portlet-name> <portlet-name>1</portlet-name>
<icon></icon> <icon></icon>
<scheduler-entry>
<scheduler-event-listener-class>it.tref.liferay.portos.kaleo.controller.scheduler.SchedulerKaleoController</scheduler-event-listener-class>
<trigger>
<simple>
<simple-trigger-value>240</simple-trigger-value>
<time-unit>second</time-unit>
</simple>
</trigger>
</scheduler-entry>
<header-portlet-css></header-portlet-css> <header-portlet-css></header-portlet-css>
<footer-portlet-javascript></footer-portlet-javascript> <footer-portlet-javascript></footer-portlet-javascript>
<css-class-wrapper></css-class-wrapper> <css-class-wrapper></css-class-wrapper>

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd"> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">
<service-builder package-path="it.tref.liferay.portos.kaleo.controller"> <service-builder package-path="it.tref.liferay.portos.kaleo.controller">
<author>3FC + Manifattura Web Group s.r.l.</author> <author>3FC + Manifattura Web Group s.r.l.</author>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl;
* *
* @author 3FC + Manifattura Web Group s.r.l. * @author 3FC + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class KaleoInstanceTokenImpl extends KaleoInstanceTokenBaseImpl { public class KaleoInstanceTokenImpl extends KaleoInstanceTokenBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo instance token model * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo instance token model

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoLogImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl;
* *
* @author 3FC + Manifattura Web Group s.r.l. * @author 3FC + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class KaleoLogImpl extends KaleoLogBaseImpl { public class KaleoLogImpl extends KaleoLogBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo log model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo log model instance

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl;
* *
* @author 3FC + Manifattura Web Group s.r.l. * @author 3FC + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class KaleoNodeImpl extends KaleoNodeBaseImpl { public class KaleoNodeImpl extends KaleoNodeBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo node model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo node model instance

4
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceImpl.java

@ -19,8 +19,8 @@ package it.tref.liferay.portos.kaleo.controller.model.impl;
* *
* @author 3FC + Manifattura Web Group s.r.l. * @author 3FC + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial") public class KaleoTaskAssignmentInstanceImpl
public class KaleoTaskAssignmentInstanceImpl extends KaleoTaskAssignmentInstanceBaseImpl { extends KaleoTaskAssignmentInstanceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task assignment * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task assignment
* instance model instance should use the {@link * instance model instance should use the {@link

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl;
* *
* @author 3FC + Manifattura Web Group s.r.l. * @author 3FC + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class KaleoTaskImpl extends KaleoTaskBaseImpl { public class KaleoTaskImpl extends KaleoTaskBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task model instance

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskInstanceTokenImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl;
* *
* @author 3FC + Manifattura Web Group s.r.l. * @author 3FC + Manifattura Web Group s.r.l.
*/ */
@SuppressWarnings("serial")
public class KaleoTaskInstanceTokenImpl extends KaleoTaskInstanceTokenBaseImpl { public class KaleoTaskInstanceTokenImpl extends KaleoTaskInstanceTokenBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task instance token * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task instance token

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstancePersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoInstanceException;
import it.tref.liferay.portos.kaleo.controller.model.KaleoInstance; import it.tref.liferay.portos.kaleo.controller.model.KaleoInstance;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoInstancePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstanceTokenPersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoInstanceTokenException
import it.tref.liferay.portos.kaleo.controller.model.KaleoInstanceToken; import it.tref.liferay.portos.kaleo.controller.model.KaleoInstanceToken;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoInstanceTokenPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoLogPersistenceImpl.java

@ -43,6 +43,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoLogException;
import it.tref.liferay.portos.kaleo.controller.model.KaleoLog; import it.tref.liferay.portos.kaleo.controller.model.KaleoLog;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoLogPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoNodePersistenceImpl.java

@ -41,6 +41,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoNodeException;
import it.tref.liferay.portos.kaleo.controller.model.KaleoNode; import it.tref.liferay.portos.kaleo.controller.model.KaleoNode;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoNodePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskAssignmentInstancePersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoTaskAssignmentInstance
import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskAssignmentInstance; import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskAssignmentInstance;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoTaskAssignmentInstancePersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskInstanceTokenPersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoTaskInstanceTokenExcep
import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskInstanceToken; import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskInstanceToken;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoTaskInstanceTokenPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskPersistenceImpl.java

@ -40,6 +40,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoTaskException;
import it.tref.liferay.portos.kaleo.controller.model.KaleoTask; import it.tref.liferay.portos.kaleo.controller.model.KaleoTask;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl;
import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl;
import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoTaskPersistence;
import java.io.Serializable; import java.io.Serializable;

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/liferay-hook.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook> <hook>

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd"> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">
<service-builder package-path="it.tref.liferay.portos.kaleo"> <service-builder package-path="it.tref.liferay.portos.kaleo">
<author></author> <author></author>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormDefinitionLinkImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.model.impl;
* *
* @author * @author
*/ */
@SuppressWarnings("serial")
public class FormDefinitionLinkImpl extends FormDefinitionLinkBaseImpl { public class FormDefinitionLinkImpl extends FormDefinitionLinkBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form definition link model * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form definition link model

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormLogImpl.java

@ -18,7 +18,6 @@ package it.tref.liferay.portos.kaleo.model.impl;
* *
* @author * @author
*/ */
@SuppressWarnings("serial")
public class FormLogImpl extends FormLogBaseImpl { public class FormLogImpl extends FormLogBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form log model instance * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form log model instance

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormTemplateLinkImpl.java

@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.model.impl;
* *
* @author * @author
*/ */
@SuppressWarnings("serial")
public class FormTemplateLinkImpl extends FormTemplateLinkBaseImpl { public class FormTemplateLinkImpl extends FormTemplateLinkBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form template link model * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form template link model

7
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/portlet/WorkflowFormAdminPortletControlPanelEntry.java

@ -12,6 +12,11 @@ public class WorkflowFormAdminPortletControlPanelEntry extends BaseControlPanelE
protected boolean hasAccessPermissionDenied(PermissionChecker permissionChecker, Group group, Portlet portlet) protected boolean hasAccessPermissionDenied(PermissionChecker permissionChecker, Group group, Portlet portlet)
throws Exception { throws Exception {
return group.isLayoutSetPrototype() || !WorkflowEngineManagerUtil.isDeployed(); if (group.isLayoutSetPrototype() || !WorkflowEngineManagerUtil.isDeployed()) {
return true;
}
return false;
} }
} }

29
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormDefinitionLinkLocalServiceImpl.java

@ -48,7 +48,6 @@ public class FormDefinitionLinkLocalServiceImpl extends FormDefinitionLinkLocalS
* service. * service.
*/ */
@Override
public FormDefinitionLink addFormDefinitionLink(String name, String definitionName, int definitionVersion, public FormDefinitionLink addFormDefinitionLink(String name, String definitionName, int definitionVersion,
long ddmStructureId, ServiceContext serviceContext) throws PortalException, SystemException { long ddmStructureId, ServiceContext serviceContext) throws PortalException, SystemException {
@ -67,7 +66,6 @@ public class FormDefinitionLinkLocalServiceImpl extends FormDefinitionLinkLocalS
return addFormDefinitionLink(formDefinitionLink); return addFormDefinitionLink(formDefinitionLink);
} }
@Override
public FormDefinitionLink updateFormDefinitionLink(long formDefinitionLinkId, String name, String definitionName, public FormDefinitionLink updateFormDefinitionLink(long formDefinitionLinkId, String name, String definitionName,
int definitionVersion, long ddmStructureId, ServiceContext serviceContext) throws PortalException, int definitionVersion, long ddmStructureId, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
@ -101,44 +99,39 @@ public class FormDefinitionLinkLocalServiceImpl extends FormDefinitionLinkLocalS
return formDefinitionLink; return formDefinitionLink;
} }
@Override
public int countByCompany(long companyId) throws SystemException { public int countByCompany(long companyId) throws SystemException {
return formDefinitionLinkPersistence.countByCompany(companyId); return formDefinitionLinkPersistence.countByCompany(companyId);
} }
@Override
public List<FormDefinitionLink> findByCompany(long companyId) throws SystemException { public List<FormDefinitionLink> findByCompany(long companyId) throws SystemException {
return formDefinitionLinkPersistence.findByCompany(companyId); return formDefinitionLinkPersistence.findByCompany(companyId);
} }
@Override
public List<FormDefinitionLink> findByCompany(long companyId, int start, int end) throws SystemException { public List<FormDefinitionLink> findByCompany(long companyId, int start, int end) throws SystemException {
return formDefinitionLinkPersistence.findByCompany(companyId, start, end); return formDefinitionLinkPersistence.findByCompany(companyId, start, end);
} }
@Override public List<FormDefinitionLink> findByCompany(long companyId, int start, int end, OrderByComparator orderByComparator)
public List<FormDefinitionLink> findByCompany(long companyId, int start, int end, throws SystemException {
OrderByComparator orderByComparator) throws SystemException {
return formDefinitionLinkPersistence.findByCompany(companyId, start, end, orderByComparator); return formDefinitionLinkPersistence.findByCompany(companyId, start, end, orderByComparator);
} }
@Override
public int countByDDMStructureId(long ddmStructureId) throws SystemException { public int countByDDMStructureId(long ddmStructureId) throws SystemException {
return formDefinitionLinkPersistence.countByDDMStructureId(ddmStructureId); return formDefinitionLinkPersistence.countByDDMStructureId(ddmStructureId);
} }
@Override
public FormDefinitionLink fetchByC_DefinitionName_DefinitionVersion(long companyId, String definitionName, public FormDefinitionLink fetchByC_DefinitionName_DefinitionVersion(long companyId, String definitionName,
int definitionVersion) throws SystemException { int definitionVersion) throws SystemException {
List<FormDefinitionLink> formDefinitionLinks = formDefinitionLinkPersistence List<FormDefinitionLink> formDefinitionLinks =
.findByC_DefinitionName_DefinitionVersion(companyId, definitionName, definitionVersion); formDefinitionLinkPersistence.findByC_DefinitionName_DefinitionVersion(companyId, definitionName,
return formDefinitionLinks.isEmpty() ? null : formDefinitionLinks.get(0); definitionVersion);
if (formDefinitionLinks.isEmpty()) {
return null;
}
return formDefinitionLinks.get(0);
} }
private void setFormDefinitionLink(FormDefinitionLink formDefinitionLink, String name, String definitionName, private void setFormDefinitionLink(FormDefinitionLink formDefinitionLink, String name, String definitionName,

16
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormLogLocalServiceImpl.java

@ -39,9 +39,8 @@ public class FormLogLocalServiceImpl extends FormLogLocalServiceBaseImpl {
* it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil} to access the form log local service. * it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil} to access the form log local service.
*/ */
@Override public FormLog addFormLog(long workflowInstanceId, long workflowTaskId, String transitionName, String formParameters,
public FormLog addFormLog(long workflowInstanceId, long workflowTaskId, String transitionName, ServiceContext serviceContext) throws SystemException, PortalException {
String formParameters, ServiceContext serviceContext) throws SystemException, PortalException {
Date now = new Date(); Date now = new Date();
User user = userLocalService.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
@ -59,7 +58,6 @@ public class FormLogLocalServiceImpl extends FormLogLocalServiceBaseImpl {
return addFormLog(formLog); return addFormLog(formLog);
} }
@Override
public FormLog updateFormLog(long formLogId, long workflowInstanceId, long workflowTaskId, String transitionName, public FormLog updateFormLog(long formLogId, long workflowInstanceId, long workflowTaskId, String transitionName,
String formParameters, ServiceContext serviceContext) throws SystemException, PortalException { String formParameters, ServiceContext serviceContext) throws SystemException, PortalException {
@ -72,26 +70,20 @@ public class FormLogLocalServiceImpl extends FormLogLocalServiceBaseImpl {
return updateFormLog(formLog); return updateFormLog(formLog);
} }
@Override
public List<FormLog> findByC_Instance(long companyId, long workflowInstanceId, int start, int end) public List<FormLog> findByC_Instance(long companyId, long workflowInstanceId, int start, int end)
throws SystemException { throws SystemException {
return formLogPersistence.findByC_Instance(companyId, workflowInstanceId, start, end); return formLogPersistence.findByC_Instance(companyId, workflowInstanceId, start, end);
} }
@Override
public FormLog findByC_Task(long companyId, long workflowTaskId) throws SystemException { public FormLog findByC_Task(long companyId, long workflowTaskId) throws SystemException {
List<FormLog> list = formLogPersistence.findByC_Task(companyId, workflowTaskId, 0, 1); List<FormLog> list = formLogPersistence.findByC_Task(companyId, workflowTaskId, 0, 1);
return list.isEmpty() ? null : list.get(0); return list.isEmpty() ? null : list.get(0);
} }
@Override
public FormLog findByC_Task_TransitionName(long companyId, long workflowTaskId, String transitionName) public FormLog findByC_Task_TransitionName(long companyId, long workflowTaskId, String transitionName)
throws SystemException { throws SystemException {
List<FormLog> list =
List<FormLog> list = formLogPersistence.findByC_Task_TransitionName(companyId, workflowTaskId, transitionName, formLogPersistence.findByC_Task_TransitionName(companyId, workflowTaskId, transitionName, 0, 1);
0, 1);
return list.isEmpty() ? null : list.get(0); return list.isEmpty() ? null : list.get(0);
} }
} }

11
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormTemplateLinkLocalServiceImpl.java

@ -43,7 +43,6 @@ public class FormTemplateLinkLocalServiceImpl extends FormTemplateLinkLocalServi
* service. * service.
*/ */
@Override
public FormTemplateLink addFormTemplateLink(long formDefinitionLinkId, long ddmTemplateId, long kaleoNodeId, public FormTemplateLink addFormTemplateLink(long formDefinitionLinkId, long ddmTemplateId, long kaleoNodeId,
String transitionName) throws SystemException, PortalException { String transitionName) throws SystemException, PortalException {
@ -54,7 +53,6 @@ public class FormTemplateLinkLocalServiceImpl extends FormTemplateLinkLocalServi
return addFormTemplateLink(formTemplateLink); return addFormTemplateLink(formTemplateLink);
} }
@Override
public FormTemplateLink updateFormTemplateLink(long formTemplateLinkId, long formDefinitionLinkId, public FormTemplateLink updateFormTemplateLink(long formTemplateLinkId, long formDefinitionLinkId,
long ddmTemplateId, long kaleoNodeId, String transitionName) throws SystemException, PortalException { long ddmTemplateId, long kaleoNodeId, String transitionName) throws SystemException, PortalException {
@ -64,32 +62,23 @@ public class FormTemplateLinkLocalServiceImpl extends FormTemplateLinkLocalServi
return updateFormTemplateLink(formTemplateLink); return updateFormTemplateLink(formTemplateLink);
} }
@Override
public int countByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException { public int countByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException {
return formTemplateLinkPersistence.countByFormDefinitionLinkId(formDefinitionLinkId); return formTemplateLinkPersistence.countByFormDefinitionLinkId(formDefinitionLinkId);
} }
@Override
public List<FormTemplateLink> findByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException { public List<FormTemplateLink> findByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException {
return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId); return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId);
} }
@Override
public List<FormTemplateLink> findByFormDefinitionLinkId(long formDefinitionLinkId, int start, int end) public List<FormTemplateLink> findByFormDefinitionLinkId(long formDefinitionLinkId, int start, int end)
throws SystemException { throws SystemException {
return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId, start, end); return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId, start, end);
} }
@Override
public int countByDDMTemplateId(long ddmTemplateId) throws SystemException { public int countByDDMTemplateId(long ddmTemplateId) throws SystemException {
return formTemplateLinkPersistence.countByDDMTemplateId(ddmTemplateId); return formTemplateLinkPersistence.countByDDMTemplateId(ddmTemplateId);
} }
@Override
public FormTemplateLink fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(long formDefinitionLinkId, public FormTemplateLink fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(long formDefinitionLinkId,
long kaleoNodeId, String transitionName) throws SystemException { long kaleoNodeId, String transitionName) throws SystemException {

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/init.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="java.util.Arrays"%> <%@page import="java.util.Arrays"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/edit_form_definition_link.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.workflow.kaleo.definition.NodeType"%> <%@page import="com.liferay.portal.workflow.kaleo.definition.NodeType"%>
<%@page import="com.liferay.portal.workflow.kaleo.model.KaleoTransition"%> <%@page import="com.liferay.portal.workflow.kaleo.model.KaleoTransition"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/form_definition_link_action.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.kaleo.model.FormDefinitionLink"%> <%@page import="it.tref.liferay.portos.kaleo.model.FormDefinitionLink"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.Validator"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/init.jsp

@ -1,3 +1,2 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/html/init.jsp" %> <%@ include file="/html/init.jsp" %>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/select_workflow_definition.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> <%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/edit_form_template_link.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.kaleo.service.FormDefinitionLinkLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.kaleo.service.FormDefinitionLinkLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.kaleo.FormTemplateLinkKaleoNodeIdException"%> <%@page import="it.tref.liferay.portos.kaleo.FormTemplateLinkKaleoNodeIdException"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/form_template_link_action.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.kaleo.model.FormTemplateLink"%> <%@page import="it.tref.liferay.portos.kaleo.model.FormTemplateLink"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.Validator"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/template_toolbar.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="javax.portlet.PortletRequest"%> <%@page import="javax.portlet.PortletRequest"%>
<%@page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil"%> <%@page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/view_form_template_links.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil"%> <%@page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil"%>
<%@page import="com.liferay.portal.kernel.dao.search.RowChecker"%> <%@page import="com.liferay.portal.kernel.dao.search.RowChecker"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/toolbar.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> <%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%>
<%@page import="javax.portlet.PortletRequest"%> <%@page import="javax.portlet.PortletRequest"%>

1
liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/view.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> <%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%>
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> <%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%>

2
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-hook.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook> <hook>

2
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java

@ -28,9 +28,9 @@ import com.liferay.portal.util.PortalUtil;
import eu.bitwalker.useragentutils.UserAgent; import eu.bitwalker.useragentutils.UserAgent;
import it.tref.portos.liferay.log.camel.core.CamelCoreInitializer; import it.tref.portos.liferay.log.camel.core.CamelCoreInitializer;
import it.tref.portos.liferay.log.model.LogActionDetails; import it.tref.portos.liferay.log.model.LogActionDetails;
import it.tref.portos.liferay.log.shared.util.Constants;
import it.tref.portos.liferay.log.spring.SpringContextBeanScanner; import it.tref.portos.liferay.log.spring.SpringContextBeanScanner;
import it.tref.portos.liferay.log.utility.ClassUtils; import it.tref.portos.liferay.log.utility.ClassUtils;
import it.tref.portos.liferay.log.utility.Constants;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.text.ParseException; import java.text.ParseException;

5
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java

@ -1,7 +1,5 @@
package it.tref.portos.liferay.log.action; package it.tref.portos.liferay.log.action;
import it.tref.portos.liferay.log.utility.Constants;
import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.events.SimpleAction;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
@ -26,6 +24,9 @@ import com.liferay.portlet.expando.model.ExpandoTableConstants;
import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil;
import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil;
import it.tref.portos.liferay.log.shared.util.Constants;
public class LogStartupAction extends SimpleAction { public class LogStartupAction extends SimpleAction {
private static Log _log = LogFactoryUtil.getLog(LogStartupAction.class); private static Log _log = LogFactoryUtil.getLog(LogStartupAction.class);

1
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/html/init.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

1
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/view.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% <%
/** /**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.

2
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-hook.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd"> <!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
<hook> <hook>

2
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd"> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">
<service-builder package-path="it.tref.liferay.portos.mailmanager"> <service-builder package-path="it.tref.liferay.portos.mailmanager">
<author></author> <author></author>

3
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/messaging/MailManagerMessageListener.java

@ -30,7 +30,8 @@ public class MailManagerMessageListener implements MessageListener {
String mode = (String) message.get("mode"); String mode = (String) message.get("mode");
MailMessage mailMessage = (MailMessage) message.getPayload(); MailMessage mailMessage = (MailMessage) message.getPayload();
ServiceContext serviceContext = (ServiceContext) message.get("serviceContext"); ServiceContext serviceContext = (ServiceContext) message.get("serviceContext");
boolean checkPermission = GetterUtil.getBoolean(message.get("checkPermission"), true); boolean checkPermission = GetterUtil.getBoolean(message.get("checkPermission"), Boolean.TRUE);
String className = GetterUtil.getString(message.get("className")); String className = GetterUtil.getString(message.get("className"));
long classPK = GetterUtil.getLong(message.get("classPK")); long classPK = GetterUtil.getLong(message.get("classPK"));
boolean sendSync = false; boolean sendSync = false;

20
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailAttachmentLocalServiceImpl.java

@ -46,11 +46,12 @@ import com.liferay.portal.service.ServiceContext;
*/ */
public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalServiceBaseImpl { public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link * NOTE FOR DEVELOPERS:
* it.noovle.azimut.icf.mailmanager.service.EmailAttachmentLocalServiceUtil} to access the email attachment local *
* service. * Never reference this interface directly. Always use {@link
* it.noovle.azimut.icf.mailmanager.service.EmailAttachmentLocalServiceUtil} to access the
* email attachment local service.
*/ */
@Override
public EmailAttachment addEmailAttachment(long companyId, long emailId, long folderId, String fileName, File file) public EmailAttachment addEmailAttachment(long companyId, long emailId, long folderId, String fileName, File file)
throws PortalException, SystemException { throws PortalException, SystemException {
@ -79,16 +80,15 @@ public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalService
sourceFileName, mimeType, title, StringPool.BLANK, StringPool.BLANK, file, serviceContext); sourceFileName, mimeType, title, StringPool.BLANK, StringPool.BLANK, file, serviceContext);
EmailAttachment emailAttachment = EmailAttachment emailAttachment =
createEmailAttachment(new EmailAttachmentPK(emailId, fileEntry emailAttachmentLocalService.createEmailAttachment(new EmailAttachmentPK(emailId, fileEntry.getFileEntryId()));
.getFileEntryId()));
return addEmailAttachment(emailAttachment); return emailAttachmentLocalService.addEmailAttachment(emailAttachment);
} }
@Override @Override
public EmailAttachment deleteEmailAttachment(EmailAttachmentPK emailAttachmentPK) throws PortalException, public EmailAttachment deleteEmailAttachment(EmailAttachmentPK emailAttachmentPK) throws PortalException,
SystemException { SystemException {
EmailAttachment emailAttachment = getEmailAttachment(emailAttachmentPK); EmailAttachment emailAttachment = emailAttachmentLocalService.getEmailAttachment(emailAttachmentPK);
return deleteEmailAttachment(emailAttachment); return deleteEmailAttachment(emailAttachment);
} }
@ -106,22 +106,18 @@ public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalService
return emailAttachment; return emailAttachment;
} }
@Override
public List<EmailAttachment> findByEmailId(long emailId) throws SystemException { public List<EmailAttachment> findByEmailId(long emailId) throws SystemException {
return emailAttachmentPersistence.findByEmailId(emailId); return emailAttachmentPersistence.findByEmailId(emailId);
} }
@Override
public List<EmailAttachment> findByEmailId(long emailId, int start, int end) throws SystemException { public List<EmailAttachment> findByEmailId(long emailId, int start, int end) throws SystemException {
return emailAttachmentPersistence.findByEmailId(emailId); return emailAttachmentPersistence.findByEmailId(emailId);
} }
@Override
public int countByEmailId(long emailId) throws SystemException { public int countByEmailId(long emailId) throws SystemException {
return emailAttachmentPersistence.countByEmailId(emailId); return emailAttachmentPersistence.countByEmailId(emailId);
} }
@Override
public EmailAttachment fetchByFileEntryId(long fileEntryId) throws SystemException { public EmailAttachment fetchByFileEntryId(long fileEntryId) throws SystemException {
return emailAttachmentPersistence.fetchByFileEntryId(fileEntryId); return emailAttachmentPersistence.fetchByFileEntryId(fileEntryId);
} }

172
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailLocalServiceImpl.java

@ -7,6 +7,24 @@
package it.tref.liferay.portos.mailmanager.service.impl; package it.tref.liferay.portos.mailmanager.service.impl;
import com.liferay.mail.model.FileAttachment;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.util.FileUtil;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.Company;
import com.liferay.portal.model.Group;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.model.DLFolderConstants;
import it.tref.liferay.portos.mailmanager.EmailBccException; import it.tref.liferay.portos.mailmanager.EmailBccException;
import it.tref.liferay.portos.mailmanager.EmailBulkAddressesException; import it.tref.liferay.portos.mailmanager.EmailBulkAddressesException;
import it.tref.liferay.portos.mailmanager.EmailCcException; import it.tref.liferay.portos.mailmanager.EmailCcException;
@ -27,24 +45,9 @@ import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.liferay.mail.model.FileAttachment;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.util.FileUtil;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.Company;
import com.liferay.portal.model.Group;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.model.DLFolderConstants;
/** /**
* The implementation of the email local service. * The implementation of the email local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.noovle.azimut.icf.mailmanager.service.EmailLocalService} interface. * their definitions into the {@link it.noovle.azimut.icf.mailmanager.service.EmailLocalService} interface.
@ -63,63 +66,61 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
* it.noovle.azimut.icf.mailmanager.service.EmailLocalServiceUtil} to access the email local service. * it.noovle.azimut.icf.mailmanager.service.EmailLocalServiceUtil} to access the email local service.
*/ */
@Override private final static Log _log = LogFactoryUtil.getLog(EmailLocalServiceImpl.class);
public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[],
String subject, String body, boolean htmlFormat, ServiceContext serviceContext) throws Exception {
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, public Email addEmail(String className, long classPK, String from, String to[], String cc[],
0, false, null, null, Collections.<FileAttachment> emptyList(), serviceContext); String bcc[], String subject, String body, boolean htmlFormat, ServiceContext serviceContext)
throws Exception {
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null,
null, null, 0, false, null, null, Collections.<FileAttachment> emptyList(), serviceContext);
} }
@Override public Email addEmail(String className, long classPK, String from, String to[], String cc[],
public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], String bcc[], String subject, String body, boolean htmlFormat,
String subject, String body, boolean htmlFormat, List<FileAttachment> fileAttachments, List<FileAttachment> fileAttachments, ServiceContext serviceContext) throws Exception {
ServiceContext serviceContext) throws Exception { return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null,
null, null, 0, false, null, null, fileAttachments, false, null, serviceContext);
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null,
0, false, null, null, fileAttachments, false, null, serviceContext);
} }
@Override public Email addEmail(String className, long classPK, String from, String to[], String cc[],
public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], String bcc[], String[] bulkAddresses, String subject, String body, boolean htmlFormat,
String[] bulkAddresses, String subject, String body, boolean htmlFormat, String[] replyTo, String[] replyTo, String messageId, String inReplyTo, String smtpHost, int smtpPort,
String messageId, String inReplyTo, String smtpHost, int smtpPort, boolean smtpSecure, String smtpUsername, boolean smtpSecure, String smtpUsername, String smtpPassword,
String smtpPassword, List<FileAttachment> fileAttachments, ServiceContext serviceContext) throws Exception { List<FileAttachment> fileAttachments, ServiceContext serviceContext) throws Exception {
return addEmail(className, classPK, from, to, cc, bcc, bulkAddresses, subject, body, htmlFormat,
return addEmail(className, classPK, from, to, cc, bcc, bulkAddresses, subject, body, htmlFormat, replyTo, replyTo, messageId, inReplyTo, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword,
messageId, inReplyTo, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, fileAttachments, fileAttachments, false, null, serviceContext);
false, null, serviceContext);
} }
@Override public Email addEmail(String className, long classPK, String from, String to[], String cc[],
public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], String bcc[], String subject, String body, boolean htmlFormat,
String subject, String body, boolean htmlFormat, List<FileAttachment> fileAttachments, boolean sendSync, List<FileAttachment> fileAttachments, boolean sendSync, ServiceContext serviceContext)
ServiceContext serviceContext) throws Exception { throws Exception {
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null,
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, null, null, 0, false, null, null, fileAttachments, sendSync, null, serviceContext);
0, false, null, null, fileAttachments, sendSync, null, serviceContext);
} }
@Override public Email addEmail(String className, long classPK, String from, String to[], String cc[],
public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], String bcc[], String subject, String body, boolean htmlFormat,
String subject, String body, boolean htmlFormat, List<FileAttachment> fileAttachments, boolean sendSync, List<FileAttachment> fileAttachments, boolean sendSync, String templateName,
String templateName, ServiceContext serviceContext) throws Exception { ServiceContext serviceContext) throws Exception {
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null,
return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, null, null, 0, false, null, null, fileAttachments, sendSync, templateName, serviceContext);
0, false, null, null, fileAttachments, sendSync, templateName, serviceContext);
} }
@Override public Email addEmail(String className, long classPK, String from, String to[], String cc[],
public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], String bcc[], String[] bulkAddresses, String subject, String body, boolean htmlFormat,
String[] bulkAddresses, String subject, String body, boolean htmlFormat, String[] replyTo, String[] replyTo, String messageId, String inReplyTo, String smtpHost, int smtpPort,
String messageId, String inReplyTo, String smtpHost, int smtpPort, boolean smtpSecure, String smtpUsername, boolean smtpSecure, String smtpUsername, String smtpPassword,
String smtpPassword, List<FileAttachment> fileAttachments, boolean sendSync, String templateName, List<FileAttachment> fileAttachments, boolean sendSync, String templateName,
ServiceContext serviceContext) throws Exception { ServiceContext serviceContext) throws Exception {
User user = userLocalService.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
Date now = new Date(); Date now = new Date();
validate(from, to, cc, bcc, bulkAddresses, subject, body, replyTo); validate(from, to, cc, bcc, bulkAddresses, subject, body, replyTo);
Email email = createEmail(counterLocalService.increment(Email.class.getName()));
Email email = emailLocalService.createEmail(counterLocalService.increment(Email.class.getName()));
email.setGroupId(serviceContext.getScopeGroupId()); email.setGroupId(serviceContext.getScopeGroupId());
email.setCompanyId(serviceContext.getCompanyId()); email.setCompanyId(serviceContext.getCompanyId());
email.setCreateDate(serviceContext.getCreateDate(now)); email.setCreateDate(serviceContext.getCreateDate(now));
@ -171,11 +172,11 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
return email; return email;
} }
@Override public Email updateEmail(long emailId, String from, String to[], String cc[], String bcc[],
public Email updateEmail(long emailId, String from, String to[], String cc[], String bcc[], String subject, String subject, String body, ServiceContext serviceContext) throws Exception {
String body, ServiceContext serviceContext) throws Exception {
Email email = emailLocalService.getEmail(emailId);
Email email = getEmail(emailId);
validate(from, to, cc, bcc, null, subject, body, null); validate(from, to, cc, bcc, null, subject, body, null);
email.setModifiedDate(new Date()); email.setModifiedDate(new Date());
email.setFrom(from); email.setFrom(from);
@ -187,10 +188,10 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
return updateEmail(email); return updateEmail(email);
} }
@Override public Email markAsSent(long emailId, Date sentDate, String statusMessage) throws PortalException,
public Email markAsSent(long emailId, Date sentDate, String statusMessage) throws PortalException, SystemException { SystemException {
Email email = getEmail(emailId); Email email = emailLocalService.getEmail(emailId);
email.setModifiedDate(new Date()); email.setModifiedDate(new Date());
email.setSent(true); email.setSent(true);
email.setSentDate(sentDate); email.setSentDate(sentDate);
@ -198,19 +199,18 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
return updateEmail(email); return updateEmail(email);
} }
@Override public Email updateStatusMessage(long emailId, String statusMessage) throws PortalException,
public Email updateStatusMessage(long emailId, String statusMessage) throws PortalException, SystemException { SystemException {
Email email = getEmail(emailId); Email email = emailLocalService.getEmail(emailId);
email.setModifiedDate(new Date()); email.setModifiedDate(new Date());
email.setStatusMessage(statusMessage); email.setStatusMessage(statusMessage);
return updateEmail(email); return updateEmail(email);
} }
@Override
public Email resendEmail(long emailId) throws PortalException, SystemException { public Email resendEmail(long emailId) throws PortalException, SystemException {
Email email = getEmail(emailId); Email email = emailLocalService.getEmail(emailId);
email.setModifiedDate(new Date()); email.setModifiedDate(new Date());
email.setStatusMessage(""); email.setStatusMessage("");
email.setSent(false); email.setSent(false);
@ -219,10 +219,9 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
return updateEmail(email); return updateEmail(email);
} }
@Override
public Email cancelEmail(long emailId) throws PortalException, SystemException { public Email cancelEmail(long emailId) throws PortalException, SystemException {
Email email = getEmail(emailId); Email email = emailLocalService.getEmail(emailId);
email.setModifiedDate(new Date()); email.setModifiedDate(new Date());
email.setCancel(true); email.setCancel(true);
return updateEmail(email); return updateEmail(email);
@ -230,8 +229,7 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
@Override @Override
public Email deleteEmail(long emailId) throws PortalException, SystemException { public Email deleteEmail(long emailId) throws PortalException, SystemException {
Email email = emailLocalService.getEmail(emailId);
Email email = getEmail(emailId);
return deleteEmail(email); return deleteEmail(email);
} }
@ -247,92 +245,76 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl {
return email; return email;
} }
@Override
public List<Email> findByCompany(long companyId) throws SystemException { public List<Email> findByCompany(long companyId) throws SystemException {
return emailPersistence.findByCompany(companyId); return emailPersistence.findByCompany(companyId);
} }
@Override
public List<Email> findByCompany(long companyId, int start, int end) throws SystemException { public List<Email> findByCompany(long companyId, int start, int end) throws SystemException {
return emailPersistence.findByCompany(companyId, start, end); return emailPersistence.findByCompany(companyId, start, end);
} }
@Override
public List<Email> findByCompany(long companyId, int start, int end, OrderByComparator orderByComparator) public List<Email> findByCompany(long companyId, int start, int end, OrderByComparator orderByComparator)
throws SystemException { throws SystemException {
return emailPersistence.findByCompany(companyId, start, end, orderByComparator); return emailPersistence.findByCompany(companyId, start, end, orderByComparator);
} }
@Override
public int countByCompany(long companyId) throws SystemException { public int countByCompany(long companyId) throws SystemException {
return emailPersistence.countByCompany(companyId); return emailPersistence.countByCompany(companyId);
} }
@Override
public List<Email> findByC_G(long companyId, long groupId) throws SystemException { public List<Email> findByC_G(long companyId, long groupId) throws SystemException {
return emailPersistence.findByC_G(companyId, groupId); return emailPersistence.findByC_G(companyId, groupId);
} }
@Override
public List<Email> findByC_G(long companyId, long groupId, int start, int end) throws SystemException { public List<Email> findByC_G(long companyId, long groupId, int start, int end) throws SystemException {
return emailPersistence.findByC_G(companyId, groupId, start, end); return emailPersistence.findByC_G(companyId, groupId, start, end);
} }
@Override public List<Email> findByC_G(long companyId, long groupId, int start, int end,
public List<Email> findByC_G(long companyId, long groupId, int start, int end, OrderByComparator orderByComparator) OrderByComparator orderByComparator) throws SystemException {
throws SystemException {
return emailPersistence.findByC_G(companyId, groupId, start, end, orderByComparator); return emailPersistence.findByC_G(companyId, groupId, start, end, orderByComparator);
} }
@Override
public int countByC_G(long companyId, long groupId) throws SystemException { public int countByC_G(long companyId, long groupId) throws SystemException {
return emailPersistence.countByC_G(companyId, groupId); return emailPersistence.countByC_G(companyId, groupId);
} }
@Override
public List<Email> findByC_G_T(long companyId, long groupId, String templateName) throws SystemException { public List<Email> findByC_G_T(long companyId, long groupId, String templateName) throws SystemException {
return emailPersistence.findByC_G_T(companyId, groupId, templateName); return emailPersistence.findByC_G_T(companyId, groupId, templateName);
} }
@Override
public List<Email> findByC_G_T(long companyId, long groupId, String templateName, int start, int end) public List<Email> findByC_G_T(long companyId, long groupId, String templateName, int start, int end)
throws SystemException { throws SystemException {
return emailPersistence.findByC_G_T(companyId, groupId, templateName, start, end); return emailPersistence.findByC_G_T(companyId, groupId, templateName, start, end);
} }
@Override
public int countByC_G_T(long companyId, long groupId, String templateName) throws SystemException { public int countByC_G_T(long companyId, long groupId, String templateName) throws SystemException {
return emailPersistence.countByC_G_T(companyId, groupId, templateName); return emailPersistence.countByC_G_T(companyId, groupId, templateName);
} }
@Override
public List<Email> findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK) public List<Email> findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK)
throws SystemException { throws SystemException {
return emailPersistence.findByC_G_C_C(companyId, groupId, classNameId, classPK); return emailPersistence.findByC_G_C_C(companyId, groupId, classNameId, classPK);
} }
@Override public List<Email> findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK, int start,
public List<Email> findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK, int start, int end) int end) throws SystemException {
throws SystemException {
return emailPersistence.findByC_G_C_C(companyId, groupId, classNameId, classPK, start, end); return emailPersistence.findByC_G_C_C(companyId, groupId, classNameId, classPK, start, end);
} }
@Override public int countByC_G_C_C(long companyId, long groupId, long classNameId, long classPK)
public int countByC_G_C_C(long companyId, long groupId, long classNameId, long classPK) throws SystemException { throws SystemException {
return emailPersistence.countByC_G_C_C(companyId, groupId, classNameId, classPK); return emailPersistence.countByC_G_C_C(companyId, groupId, classNameId, classPK);
} }

30
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailTemplateLocalServiceImpl.java

@ -62,26 +62,35 @@ public class EmailTemplateLocalServiceImpl extends EmailTemplateLocalServiceBase
User user = userLocalService.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
Date now = new Date(); Date now = new Date();
validate(templateName, from, to, cc, ccn, subject, body); validate(templateName, from, to, cc, ccn, subject, body);
EmailTemplate emailTemplate = createEmailTemplate(counterLocalService.increment(EmailTemplate.class.getName()));
EmailTemplate emailTemplate =
emailTemplateLocalService.createEmailTemplate(counterLocalService.increment(EmailTemplate.class.getName()));
emailTemplate.setCompanyId(serviceContext.getCompanyId()); emailTemplate.setCompanyId(serviceContext.getCompanyId());
emailTemplate.setUserId(user.getUserId()); emailTemplate.setUserId(user.getUserId());
emailTemplate.setUserName(user.getFullName()); emailTemplate.setUserName(user.getFullName());
emailTemplate.setCreateDate(serviceContext.getCreateDate(now)); emailTemplate.setCreateDate(serviceContext.getCreateDate(now));
emailTemplate.setModifiedDate(serviceContext.getModifiedDate(now)); emailTemplate.setModifiedDate(serviceContext.getModifiedDate(now));
emailTemplate.setGroupId(serviceContext.getScopeGroupId()); emailTemplate.setGroupId(serviceContext.getScopeGroupId());
emailTemplate.setTemplateName(templateName); emailTemplate.setTemplateName(templateName);
emailTemplate.setFrom(from); emailTemplate.setFrom(from);
emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA)); emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA));
emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA)); emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA));
emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA)); emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA));
emailTemplate.setSubject(subject); emailTemplate.setSubject(subject);
emailTemplate.setBody(body); emailTemplate.setBody(body);
emailTemplate.setAttachmentPermitted(attachmentPermitted); emailTemplate.setAttachmentPermitted(attachmentPermitted);
emailTemplate = addEmailTemplate(emailTemplate);
emailTemplate = emailTemplateLocalService.addEmailTemplate(emailTemplate);
// Resource // Resource
resourceLocalService.addResources(emailTemplate.getCompanyId(), emailTemplate.getGroupId(), resourceLocalService.addResources(emailTemplate.getCompanyId(), emailTemplate.getGroupId(),
emailTemplate.getUserId(), EmailTemplate.class.getName(), emailTemplate.getPrimaryKey(), false, true, emailTemplate.getUserId(), EmailTemplate.class.getName(), emailTemplate.getPrimaryKey(), false, true, true);
true);
return emailTemplate; return emailTemplate;
} }
@ -90,24 +99,29 @@ public class EmailTemplateLocalServiceImpl extends EmailTemplateLocalServiceBase
String[] cc, String[] ccn, String subject, String body, boolean attachmentPermitted, String[] cc, String[] ccn, String subject, String body, boolean attachmentPermitted,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
EmailTemplate emailTemplate = getEmailTemplate(emailTemplateId); EmailTemplate emailTemplate = emailTemplateLocalService.getEmailTemplate(emailTemplateId);
validate(templateName, from, to, cc, ccn, subject, body); validate(templateName, from, to, cc, ccn, subject, body);
emailTemplate.setModifiedDate(serviceContext.getModifiedDate(new Date())); emailTemplate.setModifiedDate(serviceContext.getModifiedDate(new Date()));
emailTemplate.setFrom(from); emailTemplate.setFrom(from);
emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA)); emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA));
emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA)); emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA));
emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA)); emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA));
emailTemplate.setSubject(subject); emailTemplate.setSubject(subject);
emailTemplate.setBody(body); emailTemplate.setBody(body);
emailTemplate.setAttachmentPermitted(attachmentPermitted); emailTemplate.setAttachmentPermitted(attachmentPermitted);
emailTemplate = updateEmailTemplate(emailTemplate);
emailTemplate = emailTemplateLocalService.updateEmailTemplate(emailTemplate);
return emailTemplate; return emailTemplate;
} }
@Override @Override
public EmailTemplate deleteEmailTemplate(long emailTemplateId) throws PortalException, SystemException { public EmailTemplate deleteEmailTemplate(long emailTemplateId) throws PortalException, SystemException {
EmailTemplate emailTemplate = emailTemplateLocalService.getEmailTemplate(emailTemplateId);
EmailTemplate emailTemplate = getEmailTemplate(emailTemplateId);
return deleteEmailTemplate(emailTemplate); return deleteEmailTemplate(emailTemplate);
} }

Some files were not shown because too many files have changed in this diff Show More

Caricamento…
Annulla
Salva