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. 83
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml
  6. 106
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PraticaUtil.java
  7. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
  8. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/OrganigrammaPortlet.java
  9. 34
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/AllegatoManualeBaseImpl.java
  10. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  11. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp
  12. 50
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp
  13. 60
      liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java
  14. 4
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp
  15. 1
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java
  16. 67
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/MailTemplateMessage.java
  17. 144
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java
  18. 11
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/DestinationNames.java
  19. 95
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/util/MailManagerUtil.java
  20. 137
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java
  21. 51
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java
  22. 214
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java
  23. 6
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/PortletKeys.java
  24. 16
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java
  25. 15
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp
  26. 52
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf
  27. 7
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java
  28. 9
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/RenderHistoryFormAction.java
  29. 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"> <textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/> <font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Il sopritendente]]></text> <text><![CDATA[Il soprintendente]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="4" y="230" width="547" height="10" uuid="e484cc67-3e66-431a-ad1f-bc7fc56c0836"> <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> <textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression>
</textField> </textField>
<staticText> <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.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" 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> </reportElement>
<textElement textAlignment="Center"> <textElement textAlignment="Center">
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[DICHIARAZIONE DI NON COMPETENZA]]></text> <text><![CDATA[DICHIARAZIONE DI NON COMPETENZA / ERRATA ISTANZA]]></text>
</staticText> </staticText>
</band> </band>
<band height="50"> <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"> <!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN" "http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
<display> <display>
<category name="category.portos"> <category name="category.portos">
<category name="category.bo"> <category name="category.bo">
<portlet id="1"></portlet> <portlet id="1" />
<portlet id="2"></portlet> <portlet id="2" />
<portlet id="3"></portlet> <portlet id="4" />
<portlet id="4"></portlet> <portlet id="6" />
<portlet id="6"></portlet> <portlet id="8" />
<portlet id="8"></portlet> <portlet id="13" />
<portlet id="generate-protocollo-csv"></portlet> <portlet id="22" />
<portlet id="22"></portlet> <portlet id="ricerca-posizione" />
<portlet id="13"></portlet>
</category> </category>
</category> </category>
<category name="category.hidden"> <category name="category.hidden">
<portlet id="9"></portlet> <portlet id="5" />
<portlet id="12"></portlet> <portlet id="7" />
<portlet id="portos-administration"></portlet> <portlet id="9" />
<portlet id="11" />
<portlet id="12" />
<portlet id="portos-administration" />
</category> </category>
</display> </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> <control-panel-entry-weight>1.6</control-panel-entry-weight>
<css-class-wrapper>pending-pagamenti-portlet</css-class-wrapper> <css-class-wrapper>pending-pagamenti-portlet</css-class-wrapper>
</portlet> </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>
<portlet-name>portos-administration</portlet-name> <portlet-name>portos-administration</portlet-name>
<icon>/icon.png</icon> <icon>/icon.png</icon>

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

@ -1,13 +1,13 @@
<?xml version="1.0"?> <?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>
<portlet-name>1</portlet-name> <portlet-name>1</portlet-name>
<display-name>Fascicolo</display-name> <display-name>Fascicolo</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.FascicoloPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.FascicoloPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/fascicolo/view.jsp</value> <value>/html/fascicolo/view.jsp</value>
@ -49,7 +49,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode> <portlet-mode>view</portlet-mode>
</supports> </supports>
<resource-bundle>content.Language</resource-bundle> <resource-bundle>content.Language</resource-bundle>
<portlet-info> <portlet-info>
<title>Tabelle di Sistema</title> <title>Tabelle di Sistema</title>
<short-title>Tabelle di Sistema</short-title> <short-title>Tabelle di Sistema</short-title>
@ -81,7 +81,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode> <portlet-mode>view</portlet-mode>
</supports> </supports>
<resource-bundle>content.Language</resource-bundle> <resource-bundle>content.Language</resource-bundle>
<portlet-info> <portlet-info>
<title>Gestione Firme</title> <title>Gestione Firme</title>
<short-title>Gestione Firme</short-title> <short-title>Gestione Firme</short-title>
@ -103,9 +103,7 @@
<portlet> <portlet>
<portlet-name>5</portlet-name> <portlet-name>5</portlet-name>
<display-name>Fascicolo</display-name> <display-name>Fascicolo</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.DocAggiuntivaPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.DocAggiuntivaPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/doc_aggiuntiva/view.jsp</value> <value>/html/doc_aggiuntiva/view.jsp</value>
@ -137,9 +135,7 @@
<portlet> <portlet>
<portlet-name>6</portlet-name> <portlet-name>6</portlet-name>
<display-name>Gestione Attività</display-name> <display-name>Gestione Attività</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.GestioneAttivitaPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.GestioneAttivitaPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/gestioneattivita/view.jsp</value> <value>/html/gestioneattivita/view.jsp</value>
@ -171,9 +167,7 @@
<portlet> <portlet>
<portlet-name>7</portlet-name> <portlet-name>7</portlet-name>
<display-name>Allegati Manuali</display-name> <display-name>Allegati Manuali</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.AllegatiManualiPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.AllegatiManualiPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/allegati_manuali/view.jsp</value> <value>/html/allegati_manuali/view.jsp</value>
@ -205,9 +199,7 @@
<portlet> <portlet>
<portlet-name>8</portlet-name> <portlet-name>8</portlet-name>
<display-name>Gestione Attivita Istruttore</display-name> <display-name>Gestione Attivita Istruttore</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.GestioneAttivitaIstruttorePortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.GestioneAttivitaIstruttorePortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/gestioneattivitaistruttore/view.jsp</value> <value>/html/gestioneattivitaistruttore/view.jsp</value>
@ -239,9 +231,7 @@
<portlet> <portlet>
<portlet-name>9</portlet-name> <portlet-name>9</portlet-name>
<display-name>Carichi di lavoro</display-name> <display-name>Carichi di lavoro</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.CarichiLavoroPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.CarichiLavoroPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/carichilavoro/view.jsp</value> <value>/html/carichilavoro/view.jsp</value>
@ -273,9 +263,7 @@
<portlet> <portlet>
<portlet-name>11</portlet-name> <portlet-name>11</portlet-name>
<display-name>Generate Protocollo Csv</display-name> <display-name>Generate Protocollo Csv</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.GenerateProtocolloCSVPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.GenerateProtocolloCSVPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/generateprotocollocsv/view.jsp</value> <value>/html/generateprotocollocsv/view.jsp</value>
@ -285,7 +273,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode> <portlet-mode>view</portlet-mode>
</supports> </supports>
<resource-bundle>content.Language</resource-bundle> <resource-bundle>content.Language</resource-bundle>
<portlet-info> <portlet-info>
<title>Generate Protocollo Csv</title> <title>Generate Protocollo Csv</title>
<short-title>11</short-title> <short-title>11</short-title>
@ -317,7 +305,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode> <portlet-mode>view</portlet-mode>
</supports> </supports>
<resource-bundle>content.Language</resource-bundle> <resource-bundle>content.Language</resource-bundle>
<portlet-info> <portlet-info>
<title>Pagamenti in Pending</title> <title>Pagamenti in Pending</title>
<short-title>Pagamenti in Pending</short-title> <short-title>Pagamenti in Pending</short-title>
@ -336,12 +324,41 @@
<role-name>user</role-name> <role-name>user</role-name>
</security-role-ref> </security-role-ref>
</portlet> </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>
<portlet-name>portos-administration</portlet-name> <portlet-name>portos-administration</portlet-name>
<display-name>Amministrazione Paesaggistica</display-name> <display-name>Amministrazione Paesaggistica</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.PaesaggisticaAdministrationPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.PaesaggisticaAdministrationPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/paesaggistica_administration/view.jsp</value> <value>/html/paesaggistica_administration/view.jsp</value>
@ -404,9 +421,7 @@
<portlet> <portlet>
<portlet-name>22</portlet-name> <portlet-name>22</portlet-name>
<display-name>Ricerca Protocollo</display-name> <display-name>Ricerca Protocollo</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.RicercaProtocolloPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.RicercaProtocolloPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/ricercaprotocollo/view.jsp</value> <value>/html/ricercaprotocollo/view.jsp</value>
@ -437,9 +452,7 @@
<portlet> <portlet>
<portlet-name>13</portlet-name> <portlet-name>13</portlet-name>
<display-name>Home Bo</display-name> <display-name>Home Bo</display-name>
<portlet-class> <portlet-class>it.tref.liferay.portos.bo.portlet.HomeBOPortlet</portlet-class>
it.tref.liferay.portos.bo.portlet.HomeBOPortlet
</portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>
<value>/html/homebo/view.jsp</value> <value>/html/homebo/view.jsp</value>

