diff --git a/jasper/Autorizzazione.jrxml b/jasper/Autorizzazione.jrxml index 19653406..e32b8188 100644 --- a/jasper/Autorizzazione.jrxml +++ b/jasper/Autorizzazione.jrxml @@ -389,7 +389,7 @@ L’eventuale ricorso gerarchico, debitamente sottoscritto e regolarizzato in bo - + diff --git a/jasper/Avviso di Non Competenza.jrxml b/jasper/Avviso di Non Competenza.jrxml index 722fa03a..8354b4a7 100644 --- a/jasper/Avviso di Non Competenza.jrxml +++ b/jasper/Avviso di Non Competenza.jrxml @@ -136,14 +136,16 @@ e dell'identità siciliana]]> - + + + - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-display.xml index 9421d070..8dbbc89d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-display.xml @@ -2,23 +2,24 @@ - - - - - - - - - - + + + + + + + + - + - - - + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml index 4e7754d9..4cedd60a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -142,6 +142,15 @@ 1.6 pending-pagamenti-portlet + + paesaggistica-organigramma + /icon.png + configuration + 1.9 + /css/main.css?v=1 + /js/main.js?v=2 + paesaggistica-organigramma-portlet + portos-administration /icon.png diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml index e976e342..cc7a76ce 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,13 @@ - - + + 1 Fascicolo - - it.tref.liferay.portos.bo.portlet.FascicoloPortlet - + it.tref.liferay.portos.bo.portlet.FascicoloPortlet view-template /html/fascicolo/view.jsp @@ -47,14 +47,14 @@ 0 text/html - view + view - content.Language + content.Language Tabelle di Sistema Tabelle di Sistema - + administrator @@ -79,14 +79,14 @@ 0 text/html - view + view - content.Language + content.Language Gestione Firme Gestione Firme - + administrator @@ -103,9 +103,7 @@ 5 Fascicolo - - it.tref.liferay.portos.bo.portlet.DocAggiuntivaPortlet - + it.tref.liferay.portos.bo.portlet.DocAggiuntivaPortlet view-template /html/doc_aggiuntiva/view.jsp @@ -137,9 +135,7 @@ 6 Gestione Attività - - it.tref.liferay.portos.bo.portlet.GestioneAttivitaPortlet - + it.tref.liferay.portos.bo.portlet.GestioneAttivitaPortlet view-template /html/gestioneattivita/view.jsp @@ -171,9 +167,7 @@ 7 Allegati Manuali - - it.tref.liferay.portos.bo.portlet.AllegatiManualiPortlet - + it.tref.liferay.portos.bo.portlet.AllegatiManualiPortlet view-template /html/allegati_manuali/view.jsp @@ -205,9 +199,7 @@ 8 Gestione Attivita Istruttore - - it.tref.liferay.portos.bo.portlet.GestioneAttivitaIstruttorePortlet - + it.tref.liferay.portos.bo.portlet.GestioneAttivitaIstruttorePortlet view-template /html/gestioneattivitaistruttore/view.jsp @@ -239,9 +231,7 @@ 9 Carichi di lavoro - - it.tref.liferay.portos.bo.portlet.CarichiLavoroPortlet - + it.tref.liferay.portos.bo.portlet.CarichiLavoroPortlet view-template /html/carichilavoro/view.jsp @@ -273,9 +263,7 @@ 11 Generate Protocollo Csv - - it.tref.liferay.portos.bo.portlet.GenerateProtocolloCSVPortlet - + it.tref.liferay.portos.bo.portlet.GenerateProtocolloCSVPortlet view-template /html/generateprotocollocsv/view.jsp @@ -285,7 +273,7 @@ text/html view - content.Language + content.Language Generate Protocollo Csv 11 @@ -315,14 +303,45 @@ 0 text/html - view + view - content.Language + content.Language Pagamenti in Pending Pagamenti in Pending - + + + administrator + + + guest + + + power-user + + + user + + + + paesaggistica-organigramma + Organigramma + it.mwg.sismica.bo.portlet.OrganigrammaPortlet + + view-template + /html/organigramma/view.jsp + + 0 + + text/html + view + + + Organigramma + Organigramma + + administrator @@ -339,9 +358,7 @@ portos-administration Amministrazione Paesaggistica - - it.tref.liferay.portos.bo.portlet.PaesaggisticaAdministrationPortlet - + it.tref.liferay.portos.bo.portlet.PaesaggisticaAdministrationPortlet view-template /html/paesaggistica_administration/view.jsp @@ -404,9 +421,7 @@ 22 Ricerca Protocollo - - it.tref.liferay.portos.bo.portlet.RicercaProtocolloPortlet - + it.tref.liferay.portos.bo.portlet.RicercaProtocolloPortlet view-template /html/ricercaprotocollo/view.jsp @@ -437,9 +452,7 @@ 13 Home Bo - - it.tref.liferay.portos.bo.portlet.HomeBOPortlet - + it.tref.liferay.portos.bo.portlet.HomeBOPortlet view-template /html/homebo/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java index 56bf3ef8..b534eb37 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java @@ -65,39 +65,39 @@ public class PraticaUtil { SystemException { switch (tipoProcedura) { - case Constants.PROCEDURA_P3: - case Constants.PROCEDURA_Q3: - switch (statoPratica) { - case StatoPraticaConstants.AUTORIZZATA: - case StatoPraticaConstants.CONFORME: - return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_APERTO); - case StatoPraticaConstants.NON_AUTORIZZATA: - case StatoPraticaConstants.NON_CONFORME: - return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_CHIUSO); - } - break; - case Constants.PROCEDURA_P10: - case Constants.PROCEDURA_Q10: - switch (statoPratica) { - case StatoPraticaConstants.AUTORIZZATA: - case StatoPraticaConstants.CONFORME: - return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VINCOLI); - } + case Constants.PROCEDURA_P3: + case Constants.PROCEDURA_Q3: + switch (statoPratica) { + case StatoPraticaConstants.AUTORIZZATA: + case StatoPraticaConstants.CONFORME: + return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_APERTO); + case StatoPraticaConstants.NON_AUTORIZZATA: + case StatoPraticaConstants.NON_CONFORME: + return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_CHIUSO); + } + break; + case Constants.PROCEDURA_P10: + case Constants.PROCEDURA_Q10: + switch (statoPratica) { + case StatoPraticaConstants.AUTORIZZATA: + case StatoPraticaConstants.CONFORME: + return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VINCOLI); + } } String statoPraticaLabel = StringPool.BLANK; switch (statoPratica) { - case StatoPraticaConstants.CONFORME: - statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.AUTORIZZATA); - break; - case StatoPraticaConstants.NON_CONFORME: - statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.NON_AUTORIZZATA); - break; - default: - statoPraticaLabel = StatoPraticaConstants.getStatusLabel(statoPratica); - if (Validator.isNull(statoPraticaLabel)) { - statoPraticaLabel = "In compilazione"; - } - break; + case StatoPraticaConstants.CONFORME: + statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.AUTORIZZATA); + break; + case StatoPraticaConstants.NON_CONFORME: + statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.NON_AUTORIZZATA); + break; + default: + statoPraticaLabel = StatoPraticaConstants.getStatusLabel(statoPratica); + if (Validator.isNull(statoPraticaLabel)) { + statoPraticaLabel = "In compilazione"; + } + break; } return statoPraticaLabel; } @@ -113,33 +113,33 @@ public class PraticaUtil { if (intPratica.getTipoRichiesta() == Constants.VIARCH) { switch (intPratica.getStatoPratica()) { - case StatoPraticaConstants.AUTORIZZATA: - case StatoPraticaConstants.CONFORME: - return StatoPraticaConstants.VIARCH_APERTO; - case StatoPraticaConstants.NON_AUTORIZZATA: - case StatoPraticaConstants.NON_CONFORME: - return StatoPraticaConstants.VIARCH_CHIUSO; + case StatoPraticaConstants.AUTORIZZATA: + case StatoPraticaConstants.CONFORME: + return StatoPraticaConstants.VIARCH_APERTO; + case StatoPraticaConstants.NON_AUTORIZZATA: + case StatoPraticaConstants.NON_CONFORME: + return StatoPraticaConstants.VIARCH_CHIUSO; } } String statoPraticaCode = StringPool.BLANK; switch (statoPratica) { - case StatoPraticaConstants.CONFORME: - if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { - statoPraticaCode = StatoPraticaConstants.CONFORME; - } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { - statoPraticaCode = StatoPraticaConstants.AUTORIZZATA; - } - break; - case StatoPraticaConstants.NON_CONFORME: - if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { - statoPraticaCode = StatoPraticaConstants.NON_CONFORME; - } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { - statoPraticaCode = StatoPraticaConstants.NON_AUTORIZZATA; - } - break; - default: - statoPraticaCode = statoPratica; - break; + case StatoPraticaConstants.CONFORME: + if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { + statoPraticaCode = StatoPraticaConstants.CONFORME; + } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + statoPraticaCode = StatoPraticaConstants.AUTORIZZATA; + } + break; + case StatoPraticaConstants.NON_CONFORME: + if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { + statoPraticaCode = StatoPraticaConstants.NON_CONFORME; + } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + statoPraticaCode = StatoPraticaConstants.NON_AUTORIZZATA; + } + break; + default: + statoPraticaCode = statoPratica; + break; } return statoPraticaCode; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties index 4a7976e3..b9cdf2a7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties @@ -46,7 +46,7 @@ stato-pratica-VS = Variazione soggetti stato-pratica-V1 = Apertura VIArch stato-pratica-V2 = Chiusura VIArch -stato-pratica-PS = Perizia sanzione +stato-pratica-PS = Decreto sanzione effettua-delega = Effettua Delega effettua-delega-TT = Effettua Delega Totale @@ -1103,6 +1103,7 @@ label.admingeniocivile.statopratica.viarch1 = VIArch aperto label.admingeniocivile.statopratica.viarch2 = VIArch chiuso label.admingeniocivile.statopratica.sanzione.doc1 = Sanzione pecuniaria doc. 1 label.admingeniocivile.statopratica.sanzione.doc2 = Sanzione pecuniaria doc. 2 +label.admingeniocivile.statopratica.periziasanzione = Decreto sanzione label.firma-doc = Dichiaro di aver preso visione del documento, e di sottoscriverne il contenuto ai sensi del D.Lgs. 82/2005 label.cambio-soggetti-ok = Cambio Soggetti #{0} completato con successo @@ -1217,7 +1218,7 @@ label.admingeniocivile.avviso.tipoDocumento.avvisomanuale = Avviso generico label.admingeniocivile.avviso.tipoDocumento.cambioistruttore = Avviso di cambio istruttore label.admingeniocivile.avviso.tipoDocumento.variazioneSoggetto = Avviso di variazione soggetto label.admingeniocivile.avviso.tipoDocumento.vincoli = Avviso di attestazione vincoli -label.admingeniocivile.avviso.tipoDocumento.periziasanzione = Perizia sanzione +label.admingeniocivile.avviso.tipoDocumento.periziasanzione = Decreto sanzione label.admingeniocivile.avviso.documento.conforme = Conformità/Autorizzazione label.admingeniocivile.avviso.documento.nonconforme = Conformità negata diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/OrganigrammaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/OrganigrammaPortlet.java new file mode 100644 index 00000000..abe5edfb --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/OrganigrammaPortlet.java @@ -0,0 +1,11 @@ +package it.mwg.sismica.bo.portlet; + +import com.liferay.util.bridges.mvc.MVCPortlet; + +public class OrganigrammaPortlet extends MVCPortlet { + + public OrganigrammaPortlet() { + // TODO Auto-generated constructor stub + } + +} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AllegatoManualeBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AllegatoManualeBaseImpl.java index 54f4f8a3..bbdd77c3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AllegatoManualeBaseImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AllegatoManualeBaseImpl.java @@ -1,9 +1,15 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in - * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. */ package it.tref.liferay.portos.bo.model.impl; @@ -14,11 +20,10 @@ import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil; /** - * The extended model base implementation for the AllegatoManuale service. Represents a row in the - * "portos_bo_AllegatoManuale" database table, with each column mapped to a property of this class. + * The extended model base implementation for the AllegatoManuale service. Represents a row in the "portos_bo_AllegatoManuale" database table, with each column mapped to a property of this class. + * *

- * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. - * Helper methods and all application logic should be put in {@link AllegatoManualeImpl}. + * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link AllegatoManualeImpl}. *

* * @author Davide Barbagallo, 3F Consulting + Manifattura Web Group s.r.l. @@ -26,17 +31,20 @@ import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil; * @see it.tref.liferay.portos.bo.model.AllegatoManuale * @generated */ -public abstract class AllegatoManualeBaseImpl extends AllegatoManualeModelImpl implements AllegatoManuale { +public abstract class AllegatoManualeBaseImpl extends AllegatoManualeModelImpl + implements AllegatoManuale { /* - * NOTE FOR DEVELOPERS: Never modify or reference this class directly. All methods that expect a allegato manuale - * model instance should use the {@link AllegatoManuale} interface instead. + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a allegato manuale model instance should use the {@link AllegatoManuale} interface instead. */ @Override public void persist() throws SystemException { if (this.isNew()) { AllegatoManualeLocalServiceUtil.addAllegatoManuale(this); - } else { + } + else { AllegatoManualeLocalServiceUtil.updateAllegatoManuale(this); } } -} +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 61061686..fd6f2898 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3349 - build.date=1631527942260 + build.number=3357 + build.date=1631548540307 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp index e6d56bb9..aebd0452 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp @@ -20,6 +20,8 @@ <% ControlloPratica controlloPratica = (ControlloPratica) request.getAttribute("controlloPratica"); Map parametri = WorkflowUtil.getFormParameters(controlloPratica); +boolean base64 = MapUtil.getBoolean(parametri, "base64", false); +parametri.remove("base64"); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()); DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); DettPratica controlloDettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); @@ -30,7 +32,6 @@ Organization org = OrganizationLocalServiceUtil.getOrganization(groupTerritorio. Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); List pareri = ParereGeologoLocalServiceUtil.findByIntPraticaId(intPratica.getIntPraticaId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS); -List nascosti = Arrays.asList(new String[] { "base64" }); %>

