Sfoglia il codice sorgente

Dicitura Decreto sanzione in Kaleo

master
Salvatore La Manna 3 anni fa
parent
commit
191c44275f
  1. 2
      jasper/Autorizzazione.jrxml
  2. 6
      jasper/Avviso di Non Competenza.jrxml
  3. 27
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-display.xml
  4. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml
  5. 75
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml
  6. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
  7. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/OrganigrammaPortlet.java
  8. 34
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AllegatoManualeBaseImpl.java
  9. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  10. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp
  11. 50
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp
  12. 60
      liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java
  13. 4
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp
  14. 1
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java
  15. 9
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java
  16. 20
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java
  17. 1
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java
  18. 95
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/MailManagerUtil.java
  19. 33
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java
  20. 3
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java
  21. 50
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java
  22. 2
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java
  23. 2
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java
  24. 13
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp
  25. 52
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf
  26. 7
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java
  27. 9
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderHistoryFormAction.java
  28. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

2
jasper/Autorizzazione.jrxml

@ -389,7 +389,7 @@ L’eventuale ricorso gerarchico, debitamente sottoscritto e regolarizzato in bo
<textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement>
<text><![CDATA[Il sopritendente]]></text>
<text><![CDATA[Il soprintendente]]></text>
</staticText>
<staticText>
<reportElement x="4" y="230" width="547" height="10" uuid="e484cc67-3e66-431a-ad1f-bc7fc56c0836">

6
jasper/Avviso di Non Competenza.jrxml

@ -136,14 +136,16 @@ e dell'identità siciliana]]></text>
<textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="148" y="60" width="259" height="14" uuid="8c9f5378-8e8d-4655-84b5-eccad49767d5">
<reportElement x="48" y="60" width="459" height="14" uuid="8c9f5378-8e8d-4655-84b5-eccad49767d5">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[DICHIARAZIONE DI NON COMPETENZA]]></text>
<text><![CDATA[DICHIARAZIONE DI NON COMPETENZA / ERRATA ISTANZA]]></text>
</staticText>
</band>
<band height="50">

27
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-display.xml

@ -2,23 +2,24 @@
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN" "http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
<display>
<category name="category.portos">
<category name="category.bo">
<portlet id="1"></portlet>
<portlet id="2"></portlet>
<portlet id="3"></portlet>
<portlet id="4"></portlet>
<portlet id="6"></portlet>
<portlet id="8"></portlet>
<portlet id="generate-protocollo-csv"></portlet>
<portlet id="22"></portlet>
<portlet id="13"></portlet>
<portlet id="1" />
<portlet id="2" />
<portlet id="4" />
<portlet id="6" />
<portlet id="8" />
<portlet id="13" />
<portlet id="22" />
<portlet id="ricerca-posizione" />
</category>
</category>
<category name="category.hidden">
<portlet id="9"></portlet>
<portlet id="12"></portlet>
<portlet id="portos-administration"></portlet>
<portlet id="5" />
<portlet id="7" />
<portlet id="9" />
<portlet id="11" />
<portlet id="12" />
<portlet id="portos-administration" />
</category>
</display>

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

@ -142,6 +142,15 @@
<control-panel-entry-weight>1.6</control-panel-entry-weight>
<css-class-wrapper>pending-pagamenti-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>paesaggistica-organigramma</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>configuration</control-panel-entry-category>
<control-panel-entry-weight>1.9</control-panel-entry-weight>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>paesaggistica-organigramma-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>portos-administration</portlet-name>
<icon>/icon.png</icon>

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