106
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 { SystemException {
switch (tipoProcedura) { switch (tipoProcedura) {
case Constants.PROCEDURA_P3: case Constants.PROCEDURA_P3:
case Constants.PROCEDURA_Q3: case Constants.PROCEDURA_Q3:
switch (statoPratica) { switch (statoPratica) {
case StatoPraticaConstants.AUTORIZZATA: case StatoPraticaConstants.AUTORIZZATA:
case StatoPraticaConstants.CONFORME: case StatoPraticaConstants.CONFORME:
return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_APERTO); return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_APERTO);
case StatoPraticaConstants.NON_AUTORIZZATA: case StatoPraticaConstants.NON_AUTORIZZATA:
case StatoPraticaConstants.NON_CONFORME: case StatoPraticaConstants.NON_CONFORME:
return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_CHIUSO); return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VIARCH_CHIUSO);
} }
break; break;
case Constants.PROCEDURA_P10: case Constants.PROCEDURA_P10:
case Constants.PROCEDURA_Q10: case Constants.PROCEDURA_Q10:
switch (statoPratica) { switch (statoPratica) {
case StatoPraticaConstants.AUTORIZZATA: case StatoPraticaConstants.AUTORIZZATA:
case StatoPraticaConstants.CONFORME: case StatoPraticaConstants.CONFORME:
return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VINCOLI); return StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.VINCOLI);
} }
} }
String statoPraticaLabel = StringPool.BLANK; String statoPraticaLabel = StringPool.BLANK;
switch (statoPratica) { switch (statoPratica) {
case StatoPraticaConstants.CONFORME: case StatoPraticaConstants.CONFORME:
statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.AUTORIZZATA); statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.AUTORIZZATA);
break; break;
case StatoPraticaConstants.NON_CONFORME: case StatoPraticaConstants.NON_CONFORME:
statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.NON_AUTORIZZATA); statoPraticaLabel = StatoPraticaConstants.getStatusLabel(StatoPraticaConstants.NON_AUTORIZZATA);
break; break;
default: default:
statoPraticaLabel = StatoPraticaConstants.getStatusLabel(statoPratica); statoPraticaLabel = StatoPraticaConstants.getStatusLabel(statoPratica);
if (Validator.isNull(statoPraticaLabel)) { if (Validator.isNull(statoPraticaLabel)) {
statoPraticaLabel = "In compilazione"; statoPraticaLabel = "In compilazione";
} }
break; break;
} }
return statoPraticaLabel; return statoPraticaLabel;
} }
@ -113,33 +113,33 @@ public class PraticaUtil {
if (intPratica.getTipoRichiesta() == Constants.VIARCH) { if (intPratica.getTipoRichiesta() == Constants.VIARCH) {
switch (intPratica.getStatoPratica()) { switch (intPratica.getStatoPratica()) {
case StatoPraticaConstants.AUTORIZZATA: case StatoPraticaConstants.AUTORIZZATA:
case StatoPraticaConstants.CONFORME: case StatoPraticaConstants.CONFORME:
return StatoPraticaConstants.VIARCH_APERTO; return StatoPraticaConstants.VIARCH_APERTO;
case StatoPraticaConstants.NON_AUTORIZZATA: case StatoPraticaConstants.NON_AUTORIZZATA:
case StatoPraticaConstants.NON_CONFORME: case StatoPraticaConstants.NON_CONFORME:
return StatoPraticaConstants.VIARCH_CHIUSO; return StatoPraticaConstants.VIARCH_CHIUSO;
} }
} }
String statoPraticaCode = StringPool.BLANK; String statoPraticaCode = StringPool.BLANK;
switch (statoPratica) { switch (statoPratica) {
case StatoPraticaConstants.CONFORME: case StatoPraticaConstants.CONFORME:
if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) {
statoPraticaCode = StatoPraticaConstants.CONFORME; statoPraticaCode = StatoPraticaConstants.CONFORME;
} else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) {
statoPraticaCode = StatoPraticaConstants.AUTORIZZATA; statoPraticaCode = StatoPraticaConstants.AUTORIZZATA;
} }
break; break;
case StatoPraticaConstants.NON_CONFORME: case StatoPraticaConstants.NON_CONFORME:
if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) {
statoPraticaCode = StatoPraticaConstants.NON_CONFORME; statoPraticaCode = StatoPraticaConstants.NON_CONFORME;
} else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) {
statoPraticaCode = StatoPraticaConstants.NON_AUTORIZZATA; statoPraticaCode = StatoPraticaConstants.NON_AUTORIZZATA;
} }
break; break;
default: default:
statoPraticaCode = statoPratica; statoPraticaCode = statoPratica;
break; break;
} }
return statoPraticaCode; return statoPraticaCode;
} }

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-V1 = Apertura VIArch
stato-pratica-V2 = Chiusura VIArch stato-pratica-V2 = Chiusura VIArch
stato-pratica-PS = Perizia sanzione stato-pratica-PS = Decreto sanzione
effettua-delega = Effettua Delega effettua-delega = Effettua Delega
effettua-delega-TT = Effettua Delega Totale 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.viarch2 = VIArch chiuso
label.admingeniocivile.statopratica.sanzione.doc1 = Sanzione pecuniaria doc. 1 label.admingeniocivile.statopratica.sanzione.doc1 = Sanzione pecuniaria doc. 1
label.admingeniocivile.statopratica.sanzione.doc2 = Sanzione pecuniaria doc. 2 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.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 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.cambioistruttore = Avviso di cambio istruttore
label.admingeniocivile.avviso.tipoDocumento.variazioneSoggetto = Avviso di variazione soggetto label.admingeniocivile.avviso.tipoDocumento.variazioneSoggetto = Avviso di variazione soggetto
label.admingeniocivile.avviso.tipoDocumento.vincoli = Avviso di attestazione vincoli 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.conforme = Conformità/Autorizzazione
label.admingeniocivile.avviso.documento.nonconforme = Conformità negata 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 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
* 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 * This library is free software; you can redistribute it and/or modify it under
* the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * the terms of the GNU Lesser General Public License as published by the Free
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * 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; 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; import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil;
/** /**
* The extended model base implementation for the AllegatoManuale service. Represents a row in the * 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.
* &quot;portos_bo_AllegatoManuale&quot; database table, with each column mapped to a property of this class. *
* <p> * <p>
* This class exists only as a container for the default extended model level methods generated by ServiceBuilder. * 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}.
* Helper methods and all application logic should be put in {@link AllegatoManualeImpl}.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting + Manifattura Web Group s.r.l. * @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 * @see it.tref.liferay.portos.bo.model.AllegatoManuale
* @generated * @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 * NOTE FOR DEVELOPERS:
* model instance should use the {@link AllegatoManuale} interface instead. *
* Never modify or reference this class directly. All methods that expect a allegato manuale model instance should use the {@link AllegatoManuale} interface instead.
*/ */
@Override @Override
public void persist() throws SystemException { public void persist() throws SystemException {
if (this.isNew()) { if (this.isNew()) {
AllegatoManualeLocalServiceUtil.addAllegatoManuale(this); AllegatoManualeLocalServiceUtil.addAllegatoManuale(this);
} else { }
else {
AllegatoManualeLocalServiceUtil.updateAllegatoManuale(this); 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.namespace=portos_bo
build.number=3349 build.number=3357
build.date=1631527942260 build.date=1631548540307
build.auto.upgrade=true 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"); ControlloPratica controlloPratica = (ControlloPratica) request.getAttribute("controlloPratica");
Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica); Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica);
boolean base64 = MapUtil.getBoolean(parametri, "base64", false);
parametri.remove("base64");
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId());
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId());
DettPratica controlloDettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica controlloDettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
@ -30,7 +32,6 @@ Organization org = OrganizationLocalServiceUtil.getOrganization(groupTerritorio.
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
List<ParereGeologo> pareri = ParereGeologoLocalServiceUtil.findByIntPraticaId(intPratica.getIntPraticaId(), List<ParereGeologo> pareri = ParereGeologoLocalServiceUtil.findByIntPraticaId(intPratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS); QueryUtil.ALL_POS, QueryUtil.ALL_POS);
List<String> nascosti = Arrays.asList(new String[] { "base64" });
%> %>
<h4 class="title_int_pratica"><%= intPratica.getTitle(true) %></h4> <h4 class="title_int_pratica"><%= intPratica.getTitle(true) %></h4>
<liferay-portlet:renderURL portletName='<%= PortletKeys.CARICHI_LAVORO %>' <liferay-portlet:renderURL portletName='<%= PortletKeys.CARICHI_LAVORO %>'
@ -140,7 +141,6 @@ List<String> nascosti = Arrays.asList(new String[] { "base64" });
if (parametri.isEmpty()) { if (parametri.isEmpty()) {
out.print("<li><strong>Nessun dato inserito</strong></li>"); out.print("<li><strong>Nessun dato inserito</strong></li>");
} else { } else {
boolean base64 = MapUtil.getBoolean(parametri, "base64", false);
for (Entry<String, Serializable> entry : parametri.entrySet()) { for (Entry<String, Serializable> entry : parametri.entrySet()) {
String key = entry.getKey(); String key = entry.getKey();
String value = entry.getValue().toString(); String value = entry.getValue().toString();
@ -165,14 +165,21 @@ List<String> nascosti = Arrays.asList(new String[] { "base64" });
} }
if (key.equals("ingloba_variante")) { if (key.equals("ingloba_variante")) {
out.print("<li><strong>" + value + "</strong></li>"); 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")) { 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> " out.print("</li>");
+ LanguageUtil.get(pageContext,
WorkflowUtil.adjustWorkflowContextValue(key, value, intPratica.getIntPraticaId()))
+ " </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) { for (String id : companyIds) {
try { try {
long companyId = GetterUtil.getLong(id); long companyId = GetterUtil.getLong(id);
String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE }; String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE };
String[] guestActions = { ActionKeys.VIEW }; String[] guestActions = { ActionKeys.VIEW };
// Organization custom fields // Organization custom fields
addExpandoColumnIfNotExists(companyId, Group.class.getName(), "portos_notification_enable", addExpandoColumnIfNotExists(companyId, Group.class.getName(), "portos_notification_enable",
ExpandoColumnConstants.BOOLEAN, false, false, defaultActions, guestActions); ExpandoColumnConstants.BOOLEAN, false, false, defaultActions, guestActions);
@ -46,12 +44,10 @@ public class StartUpAction extends SimpleAction {
} }
} }
private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, int type,
int type, boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) throws SystemException {
throws SystemException {
long classNameId = PortalUtil.getClassNameId(className); long classNameId = PortalUtil.getClassNameId(className);
ExpandoTable expandoTable = null; ExpandoTable expandoTable = null;
try { try {
expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId,
@ -60,65 +56,41 @@ public class StartUpAction extends SimpleAction {
try { try {
expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId,
ExpandoTableConstants.DEFAULT_TABLE_NAME); 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) { if (expandoColumn == null) {
try { try {
expandoColumn = ExpandoColumnLocalServiceUtil expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type);
.addColumn(expandoTable.getTableId(), name, type); } catch (PortalException e) {}
} catch (PortalException e) {
}
} }
try { try {
if (indexed) { if (indexed) {
UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties();
typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE,
String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT));
expandoColumn.setTypeSettingsProperties(typeSettingsProperties); expandoColumn.setTypeSettingsProperties(typeSettingsProperties);
expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn);
} }
if (hidden) { if (hidden) {
UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties();
typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1));
expandoColumn.setTypeSettingsProperties(typeSettingsProperties); expandoColumn.setTypeSettingsProperties(typeSettingsProperties);
expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn);
} }
Role roleGuest = RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST); Role roleGuest = RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST);
Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER); Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER);
Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER); Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(),
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()),
ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, roleGuest.getRoleId(), guestActions);
String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(), guestActions); ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(),
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()),
ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, rolePowerUser.getRoleId(), defaultActions);
String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(), defaultActions); ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(),
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()),
ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, roleUser.getRoleId(), defaultActions);
String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(), defaultActions); } catch (PortalException e) {}
} catch (PortalException e) {
}
return expandoColumn; 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 contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> <%@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="it.mwg.sicilia.sue.service.SportelloLocalServiceUtil"%>
<%@page import="java.text.NumberFormat"%>
<%@include file="/html/init.jsp"%> <%@include file="/html/init.jsp"%>
<portlet:renderURL var="addSportelloURL"> <portlet:renderURL var="addSportelloURL">
<portlet:param name="mvcPath" value="/html/administration/edit_sportello.jsp" /> <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(VIARCH_CHIUSO, "label.admingeniocivile.statopratica.viarch2");
put(SANZIONE_DOC1, "label.admingeniocivile.statopratica.sanzione.doc1"); put(SANZIONE_DOC1, "label.admingeniocivile.statopratica.sanzione.doc1");
put(SANZIONE_DOC2, "label.admingeniocivile.statopratica.sanzione.doc2"); put(SANZIONE_DOC2, "label.admingeniocivile.statopratica.sanzione.doc2");
put(PERIZIA_SANZIONE, "label.admingeniocivile.statopratica.periziasanzione");
} }
}; };