<%= intPratica.getTitle(true) %>

nascosti = Arrays.asList(new String[] { "base64" }); if (parametri.isEmpty()) { out.print("
  • Nessun dato inserito
  • "); } else { - boolean base64 = MapUtil.getBoolean(parametri, "base64", false); for (Entry entry : parametri.entrySet()) { String key = entry.getKey(); String value = entry.getValue().toString(); @@ -165,14 +165,21 @@ List nascosti = Arrays.asList(new String[] { "base64" }); } if (key.equals("ingloba_variante")) { out.print("
  • " + value + "
  • "); - } else if (!nascosti.contains(key)) { + } else { + out.print("
  • "); + out.print(LanguageUtil.get(pageContext, key)); + out.print(": "); if (base64 && key.equalsIgnoreCase("testo_del_documento")) { - value = "File allegato"; + out.print(""); + out.print("File allegato "); + } else { + out.print(LanguageUtil.get(pageContext, WorkflowUtil.adjustWorkflowContextValue(key, value, + intPratica.getIntPraticaId()))); } - out.print("
  • " + LanguageUtil.get(pageContext, key) + ": " - + LanguageUtil.get(pageContext, - WorkflowUtil.adjustWorkflowContextValue(key, value, intPratica.getIntPraticaId())) - + "
  • "); + out.print(""); } } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp new file mode 100644 index 00000000..35629115 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp @@ -0,0 +1,50 @@ +<%@page import="org.apache.commons.lang.StringUtils"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%> +<%@page import="com.liferay.portal.model.User"%> +<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> +<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> +<%@page import="com.liferay.portal.model.Organization"%> +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/html/init.jsp"%> +<% +long organizationId = ParamUtil.getLong(request, "organization", 0); +Organization organization = null; +if (organizationId != 0) { + organization = OrganizationLocalServiceUtil.fetchOrganization(organizationId); +} +%> +

    + Organigramma <%= Validator.isNull(organization) ? StringPool.BLANK : organization.getName() %> + (<%= organizationId %>) +

    + + + <% + for (Organization org : OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, + QueryUtil.ALL_POS)) { + if (org.getParentOrganizationId() != 0) { + %> + + <% + } + } + %> + + + +

    Risultati

    + + + + + + + + + + +

    /Risultati

    diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java index 2acb09ac..574459b6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java @@ -33,10 +33,8 @@ public class StartUpAction extends SimpleAction { for (String id : companyIds) { try { long companyId = GetterUtil.getLong(id); - String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE }; String[] guestActions = { ActionKeys.VIEW }; - // Organization custom fields addExpandoColumnIfNotExists(companyId, Group.class.getName(), "portos_notification_enable", ExpandoColumnConstants.BOOLEAN, false, false, defaultActions, guestActions); @@ -46,12 +44,10 @@ public class StartUpAction extends SimpleAction { } } - private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, - int type, boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) - throws SystemException { + private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, int type, + boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) throws SystemException { long classNameId = PortalUtil.getClassNameId(className); - ExpandoTable expandoTable = null; try { expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, @@ -60,65 +56,41 @@ public class StartUpAction extends SimpleAction { try { expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); - } catch (PortalException e1) { - } + } catch (PortalException e1) {} } - - ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil - .getColumn(expandoTable.getTableId(), name); - + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); if (expandoColumn == null) { - try { - expandoColumn = ExpandoColumnLocalServiceUtil - .addColumn(expandoTable.getTableId(), name, type); - - } catch (PortalException e) { - } + expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type); + } catch (PortalException e) {} } - try { - if (indexed) { - UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); - typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); - expandoColumn.setTypeSettingsProperties(typeSettingsProperties); - expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); } - if (hidden) { - UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); - typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); - expandoColumn.setTypeSettingsProperties(typeSettingsProperties); - expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); } - Role roleGuest = RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST); Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER); Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER); - - ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, - ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, - String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(), guestActions); - ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, - ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, - String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(), defaultActions); - ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, - ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, - String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(), defaultActions); - } catch (PortalException e) { - } - + ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), + ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), + roleGuest.getRoleId(), guestActions); + ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), + ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), + rolePowerUser.getRoleId(), defaultActions); + ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), + ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), + roleUser.getRoleId(), defaultActions); + } catch (PortalException e) {} return expandoColumn; } - } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp index f66b0005..787df950 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp @@ -1,9 +1,7 @@ -<%@page import="com.liferay.portal.kernel.util.Constants"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> -<%@page import="java.text.NumberFormat"%> -<%@page import="it.mwg.sicilia.sue.model.Sportello"%> <%@page import="it.mwg.sicilia.sue.service.SportelloLocalServiceUtil"%> +<%@page import="java.text.NumberFormat"%> <%@include file="/html/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java index 60ed2658..bcd65194 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java +++ b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java @@ -68,6 +68,7 @@ public class StatoPraticaConstants { put(VIARCH_CHIUSO, "label.admingeniocivile.statopratica.viarch2"); put(SANZIONE_DOC1, "label.admingeniocivile.statopratica.sanzione.doc1"); put(SANZIONE_DOC2, "label.admingeniocivile.statopratica.sanzione.doc2"); + put(PERIZIA_SANZIONE, "label.admingeniocivile.statopratica.periziasanzione"); } }; diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java index 4552f85b..ed3d4aa8 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java @@ -6,42 +6,51 @@ import java.io.Serializable; import java.util.List; public class MailTemplateMessage implements Serializable { - private static final long serialVersionUID = 1L; - private long templateId; - private String templateName; - private String templateParam; - private List fileAttachments; + private static final long serialVersionUID = 1L; - public long getTemplateId() { - return templateId; - } + private long templateId; + private String templateName; + private String templateParam; + private List fileAttachments; - public void setTemplateId(long templateId) { - this.templateId = templateId; - } + public long getTemplateId() { - public String getTemplateParam() { - return templateParam; - } + return templateId; + } - public void setTemplateParam(String templateParam) { - this.templateParam = templateParam; - } + public void setTemplateId(long templateId) { - public List getFileAttachments() { - return fileAttachments; - } + this.templateId = templateId; + } - public void setFileAttachments(List fileAttachments) { - this.fileAttachments = fileAttachments; - } + public String getTemplateParam() { - public String getTemplateName() { - return templateName; - } + return templateParam; + } - public void setTemplateName(String templateName) { - this.templateName = templateName; - } + public void setTemplateParam(String templateParam) { + + this.templateParam = templateParam; + } + + public List getFileAttachments() { + + return fileAttachments; + } + + public void setFileAttachments(List fileAttachments) { + + this.fileAttachments = fileAttachments; + } + + public String getTemplateName() { + + return templateName; + } + + public void setTemplateName(String templateName) { + + this.templateName = templateName; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java index 293fa983..8e21a5d5 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java @@ -3,89 +3,105 @@ package it.tref.liferay.portos.mailmanager.shared.messaging.dto; import java.io.Serializable; public class TemplateMessage implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private long templateId; - private String templateName; - private String from; - private String[] to; - private String[] cc; - private String[] ccn; - private String subject; - private String body; - private boolean attachmentPermitted; + private long templateId; + private String templateName; + private String from; + private String[] to; + private String[] cc; + private String[] ccn; + private String subject; + private String body; + private boolean attachmentPermitted; + public long getTemplateId() { - public long getTemplateId() { - return templateId; - } + return templateId; + } - public void setTemplateId(long templateId) { - this.templateId = templateId; - } + public void setTemplateId(long templateId) { - public String getTemplateName() { - return templateName; - } + this.templateId = templateId; + } - public void setTemplateName(String templateName) { - this.templateName = templateName; - } + public String getTemplateName() { - public String getFrom() { - return from; - } + return templateName; + } - public void setFrom(String from) { - this.from = from; - } + public void setTemplateName(String templateName) { - public String[] getTo() { - return to; - } + this.templateName = templateName; + } - public void setTo(String[] to) { - this.to = to; - } + public String getFrom() { - public String[] getCc() { - return cc; - } + return from; + } - public void setCc(String[] cc) { - this.cc = cc; - } + public void setFrom(String from) { - public String[] getCcn() { - return ccn; - } + this.from = from; + } - public void setCcn(String[] ccn) { - this.ccn = ccn; - } + public String[] getTo() { - public String getBody() { - return body; - } + return to; + } - public void setBody(String body) { - this.body = body; - } + public void setTo(String[] to) { - public String getSubject() { - return subject; - } + this.to = to; + } - public void setSubject(String subject) { - this.subject = subject; - } + public String[] getCc() { - public boolean isAttachmentPermitted() { - return attachmentPermitted; - } + return cc; + } - public void setAttachmentPermitted(boolean attachmentPermitted) { - this.attachmentPermitted = attachmentPermitted; - } + public void setCc(String[] cc) { + this.cc = cc; + } + + public String[] getCcn() { + + return ccn; + } + + public void setCcn(String[] ccn) { + + this.ccn = ccn; + } + + public String getBody() { + + return body; + } + + public void setBody(String body) { + + this.body = body; + } + + public String getSubject() { + + return subject; + } + + public void setSubject(String subject) { + + this.subject = subject; + } + + public boolean isAttachmentPermitted() { + + return attachmentPermitted; + } + + public void setAttachmentPermitted(boolean attachmentPermitted) { + + this.attachmentPermitted = attachmentPermitted; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java index 9c9401ae..a548ec54 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java @@ -2,12 +2,11 @@ package it.tref.liferay.portos.mailmanager.shared.messaging.util; public class DestinationNames { - public static final String SEND_MAIL = "liferay/mail_manager/add_email"; - public static final String SEND_TEMPLATE_MAIL = "liferay/mail_manager/add_email_by_template"; + public static final String SEND_MAIL = "liferay/mail_manager/add_email"; + public static final String SEND_TEMPLATE_MAIL = "liferay/mail_manager/add_email_by_template"; - public static final String SEND_MAIL_SYNC = "liferay/mail_manager/add_email_sync"; - public static final String SEND_TEMPLATE_MAIL_SYNC = "liferay/mail_manager/add_email_by_template_sync"; - - public static final String EDIT_EMAIL_TEMPLATE = "liferay/mail_manager/edit_email_template"; + public static final String SEND_MAIL_SYNC = "liferay/mail_manager/add_email_sync"; + public static final String SEND_TEMPLATE_MAIL_SYNC = "liferay/mail_manager/add_email_by_template_sync"; + public static final String EDIT_EMAIL_TEMPLATE = "liferay/mail_manager/edit_email_template"; } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/MailManagerUtil.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/MailManagerUtil.java index bddabc13..e53992dc 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/MailManagerUtil.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/MailManagerUtil.java @@ -1,5 +1,18 @@ package it.tref.liferay.portos.mailmanager.shared.messaging.util; +import it.tref.liferay.portos.mailmanager.shared.messaging.dto.MailTemplateMessage; +import it.tref.liferay.portos.mailmanager.shared.messaging.dto.TemplateMessage; +import it.tref.liferay.portos.mailmanager.shared.model.FileAttachment; +import it.tref.liferay.portos.mailmanager.shared.util.MailManagerConstants; +import it.tref.liferay.portos.mailmanager.shared.util.MailUtil; + +import java.util.Collections; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; + import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; @@ -14,64 +27,43 @@ import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.service.ServiceContext; -import it.tref.liferay.portos.mailmanager.shared.messaging.dto.MailTemplateMessage; -import it.tref.liferay.portos.mailmanager.shared.messaging.dto.TemplateMessage; -import it.tref.liferay.portos.mailmanager.shared.model.FileAttachment; -import it.tref.liferay.portos.mailmanager.shared.util.MailManagerConstants; -import it.tref.liferay.portos.mailmanager.shared.util.MailUtil; - -import java.util.Collections; -import java.util.List; -import java.util.concurrent.TimeUnit; - -import javax.mail.internet.AddressException; -import javax.mail.internet.InternetAddress; - public class MailManagerUtil { - + private final static Log _log = LogFactoryUtil.getLog(MailManagerUtil.class); public static boolean sendMail(String messageId, String inReplyTo, String from, String[] to, String[] cc, - String[] bcc, String subject, String body, boolean htmlFormat, boolean async, - boolean checkPermission, ServiceContext serviceContext) throws AddressException, SystemException { - - InternetAddress fromInternetAddress = new InternetAddress(from, true); + String[] bcc, String subject, String body, boolean htmlFormat, boolean async, boolean checkPermission, + ServiceContext serviceContext) throws AddressException, SystemException { + InternetAddress fromInternetAddress = new InternetAddress(from, true); InternetAddress[] toInternetAddress = MailUtil.fromStringAddress(to); InternetAddress[] ccInternetAddress = MailUtil.fromStringAddress(cc); InternetAddress[] bccInternetAddress = MailUtil.fromStringAddress(bcc); - MailMessage mailMessage = new MailMessage(fromInternetAddress, subject, body, htmlFormat); mailMessage.setTo(toInternetAddress); mailMessage.setCC(ccInternetAddress); mailMessage.setBCC(bccInternetAddress); - Message message = new Message(); - message.put("serviceContext", serviceContext); - message.setPayload(JSONFactoryUtil.looseSerializeDeep(mailMessage)); - try { - if (async) { message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_ASYNC); MessageBusUtil.sendMessage(DestinationNames.SEND_MAIL, message); return true; } else { message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_SYNC); - return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage( - DestinationNames.SEND_MAIL_SYNC, message, TimeUnit.SECONDS.toMillis(30))); + return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage(DestinationNames.SEND_MAIL_SYNC, + message, TimeUnit.SECONDS.toMillis(30))); } - } catch (MessageBusException e) { throw new SystemException(e); } - } public static boolean sendMailByTemplateId(String className, long classPK, long templateId, JSONObject templateVariables, ServiceContext serviceContext) throws SystemException { + return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, null, null, null, templateVariables, Collections. emptyList(), true, true, serviceContext); } @@ -79,6 +71,7 @@ public class MailManagerUtil { public static boolean sendMailByTemplateId(String className, long classPK, long templateId, JSONObject templateVariables, List fileAttachments, ServiceContext serviceContext) throws SystemException { + return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, null, null, null, templateVariables, fileAttachments, true, true, serviceContext); } @@ -86,12 +79,14 @@ public class MailManagerUtil { public static boolean sendMailByTemplateId(String className, long classPK, long templateId, String[] to, String[] cc, String[] ccn, JSONObject templateVariables, List fileAttachments, ServiceContext serviceContext) throws SystemException { - return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, to, cc, ccn, - templateVariables, fileAttachments, true, true, serviceContext); + + return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, to, cc, ccn, templateVariables, + fileAttachments, true, true, serviceContext); } public static boolean sendMailByTemplateName(String className, long classPK, String templateName, JSONObject templateVariables, ServiceContext serviceContext) throws SystemException { + return sendMailByTemplate(className, classPK, 0l, templateName, null, null, null, templateVariables, Collections. emptyList(), true, true, serviceContext); } @@ -99,52 +94,45 @@ public class MailManagerUtil { public static boolean sendMailByTemplateName(String className, long classPK, String templateName, JSONObject templateVariables, List fileAttachments, ServiceContext serviceContext) throws SystemException { + return sendMailByTemplate(className, classPK, 0l, templateName, null, null, null, templateVariables, fileAttachments, true, true, serviceContext); } - public static boolean sendMailByTemplatName(String className, long classPK, String templateName, - String[] to, String[] cc, String[] ccn, JSONObject templateVariables, - List fileAttachments, ServiceContext serviceContext) throws SystemException { + public static boolean sendMailByTemplatName(String className, long classPK, String templateName, String[] to, + String[] cc, String[] ccn, JSONObject templateVariables, List fileAttachments, + ServiceContext serviceContext) throws SystemException { + return sendMailByTemplate(className, classPK, 0l, templateName, to, cc, ccn, templateVariables, fileAttachments, true, true, serviceContext); } - public static boolean sendMailByTemplate(String className, long classPK, long templateId, - String templateName, String[] to, String[] cc, String[] ccn, JSONObject templateVariables, - List fileAttachments, boolean async, boolean checkPermission, - ServiceContext serviceContext) throws SystemException { - + public static boolean sendMailByTemplate(String className, long classPK, long templateId, String templateName, + String[] to, String[] cc, String[] ccn, JSONObject templateVariables, List fileAttachments, + boolean async, boolean checkPermission, ServiceContext serviceContext) throws SystemException { + JSONObject templateParam = JSONFactoryUtil.createJSONObject(); templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_VARIABLES_KEY, templateVariables); - if (to != null && to.length > 0) { - templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_TO_KEY, - StringUtil.merge(to, StringPool.COMMA)); + templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_TO_KEY, StringUtil.merge(to, StringPool.COMMA)); } if (cc != null && cc.length > 0) { - templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CC_KEY, - StringUtil.merge(cc, StringPool.COMMA)); + templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CC_KEY, StringUtil.merge(cc, StringPool.COMMA)); } if (ccn != null && ccn.length > 0) { - templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CCN_KEY, - StringUtil.merge(ccn, StringPool.COMMA)); + templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CCN_KEY, StringUtil.merge(ccn, StringPool.COMMA)); } - MailTemplateMessage mailTemplateMessage = new MailTemplateMessage(); mailTemplateMessage.setTemplateId(templateId); mailTemplateMessage.setTemplateName(templateName); mailTemplateMessage.setTemplateParam(templateParam.toString()); mailTemplateMessage.setFileAttachments(fileAttachments); - Message message = new Message(); message.put("serviceContext", serviceContext); message.put("className", className); message.put("classPK", classPK); message.setPayload(JSONFactoryUtil.looseSerializeDeep(mailTemplateMessage)); - try { - if (async) { message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_ASYNC); MessageBusUtil.sendMessage(DestinationNames.SEND_TEMPLATE_MAIL, message); @@ -154,15 +142,15 @@ public class MailManagerUtil { return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage( DestinationNames.SEND_TEMPLATE_MAIL_SYNC, message, TimeUnit.SECONDS.toMillis(30))); } - } catch (MessageBusException e) { throw new SystemException(e); } } - public static boolean addMailTemplate(String templateName, String from, String[] to, String[] cc, - String[] ccn, String subject, String body, boolean attachmentPermitted, - ServiceContext serviceContext) throws SystemException { + public static boolean addMailTemplate(String templateName, String from, String[] to, String[] cc, String[] ccn, + String subject, String body, boolean attachmentPermitted, ServiceContext serviceContext) + throws SystemException { + return updateMailTemplate(0l, templateName, from, to, cc, ccn, subject, body, attachmentPermitted, serviceContext); } @@ -181,17 +169,14 @@ public class MailManagerUtil { templateMessage.setCcn(ccn); templateMessage.setSubject(subject); templateMessage.setBody(body); - Message message = new Message(); message.put("serviceContext", serviceContext); message.setPayload(JSONFactoryUtil.looseSerializeDeep(templateMessage)); - try { - return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage( - DestinationNames.EDIT_EMAIL_TEMPLATE, message, TimeUnit.SECONDS.toMillis(30))); + return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage(DestinationNames.EDIT_EMAIL_TEMPLATE, + message, TimeUnit.SECONDS.toMillis(30))); } catch (MessageBusException e) { throw new SystemException(e); } } - } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java index 43c558ce..305e865c 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java @@ -1,5 +1,8 @@ package it.tref.liferay.portos.mailmanager.shared.model; +import java.io.File; +import java.io.InputStream; + import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.repository.model.FileEntry; @@ -9,93 +12,95 @@ import com.liferay.portal.kernel.util.Validator; import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; -import java.io.File; -import java.io.InputStream; +public class FileAttachment extends com.liferay.mail.model.FileAttachment { + public static final Log _log = LogFactoryUtil.getLog(FileAttachment.class); -public class FileAttachment extends com.liferay.mail.model.FileAttachment { + private long fileEntryId; + private byte[] bytes; + private String tipologia; + private String fileName; + + public FileAttachment() { - public static final Log _log = LogFactoryUtil.getLog(FileAttachment.class); + super(); + } - private long fileEntryId; - private byte[] bytes; - private String tipologia; - private String fileName; + public FileAttachment(File file, String fileName, String tipologia, long fileEntryId, byte[] bytes) { - public FileAttachment() { - super(); - } + super(file, fileName); + this.setTipologia(tipologia); + this.fileEntryId = fileEntryId; + this.setBytes(bytes); + } - public FileAttachment(File file, String fileName, String tipologia, long fileEntryId, byte[] bytes) { - super(file, fileName); - this.setTipologia(tipologia); - this.fileEntryId = fileEntryId; - this.setBytes(bytes); - } + @Override + public String getFileName() { + return fileName; + } - public String getFileName() { - return fileName; - } + @Override + public void setFileName(String fileName) { - public void setFileName(String fileName) { - this.fileName = fileName; - super.setFileName(fileName); - } + this.fileName = fileName; + super.setFileName(fileName); + } + public long getFileEntryId() { - public long getFileEntryId() { - return fileEntryId; - } + return fileEntryId; + } - public void setFileEntryId(long fileEntryId) { - this.fileEntryId = fileEntryId; - } + public void setFileEntryId(long fileEntryId) { - public byte[] getBytes() { - return bytes; - } + this.fileEntryId = fileEntryId; + } - public void setBytes(byte[] bytes) { - this.bytes = bytes; - } + public byte[] getBytes() { - public String getTipologia() { - return tipologia; - } + return bytes; + } - public void setTipologia(String tipologia) { - this.tipologia = tipologia; - } + public void setBytes(byte[] bytes) { - public File generateFile() { + this.bytes = bytes; + } - File result = null; + public String getTipologia() { - try { + return tipologia; + } - if (Validator.isNotNull(super.getFile())) { - result = super.getFile(); - } else if (Validator.isNotNull(fileEntryId)) { - FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId); - setFileName(fileEntry.getTitle() - + (Validator.isNotNull(fileEntry.getExtension()) ? "." + fileEntry.getExtension() : StringPool.BLANK)); - InputStream is = - DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(), false); - result = FileUtil.createTempFile(is); - is.close(); - result.deleteOnExit(); - } else if (Validator.isNotNull(bytes)) { - result = FileUtil.createTempFile(bytes); - result.deleteOnExit(); - } + public void setTipologia(String tipologia) { - } catch (Exception e) { - _log.error("Error during getFile()", e); - } - setFile(result); - return result; - } + this.tipologia = tipologia; + } + public File generateFile() { + File result = null; + try { + if (Validator.isNotNull(super.getFile())) { + result = super.getFile(); + } else if (Validator.isNotNull(fileEntryId)) { + FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId); + setFileName(fileEntry.getTitle() + + (Validator.isNotNull(fileEntry.getExtension()) ? "." + fileEntry.getExtension() + : StringPool.BLANK)); + InputStream is = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), + fileEntry.getVersion(), false); + result = FileUtil.createTempFile(is); + is.close(); + result.deleteOnExit(); + } else if (Validator.isNotNull(bytes)) { + result = FileUtil.createTempFile(bytes); + result.deleteOnExit(); + } + } catch (Exception e) { + _log.error("Error during getFile()", e); + } + setFile(result); + return result; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java index 6812e53f..1726027a 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java @@ -1,38 +1,35 @@ package it.tref.liferay.portos.mailmanager.shared.util; - public class MailManagerConstants { - public enum SendTemplateMode { - - REVIEW("R"), EDIT("E"); - - private SendTemplateMode(String id) { - this.id = id; - } + public enum SendTemplateMode { - private String id; + REVIEW("R"), EDIT("E"); - public static SendTemplateMode parse(String id) { - for (SendTemplateMode item : values()) { - if (item.id.equals(id)) { - return item; - } - } - throw new IllegalArgumentException("Invalid SendTemplateMode value: " + id); - } + private SendTemplateMode(String id) { + this.id = id; + } - public String getId() { - return id; - } - } + private String id; - public static final String TEMPLATE_PARAMETER_VARIABLES_KEY = "variables"; - public static final String TEMPLATE_PARAMETER_TO_KEY = "to"; - public static final String TEMPLATE_PARAMETER_CC_KEY = "cc"; - public static final String TEMPLATE_PARAMETER_CCN_KEY = "ccn"; + public static SendTemplateMode parse(String id) { + for (SendTemplateMode item : values()) { + if (item.id.equals(id)) { + return item; + } + } + throw new IllegalArgumentException("Invalid SendTemplateMode value: " + id); + } - public static final String MESSAGING_SEND_MODE_SYNC = "sync"; - public static final String MESSAGING_SEND_MODE_ASYNC = "async"; + public String getId() { + return id; + } + } + public static final String TEMPLATE_PARAMETER_VARIABLES_KEY = "variables"; + public static final String TEMPLATE_PARAMETER_TO_KEY = "to"; + public static final String TEMPLATE_PARAMETER_CC_KEY = "cc"; + public static final String TEMPLATE_PARAMETER_CCN_KEY = "ccn"; + public static final String MESSAGING_SEND_MODE_SYNC = "sync"; + public static final String MESSAGING_SEND_MODE_ASYNC = "async"; } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java index 0870629b..59440fd1 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java @@ -1,9 +1,5 @@ package it.tref.liferay.portos.mailmanager.shared.util; -import com.liferay.portal.kernel.upload.UploadPortletRequest; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.Validator; - import it.tref.liferay.portos.mailmanager.shared.model.FileAttachment; import java.io.File; @@ -14,119 +10,103 @@ import java.util.List; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; -public class MailUtil { - - public static String fromInternetAddress(InternetAddress internetAddress) { - if (Validator.isNotNull(internetAddress)) { - return internetAddress.getAddress(); - } - return null; - } - - public static String[] fromInternetAddresses(InternetAddress[] internetAddresses) { - if (internetAddresses != null && internetAddresses.length > 0) { - String[] addresses = new String[internetAddresses.length]; - for (int i = 0; i < internetAddresses.length; i++) { - addresses[i] = internetAddresses[i].getAddress(); - } - return addresses; - } - return null; - } - - public static InternetAddress[] fromStringAddress(String[] address) throws AddressException { - - InternetAddress[] result = null; - if (address != null && address.length > 0) { - result = new InternetAddress[address.length]; - for (int i = 0; i < address.length; i++) { - result[i] = new InternetAddress(address[i], true); - } - } - return result; - } - - public static List getFileAttachments(UploadPortletRequest uploadPortletRequest) { - return getFileAttachments(uploadPortletRequest, Collections.emptyList()); - } - - public static List getFileAttachments(UploadPortletRequest uploadPortletRequest, - List defaultFileAttachments) { - - String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes"); - - if (allegatiIndexesString == null) { - return defaultFileAttachments; - } - - List fileAttachments = new ArrayList(); - - int[] allegatiIndexes = StringUtil.split(allegatiIndexesString, 0); - - for (int allegatiIndex : allegatiIndexes) { - long fileEntryId = ParamUtil.getLong(uploadPortletRequest, "fileEntryId" + allegatiIndex); - - String fileName = uploadPortletRequest.getFileName("file" + allegatiIndex); - File file = uploadPortletRequest.getFile("file" + allegatiIndex); - - if (Validator.isNull(fileEntryId)) { - if (Validator.isNull(fileName)) { - continue; - } - } - - String tipologia = ParamUtil.getString(uploadPortletRequest, "tipologia" + allegatiIndex); - - FileAttachment fileAttachment = new FileAttachment(); - - fileAttachment.setFileEntryId(fileEntryId); - fileAttachment.setTipologia(tipologia); - fileAttachment.setFileName(fileName); - fileAttachment.setFile(file); - - fileAttachments.add(fileAttachment); - } - - return fileAttachments; - } - - public static List getEmailFileAttachments( - UploadPortletRequest uploadPortletRequest) { - return getEmailFileAttachments(uploadPortletRequest, Collections.emptyList()); - } - - public static List getEmailFileAttachments( - UploadPortletRequest uploadPortletRequest, List defaultFileAttachments) { - - String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes"); - - if (allegatiIndexesString == null) { - return defaultFileAttachments; - } - - List fileAttachments = - new ArrayList(); - - int[] allegatiIndexes = StringUtil.split(allegatiIndexesString, 0); - - for (int allegatiIndex : allegatiIndexes) { - - String fileName = uploadPortletRequest.getFileName("file" + allegatiIndex); - File file = uploadPortletRequest.getFile("file" + allegatiIndex); - - if (Validator.isNull(fileName)) { - continue; - } - - com.liferay.mail.model.FileAttachment fileAttachment = new com.liferay.mail.model.FileAttachment(); - - fileAttachment.setFileName(fileName); - fileAttachment.setFile(file); - - fileAttachments.add(fileAttachment); - } +import com.liferay.portal.kernel.upload.UploadPortletRequest; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.Validator; - return fileAttachments; - } +public class MailUtil { + public static String fromInternetAddress(InternetAddress internetAddress) { + + return Validator.isNull(internetAddress) ? null : internetAddress.getAddress(); + } + + public static String[] fromInternetAddresses(InternetAddress[] internetAddresses) { + + if (internetAddresses != null && internetAddresses.length > 0) { + String[] addresses = new String[internetAddresses.length]; + for (int i = 0; i < internetAddresses.length; i++) { + addresses[i] = internetAddresses[i].getAddress(); + } + return addresses; + } + return null; + } + + public static InternetAddress[] fromStringAddress(String[] address) throws AddressException { + + InternetAddress[] result = null; + if (address != null && address.length > 0) { + result = new InternetAddress[address.length]; + for (int i = 0; i < address.length; i++) { + result[i] = new InternetAddress(address[i], true); + } + } + return result; + } + + public static List getFileAttachments(UploadPortletRequest uploadPortletRequest) { + + return getFileAttachments(uploadPortletRequest, Collections. emptyList()); + } + + public static List getFileAttachments(UploadPortletRequest uploadPortletRequest, + List defaultFileAttachments) { + + String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes"); + if (allegatiIndexesString == null) { + return defaultFileAttachments; + } + List fileAttachments = new ArrayList(); + int[] allegatiIndexes = StringUtil.split(allegatiIndexesString, 0); + for (int allegatiIndex : allegatiIndexes) { + long fileEntryId = ParamUtil.getLong(uploadPortletRequest, "fileEntryId" + allegatiIndex); + String fileName = uploadPortletRequest.getFileName("file" + allegatiIndex); + File file = uploadPortletRequest.getFile("file" + allegatiIndex); + if (Validator.isNull(fileEntryId)) { + if (Validator.isNull(fileName)) { + continue; + } + } + String tipologia = ParamUtil.getString(uploadPortletRequest, "tipologia" + allegatiIndex); + FileAttachment fileAttachment = new FileAttachment(); + fileAttachment.setFileEntryId(fileEntryId); + fileAttachment.setTipologia(tipologia); + fileAttachment.setFileName(fileName); + fileAttachment.setFile(file); + fileAttachments.add(fileAttachment); + } + return fileAttachments; + } + + public static List getEmailFileAttachments( + UploadPortletRequest uploadPortletRequest) { + + return getEmailFileAttachments(uploadPortletRequest, + Collections. emptyList()); + } + + public static List getEmailFileAttachments( + UploadPortletRequest uploadPortletRequest, + List defaultFileAttachments) { + + String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes"); + if (allegatiIndexesString == null) { + return defaultFileAttachments; + } + List fileAttachments = new ArrayList(); + int[] allegatiIndexes = StringUtil.split(allegatiIndexesString, 0); + for (int allegatiIndex : allegatiIndexes) { + String fileName = uploadPortletRequest.getFileName("file" + allegatiIndex); + File file = uploadPortletRequest.getFile("file" + allegatiIndex); + if (Validator.isNull(fileName)) { + continue; + } + com.liferay.mail.model.FileAttachment fileAttachment = new com.liferay.mail.model.FileAttachment(); + fileAttachment.setFileName(fileName); + fileAttachment.setFile(file); + fileAttachments.add(fileAttachment); + } + return fileAttachments; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java index 750651e0..c53db0e7 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java @@ -2,8 +2,6 @@ package it.tref.liferay.portos.mailmanager.shared.util; public class PortletKeys extends com.liferay.portal.util.PortletKeys { - public static final String MAIL_MANAGER = "1_WAR_portosmailmanagerportlet"; - - public static final String EMAIL_TEMPLATE = "2_WAR_portosmailmanagerportlet"; - + public static final String MAIL_MANAGER = "1_WAR_portosmailmanagerportlet"; + public static final String EMAIL_TEMPLATE = "2_WAR_portosmailmanagerportlet"; } diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java index 2bb47066..224c8fb0 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java @@ -1,14 +1,12 @@ package it.tref.liferay.portos.mailmanager.shared.util; - public class StringUtil extends com.liferay.portal.kernel.util.StringUtil { - public static String[] splitAndTrim(String s) { - String[] array = StringUtil.split(s); - for (int i = 0; i < array.length; i++) { - array[i] = StringUtil.trim(array[i]); - } - return array; - } - + public static String[] splitAndTrim(String s) { + String[] array = StringUtil.split(s); + for (int i = 0; i < array.length; i++) { + array[i] = StringUtil.trim(array[i]); + } + return array; + } } diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp index 68170c60..4440d963 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp @@ -1,5 +1,6 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> +<%@page import="com.liferay.portal.kernel.util.MapUtil"%> <%@page import="java.io.Serializable"%> <%@page import="java.util.ArrayList"%> <%@page import="java.util.Map"%> @@ -7,16 +8,26 @@ <%@include file="/html/portlet/workflow_instances/init.jsp"%> <% Map parameters = (Map) renderRequest.getAttribute("parameters"); +boolean base64 = MapUtil.getBoolean(parameters, "base64", false); +parameters.remove("base64"); %> + results="<%= new ArrayList>(parameters.entrySet()) %>" /> <%= LanguageUtil.get(pageContext, (String) entry.getKey()) %> - <%= entry.getValue() %> + <% + if (base64 && entry.getKey().toString().equalsIgnoreCase("testo_del_documento")) { + out.print(""); + } else { + out.print(entry.getValue()); + } + %> diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf index aa8981f3..5a059b4f 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf @@ -1,11 +1,9 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%-- Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - -This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later -version. - +This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General +Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any +later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. @@ -37,7 +35,8 @@ details. <% @SuppressWarnings("unchecked") - Map historyWorkflowEsitiLogs = (Map) request.getAttribute("historyWorkflowEsitiLogs"); + Map historyWorkflowEsitiLogs = (Map) request.getAttribute( + "historyWorkflowEsitiLogs"); for (WorkflowLog workflowLog : workflowLogs) { Role curRole = null; User curUser = null; @@ -75,19 +74,22 @@ details. <% String esito = (String) request.getAttribute("registra-esito-value"); - if (historyWorkflowEsitiLogs != null && historyWorkflowEsitiLogs.containsKey( - workflowLog.getWorkflowLogId())) { + if (Validator.isNull(esito) && Validator.isNotNull(historyWorkflowEsitiLogs) + && historyWorkflowEsitiLogs.containsKey(workflowLog + .getWorkflowLogId())) { esito = historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); } %> - <% String assegna = (String) request.getAttribute("assegna-value"); %> - <% if (curRole == null) { - String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK); + String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), + StringPool.BLANK); %>
    - +
    <% @@ -161,13 +167,17 @@ details. if (Validator.isNotNull(transitionName)) { if ("registra-esito".equalsIgnoreCase(transitionName)) { String esito = (String) request.getAttribute("registra-esito-value"); - if (historyWorkflowEsitiLogs != null && historyWorkflowEsitiLogs.containsKey(workflowLog - .getWorkflowLogId())) { + if (Validator.isNull(esito) && Validator.isNotNull(historyWorkflowEsitiLogs) + && historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId())) { esito = historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); } - out.print(" ( " + esito + " ) "); + out.print(" ("); + out.print(esito); + out.print(")"); } else if ("assegna".equalsIgnoreCase(transitionName)) { - out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) "); + out.print(" ("); + out.print((String) request.getAttribute("assegna-value")); + out.print(")"); } } } @@ -178,7 +188,9 @@ details. && !"Assigned initial task.".equals(workflowLog.getComment()) %>'>
    -

    <%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>

    +

    + <%= dateFormatDateTime.format(workflowLog.getCreateDate()) %> +

    <%= curUser.getFullName() %> diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java index 7983c189..799f34b4 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java @@ -411,7 +411,12 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction { ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance .getClassPK()); if (json.has("esito")) { - return PraticaUtil.getStatoPratica(json.getString("esito"), controlloPratica.getIntPraticaId()); + String esito = json.getString("esito"); + if (json.getBoolean("base64")) { + esito = StatoPraticaConstants.PERIZIA_SANZIONE; + } + String ret = PraticaUtil.getStatoPratica(esito, controlloPratica.getIntPraticaId()); + return ret; } else if (json.has("istruttore")) { User istruttore = UserLocalServiceUtil.fetchUser(json.getLong("istruttore")); if (Validator.isNotNull(istruttore)) { diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderHistoryFormAction.java b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderHistoryFormAction.java index b34823e9..f0789fbf 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderHistoryFormAction.java +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderHistoryFormAction.java @@ -18,8 +18,8 @@ import javax.portlet.RenderResponse; import com.liferay.portal.kernel.json.JSONDeserializer; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.struts.BaseStrutsPortletAction; +import com.liferay.portal.kernel.util.MapUtil; import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.kernel.workflow.WorkflowTask; @@ -54,7 +54,6 @@ public class RenderHistoryFormAction extends BaseStrutsPortletAction { User istruttore = UserLocalServiceUtil.fetchUser(Long .parseLong(parameters.get("istruttore").toString())); if (istruttore != null) { - parameters.remove("istruttore"); parameters.put("istruttore", istruttore.getFullName()); } } @@ -64,14 +63,16 @@ public class RenderHistoryFormAction extends BaseStrutsPortletAction { ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance .getClassPK()); String esito = parameters.get("esito").toString(); - String tipoEsito = StringPool.BLANK; + if (MapUtil.getBoolean(parameters, "base64") && esito.equals(StatoPraticaConstants.INTEGRAZIONE)) { + esito = StatoPraticaConstants.PERIZIA_SANZIONE; + } + String tipoEsito = null; if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) { tipoEsito = StatoPraticaConstants.getEsitoDeposito(esito); } else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { tipoEsito = StatoPraticaConstants.getEsitoAutorizzazione(esito); } if (Validator.isNotNull(tipoEsito)) { - parameters.remove("esito"); parameters.put("esito", tipoEsito); } } diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties index 4c4f521a..63ecff0e 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=Kaleo - build.number=55 - build.date=1631181216604 + build.number=57 + build.date=1631548590240 build.auto.upgrade=true ##