@ -1,13 +1,13 @@
<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
<portlet>
<portlet-name>1</portlet-name>
<display-name>Fascicolo</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.FascicoloPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.FascicoloPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/fascicolo/view.jsp</value>
@ -103,9 +103,7 @@
<portlet>
<portlet-name>5</portlet-name>
<display-name>Fascicolo</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.DocAggiuntivaPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.DocAggiuntivaPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/doc_aggiuntiva/view.jsp</value>
@ -137,9 +135,7 @@
<portlet>
<portlet-name>6</portlet-name>
<display-name>Gestione Attività</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.GestioneAttivitaPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.GestioneAttivitaPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/gestioneattivita/view.jsp</value>
@ -171,9 +167,7 @@
<portlet>
<portlet-name>7</portlet-name>
<display-name>Allegati Manuali</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.AllegatiManualiPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.AllegatiManualiPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/allegati_manuali/view.jsp</value>
@ -205,9 +199,7 @@
<portlet>
<portlet-name>8</portlet-name>
<display-name>Gestione Attivita Istruttore</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.GestioneAttivitaIstruttorePortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.GestioneAttivitaIstruttorePortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/gestioneattivitaistruttore/view.jsp</value>
@ -239,9 +231,7 @@
<portlet>
<portlet-name>9</portlet-name>
<display-name>Carichi di lavoro</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.CarichiLavoroPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.CarichiLavoroPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/carichilavoro/view.jsp</value>
@ -273,9 +263,7 @@
<portlet>
<portlet-name>11</portlet-name>
<display-name>Generate Protocollo Csv</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.GenerateProtocolloCSVPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.GenerateProtocolloCSVPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/generateprotocollocsv/view.jsp</value>
@ -336,12 +324,41 @@
<role-name>user</role-name>
</security-role-ref>
</portlet>
<portlet>
<portlet-name>paesaggistica-organigramma</portlet-name>
<display-name>Organigramma</display-name>
<portlet-class>it.mwg.sismica.bo.portlet.OrganigrammaPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/organigramma/view.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>Organigramma</title>
<short-title>Organigramma</short-title>
<keywords></keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
<portlet>
<portlet-name>portos-administration</portlet-name>
<display-name>Amministrazione Paesaggistica</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.PaesaggisticaAdministrationPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.PaesaggisticaAdministrationPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/paesaggistica_administration/view.jsp</value>
@ -404,9 +421,7 @@
<portlet>
<portlet-name>22</portlet-name>
<display-name>Ricerca Protocollo</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.RicercaProtocolloPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.RicercaProtocolloPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/ricercaprotocollo/view.jsp</value>
@ -437,9 +452,7 @@
<portlet>
<portlet-name>13</portlet-name>
<display-name>Home Bo</display-name>
<portlet-class>
it.tref.liferay.portos.bo.portlet.HomeBOPortlet
</portlet-class>
<portlet-class>it.tref.liferay.portos.bo.portlet.HomeBOPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/homebo/view.jsp</value>

5
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

11
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
}
}

34
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
* &quot;portos_bo_AllegatoManuale&quot; 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 &quot;portos_bo_AllegatoManuale&quot; database table, with each column mapped to a property of this class.
*
* <p>
* 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}.
* </p>
*
* @author Davide Barbagallo, 3F Consulting + Manifattura Web Group s.r.l.
@ -26,16 +31,19 @@ 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);
}
}

4
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
##

23
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<String, Serializable> 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<ParereGeologo> pareri = ParereGeologoLocalServiceUtil.findByIntPraticaId(intPratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS);
List<String> nascosti = Arrays.asList(new String[] { "base64" });
%>
<h4 class="title_int_pratica"><%= intPratica.getTitle(true) %></h4>
<liferay-portlet:renderURL portletName='<%= PortletKeys.CARICHI_LAVORO %>'
@ -140,7 +141,6 @@ List<String> nascosti = Arrays.asList(new String[] { "base64" });
if (parametri.isEmpty()) {
out.print("<li><strong>Nessun dato inserito</strong></li>");
} else {
boolean base64 = MapUtil.getBoolean(parametri, "base64", false);
for (Entry<String, Serializable> entry : parametri.entrySet()) {
String key = entry.getKey();
String value = entry.getValue().toString();
@ -165,14 +165,21 @@ List<String> nascosti = Arrays.asList(new String[] { "base64" });
}
if (key.equals("ingloba_variante")) {
out.print("<li><strong>" + value + "</strong></li>");
} else if (!nascosti.contains(key)) {
} else {
out.print("<li><strong>");
out.print(LanguageUtil.get(pageContext, key));
out.print(":</strong> ");
if (base64 && key.equalsIgnoreCase("testo_del_documento")) {
value = "File allegato";
out.print("<script>window.mostraDoc = function() { var w = window.open('');");
out.print("w.document.write(\"<iframe width='100%' height='100%' src='");
out.print(value);
out.print("'></iframe>\");}</script>");
out.print("File allegato <button type=\"button\" onclick=\"mostraDoc()\">Visualizza</button>");
} else {
out.print(LanguageUtil.get(pageContext, WorkflowUtil.adjustWorkflowContextValue(key, value,
intPratica.getIntPraticaId())));
}
out.print("<li><strong>" + LanguageUtil.get(pageContext, key) + ":</strong> "
+ LanguageUtil.get(pageContext,
WorkflowUtil.adjustWorkflowContextValue(key, value, intPratica.getIntPraticaId()))
+ " </li>");
out.print("</li>");
}
}
}