67
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; import java.util.List;
public class MailTemplateMessage implements Serializable { public class MailTemplateMessage implements Serializable {
private static final long serialVersionUID = 1L;
private long templateId; private static final long serialVersionUID = 1L;
private String templateName;
private String templateParam;
private List<FileAttachment> fileAttachments;
public long getTemplateId() { private long templateId;
return templateId; private String templateName;
} private String templateParam;
private List<FileAttachment> fileAttachments;
public void setTemplateId(long templateId) { public long getTemplateId() {
this.templateId = templateId;
}
public String getTemplateParam() { return templateId;
return templateParam; }
}
public void setTemplateParam(String templateParam) { public void setTemplateId(long templateId) {
this.templateParam = templateParam;
}
public List<FileAttachment> getFileAttachments() { this.templateId = templateId;
return fileAttachments; }
}
public void setFileAttachments(List<FileAttachment> fileAttachments) { public String getTemplateParam() {
this.fileAttachments = fileAttachments;
}
public String getTemplateName() { return templateParam;
return templateName; }
}
public void setTemplateName(String templateName) { public void setTemplateParam(String templateParam) {
this.templateName = templateName;
} 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;
}
} }

144
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; import java.io.Serializable;
public class TemplateMessage implements Serializable { public class TemplateMessage implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private long templateId; private long templateId;
private String templateName; private String templateName;
private String from; private String from;
private String[] to; private String[] to;
private String[] cc; private String[] cc;
private String[] ccn; private String[] ccn;
private String subject; private String subject;
private String body; private String body;
private boolean attachmentPermitted; private boolean attachmentPermitted;
public long getTemplateId() {
public long getTemplateId() { return templateId;
return templateId; }
}
public void setTemplateId(long templateId) { public void setTemplateId(long templateId) {
this.templateId = templateId;
}
public String getTemplateName() { this.templateId = templateId;
return templateName; }
}
public void setTemplateName(String templateName) { public String getTemplateName() {
this.templateName = templateName;
}
public String getFrom() { return templateName;
return from; }
}
public void setFrom(String from) { public void setTemplateName(String templateName) {
this.from = from;
}
public String[] getTo() { this.templateName = templateName;
return to; }
}
public void setTo(String[] to) { public String getFrom() {
this.to = to;
}
public String[] getCc() { return from;
return cc; }
}
public void setCc(String[] cc) { public void setFrom(String from) {
this.cc = cc;
}
public String[] getCcn() { this.from = from;
return ccn; }
}
public void setCcn(String[] ccn) { public String[] getTo() {
this.ccn = ccn;
}
public String getBody() { return to;
return body; }
}
public void setBody(String body) { public void setTo(String[] to) {
this.body = body;
}
public String getSubject() { this.to = to;
return subject; }
}
public void setSubject(String subject) { public String[] getCc() {
this.subject = subject;
}
public boolean isAttachmentPermitted() { return cc;
return attachmentPermitted; }
}
public void setAttachmentPermitted(boolean attachmentPermitted) { public void setCc(String[] cc) {
this.attachmentPermitted = attachmentPermitted;
}
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;
}
} }