50
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);
}
%>
<h2>
Organigramma <%= Validator.isNull(organization) ? StringPool.BLANK : organization.getName() %>
(<%= organizationId %>)
</h2>
<aui:form>
<aui:select name="organization">
<%
for (Organization org : OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS,
QueryUtil.ALL_POS)) {
if (org.getParentOrganizationId() != 0) {
%>
<aui:option value="<%= org.getOrganizationId() %>" label="<%= org.getName() %>" />
<%
}
}
%>
</aui:select>
<aui:button type="submit" value="show" />
</aui:form>
<h4>Risultati</h4>
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found">
<liferay-ui:search-container-results
total="<%= UserLocalServiceUtil.getOrganizationUsersCount(organizationId) %>"
results="<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(),
searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>" />
<liferay-ui:search-container-row className="com.liferay.portal.model.User" modelVar="orgUser" >
<liferay-ui:search-container-column-text name="screenName" />
<liferay-ui:search-container-column-text name="firstName" />
<liferay-ui:search-container-column-text name="lastName" />
<liferay-ui:search-container-column-text name="Unità operative" value="<%= StringUtils.join(UnitaOperativeUtil
.getUnitaOperative(orgUser), StringPool.COMMA_AND_SPACE) %>" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="true" />
</liferay-ui:search-container>
<h4>/Risultati</h4>

60
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;
}
}

4
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"%>
<portlet:renderURL var="addSportelloURL">
<portlet:param name="mvcPath" value="/html/administration/edit_sportello.jsp" />

1
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");
}
};

9
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java

@ -6,6 +6,7 @@ import java.io.Serializable;
import java.util.List;
public class MailTemplateMessage implements Serializable {
private static final long serialVersionUID = 1L;
private long templateId;
@ -14,34 +15,42 @@ public class MailTemplateMessage implements Serializable {
private List<FileAttachment> fileAttachments;
public long getTemplateId() {
return templateId;
}
public void setTemplateId(long templateId) {
this.templateId = templateId;
}
public String getTemplateParam() {
return templateParam;
}
public void setTemplateParam(String templateParam) {
this.templateParam = templateParam;
}
public List<FileAttachment> getFileAttachments() {
return fileAttachments;
}
public void setFileAttachments(List<FileAttachment> fileAttachments) {
this.fileAttachments = fileAttachments;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
}

20
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java

@ -15,77 +15,93 @@ public class TemplateMessage implements Serializable {
private String body;
private boolean attachmentPermitted;
public long getTemplateId() {
return templateId;
}
public void setTemplateId(long templateId) {
this.templateId = templateId;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String[] getTo() {
return to;
}
public void setTo(String[] to) {
this.to = to;
}
public String[] getCc() {
return cc;
}
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;
}
}

1
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java

@ -9,5 +9,4 @@ public class DestinationNames {
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";
}

95
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 {
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.<FileAttachment> emptyList(), true, true, serviceContext);
}
@ -79,6 +71,7 @@ public class MailManagerUtil {
public static boolean sendMailByTemplateId(String className, long classPK, long templateId,
JSONObject templateVariables, List<FileAttachment> 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<FileAttachment> 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.<FileAttachment> emptyList(), true, true, serviceContext);
}
@ -99,52 +94,45 @@ public class MailManagerUtil {
public static boolean sendMailByTemplateName(String className, long classPK, String templateName,
JSONObject templateVariables, List<FileAttachment> 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<FileAttachment> fileAttachments, ServiceContext serviceContext) throws SystemException {
public static boolean sendMailByTemplatName(String className, long classPK, String templateName, String[] to,
String[] cc, String[] ccn, JSONObject templateVariables, List<FileAttachment> 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<FileAttachment> 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<FileAttachment> 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);
}
}
}