11
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 class DestinationNames {
public static final String SEND_MAIL = "liferay/mail_manager/add_email"; 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_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_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 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 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; 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.exception.SystemException;
import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.json.JSONObject;
@ -14,64 +27,43 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.service.ServiceContext; 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 { public class MailManagerUtil {
private final static Log _log = LogFactoryUtil.getLog(MailManagerUtil.class); private final static Log _log = LogFactoryUtil.getLog(MailManagerUtil.class);
public static boolean sendMail(String messageId, String inReplyTo, String from, String[] to, String[] cc, public static boolean sendMail(String messageId, String inReplyTo, String from, String[] to, String[] cc,
String[] bcc, String subject, String body, boolean htmlFormat, boolean async, String[] bcc, String subject, String body, boolean htmlFormat, boolean async, boolean checkPermission,
boolean checkPermission, ServiceContext serviceContext) throws AddressException, SystemException { ServiceContext serviceContext) throws AddressException, SystemException {
InternetAddress fromInternetAddress = new InternetAddress(from, true); InternetAddress fromInternetAddress = new InternetAddress(from, true);
InternetAddress[] toInternetAddress = MailUtil.fromStringAddress(to); InternetAddress[] toInternetAddress = MailUtil.fromStringAddress(to);
InternetAddress[] ccInternetAddress = MailUtil.fromStringAddress(cc); InternetAddress[] ccInternetAddress = MailUtil.fromStringAddress(cc);
InternetAddress[] bccInternetAddress = MailUtil.fromStringAddress(bcc); InternetAddress[] bccInternetAddress = MailUtil.fromStringAddress(bcc);
MailMessage mailMessage = new MailMessage(fromInternetAddress, subject, body, htmlFormat); MailMessage mailMessage = new MailMessage(fromInternetAddress, subject, body, htmlFormat);
mailMessage.setTo(toInternetAddress); mailMessage.setTo(toInternetAddress);
mailMessage.setCC(ccInternetAddress); mailMessage.setCC(ccInternetAddress);
mailMessage.setBCC(bccInternetAddress); mailMessage.setBCC(bccInternetAddress);
Message message = new Message(); Message message = new Message();
message.put("serviceContext", serviceContext); message.put("serviceContext", serviceContext);
message.setPayload(JSONFactoryUtil.looseSerializeDeep(mailMessage)); message.setPayload(JSONFactoryUtil.looseSerializeDeep(mailMessage));
try { try {
if (async) { if (async) {
message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_ASYNC); message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_ASYNC);
MessageBusUtil.sendMessage(DestinationNames.SEND_MAIL, message); MessageBusUtil.sendMessage(DestinationNames.SEND_MAIL, message);
return true; return true;
} else { } else {
message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_SYNC); message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_SYNC);
return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage( return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage(DestinationNames.SEND_MAIL_SYNC,
DestinationNames.SEND_MAIL_SYNC, message, TimeUnit.SECONDS.toMillis(30))); message, TimeUnit.SECONDS.toMillis(30)));
} }
} catch (MessageBusException e) { } catch (MessageBusException e) {
throw new SystemException(e); throw new SystemException(e);
} }
} }
public static boolean sendMailByTemplateId(String className, long classPK, long templateId, public static boolean sendMailByTemplateId(String className, long classPK, long templateId,
JSONObject templateVariables, ServiceContext serviceContext) throws SystemException { JSONObject templateVariables, ServiceContext serviceContext) throws SystemException {
return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, null, null, null, return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, null, null, null,
templateVariables, Collections.<FileAttachment> emptyList(), true, true, serviceContext); templateVariables, Collections.<FileAttachment> emptyList(), true, true, serviceContext);
} }
@ -79,6 +71,7 @@ public class MailManagerUtil {
public static boolean sendMailByTemplateId(String className, long classPK, long templateId, public static boolean sendMailByTemplateId(String className, long classPK, long templateId,
JSONObject templateVariables, List<FileAttachment> fileAttachments, ServiceContext serviceContext) JSONObject templateVariables, List<FileAttachment> fileAttachments, ServiceContext serviceContext)
throws SystemException { throws SystemException {
return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, null, null, null, return sendMailByTemplate(className, classPK, templateId, StringPool.BLANK, null, null, null,
templateVariables, fileAttachments, true, true, serviceContext); templateVariables, fileAttachments, true, true, serviceContext);
} }
@ -86,12 +79,14 @@ public class MailManagerUtil {
public static boolean sendMailByTemplateId(String className, long classPK, long templateId, String[] to, public static boolean sendMailByTemplateId(String className, long classPK, long templateId, String[] to,
String[] cc, String[] ccn, JSONObject templateVariables, List<FileAttachment> fileAttachments, String[] cc, String[] ccn, JSONObject templateVariables, List<FileAttachment> fileAttachments,
ServiceContext serviceContext) throws SystemException { 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, public static boolean sendMailByTemplateName(String className, long classPK, String templateName,
JSONObject templateVariables, ServiceContext serviceContext) throws SystemException { JSONObject templateVariables, ServiceContext serviceContext) throws SystemException {
return sendMailByTemplate(className, classPK, 0l, templateName, null, null, null, templateVariables, return sendMailByTemplate(className, classPK, 0l, templateName, null, null, null, templateVariables,
Collections.<FileAttachment> emptyList(), true, true, serviceContext); Collections.<FileAttachment> emptyList(), true, true, serviceContext);
} }
@ -99,52 +94,45 @@ public class MailManagerUtil {
public static boolean sendMailByTemplateName(String className, long classPK, String templateName, public static boolean sendMailByTemplateName(String className, long classPK, String templateName,
JSONObject templateVariables, List<FileAttachment> fileAttachments, ServiceContext serviceContext) JSONObject templateVariables, List<FileAttachment> fileAttachments, ServiceContext serviceContext)
throws SystemException { throws SystemException {
return sendMailByTemplate(className, classPK, 0l, templateName, null, null, null, templateVariables, return sendMailByTemplate(className, classPK, 0l, templateName, null, null, null, templateVariables,
fileAttachments, true, true, serviceContext); fileAttachments, true, true, serviceContext);
} }
public static boolean sendMailByTemplatName(String className, long classPK, String templateName, public static boolean sendMailByTemplatName(String className, long classPK, String templateName, String[] to,
String[] to, String[] cc, String[] ccn, JSONObject templateVariables, String[] cc, String[] ccn, JSONObject templateVariables, List<FileAttachment> fileAttachments,
List<FileAttachment> fileAttachments, ServiceContext serviceContext) throws SystemException { ServiceContext serviceContext) throws SystemException {
return sendMailByTemplate(className, classPK, 0l, templateName, to, cc, ccn, templateVariables, return sendMailByTemplate(className, classPK, 0l, templateName, to, cc, ccn, templateVariables,
fileAttachments, true, true, serviceContext); fileAttachments, true, true, serviceContext);
} }
public static boolean sendMailByTemplate(String className, long classPK, long templateId, public static boolean sendMailByTemplate(String className, long classPK, long templateId, String templateName,
String templateName, String[] to, String[] cc, String[] ccn, JSONObject templateVariables, String[] to, String[] cc, String[] ccn, JSONObject templateVariables, List<FileAttachment> fileAttachments,
List<FileAttachment> fileAttachments, boolean async, boolean checkPermission, boolean async, boolean checkPermission, ServiceContext serviceContext) throws SystemException {
ServiceContext serviceContext) throws SystemException {
JSONObject templateParam = JSONFactoryUtil.createJSONObject(); JSONObject templateParam = JSONFactoryUtil.createJSONObject();
templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_VARIABLES_KEY, templateVariables); templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_VARIABLES_KEY, templateVariables);
if (to != null && to.length > 0) { if (to != null && to.length > 0) {
templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_TO_KEY, templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_TO_KEY, StringUtil.merge(to, StringPool.COMMA));
StringUtil.merge(to, StringPool.COMMA));
} }
if (cc != null && cc.length > 0) { if (cc != null && cc.length > 0) {
templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CC_KEY, templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CC_KEY, StringUtil.merge(cc, StringPool.COMMA));
StringUtil.merge(cc, StringPool.COMMA));
} }
if (ccn != null && ccn.length > 0) { if (ccn != null && ccn.length > 0) {
templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CCN_KEY, templateParam.put(MailManagerConstants.TEMPLATE_PARAMETER_CCN_KEY, StringUtil.merge(ccn, StringPool.COMMA));
StringUtil.merge(ccn, StringPool.COMMA));
} }
MailTemplateMessage mailTemplateMessage = new MailTemplateMessage(); MailTemplateMessage mailTemplateMessage = new MailTemplateMessage();
mailTemplateMessage.setTemplateId(templateId); mailTemplateMessage.setTemplateId(templateId);
mailTemplateMessage.setTemplateName(templateName); mailTemplateMessage.setTemplateName(templateName);
mailTemplateMessage.setTemplateParam(templateParam.toString()); mailTemplateMessage.setTemplateParam(templateParam.toString());
mailTemplateMessage.setFileAttachments(fileAttachments); mailTemplateMessage.setFileAttachments(fileAttachments);
Message message = new Message(); Message message = new Message();
message.put("serviceContext", serviceContext); message.put("serviceContext", serviceContext);
message.put("className", className); message.put("className", className);
message.put("classPK", classPK); message.put("classPK", classPK);
message.setPayload(JSONFactoryUtil.looseSerializeDeep(mailTemplateMessage)); message.setPayload(JSONFactoryUtil.looseSerializeDeep(mailTemplateMessage));
try { try {
if (async) { if (async) {
message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_ASYNC); message.put("mode", MailManagerConstants.MESSAGING_SEND_MODE_ASYNC);
MessageBusUtil.sendMessage(DestinationNames.SEND_TEMPLATE_MAIL, message); MessageBusUtil.sendMessage(DestinationNames.SEND_TEMPLATE_MAIL, message);
@ -154,15 +142,15 @@ public class MailManagerUtil {
return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage( return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage(
DestinationNames.SEND_TEMPLATE_MAIL_SYNC, message, TimeUnit.SECONDS.toMillis(30))); DestinationNames.SEND_TEMPLATE_MAIL_SYNC, message, TimeUnit.SECONDS.toMillis(30)));
} }
} catch (MessageBusException e) { } catch (MessageBusException e) {
throw new SystemException(e); throw new SystemException(e);
} }
} }
public static boolean addMailTemplate(String templateName, String from, String[] to, String[] cc, public static boolean addMailTemplate(String templateName, String from, String[] to, String[] cc, String[] ccn,
String[] ccn, String subject, String body, boolean attachmentPermitted, String subject, String body, boolean attachmentPermitted, ServiceContext serviceContext)
ServiceContext serviceContext) throws SystemException { throws SystemException {
return updateMailTemplate(0l, templateName, from, to, cc, ccn, subject, body, attachmentPermitted, return updateMailTemplate(0l, templateName, from, to, cc, ccn, subject, body, attachmentPermitted,
serviceContext); serviceContext);
} }
@ -181,17 +169,14 @@ public class MailManagerUtil {
templateMessage.setCcn(ccn); templateMessage.setCcn(ccn);
templateMessage.setSubject(subject); templateMessage.setSubject(subject);
templateMessage.setBody(body); templateMessage.setBody(body);
Message message = new Message(); Message message = new Message();
message.put("serviceContext", serviceContext); message.put("serviceContext", serviceContext);
message.setPayload(JSONFactoryUtil.looseSerializeDeep(templateMessage)); message.setPayload(JSONFactoryUtil.looseSerializeDeep(templateMessage));
try { try {
return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage( return GetterUtil.getBoolean(MessageBusUtil.sendSynchronousMessage(DestinationNames.EDIT_EMAIL_TEMPLATE,
DestinationNames.EDIT_EMAIL_TEMPLATE, message, TimeUnit.SECONDS.toMillis(30))); message, TimeUnit.SECONDS.toMillis(30)));
} catch (MessageBusException e) { } catch (MessageBusException e) {
throw new SystemException(e); throw new SystemException(e);
} }
} }
} }