33
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,10 +12,6 @@ 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);
@ -23,65 +22,74 @@ public class FileAttachment extends com.liferay.mail.model.FileAttachment {
private String fileName;
public FileAttachment() {
super();
}
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;
}
@Override
public void setFileName(String fileName) {
this.fileName = fileName;
super.setFileName(fileName);
}
public long getFileEntryId() {
return fileEntryId;
}
public void setFileEntryId(long fileEntryId) {
this.fileEntryId = fileEntryId;
}
public byte[] getBytes() {
return bytes;
}
public void setBytes(byte[] bytes) {
this.bytes = bytes;
}
public String getTipologia() {
return tipologia;
}
public void setTipologia(String tipologia) {
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);
+ (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();
@ -89,13 +97,10 @@ public class FileAttachment extends com.liferay.mail.model.FileAttachment {
result = FileUtil.createTempFile(bytes);
result.deleteOnExit();
}
} catch (Exception e) {
_log.error("Error during getFile()", e);
}
setFile(result);
return result;
}
}

3
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java

@ -1,6 +1,5 @@
package it.tref.liferay.portos.mailmanager.shared.util;
public class MailManagerConstants {
public enum SendTemplateMode {
@ -31,8 +30,6 @@ public class MailManagerConstants {
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";
}

50
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,16 +10,19 @@ import java.util.List;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import com.liferay.portal.kernel.upload.UploadPortletRequest;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.Validator;
public class MailUtil {
public static String fromInternetAddress(InternetAddress internetAddress) {
if (Validator.isNotNull(internetAddress)) {
return internetAddress.getAddress();
}
return null;
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++) {
@ -47,86 +46,67 @@ public class MailUtil {
}
public static List<FileAttachment> getFileAttachments(UploadPortletRequest uploadPortletRequest) {
return getFileAttachments(uploadPortletRequest, Collections.<FileAttachment>emptyList());
return getFileAttachments(uploadPortletRequest, Collections.<FileAttachment> emptyList());
}
public static List<FileAttachment> getFileAttachments(UploadPortletRequest uploadPortletRequest,
List<FileAttachment> defaultFileAttachments) {
String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes");
if (allegatiIndexesString == null) {
return defaultFileAttachments;
}
List<FileAttachment> fileAttachments = new ArrayList<FileAttachment>();
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<com.liferay.mail.model.FileAttachment> getEmailFileAttachments(
UploadPortletRequest uploadPortletRequest) {
return getEmailFileAttachments(uploadPortletRequest, Collections.<com.liferay.mail.model.FileAttachment>emptyList());
return getEmailFileAttachments(uploadPortletRequest,
Collections.<com.liferay.mail.model.FileAttachment> emptyList());
}
public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments(
UploadPortletRequest uploadPortletRequest, List<com.liferay.mail.model.FileAttachment> defaultFileAttachments) {
UploadPortletRequest uploadPortletRequest,
List<com.liferay.mail.model.FileAttachment> defaultFileAttachments) {
String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes");
if (allegatiIndexesString == null) {
return defaultFileAttachments;
}
List<com.liferay.mail.model.FileAttachment> fileAttachments =
new ArrayList<com.liferay.mail.model.FileAttachment>();
List<com.liferay.mail.model.FileAttachment> fileAttachments = new ArrayList<com.liferay.mail.model.FileAttachment>();
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;
}
}

2
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java

@ -3,7 +3,5 @@ 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";
}

2
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java

@ -1,6 +1,5 @@
package it.tref.liferay.portos.mailmanager.shared.util;
public class StringUtil extends com.liferay.portal.kernel.util.StringUtil {
public static String[] splitAndTrim(String s) {
@ -10,5 +9,4 @@ public class StringUtil extends com.liferay.portal.kernel.util.StringUtil {
}
return array;
}
}

13
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,6 +8,8 @@
<%@include file="/html/portlet/workflow_instances/init.jsp"%>
<%
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters");
boolean base64 = MapUtil.getBoolean(parameters, "base64", false);
parameters.remove("base64");
%>
<liferay-ui:search-container emptyResultsMessage="label-portos-kaleo-there-are-no-results" >
<liferay-ui:search-container-results total="<%= parameters.size() %>"
@ -16,7 +19,15 @@ Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest
<%= LanguageUtil.get(pageContext, (String) entry.getKey()) %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="label-portos-kaleo-value">
<%= entry.getValue() %>
<%
if (base64 && entry.getKey().toString().equalsIgnoreCase("testo_del_documento")) {
out.print("<iframe width='100%' height='100%' src='");
out.print(entry.getValue());
out.print("'></iframe>");
} else {
out.print(entry.getValue());
}
%>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="false" />

52
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.
<tbody class="attivita-group__body">
<%
@SuppressWarnings("unchecked")
Map<Long, String> historyWorkflowEsitiLogs = (Map<Long, String>) request.getAttribute("historyWorkflowEsitiLogs");
Map<Long, String> historyWorkflowEsitiLogs = (Map<Long, String>) request.getAttribute(
"historyWorkflowEsitiLogs");
for (WorkflowLog workflowLog : workflowLogs) {
Role curRole = null;
User curUser = null;
@ -75,19 +74,22 @@ details.
<c:if test='<%= "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());
}
%>
<liferay-ui:message arguments="<%= new Object[] { actorName, kaleoNodeName, esito} %>"
<liferay-ui:message
arguments="<%= new Object[] { actorName, kaleoNodeName, esito} %>"
key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'>
<%
String assegna = (String) request.getAttribute("assegna-value");
%>
<liferay-ui:message arguments="<%= new Object[] { actorName, kaleoNodeName, assegna} %>"
<liferay-ui:message
arguments="<%= new Object[] { actorName, kaleoNodeName, assegna} %>"
key="x-completed-the-task-y-z" />
</c:if>
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName)
@ -97,7 +99,8 @@ details.
</c:if>
</c:otherwise>
</c:choose>
<portlet:renderURL var="historyFormTaskURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<portlet:renderURL var="historyFormTaskURL"
windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<portlet:param name="struts_action" value="/workflow_tasks/render_history_form_task" />
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog
.getWorkflowTaskId()) %>" />
@ -119,7 +122,8 @@ details.
</c:when>
<c:otherwise>
<c:choose>
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>">
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser
.getUserId()) %>">
<div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>"
key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself"
@ -129,14 +133,16 @@ details.
<c:otherwise>
<%
if (curRole == null) {
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK);
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(),
StringPool.BLANK);
%>
<div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName),
actorName} %>" key="x-assigned-the-task-to-x" />
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog
.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" />
<liferay-ui:message key="previous-assignee-was-x"
arguments="<%= PortalUtil.getUserName(workflowLog
.getPreviousUserId(), StringPool.BLANK) %>" />
</c:if>
</div>
<%
@ -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()) %>'>
<div class="post-it-note">
<div class="header-post-it">
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p>
<p class="header-post-it_date">
<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>
</p>
<p class="header-post-it_name">
<c:if test="<%= Validator.isNotNull(curUser) %>">
<%= curUser.getFullName() %>

7
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)) {

9
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);
}
}

4
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
##

Caricamento…
Annulla
Salva