137
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; 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.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.repository.model.FileEntry; 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.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
import java.io.File; public class FileAttachment extends com.liferay.mail.model.FileAttachment {
import java.io.InputStream;
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; public FileAttachment(File file, String fileName, String tipologia, long fileEntryId, byte[] bytes) {
private byte[] bytes;
private String tipologia;
private String fileName;
public FileAttachment() { super(file, fileName);
super(); this.setTipologia(tipologia);
} this.fileEntryId = fileEntryId;
this.setBytes(bytes);
}
public FileAttachment(File file, String fileName, String tipologia, long fileEntryId, byte[] bytes) { @Override
super(file, fileName); public String getFileName() {
this.setTipologia(tipologia);
this.fileEntryId = fileEntryId;
this.setBytes(bytes);
}
return fileName;
}
public String getFileName() { @Override
return fileName; public void setFileName(String fileName) {
}
public void setFileName(String fileName) { this.fileName = fileName;
this.fileName = fileName; super.setFileName(fileName);
super.setFileName(fileName); }
}
public long getFileEntryId() {
public long getFileEntryId() { return fileEntryId;
return fileEntryId; }
}
public void setFileEntryId(long fileEntryId) { public void setFileEntryId(long fileEntryId) {
this.fileEntryId = fileEntryId;
}
public byte[] getBytes() { this.fileEntryId = fileEntryId;
return bytes; }
}
public void setBytes(byte[] bytes) { public byte[] getBytes() {
this.bytes = bytes;
}
public String getTipologia() { return bytes;
return tipologia; }
}
public void setTipologia(String tipologia) { public void setBytes(byte[] bytes) {
this.tipologia = tipologia;
}
public File generateFile() { this.bytes = bytes;
}
File result = null; public String getTipologia() {
try { return tipologia;
}
if (Validator.isNotNull(super.getFile())) { public void setTipologia(String tipologia) {
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) { this.tipologia = tipologia;
_log.error("Error during getFile()", e); }
}
setFile(result);
return result;
}
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;
}
} }

51
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; package it.tref.liferay.portos.mailmanager.shared.util;
public class MailManagerConstants { public class MailManagerConstants {
public enum SendTemplateMode { public enum SendTemplateMode {
REVIEW("R"), EDIT("E");
private SendTemplateMode(String id) {
this.id = id;
}
private String id; REVIEW("R"), EDIT("E");
public static SendTemplateMode parse(String id) { private SendTemplateMode(String id) {
for (SendTemplateMode item : values()) { this.id = id;
if (item.id.equals(id)) { }
return item;
}
}
throw new IllegalArgumentException("Invalid SendTemplateMode value: " + id);
}
public String getId() { private String id;
return id;
}
}
public static final String TEMPLATE_PARAMETER_VARIABLES_KEY = "variables"; public static SendTemplateMode parse(String id) {
public static final String TEMPLATE_PARAMETER_TO_KEY = "to"; for (SendTemplateMode item : values()) {
public static final String TEMPLATE_PARAMETER_CC_KEY = "cc"; if (item.id.equals(id)) {
public static final String TEMPLATE_PARAMETER_CCN_KEY = "ccn"; return item;
}
}
throw new IllegalArgumentException("Invalid SendTemplateMode value: " + id);
}
public static final String MESSAGING_SEND_MODE_SYNC = "sync"; public String getId() {
public static final String MESSAGING_SEND_MODE_ASYNC = "async"; 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";
} }

214
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; 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 it.tref.liferay.portos.mailmanager.shared.model.FileAttachment;
import java.io.File; import java.io.File;
@ -14,119 +10,103 @@ import java.util.List;
import javax.mail.internet.AddressException; import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
public class MailUtil { import com.liferay.portal.kernel.upload.UploadPortletRequest;
import com.liferay.portal.kernel.util.ParamUtil;
public static String fromInternetAddress(InternetAddress internetAddress) { import com.liferay.portal.kernel.util.Validator;
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<FileAttachment> getFileAttachments(UploadPortletRequest uploadPortletRequest) {
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());
}
public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments(
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>();
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; 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<FileAttachment> getFileAttachments(UploadPortletRequest uploadPortletRequest) {
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());
}
public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments(
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>();
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;
}
} }

6
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 class PortletKeys extends com.liferay.portal.util.PortletKeys {
public static final String MAIL_MANAGER = "1_WAR_portosmailmanagerportlet"; public static final String MAIL_MANAGER = "1_WAR_portosmailmanagerportlet";
public static final String EMAIL_TEMPLATE = "2_WAR_portosmailmanagerportlet";
public static final String EMAIL_TEMPLATE = "2_WAR_portosmailmanagerportlet";
} }

16
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; package it.tref.liferay.portos.mailmanager.shared.util;
public class StringUtil extends com.liferay.portal.kernel.util.StringUtil { public class StringUtil extends com.liferay.portal.kernel.util.StringUtil {
public static String[] splitAndTrim(String s) { public static String[] splitAndTrim(String s) {
String[] array = StringUtil.split(s); String[] array = StringUtil.split(s);
for (int i = 0; i < array.length; i++) { for (int i = 0; i < array.length; i++) {
array[i] = StringUtil.trim(array[i]); array[i] = StringUtil.trim(array[i]);
} }
return array; return array;
} }
} }

15
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 contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> <%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="com.liferay.portal.kernel.util.MapUtil"%>
<%@page import="java.io.Serializable"%> <%@page import="java.io.Serializable"%>
<%@page import="java.util.ArrayList"%> <%@page import="java.util.ArrayList"%>
<%@page import="java.util.Map"%> <%@page import="java.util.Map"%>
@ -7,16 +8,26 @@
<%@include file="/html/portlet/workflow_instances/init.jsp"%> <%@include file="/html/portlet/workflow_instances/init.jsp"%>
<% <%
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters"); 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 emptyResultsMessage="label-portos-kaleo-there-are-no-results" >
<liferay-ui:search-container-results total="<%= parameters.size() %>" <liferay-ui:search-container-results total="<%= parameters.size() %>"
results="<%= new ArrayList<Entry<String, Serializable>>(parameters.entrySet()) %>" /> results="<%= new ArrayList<Entry<String, Serializable>>(parameters.entrySet()) %>" />
<liferay-ui:search-container-row className="java.util.Map.Entry" modelVar="entry"> <liferay-ui:search-container-row className="java.util.Map.Entry" modelVar="entry">
<liferay-ui:search-container-column-text name="label-portos-kaleo-key"> <liferay-ui:search-container-column-text name="label-portos-kaleo-key">
<%= LanguageUtil.get(pageContext, (String) entry.getKey()) %> <%= LanguageUtil.get(pageContext, (String) entry.getKey()) %>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="label-portos-kaleo-value"> <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-column-text>
</liferay-ui:search-container-row> </liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="false" /> <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"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- <%--
Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any
License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later later version.
version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 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 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details. details.
@ -37,7 +35,8 @@ details.
<tbody class="attivita-group__body"> <tbody class="attivita-group__body">
<% <%
@SuppressWarnings("unchecked") @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) { for (WorkflowLog workflowLog : workflowLogs) {
Role curRole = null; Role curRole = null;
User curUser = null; User curUser = null;
@ -75,19 +74,22 @@ details.
<c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'> <c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'>
<% <%
String esito = (String) request.getAttribute("registra-esito-value"); String esito = (String) request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs != null && historyWorkflowEsitiLogs.containsKey( if (Validator.isNull(esito) && Validator.isNotNull(historyWorkflowEsitiLogs)
workflowLog.getWorkflowLogId())) { && historyWorkflowEsitiLogs.containsKey(workflowLog
.getWorkflowLogId())) {
esito = historyWorkflowEsitiLogs.get(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" /> key="x-completed-the-task-y-z" />
</c:if> </c:if>
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'> <c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'>
<% <%
String assegna = (String) request.getAttribute("assegna-value"); 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" /> key="x-completed-the-task-y-z" />
</c:if> </c:if>
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName) <c:if test='<%= !"assegna".equalsIgnoreCase(transitionName)
@ -97,7 +99,8 @@ details.
</c:if> </c:if>
</c:otherwise> </c:otherwise>
</c:choose> </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="struts_action" value="/workflow_tasks/render_history_form_task" />
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog <portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog
.getWorkflowTaskId()) %>" /> .getWorkflowTaskId()) %>" />
@ -119,7 +122,8 @@ details.
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:choose> <c:choose>
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>"> <c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser
.getUserId()) %>">
<div> <div>
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" <liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>"
key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself"
@ -129,14 +133,16 @@ details.
<c:otherwise> <c:otherwise>
<% <%
if (curRole == null) { if (curRole == null) {
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK); String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(),
StringPool.BLANK);
%> %>
<div> <div>
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), <liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName),
actorName} %>" key="x-assigned-the-task-to-x" /> actorName} %>" key="x-assigned-the-task-to-x" />
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>"> <c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog <liferay-ui:message key="previous-assignee-was-x"
.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" /> arguments="<%= PortalUtil.getUserName(workflowLog
.getPreviousUserId(), StringPool.BLANK) %>" />
</c:if> </c:if>
</div> </div>
<% <%
@ -161,13 +167,17 @@ details.
if (Validator.isNotNull(transitionName)) { if (Validator.isNotNull(transitionName)) {
if ("registra-esito".equalsIgnoreCase(transitionName)) { if ("registra-esito".equalsIgnoreCase(transitionName)) {
String esito = (String) request.getAttribute("registra-esito-value"); String esito = (String) request.getAttribute("registra-esito-value");
if (historyWorkflowEsitiLogs != null && historyWorkflowEsitiLogs.containsKey(workflowLog if (Validator.isNull(esito) && Validator.isNotNull(historyWorkflowEsitiLogs)
.getWorkflowLogId())) { && historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId())) {
esito = historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); esito = historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId());
} }
out.print(" ( " + esito + " ) "); out.print(" (");
out.print(esito);
out.print(")");
} else if ("assegna".equalsIgnoreCase(transitionName)) { } 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()) %>'> && !"Assigned initial task.".equals(workflowLog.getComment()) %>'>
<div class="post-it-note"> <div class="post-it-note">
<div class="header-post-it"> <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"> <p class="header-post-it_name">
<c:if test="<%= Validator.isNotNull(curUser) %>"> <c:if test="<%= Validator.isNotNull(curUser) %>">
<%= curUser.getFullName() %> <%= 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 ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance
.getClassPK()); .getClassPK());
if (json.has("esito")) { 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")) { } else if (json.has("istruttore")) {
User istruttore = UserLocalServiceUtil.fetchUser(json.getLong("istruttore")); User istruttore = UserLocalServiceUtil.fetchUser(json.getLong("istruttore"));
if (Validator.isNotNull(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.JSONDeserializer;
import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.struts.BaseStrutsPortletAction; 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.ParamUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.kernel.workflow.WorkflowTask; import com.liferay.portal.kernel.workflow.WorkflowTask;
@ -54,7 +54,6 @@ public class RenderHistoryFormAction extends BaseStrutsPortletAction {
User istruttore = UserLocalServiceUtil.fetchUser(Long User istruttore = UserLocalServiceUtil.fetchUser(Long
.parseLong(parameters.get("istruttore").toString())); .parseLong(parameters.get("istruttore").toString()));
if (istruttore != null) { if (istruttore != null) {
parameters.remove("istruttore");
parameters.put("istruttore", istruttore.getFullName()); parameters.put("istruttore", istruttore.getFullName());
} }
} }
@ -64,14 +63,16 @@ public class RenderHistoryFormAction extends BaseStrutsPortletAction {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance
.getClassPK()); .getClassPK());
String esito = parameters.get("esito").toString(); 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())) { if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
tipoEsito = StatoPraticaConstants.getEsitoDeposito(esito); tipoEsito = StatoPraticaConstants.getEsitoDeposito(esito);
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { } else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
tipoEsito = StatoPraticaConstants.getEsitoAutorizzazione(esito); tipoEsito = StatoPraticaConstants.getEsitoAutorizzazione(esito);
} }
if (Validator.isNotNull(tipoEsito)) { if (Validator.isNotNull(tipoEsito)) {
parameters.remove("esito");
parameters.put("esito", tipoEsito); 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.namespace=Kaleo
build.number=55 build.number=57
build.date=1631181216604 build.date=1631548590240
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva