Sfoglia il codice sorgente

Merge branch 'paesaggistica' of 149.202.172.180:/home/ubuntu/sicilia/sismica into paesaggistica

master
Mattia Gosetto 4 anni fa
parent
commit
153c637bb1
  1. 142
      jasper/Modello_autorizzazione.jrxml
  2. 162
      jasper/Modello_integrazione.jrxml
  3. 10
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java
  4. 18
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  5. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java
  6. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java
  7. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java
  8. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java
  9. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java
  10. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java
  12. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java
  13. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java
  14. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java
  15. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java
  16. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java
  17. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java
  18. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java
  19. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IUVPersistenceImpl.java
  20. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/InfoFascicoloPersistenceImpl.java
  21. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  22. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java
  23. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java
  24. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java
  25. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java
  26. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java
  27. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java
  28. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java
  29. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java
  30. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  31. 2
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/ivy.xml
  32. BIN
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/lib/util-java.jar
  33. 1
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailAttachmentPersistenceImpl.java
  34. 1
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailPersistenceImpl.java
  35. 1
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplatePersistenceImpl.java
  36. 4
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/service.properties
  37. 1
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath
  38. 178
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp
  39. BIN
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portal-compat-shared.jar
  40. 698
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java
  41. 362
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/util/WorkflowUtil.java

142
jasper/Modello_autorizzazione.jrxml

@ -77,7 +77,7 @@ e dell'identità siciliana]]></text>
</band> </band>
</pageHeader> </pageHeader>
<detail> <detail>
<band height="135"> <band height="98">
<property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/>
<line> <line>
<reportElement x="0" y="22" width="555" height="1" uuid="9a12dff4-3c78-4e66-b1b6-13836bb2182b"/> <reportElement x="0" y="22" width="555" height="1" uuid="9a12dff4-3c78-4e66-b1b6-13836bb2182b"/>
@ -103,123 +103,120 @@ e dell'identità siciliana]]></text>
</textElement> </textElement>
<text><![CDATA[Data Avviso]]></text> <text><![CDATA[Data Avviso]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true">
<reportElement x="190" y="86" width="360" height="14" uuid="2808d28a-c206-4be3-ab0e-c3ef11061b0f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{ubicazione} != null ? $F{ubicazione} : ""]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="59" y="86" width="130" height="14" uuid="d2e7d2df-ed9d-4408-a657-1c45846d4011">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Ubicazione]]></text>
</staticText>
<staticText> <staticText>
<reportElement x="59" y="100" width="130" height="14" uuid="bacf1fde-94f1-48e3-bea5-a2e03e9ee190"> <reportElement x="59" y="84" width="130" height="14" uuid="2c29296d-097b-4faa-b4d2-7045cef06f6d">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Istanza n.]]></text> <text><![CDATA[Descrizione]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="190" y="100" width="360" height="14" uuid="0db22afc-1407-494f-8cd8-8697ba27de22"> <reportElement x="59" y="30" width="491" height="26" uuid="6cb9f8b8-8715-41ba-a4d4-6eabe2e85408">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{numeroProgetto}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{tipoAutorizzazione}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement x="59" y="114" width="130" height="14" uuid="d191f545-a8e8-4df1-9e97-e9e3747ee25f"> <reportElement x="183" y="63" width="195" 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"/>
</reportElement> </reportElement>
<textElement> <textElement textAlignment="Center">
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Protocollo]]></text> <text><![CDATA[AUTORIZZAZIONE]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="190" y="114" width="360" height="14" uuid="546c84ce-d718-4c30-a119-c3fb3d2c97c1"> <reportElement x="190" y="84" width="360" height="14" uuid="877d100e-606b-4eea-960e-f889359577e1">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{numeroProtocollo}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression>
</textField> </textField>
</band>
<band height="49">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText> <staticText>
<reportElement x="59" y="30" width="130" height="14" uuid="660aee93-961c-46fb-9714-b004de58b0a4"> <reportElement x="59" y="0" width="130" height="14" uuid="4f9a8fdf-ffa4-40e1-8243-a75cc00f8200">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Tipo di procedimento]]></text> <text><![CDATA[Ubicazione]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="59" y="72" width="130" height="14" uuid="2c29296d-097b-4faa-b4d2-7045cef06f6d"> <reportElement x="59" y="14" width="130" height="14" uuid="3f6043ac-d101-498c-b158-050a7240c012">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Descrizione]]></text> <text><![CDATA[Istanza n.]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="190" y="30" width="360" height="14" uuid="6cb9f8b8-8715-41ba-a4d4-6eabe2e85408"> <reportElement x="190" y="0" width="360" height="14" uuid="ac4495b9-44cc-4024-8f86-834e44616dff">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{tipoAutorizzazione}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{ubicazione} != null ? $F{ubicazione} : ""]]></textFieldExpression>
</textField> </textField>
<staticText> <textField isBlankWhenNull="true">
<reportElement x="183" y="50" width="195" height="14" uuid="8c9f5378-8e8d-4655-84b5-eccad49767d5"> <reportElement x="190" y="14" width="360" height="14" uuid="cb433646-ff21-4c58-97d7-0cf423a63b23">
<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"/>
</reportElement> </reportElement>
<textElement textAlignment="Center"> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<text><![CDATA[AUTORIZZAZIONE]]></text> <textFieldExpression><![CDATA[$F{numeroProgetto}]]></textFieldExpression>
</staticText> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="190" y="72" width="360" height="14" uuid="877d100e-606b-4eea-960e-f889359577e1"> <reportElement x="190" y="28" width="360" height="14" uuid="352ff7ee-5039-4b04-8b75-755272041573">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{numeroProtocollo}]]></textFieldExpression>
</textField> </textField>
<staticText>
<reportElement x="59" y="28" width="130" height="14" uuid="65bd3291-92e6-4348-9d4c-79304aa36c0e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement>
<text><![CDATA[Protocollo]]></text>
</staticText>
</band> </band>
<band height="259"> <band height="197">
<property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="385" y="40" width="168" height="14" uuid="b82a2f48-cea2-4ad2-8b76-c443de8a1fe1"> <reportElement key="" x="285" y="40" width="268" height="14" uuid="b82a2f48-cea2-4ad2-8b76-c443de8a1fe1">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
@ -227,9 +224,10 @@ e dell'identità siciliana]]></text>
<textFieldExpression><![CDATA[$F{comune}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{comune}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement key="" x="270" y="10" width="115" height="14" uuid="c0370045-7e64-47e0-9c03-d9259f814713"> <reportElement key="" x="170" y="10" width="115" height="14" uuid="c0370045-7e64-47e0-9c03-d9259f814713">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/> <font fontName="DejaVu Sans Bold" isBold="true"/>
@ -237,9 +235,10 @@ e dell'identità siciliana]]></text>
<text><![CDATA[Al Committente]]></text> <text><![CDATA[Al Committente]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="190" y="40" width="195" height="14" uuid="3f554448-d5dc-4075-b6ed-8e7bd10d7998"> <reportElement x="90" y="40" width="195" height="14" uuid="3f554448-d5dc-4075-b6ed-8e7bd10d7998">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
@ -247,9 +246,11 @@ e dell'identità siciliana]]></text>
<text><![CDATA[al Sindaco / S.U.E. del Comune di ]]></text> <text><![CDATA[al Sindaco / S.U.E. del Comune di ]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="385" y="10" width="168" height="14" uuid="f502c7f9-5ac4-43dd-bd91-cc46b395365e"> <reportElement key="" x="285" y="10" width="268" height="14" uuid="f502c7f9-5ac4-43dd-bd91-cc46b395365e">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
@ -257,9 +258,11 @@ e dell'identità siciliana]]></text>
<textFieldExpression><![CDATA[$F{alCommittente}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{alCommittente}]]></textFieldExpression>
</textField> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="385" y="24" width="168" height="14" uuid="03b513cf-794b-4cb8-92f4-2c81909cd825"> <reportElement key="" x="285" y="24" width="268" height="14" uuid="03b513cf-794b-4cb8-92f4-2c81909cd825">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
@ -267,9 +270,10 @@ e dell'identità siciliana]]></text>
<textFieldExpression><![CDATA[$F{alTitolareDigitale}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{alTitolareDigitale}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement key="" x="270" y="24" width="115" height="14" uuid="2a88b2fd-8fcf-4888-a1a1-82919fe0776a"> <reportElement key="" x="170" y="24" width="115" height="14" uuid="2a88b2fd-8fcf-4888-a1a1-82919fe0776a">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/> <font fontName="DejaVu Sans Bold" isBold="true"/>
@ -290,28 +294,31 @@ e dell'identità siciliana]]></text>
- visto il Piano Paesaggistico degli Ambiti 14 e 17 ricadenti nella provincia di Siracusa, approvato con D.A. n. 5040 del 20.10.2017 e pubblicato nella G.U.R.S. n. 12 del 16.03.2018; - visto il Piano Paesaggistico degli Ambiti 14 e 17 ricadenti nella provincia di Siracusa, approvato con D.A. n. 5040 del 20.10.2017 e pubblicato nella G.U.R.S. n. 12 del 16.03.2018;
esaminata la documentazione allegata all’istanza;]]></text> esaminata la documentazione allegata all’istanza;]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="3" y="140" width="548" height="109" uuid="0156b4c7-6c07-4e4a-b8f6-e8ef115f5b1e"> <reportElement x="3" y="140" width="548" height="50" uuid="0156b4c7-6c07-4e4a-b8f6-e8ef115f5b1e">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement textAlignment="Justified">
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{testo_del_documento}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{testo_del_documento}]]></textFieldExpression>
</textField> </textField>
</band> </band>
<band height="43"> <band height="63">
<componentElement> <componentElement>
<reportElement x="4" y="7" width="547" height="30" uuid="1a359757-dc45-45cb-bdf8-215e91905c39"> <reportElement x="3" y="33" width="548" height="30" uuid="1a359757-dc45-45cb-bdf8-215e91905c39">
<property name="com.jaspersoft.studio.unit.CONTENTS.height" value="px"/> <property name="com.jaspersoft.studio.unit.CONTENTS.height" value="px"/>
<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.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement> </reportElement>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"> <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="dataset1" uuid="c5c63b6d-60a1-4ab0-8a82-0ac6993df639"> <datasetRun subDataset="dataset1" uuid="c5c63b6d-60a1-4ab0-8a82-0ac6993df639">
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{allegati})]]></dataSourceExpression> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{allegati})]]></dataSourceExpression>
</datasetRun> </datasetRun>
<jr:listContents height="30" width="547"> <jr:listContents height="30" width="548">
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="20" y="0" width="519" height="14" uuid="6689d4e1-4145-4de3-9faa-7206aab84bdd"> <reportElement x="20" y="0" width="519" height="14" uuid="6689d4e1-4145-4de3-9faa-7206aab84bdd">
<property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/>
@ -341,6 +348,21 @@ esaminata la documentazione allegata all’istanza;]]></text>
</jr:listContents> </jr:listContents>
</jr:list> </jr:list>
</componentElement> </componentElement>
<staticText>
<reportElement x="3" y="0" width="548" height="26" uuid="b1072570-e715-4b6f-bda4-ae4723e17f5d">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.width" 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.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.firstLineIndent" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
<paragraph firstLineIndent="14" leftIndent="0"/>
</textElement>
<text><![CDATA[Viene di seguito riportato l’elenco dei documenti allegati all’istanza ed acquisiti dal sistema informatico “Paesaggistica” della Regione Siciliana.]]></text>
</staticText>
</band> </band>
<band height="250"> <band height="250">
<staticText> <staticText>
@ -349,7 +371,7 @@ esaminata la documentazione allegata all’istanza;]]></text>
<property name="com.jaspersoft.studio.unit.y" value="px"/> <property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement> </reportElement>
<textElement> <textElement textAlignment="Justified">
<font fontName="DejaVu Sans" size="11" isBold="false"/> <font fontName="DejaVu Sans" size="11" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[La presente autorizzazione: <text><![CDATA[La presente autorizzazione:

162
jasper/Modello_integrazione.jrxml

@ -77,18 +77,11 @@ e dell'identità siciliana]]></text>
</band> </band>
</pageHeader> </pageHeader>
<detail> <detail>
<band height="135"> <band height="98">
<property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/>
<line> <line>
<reportElement x="0" y="22" width="555" height="1" uuid="9a12dff4-3c78-4e66-b1b6-13836bb2182b"/> <reportElement x="0" y="22" width="555" height="1" uuid="9a12dff4-3c78-4e66-b1b6-13836bb2182b"/>
</line> </line>
<staticText>
<reportElement x="1" y="30" width="56" height="13" uuid="9f68e9a8-cba6-4f14-bfd8-00b5bb45ebcb"/>
<textElement>
<font fontName="DejaVu Sans" isBold="true"/>
</textElement>
<text><![CDATA[Oggetto:]]></text>
</staticText>
<textField> <textField>
<reportElement x="59" y="4" width="100" height="12" uuid="db3d08ab-28c7-4bb7-9758-f17e9a87c303"/> <reportElement x="59" y="4" width="100" height="12" uuid="db3d08ab-28c7-4bb7-9758-f17e9a87c303"/>
<textElement> <textElement>
@ -103,163 +96,185 @@ e dell'identità siciliana]]></text>
</textElement> </textElement>
<text><![CDATA[Data Avviso]]></text> <text><![CDATA[Data Avviso]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <staticText>
<reportElement x="190" y="86" width="360" height="14" uuid="2808d28a-c206-4be3-ab0e-c3ef11061b0f"> <reportElement x="1" y="30" width="56" height="13" uuid="fb9ba9bb-1c60-421b-8968-467e37f1b64f"/>
<textElement>
<font fontName="DejaVu Sans" isBold="true"/>
</textElement>
<text><![CDATA[Oggetto:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="59" y="30" width="491" height="26" uuid="b35caff9-2ceb-404d-b04a-d149b1e64763">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{ubicazione} != null ? $F{ubicazione} : ""]]></textFieldExpression> <textFieldExpression><![CDATA[$F{tipoAutorizzazione}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement x="59" y="86" width="130" height="14" uuid="d2e7d2df-ed9d-4408-a657-1c45846d4011"> <reportElement x="183" y="63" width="195" height="14" uuid="57ef5bab-9e4d-43a7-ac46-df5e71d9e83b">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement textAlignment="Center">
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Ubicazione]]></text> <text><![CDATA[RICHIESTA DI INTEGRAZIONI]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="59" y="100" width="130" height="14" uuid="bacf1fde-94f1-48e3-bea5-a2e03e9ee190"> <reportElement x="59" y="84" width="130" height="14" uuid="3290bed7-8581-4580-9ea4-c87cb13eeea7">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Istanza n.]]></text> <text><![CDATA[Descrizione]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="190" y="100" width="360" height="14" uuid="0db22afc-1407-494f-8cd8-8697ba27de22"> <reportElement x="190" y="84" width="360" height="14" uuid="011b6793-d08d-45fd-a975-565fc18ad5f0">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{numeroProgetto}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression>
</textField> </textField>
</band>
<band height="49">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<staticText> <staticText>
<reportElement x="59" y="114" width="130" height="14" uuid="d191f545-a8e8-4df1-9e97-e9e3747ee25f"> <reportElement x="59" y="0" width="130" height="14" uuid="bde321a9-85b1-401f-8d30-11e483891c7b">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Protocollo]]></text> <text><![CDATA[Ubicazione]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true">
<reportElement x="190" y="114" width="360" height="14" uuid="546c84ce-d718-4c30-a119-c3fb3d2c97c1">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroProtocollo}]]></textFieldExpression>
</textField>
<staticText> <staticText>
<reportElement x="59" y="30" width="130" height="14" uuid="660aee93-961c-46fb-9714-b004de58b0a4"> <reportElement x="59" y="14" width="130" height="14" uuid="860e2b2d-6fe9-4b4e-a71b-e06ed34aa591">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Tipo di procedimento]]></text> <text><![CDATA[Istanza n.]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="59" y="72" width="130" height="14" uuid="2c29296d-097b-4faa-b4d2-7045cef06f6d"> <reportElement x="59" y="28" width="130" height="14" uuid="9da79b62-abb0-40ff-8837-c48b37109201">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Descrizione]]></text> <text><![CDATA[Protocollo]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="190" y="30" width="360" height="14" uuid="6cb9f8b8-8715-41ba-a4d4-6eabe2e85408"> <reportElement x="190" y="0" width="360" height="14" uuid="98421d54-2be4-4b05-b622-33905be5442a">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{tipoAutorizzazione}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{ubicazione} != null ? $F{ubicazione} : ""]]></textFieldExpression>
</textField> </textField>
<staticText> <textField isBlankWhenNull="true">
<reportElement x="183" y="50" width="195" height="14" uuid="8c9f5378-8e8d-4655-84b5-eccad49767d5"> <reportElement x="190" y="14" width="360" height="14" uuid="7f0a27ee-f824-458d-acc3-df7f66df7cf3">
<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"/>
</reportElement> </reportElement>
<textElement textAlignment="Center"> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<text><![CDATA[RICHIESTA DI INTEGRAZIONI]]></text> <textFieldExpression><![CDATA[$F{numeroProgetto}]]></textFieldExpression>
</staticText> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="190" y="72" width="360" height="14" uuid="877d100e-606b-4eea-960e-f889359577e1"> <reportElement x="190" y="28" width="360" height="14" uuid="1cd97723-1517-4e92-a29c-7ca1218ec38c">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{lavoriDi}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{numeroProtocollo}]]></textFieldExpression>
</textField> </textField>
</band> </band>
<band height="252"> <band height="180">
<property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isBlankWhenNull="true"> <staticText>
<reportElement x="385" y="40" width="168" height="14" uuid="b82a2f48-cea2-4ad2-8b76-c443de8a1fe1"> <reportElement x="3" y="70" width="548" height="50" uuid="e4fec3f3-6651-4474-af2b-5072d857d07e">
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" isBold="false"/>
</textElement>
<text><![CDATA[Con riferimento all’istanza in oggetto,
esaminata la documentazione allegata,
quest’Ufficio richiede la seguente documentazione integrativa, indispensabile per la valutazione dell’istanza:]]></text>
</staticText>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="3" y="130" width="548" height="50" uuid="0156b4c7-6c07-4e4a-b8f6-e8ef115f5b1e">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{comune}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{testo_del_documento}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement key="" x="270" y="10" width="115" height="14" uuid="c0370045-7e64-47e0-9c03-d9259f814713"> <reportElement key="" x="170" y="10" width="115" height="14" uuid="c5e8dd11-e156-44fc-a2e3-40f54e862afe">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/> <font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement> </textElement>
<text><![CDATA[Al Committente]]></text> <text><![CDATA[Al Committente]]></text>
</staticText> </staticText>
<staticText> <textField isBlankWhenNull="true">
<reportElement x="190" y="40" width="195" height="14" uuid="3f554448-d5dc-4075-b6ed-8e7bd10d7998"> <reportElement key="" x="285" y="10" width="268" height="14" uuid="0a142b8d-8d77-4446-8295-2e5e41d1de7a">
<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> <textElement>
<font fontName="DejaVu Sans Bold" isBold="false"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<text><![CDATA[al Sindaco / S.U.E. del Comune di ]]></text> <textFieldExpression><![CDATA[$F{alCommittente}]]></textFieldExpression>
</staticText> </textField>
<textField isBlankWhenNull="true"> <staticText>
<reportElement x="385" y="10" width="168" height="14" uuid="f502c7f9-5ac4-43dd-bd91-cc46b395365e"> <reportElement key="" x="170" y="24" width="115" height="14" uuid="95ca6f04-450f-448e-b8cc-15f6c2744b14">
<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"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{alCommittente}]]></textFieldExpression> <text><![CDATA[c/o il suo delegato]]></text>
</textField> </staticText>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="385" y="24" width="168" height="14" uuid="03b513cf-794b-4cb8-92f4-2c81909cd825"> <reportElement key="" x="285" y="24" width="268" height="14" uuid="e564fbf9-8b85-4f41-8ace-5ebbb47996a5">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
@ -267,38 +282,27 @@ e dell'identità siciliana]]></text>
<textFieldExpression><![CDATA[$F{alTitolareDigitale}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{alTitolareDigitale}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement key="" x="270" y="24" width="115" height="14" uuid="2a88b2fd-8fcf-4888-a1a1-82919fe0776a"> <reportElement x="90" y="40" width="195" height="14" uuid="cd0e8394-a66e-438d-a6a5-efe529bedef6">
<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"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans Bold" isBold="true"/>
</textElement>
<text><![CDATA[c/o il suo delegato]]></text>
</staticText>
<staticText>
<reportElement x="3" y="70" width="548" height="50" uuid="e4fec3f3-6651-4474-af2b-5072d857d07e">
<property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement> </reportElement>
<textElement> <textElement>
<font fontName="DejaVu Sans" isBold="false"/> <font fontName="DejaVu Sans Bold" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Con riferimento all’istanza in oggetto, <text><![CDATA[al Sindaco / S.U.E. del Comune di ]]></text>
esaminata la documentazione allegata,
quest’Ufficio richiede la seguente documentazione integrativa, indispensabile per la valutazione dell’istanza:]]></text>
</staticText> </staticText>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="3" y="130" width="548" height="109" uuid="0156b4c7-6c07-4e4a-b8f6-e8ef115f5b1e"> <reportElement key="" x="285" y="40" width="268" height="14" uuid="48b4f26a-ca49-4919-995f-72881a9614c6">
<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> <textElement>
<font fontName="DejaVu Sans"/> <font fontName="DejaVu Sans"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{testo_del_documento}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{comune}]]></textFieldExpression>
</textField> </textField>
</band> </band>
<band height="60"> <band height="60">

10
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java

@ -41,7 +41,6 @@ import java.util.Calendar;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.language.LanguageUtil;
@ -176,6 +175,14 @@ public class ReportAvvisoBeanBuilder {
DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO)) { DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO)) {
docPraticas = DocPraticaLocalServiceUtil.findByIntPratica_Tipologia(intPraticaId, docPraticas = DocPraticaLocalServiceUtil.findByIntPratica_Tipologia(intPraticaId,
DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO, -1, -1); DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO, -1, -1);
} else if (avviso.getTipoDocumento().equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)
&& (avviso.getControlloPraticaId() != 0)) {
docPraticas = new ArrayList<>();
for (DocPratica doc : DocPraticaLocalServiceUtil.findByIntPratica(intPraticaId)) {
if ((WorkflowConstants.STATUS_APPROVED == doc.getStatus()) && !doc.getRimosso()) {
docPraticas.add(doc);
}
}
} else { } else {
docPraticas = DocPraticaLocalServiceUtil.findByClassPk(avviso.getClassPk()); docPraticas = DocPraticaLocalServiceUtil.findByClassPk(avviso.getClassPk());
} }
@ -328,6 +335,7 @@ public class ReportAvvisoBeanBuilder {
if (Validator.isNull(parameters.get("motivazioni"))) if (Validator.isNull(parameters.get("motivazioni")))
parameters.put("motivazioni", parameters.get("testo_del_documento")); parameters.put("motivazioni", parameters.get("testo_del_documento"));
} }
return bean; return bean;
} }
} }

18
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java

@ -36,10 +36,14 @@ import it.tref.liferay.portos.kaleo.model.FormLog;
import it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil; import it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TreeMap;
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
@ -502,11 +506,17 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole( List<UserGroupRole> userGroupRoles = UserGroupRoleLocalServiceUtil.getUserGroupRolesByGroupAndRole(
controlloPratica.getGroupId(), role.getRoleId()); controlloPratica.getGroupId(), role.getRoleId());
Map<String, JSONObject> sorted = new TreeMap<>();
for (UserGroupRole userGroupRole : userGroupRoles) { for (UserGroupRole userGroupRole : userGroupRoles) {
User user = userGroupRole.getUser();
JSONObject istruttore = JSONFactoryUtil.createJSONObject(); JSONObject istruttore = JSONFactoryUtil.createJSONObject();
istruttore.put("label", userGroupRole.getUser().getFullName()); istruttore.put("label", user.getFullName());
istruttore.put("value", userGroupRole.getUserId()); istruttore.put("value", user.getUserId());
istruttore.put("default", false); istruttore.put("default", false);
sorted.put((user.getLastName() + user.getFirstName()).toUpperCase(), istruttore);
}
for (JSONObject istruttore : sorted.values()) {
jsonArray.put(istruttore); jsonArray.put(istruttore);
} }
@ -547,12 +557,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { } else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
JSONObject etichette = JSONFactoryUtil.createJSONObject(); JSONObject etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", "Autorizzata"); etichette.put("label", "Autorizzata");
etichette.put("value", "AU"); etichette.put("value", "CO");
etichette.put("default", false); etichette.put("default", false);
jsonArray.put(etichette); jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject(); etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", "Non autorizzata"); etichette.put("label", "Non autorizzata");
etichette.put("value", "AN"); etichette.put("value", "NC");
etichette.put("default", false); etichette.put("default", false);
jsonArray.put(etichette); jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject(); etichette = JSONFactoryUtil.createJSONObject();

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchAllegatoManualeException;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl;
import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AllegatoManualePersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchAsseverazioneException;
import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl; import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl;
import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl; import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AsseverazionePersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchAvvisoException;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.impl.AvvisoImpl; import it.tref.liferay.portos.bo.model.impl.AvvisoImpl;
import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl; import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AvvisoPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchCollaudoException;
import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.impl.CollaudoImpl; import it.tref.liferay.portos.bo.model.impl.CollaudoImpl;
import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl; import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.CollaudoPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchComuneException;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.impl.ComuneImpl; import it.tref.liferay.portos.bo.model.impl.ComuneImpl;
import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl; import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ComunePersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchComunicazioneException;
import it.tref.liferay.portos.bo.model.Comunicazione; import it.tref.liferay.portos.bo.model.Comunicazione;
import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl; import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl;
import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl; import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ComunicazionePersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchConfigurazioneException;
import it.tref.liferay.portos.bo.model.Configurazione; import it.tref.liferay.portos.bo.model.Configurazione;
import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl;
import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ConfigurazionePersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchControlloPraticaException;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ControlloPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchDelegaException;
import it.tref.liferay.portos.bo.model.Delega; import it.tref.liferay.portos.bo.model.Delega;
import it.tref.liferay.portos.bo.model.impl.DelegaImpl; import it.tref.liferay.portos.bo.model.impl.DelegaImpl;
import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl; import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DelegaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchDettPraticaException;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DettPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchDocAggiuntivaException;
import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocAggiuntiva;
import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl;
import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DocAggiuntivaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchDocPraticaException;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchFineLavoriException;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl; import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl;
import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl; import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl;
import it.tref.liferay.portos.bo.service.persistence.FineLavoriPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.NoSuchHistoryWorkflowActionException;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl;
import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl;
import it.tref.liferay.portos.bo.service.persistence.HistoryWorkflowActionPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchIUVException;
import it.tref.liferay.portos.bo.model.IUV; import it.tref.liferay.portos.bo.model.IUV;
import it.tref.liferay.portos.bo.model.impl.IUVImpl; import it.tref.liferay.portos.bo.model.impl.IUVImpl;
import it.tref.liferay.portos.bo.model.impl.IUVModelImpl; import it.tref.liferay.portos.bo.model.impl.IUVModelImpl;
import it.tref.liferay.portos.bo.service.persistence.IUVPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchInfoFascicoloException;
import it.tref.liferay.portos.bo.model.InfoFascicolo; import it.tref.liferay.portos.bo.model.InfoFascicolo;
import it.tref.liferay.portos.bo.model.impl.InfoFascicoloImpl; import it.tref.liferay.portos.bo.model.impl.InfoFascicoloImpl;
import it.tref.liferay.portos.bo.model.impl.InfoFascicoloModelImpl; import it.tref.liferay.portos.bo.model.impl.InfoFascicoloModelImpl;
import it.tref.liferay.portos.bo.service.persistence.InfoFascicoloPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -48,6 +48,7 @@ import it.tref.liferay.portos.bo.NoSuchIntPraticaException;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl; import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchPagamentoException;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.impl.PagamentoImpl; import it.tref.liferay.portos.bo.model.impl.PagamentoImpl;
import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl; import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.PagamentoPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchParereGeologoException;
import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl; import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl;
import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl; import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ParereGeologoPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -43,6 +43,7 @@ import it.tref.liferay.portos.bo.NoSuchProvinciaException;
import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.model.Provincia;
import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl; import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl;
import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl; import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ProvinciaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchSoggettoException;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.impl.SoggettoImpl; import it.tref.liferay.portos.bo.model.impl.SoggettoImpl;
import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl; import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.SoggettoPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchSorteggioException;
import it.tref.liferay.portos.bo.model.Sorteggio; import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.model.impl.SorteggioImpl; import it.tref.liferay.portos.bo.model.impl.SorteggioImpl;
import it.tref.liferay.portos.bo.model.impl.SorteggioModelImpl; import it.tref.liferay.portos.bo.model.impl.SorteggioModelImpl;
import it.tref.liferay.portos.bo.service.persistence.SorteggioPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.NoSuchStoricoSoggettoPraticaException;
import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica; import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica;
import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.StoricoSoggettoPraticaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchTempisticaException;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.TempisticaImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaImpl;
import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.TempisticaPersistence;
import java.io.Serializable; import java.io.Serializable;

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

@ -44,6 +44,7 @@ import it.tref.liferay.portos.bo.NoSuchTerritorioException;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.model.impl.TerritorioImpl; import it.tref.liferay.portos.bo.model.impl.TerritorioImpl;
import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl; import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl;
import it.tref.liferay.portos.bo.service.persistence.TerritorioPersistence;
import java.io.Serializable; import java.io.Serializable;

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=2758 build.number=2761
build.date=1606735392740 build.date=1606987208464
build.auto.upgrade=true build.auto.upgrade=true
## ##

2
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/ivy.xml

@ -7,7 +7,7 @@
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
> >
<info module="portos-calendar-appointments-portlet" organisation="com.liferay"> <info module="portos-calendar-appointments-portlet" organisation="com.liferay">
<extends extendType="configurations,description,info" location="${sdk.dir}/ivy.xml" module="com.liferay.sdk" organisation="com.liferay" revision="latest.integration" /> <extends extendType="configurations,description,info" location="../../ivy.xml" module="com.liferay.sdk" organisation="com.liferay" revision="latest.integration" />
</info> </info>
<dependencies defaultconf="default"> <dependencies defaultconf="default">

BIN
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

1
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailAttachmentPersistenceImpl.java

@ -42,6 +42,7 @@ import it.tref.liferay.portos.mailmanager.NoSuchEmailAttachmentException;
import it.tref.liferay.portos.mailmanager.model.EmailAttachment; import it.tref.liferay.portos.mailmanager.model.EmailAttachment;
import it.tref.liferay.portos.mailmanager.model.impl.EmailAttachmentImpl; import it.tref.liferay.portos.mailmanager.model.impl.EmailAttachmentImpl;
import it.tref.liferay.portos.mailmanager.model.impl.EmailAttachmentModelImpl; import it.tref.liferay.portos.mailmanager.model.impl.EmailAttachmentModelImpl;
import it.tref.liferay.portos.mailmanager.service.persistence.EmailAttachmentPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailPersistenceImpl.java

@ -44,6 +44,7 @@ import it.tref.liferay.portos.mailmanager.NoSuchEmailException;
import it.tref.liferay.portos.mailmanager.model.Email; import it.tref.liferay.portos.mailmanager.model.Email;
import it.tref.liferay.portos.mailmanager.model.impl.EmailImpl; import it.tref.liferay.portos.mailmanager.model.impl.EmailImpl;
import it.tref.liferay.portos.mailmanager.model.impl.EmailModelImpl; import it.tref.liferay.portos.mailmanager.model.impl.EmailModelImpl;
import it.tref.liferay.portos.mailmanager.service.persistence.EmailPersistence;
import java.io.Serializable; import java.io.Serializable;

1
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/persistence/EmailTemplatePersistenceImpl.java

@ -46,6 +46,7 @@ import it.tref.liferay.portos.mailmanager.NoSuchEmailTemplateException;
import it.tref.liferay.portos.mailmanager.model.EmailTemplate; import it.tref.liferay.portos.mailmanager.model.EmailTemplate;
import it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateImpl; import it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateImpl;
import it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateModelImpl; import it.tref.liferay.portos.mailmanager.model.impl.EmailTemplateModelImpl;
import it.tref.liferay.portos.mailmanager.service.persistence.EmailTemplatePersistence;
import java.io.Serializable; import java.io.Serializable;

4
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_Mail build.namespace=portos_Mail
build.number=80 build.number=81
build.date=1606482952219 build.date=1606914570374
build.auto.upgrade=true build.auto.upgrade=true
## ##

1
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath

@ -23,6 +23,5 @@
<classpathentry kind="lib" path="docroot/WEB-INF/lib/util-java.jar"/> <classpathentry kind="lib" path="docroot/WEB-INF/lib/util-java.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-bo-portlet-service.jar"/> <classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-bo-portlet-service.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-kaleo-shared.jar"/> <classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-kaleo-shared.jar"/>
<classpathentry kind="lib" path="docroot/WEB-INF/lib/htmlparser.jar"/>
<classpathentry kind="output" path="docroot/WEB-INF/classes"/> <classpathentry kind="output" path="docroot/WEB-INF/classes"/>
</classpath> </classpath>

178
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp

@ -1,3 +1,11 @@
<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@page import="java.io.Serializable"%>
<%@page import="java.nio.file.Files"%>
<%@page import="java.nio.file.Path"%>
<%@page import="java.io.File"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="java.nio.file.Paths"%>
<%@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.util.MapUtil"%> <%@page import="com.liferay.portal.kernel.util.MapUtil"%>
<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> <%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%>
@ -15,114 +23,146 @@
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> <%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%>
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"%> <%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"%>
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> <%@ include file="/html/portlet/workflow_tasks/init.jsp"%>
<% <%
String classPkForCarichiLavoro = (String) renderRequest.getAttribute("classPkForCarichiLavoro"); String classPkForCarichiLavoro = (String) renderRequest.getAttribute("classPkForCarichiLavoro");
%> %>
<c:if test="<%= Validator.isNotNull(classPkForCarichiLavoro) %>"> <c:if test="<%=Validator.isNotNull(classPkForCarichiLavoro)%>">
<div class="container_header_text_attivita"> <div class="container_header_text_attivita">
<liferay-portlet:renderURL portletName='9_WAR_portosboportlet' windowState="<%=LiferayWindowState.POP_UP.toString() %>" var="carichiDiLavoro"> <liferay-portlet:renderURL portletName='9_WAR_portosboportlet'
<liferay-portlet:param name="controlloPraticaId" value='<%= (String)renderRequest.getAttribute("classPkForCarichiLavoro") %>'/> windowState="<%=LiferayWindowState.POP_UP.toString()%>" var="carichiDiLavoro">
<liferay-portlet:param name="controlloPraticaId"
value='<%=(String) renderRequest.getAttribute("classPkForCarichiLavoro")%>' />
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<liferay-ui:icon url="<%=carichiDiLavoro %>" useDialog="true" message="visualizza-carichi-di-lavoro" linkCssClass="btn btn-rounded" iconCssClass="icon-bar-chart"/> <liferay-ui:icon url="<%=carichiDiLavoro%>" useDialog="true" message="visualizza-carichi-di-lavoro"
linkCssClass="btn btn-rounded" iconCssClass="icon-bar-chart" />
<span>Visualizza Carichi di Lavoro Istruttori</span> <span>Visualizza Carichi di Lavoro Istruttori</span>
</div> </div>
</c:if> </c:if>
<% <%
long ddmTemplateId = (Long) renderRequest.getAttribute("ddmTemplateId");
long ddmStructureId = (Long) renderRequest.getAttribute("ddmStructureId");
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest
.getAttribute("parameters");
String prefix = (String) renderRequest.getAttribute("prefix");
String suffix = (String) renderRequest.getAttribute("suffix");
Map<String, List<Map<String, Serializable>>> fieldNameOptions = (Map<String, List<Map<String, Serializable>>>) renderRequest
.getAttribute("fieldNameOptions");
long ddmTemplateId = (Long) renderRequest.getAttribute("ddmTemplateId"); String redirect = StringPool.BLANK;
long ddmStructureId = (Long) renderRequest.getAttribute("ddmStructureId");
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters");
String prefix = (String) renderRequest.getAttribute("prefix");
String suffix = (String) renderRequest.getAttribute("suffix");
Map<String, List<Map<String, Serializable>>> fieldNameOptions
= (Map<String, List<Map<String, Serializable>>>) renderRequest.getAttribute("fieldNameOptions");
String redirect = StringPool.BLANK; DDLRecord record = null;
DDLRecord record = null; long recordId = BeanParamUtil.getLong(record, request, "recordId");
long recordId = BeanParamUtil.getLong(record, request, "recordId"); DDLRecordVersion recordVersion = null;
DDLRecordVersion recordVersion = null; if (record != null) {
recordVersion = record.getLatestRecordVersion();
if (record != null) { }
recordVersion = record.getLatestRecordVersion();
}
DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getDDMStructure(ddmStructureId); DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getDDMStructure(ddmStructureId);
Fields fields = null; Fields fields = null;
if (recordVersion != null) { if (recordVersion != null) {
fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId()); fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId());
} }
Locale[] availableLocales = new Locale[0]; Locale[] availableLocales = new Locale[0];
if (fields != null) { if (fields != null) {
Set<Locale> availableLocalesSet = fields.getAvailableLocales(); Set<Locale> availableLocalesSet = fields.getAvailableLocales();
availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]); availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]);
} }
String defaultLanguageId = StringPool.BLANK; String defaultLanguageId = StringPool.BLANK;
if (Validator.isNull(defaultLanguageId)) { if (Validator.isNull(defaultLanguageId)) {
defaultLanguageId = themeDisplay.getLanguageId(); defaultLanguageId = themeDisplay.getLanguageId();
if (fields != null) { if (fields != null) {
defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale()); defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale());
}
} }
}
String languageId = defaultLanguageId; String languageId = defaultLanguageId;
boolean translating = false; boolean translating = false;
if (!defaultLanguageId.equals(languageId)) { if (!defaultLanguageId.equals(languageId)) {
translating = true; translating = true;
} }
if (translating) { if (translating) {
redirect = currentURL; redirect = currentURL;
} }
long classNameId = PortalUtil.getClassNameId(DDMStructure.class); long classNameId = PortalUtil.getClassNameId(DDMStructure.class);
long classPK = ddmStructure.getStructureId(); long classPK = ddmStructure.getStructureId();
if (ddmTemplateId > 0) { if (ddmTemplateId > 0) {
classNameId = PortalUtil.getClassNameId(DDMTemplate.class); classNameId = PortalUtil.getClassNameId(DDMTemplate.class);
classPK = ddmTemplateId; classPK = ddmTemplateId;
} }
%> %>
<liferay-util:buffer var="html"> <liferay-util:buffer var="html">
<liferay-ddm:html <liferay-ddm:html classNameId="<%=classNameId%>" classPK="<%=classPK%>" fields="<%=fields%>"
classNameId="<%= classNameId %>" repeatable="<%=translating ? false : true%>" requestedLocale="<%=LocaleUtil.fromLanguageId(languageId)%>" />
classPK="<%= classPK %>"
fields="<%= fields %>"
repeatable="<%= translating ? false : true %>"
requestedLocale="<%= LocaleUtil.fromLanguageId(languageId) %>"
/>
</liferay-util:buffer> </liferay-util:buffer>
<% <%
String esito = parameters.containsKey("esito") ? parameters.get("esito").toString()
: StringPool.BLANK;
String istruttore = parameters.containsKey("istruttore") ? parameters.get("istruttore")
.toString() : StringPool.BLANK;
String ns = renderResponse.getNamespace();
for (Entry<String, List<Map<String, Serializable>>> entry : fieldNameOptions.entrySet()) { for (Entry<String, List<Map<String, Serializable>>> entry : fieldNameOptions.entrySet()) {
String base = "(?s)\\sname=\"" + renderResponse.getNamespace() + entry.getKey() String name = entry.getKey();
+ "_INSTANCE_[^\"]*\"(.*?)value=\"Value"; String regexSelect = "(?s)(.*?)(<select.*?\\sname=\"" + ns + name
int counter = 1; + "_INSTANCE_[^\"]+.*?</select>)(.*)";
for (Map<String, Serializable> option : entry.getValue()) { if (html.matches(regexSelect)) {
String regex = base + counter + "\"(.*?)Label" + counter; String match = html.replaceAll(regexSelect, "$2");
String replace = " name=\"" + entry.getKey() + "\"$1value=\"" + option.get("value") + "\""; String select = match.replaceAll("(?s)([?>]*>).*", "$1\n");
if (MapUtil.getBoolean(option, "default")) { for (Map<String, Serializable> option : entry.getValue()) {
replace += " checked=\"checked\""; String value = option.get("value").toString();
select += "<option value=\"" + HtmlUtil.escape(value) + "\"";
if ((name.equals("istruttore") && value.equalsIgnoreCase(istruttore))
|| MapUtil.getBoolean(option, "default")) {
select += " selected=\"selected\"";
}
select += ">" + HtmlUtil.escape(option.get("label").toString()) + "</option>\n";
}
html = html.replaceAll(regexSelect, "$1" + select + "</select>\n" + "$3");
} else {
String regexInput = "(?s)<input(.*?)\\sname=\"" + ns + name
+ "_INSTANCE_[^\"]+\"(.*?)value=\"[^\"]*([^>]+).*?</label>";
for (Map<String, Serializable> option : entry.getValue()) {
String value = option.get("value").toString();
String replaceInput = "<input$1 name=\"" + prefix + name + suffix + "\"$2value=\""
+ HtmlUtil.escape(value);
boolean checked = MapUtil.getBoolean(option, "default");
if ((name.equals("esito") && value.equalsIgnoreCase(esito))
|| MapUtil.getBoolean(option, "default")) {
replaceInput += "\" checked=\"checked";
}
replaceInput += "$3>" + HtmlUtil.escape(option.get("label").toString()) + "</label>";
html = html.replaceFirst(regexInput, replaceInput);
} }
replace += "$2" + option.get("label");
html = html.replaceAll(regex, replace);
counter++;
} }
} }
html = html.replaceAll("name=\"" + ns + "(.*?)_INSTANCE_[^\"]+\"", "name=\"" + prefix + "$1"
+ suffix + "\"");
html = html.replace("name=\"" + ns + "_fieldsDisplay\"", "name=\"_fieldsDisplay\"");
for (Entry<String, Serializable> p : parameters.entrySet()) {
html = html.replaceAll("(<textarea\\s.*?\\sname=\"" + prefix + p.getKey() + suffix
+ "\"[^>]*>[^<]*)</textarea>", "$1" + HtmlUtil.escape(p.getValue().toString())
+ "</textarea>");
}
%> %>
<%= html %> <%=html%>

BIN
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portal-compat-shared.jar

File binario non mostrato.

698
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/hook/struts/EditWorkflowTaskAction.java

@ -83,443 +83,458 @@ import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServ
public class EditWorkflowTaskAction extends BaseStrutsPortletAction { public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
private final static Log _log = LogFactoryUtil.getLog(EditWorkflowTaskAction.class); private final static Log _log = LogFactoryUtil.getLog(EditWorkflowTaskAction.class);
@Override @Override
public void processAction(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig, public void processAction(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig,
ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
String cmd = ParamUtil.getString(actionRequest, Constants.CMD); String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
if (cmd.equals(Constants.SAVE) || cmd.equals(Constants.RESET)) { if (cmd.equals(Constants.SAVE) || cmd.equals(Constants.RESET)) {
try {
if (cmd.equals(Constants.SAVE)) {
completeTask(actionRequest);
} else if (cmd.equals(Constants.RESET)) {
relaseTask(actionRequest);
}
String redirect = ParamUtil.getString(actionRequest, "redirect");
String closeRedirect = ParamUtil.getString(actionRequest, "closeRedirect");
if (Validator.isNotNull(closeRedirect)) {
redirect = HttpUtil.setParameter(redirect, "closeRedirect", closeRedirect);
SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest)
+ SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect);
}
sendRedirect(actionRequest, actionResponse, redirect);
} catch (Exception e) {
if (e instanceof WorkflowTaskDueDateException) {
SessionErrors.add(actionRequest, e.getClass());
} else if (e instanceof PrincipalException || e instanceof WorkflowException) {
SessionErrors.add(actionRequest, e.getClass());
setForward(actionRequest, "portlet.workflow_tasks.error");
} else {
throw e;
}
}
} else {
originalStrutsPortletAction.processAction(originalStrutsPortletAction, portletConfig, actionRequest,
actionResponse);
}
}
protected void assignTask(ActionRequest actionRequest) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
long assigneeUserId = ParamUtil.getLong(actionRequest, "assigneeUserId");
String comment = ParamUtil.getString(actionRequest, "comment");
WorkflowTaskManagerUtil.assignWorkflowTaskToUser(themeDisplay.getCompanyId(), themeDisplay.getUserId(),
workflowTaskId, assigneeUserId, comment, null, null);
}
try {
if (cmd.equals(Constants.SAVE)) {
completeTask(actionRequest);
} else if (cmd.equals(Constants.RESET)) {
relaseTask(actionRequest);
}
String redirect = ParamUtil.getString(actionRequest, "redirect");
String closeRedirect = ParamUtil.getString(actionRequest, "closeRedirect");
if (Validator.isNotNull(closeRedirect)) {
redirect = HttpUtil.setParameter(redirect, "closeRedirect", closeRedirect);
protected void completeTask(ActionRequest actionRequest) throws Exception { SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest)
+ SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect);
}
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); sendRedirect(actionRequest, actionResponse, redirect);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId"); } catch (Exception e) {
if (e instanceof WorkflowTaskDueDateException) {
SessionErrors.add(actionRequest, e.getClass());
} else if (e instanceof PrincipalException || e instanceof WorkflowException) {
String transitionName = ParamUtil.getString(actionRequest, "transitionName"); SessionErrors.add(actionRequest, e.getClass());
String comment = ParamUtil.getString(actionRequest, "comment");
//ADT: bug mancata problema assegnazione WF setForward(actionRequest, "portlet.workflow_tasks.error");
checkPresenzaIstruttore(transitionName,workflowTaskId); } else {
throw e;
}
}
} else {
originalStrutsPortletAction.processAction(originalStrutsPortletAction, portletConfig,
actionRequest, actionResponse);
}
}
//ADT: BUG ANOMALIA REGISTRA ESITO protected void assignTask(ActionRequest actionRequest) throws Exception {
if (transitionName.equalsIgnoreCase("registra-esito")) {
HttpServletRequest httpServletRequest =PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(actionRequest));
String esito=httpServletRequest.getParameter("kaleo--esito--")!=null?httpServletRequest.getParameter("kaleo--esito--").trim():"";
String testoDocumento=httpServletRequest.getParameter("kaleo--testo_del_documento--")!=null?httpServletRequest.getParameter("kaleo--testo_del_documento--"):"";
List<String> valoriAmmessi=Arrays.asList("AL", "NC", "CO" ,"IN");
if (!valoriAmmessi.contains(esito) || (esito.equalsIgnoreCase("IN")&& testoDocumento.isEmpty())){
_log.error("controllo validazione completamento task registra-esito = "+workflowTaskId+" non riuscito - esito non valorizzato o esito IN con testo del documento vuoto");
throw new PortalException("controllo validazione completamento task registra-esito non riuscito");
}
}else if (transitionName.equalsIgnoreCase("Riassegna")||transitionName.equalsIgnoreCase("assegna")) {
HttpServletRequest httpServletRequest =PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(actionRequest));
String istr=httpServletRequest.getParameter("kaleo--istruttore--")!=null?httpServletRequest.getParameter("kaleo--istruttore--").trim():"";
if (istr.isEmpty()){
_log.error("controllo validazione completamento task = "+transitionName +" -"+workflowTaskId+" non riuscito - esito non valorizzato o esito IN con testo del documento vuoto");
throw new PortalException("controllo validazione completamento task registra-esito non riuscito");
}
}
/////////////////////////////////////////////////////////
Map<String, Serializable> workflowContext = new HashMap<String, Serializable>(); ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName); long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
WorkflowUtil.updateWorkflowContextWithTaskFormParameters(actionRequest, workflowContext); long assigneeUserId = ParamUtil.getLong(actionRequest, "assigneeUserId");
String comment = ParamUtil.getString(actionRequest, "comment");
WorkflowTaskManagerUtil.completeWorkflowTask(themeDisplay.getCompanyId(), themeDisplay.getUserId(), workflowTaskId, WorkflowTaskManagerUtil.assignWorkflowTaskToUser(themeDisplay.getCompanyId(),
transitionName, comment, workflowContext); themeDisplay.getUserId(), workflowTaskId, assigneeUserId, comment, null, null);
} }
protected void relaseTask(ActionRequest actionRequest) throws Exception { protected void completeTask(ActionRequest actionRequest) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId"); long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
long assigneeUserId = ParamUtil.getLong(actionRequest, "assigneeUserId"); String transitionName = ParamUtil.getString(actionRequest, "transitionName");
String comment = ParamUtil.getString(actionRequest, "comment"); String comment = ParamUtil.getString(actionRequest, "comment");
WorkflowTaskManagerUtil.assignWorkflowTaskToRole(themeDisplay.getCompanyId(), assigneeUserId, workflowTaskId, 0L, // ADT: bug mancata problema assegnazione WF
comment, null, null); checkPresenzaIstruttore(transitionName, workflowTaskId);
}
protected boolean isCheckMethodOnProcessAction() { // ADT: BUG ANOMALIA REGISTRA ESITO
if (transitionName.equalsIgnoreCase("registra-esito")) {
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(PortalUtil
.getHttpServletRequest(actionRequest));
String esito = httpServletRequest.getParameter("kaleo--esito--") != null ? httpServletRequest
.getParameter("kaleo--esito--").trim() : "";
String testoDocumento = httpServletRequest.getParameter("kaleo--testo_del_documento--") != null ? httpServletRequest
.getParameter("kaleo--testo_del_documento--") : "";
List<String> valoriAmmessi = Arrays.asList("AL", "NC", "CO", "IN");
if (!valoriAmmessi.contains(esito) || (esito.equalsIgnoreCase("IN") && testoDocumento.isEmpty())) {
_log.error("controllo validazione completamento task registra-esito = " + workflowTaskId
+ " non riuscito - esito non valorizzato o esito IN con testo del documento vuoto");
throw new PortalException(
"controllo validazione completamento task registra-esito non riuscito");
}
} else if (transitionName.equalsIgnoreCase("Riassegna") || transitionName.equalsIgnoreCase("assegna")) {
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(PortalUtil
.getHttpServletRequest(actionRequest));
String istr = httpServletRequest.getParameter("kaleo--istruttore--") != null ? httpServletRequest
.getParameter("kaleo--istruttore--").trim() : "";
if (istr.isEmpty()) {
_log.error("controllo validazione completamento task = " + transitionName + " -"
+ workflowTaskId
+ " non riuscito - esito non valorizzato o esito IN con testo del documento vuoto");
throw new PortalException(
"controllo validazione completamento task registra-esito non riuscito");
}
}
return _CHECK_METHOD_ON_PROCESS_ACTION; Map<String, Serializable> workflowContext = new HashMap<String, Serializable>();
}
protected void updateTask(ActionRequest actionRequest) throws Exception { workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); WorkflowUtil.updateWorkflowContextWithTaskFormParameters(actionRequest, workflowContext);
long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId"); WorkflowTaskManagerUtil.completeWorkflowTask(themeDisplay.getCompanyId(), themeDisplay.getUserId(),
workflowTaskId, transitionName, comment, workflowContext);
}
String comment = ParamUtil.getString(actionRequest, "comment"); protected void relaseTask(ActionRequest actionRequest) throws Exception {
int dueDateMonth = ParamUtil.getInteger(actionRequest, "dueDateMonth"); ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
int dueDateDay = ParamUtil.getInteger(actionRequest, "dueDateDay");
int dueDateYear = ParamUtil.getInteger(actionRequest, "dueDateYear");
int dueDateHour = ParamUtil.getInteger(actionRequest, "dueDateHour");
int dueDateMinute = ParamUtil.getInteger(actionRequest, "dueDateMinute");
int dueDateAmPm = ParamUtil.getInteger(actionRequest, "dueDateAmPm");
if (dueDateAmPm == Calendar.PM) { long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
dueDateHour += 12;
}
Date dueDate = long assigneeUserId = ParamUtil.getLong(actionRequest, "assigneeUserId");
PortalUtil.getDate(dueDateMonth, dueDateDay, dueDateYear, dueDateHour, dueDateMinute, String comment = ParamUtil.getString(actionRequest, "comment");
WorkflowTaskDueDateException.class);
WorkflowTaskManagerUtil.updateDueDate(themeDisplay.getCompanyId(), themeDisplay.getUserId(), workflowTaskId, WorkflowTaskManagerUtil.assignWorkflowTaskToRole(themeDisplay.getCompanyId(), assigneeUserId,
comment, dueDate); workflowTaskId, 0L, comment, null, null);
} }
private static final boolean _CHECK_METHOD_ON_PROCESS_ACTION = false; protected boolean isCheckMethodOnProcessAction() {
protected void sendRedirect(ActionRequest actionRequest, ActionResponse actionResponse, String redirect) return _CHECK_METHOD_ON_PROCESS_ACTION;
throws IOException, SystemException { }
sendRedirect(null, actionRequest, actionResponse, redirect, null); protected void updateTask(ActionRequest actionRequest) throws Exception {
}
protected void sendRedirect(PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse, ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
String redirect, String closeRedirect) throws IOException, SystemException {
if (isDisplaySuccessMessage(actionRequest)) { long workflowTaskId = ParamUtil.getLong(actionRequest, "workflowTaskId");
addSuccessMessage(actionRequest, actionResponse);
}
if (Validator.isNull(redirect)) { String comment = ParamUtil.getString(actionRequest, "comment");
redirect = (String) actionRequest.getAttribute(WebKeys.REDIRECT);
}
if (Validator.isNull(redirect)) { int dueDateMonth = ParamUtil.getInteger(actionRequest, "dueDateMonth");
redirect = ParamUtil.getString(actionRequest, "redirect"); int dueDateDay = ParamUtil.getInteger(actionRequest, "dueDateDay");
} int dueDateYear = ParamUtil.getInteger(actionRequest, "dueDateYear");
int dueDateHour = ParamUtil.getInteger(actionRequest, "dueDateHour");
int dueDateMinute = ParamUtil.getInteger(actionRequest, "dueDateMinute");
int dueDateAmPm = ParamUtil.getInteger(actionRequest, "dueDateAmPm");
if ((portletConfig != null) && Validator.isNotNull(redirect) && Validator.isNotNull(closeRedirect)) { if (dueDateAmPm == Calendar.PM) {
dueDateHour += 12;
}
redirect = HttpUtil.setParameter(redirect, "closeRedirect", closeRedirect); Date dueDate = PortalUtil.getDate(dueDateMonth, dueDateDay, dueDateYear, dueDateHour, dueDateMinute,
WorkflowTaskDueDateException.class);
SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest) WorkflowTaskManagerUtil.updateDueDate(themeDisplay.getCompanyId(), themeDisplay.getUserId(),
+ SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect); workflowTaskId, comment, dueDate);
} }
if (Validator.isNull(redirect)) { private static final boolean _CHECK_METHOD_ON_PROCESS_ACTION = false;
return;
}
// LPS-1928 protected void sendRedirect(ActionRequest actionRequest, ActionResponse actionResponse, String redirect)
throws IOException, SystemException {
HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest); sendRedirect(null, actionRequest, actionResponse, redirect, null);
}
if (BrowserSnifferUtil.isIe(request) && (BrowserSnifferUtil.getMajorVersion(request) == 6.0) protected void sendRedirect(PortletConfig portletConfig, ActionRequest actionRequest,
&& redirect.contains(StringPool.POUND)) { ActionResponse actionResponse, String redirect, String closeRedirect) throws IOException,
SystemException {
String redirectToken = "&#"; if (isDisplaySuccessMessage(actionRequest)) {
addSuccessMessage(actionRequest, actionResponse);
}
if (!redirect.contains(StringPool.QUESTION)) { if (Validator.isNull(redirect)) {
redirectToken = StringPool.QUESTION + redirectToken; redirect = (String) actionRequest.getAttribute(WebKeys.REDIRECT);
} }
redirect = StringUtil.replace(redirect, StringPool.POUND, redirectToken); if (Validator.isNull(redirect)) {
} redirect = ParamUtil.getString(actionRequest, "redirect");
}
redirect = PortalUtil.escapeRedirect(redirect); if ((portletConfig != null) && Validator.isNotNull(redirect) && Validator.isNotNull(closeRedirect)) {
if (Validator.isNotNull(redirect)) { redirect = HttpUtil.setParameter(redirect, "closeRedirect", closeRedirect);
actionResponse.sendRedirect(redirect);
}
}
protected boolean isDisplaySuccessMessage(PortletRequest portletRequest) throws SystemException { SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest)
+ SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect);
}
if (!SessionErrors.isEmpty(portletRequest)) { if (Validator.isNull(redirect)) {
return false; return;
} }
ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); // LPS-1928
Layout layout = themeDisplay.getLayout(); HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
if (layout.isTypeControlPanel()) { if (BrowserSnifferUtil.isIe(request) && (BrowserSnifferUtil.getMajorVersion(request) == 6.0)
return true; && redirect.contains(StringPool.POUND)) {
}
String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID); String redirectToken = "&#";
try { if (!redirect.contains(StringPool.QUESTION)) {
LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); redirectToken = StringPool.QUESTION + redirectToken;
}
if (layoutTypePortlet.hasPortletId(portletId)) { redirect = StringUtil.replace(redirect, StringPool.POUND, redirectToken);
return true; }
}
} catch (PortalException pe) {
if (_log.isDebugEnabled()) {
_log.debug(pe, pe);
}
}
Portlet portlet = PortletLocalServiceUtil.getPortletById(themeDisplay.getCompanyId(), portletId); redirect = PortalUtil.escapeRedirect(redirect);
if (portlet.isAddDefaultResource()) { if (Validator.isNotNull(redirect)) {
return true; actionResponse.sendRedirect(redirect);
} }
}
return false; protected boolean isDisplaySuccessMessage(PortletRequest portletRequest) throws SystemException {
}
protected void addSuccessMessage(ActionRequest actionRequest, ActionResponse actionResponse) { if (!SessionErrors.isEmpty(portletRequest)) {
return false;
}
PortletConfig portletConfig = (PortletConfig) actionRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
boolean addProcessActionSuccessMessage = Layout layout = themeDisplay.getLayout();
GetterUtil.getBoolean(portletConfig.getInitParameter("add-process-action-success-action"), true);
if (!addProcessActionSuccessMessage) { if (layout.isTypeControlPanel()) {
return; return true;
} }
String successMessage = ParamUtil.getString(actionRequest, "successMessage"); String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID);
SessionMessages.add(actionRequest, "requestProcessed", successMessage); try {
} LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet();
protected void setForward(PortletRequest portletRequest, String forward) { if (layoutTypePortlet.hasPortletId(portletId)) {
return true;
}
} catch (PortalException pe) {
if (_log.isDebugEnabled()) {
_log.debug(pe, pe);
}
}
portletRequest.setAttribute(getForwardKey(portletRequest), forward); Portlet portlet = PortletLocalServiceUtil.getPortletById(themeDisplay.getCompanyId(), portletId);
}
public static String getForwardKey(PortletRequest portletRequest) { if (portlet.isAddDefaultResource()) {
return true;
}
String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID); return false;
}
String portletNamespace = PortalUtil.getPortletNamespace(portletId); protected void addSuccessMessage(ActionRequest actionRequest, ActionResponse actionResponse) {
return portletNamespace.concat(PORTLET_STRUTS_FORWARD); PortletConfig portletConfig = (PortletConfig) actionRequest
} .getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
private final static String PORTLET_STRUTS_FORWARD = "PORTLET_STRUTS_FORWARD"; boolean addProcessActionSuccessMessage = GetterUtil.getBoolean(
portletConfig.getInitParameter("add-process-action-success-action"), true);
@Override if (!addProcessActionSuccessMessage) {
public String render(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig, return;
RenderRequest renderRequest, RenderResponse renderResponse) throws Exception { }
ThemeDisplay themeDisplay = (ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY); String successMessage = ParamUtil.getString(actionRequest, "successMessage");
long workflowTaskId = ParamUtil.getLong(renderRequest, "workflowTaskId"); SessionMessages.add(actionRequest, "requestProcessed", successMessage);
}
WorkflowTask workflowTask = null; protected void setForward(PortletRequest portletRequest, String forward) {
if (workflowTaskId > 0) { portletRequest.setAttribute(getForwardKey(portletRequest), forward);
workflowTask = WorkflowTaskManagerUtil.getWorkflowTask(themeDisplay.getCompanyId(), workflowTaskId); }
}
String valoreTransizioneEsito = getTransitionValue(workflowTask.getWorkflowInstanceId(), "registra-esito"); public static String getForwardKey(PortletRequest portletRequest) {
String valoreTransizioneAssegna = getTransitionValue(workflowTask.getWorkflowInstanceId(), "assegna");
renderRequest.setAttribute("registra-esito-value", valoreTransizioneEsito); String portletId = (String) portletRequest.getAttribute(WebKeys.PORTLET_ID);
renderRequest.setAttribute("assegna-value", valoreTransizioneAssegna);
// Gestione permessi action button String portletNamespace = PortalUtil.getPortletNamespace(portletId);
ControlloPratica controlloPratica = getControlloPratica(workflowTask.getWorkflowInstanceId());
//ADT BUG BO ID=33 return portletNamespace.concat(PORTLET_STRUTS_FORWARD);
renderRequest.setAttribute("historyWorkflowEsitiLogs", getHistoryWorkfloLogs(themeDisplay,workflowTask.getWorkflowInstanceId(),renderRequest,controlloPratica)); }
long groupIdTerritorio = controlloPratica.getGroupId(); private final static String PORTLET_STRUTS_FORWARD = "PORTLET_STRUTS_FORWARD";
Group group = GroupLocalServiceUtil.getGroup(groupIdTerritorio);
User user = themeDisplay.getUser(); @Override
Organization org = OrganizationLocalServiceUtil.getOrganization(group.getClassPK()); public String render(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig,
RenderRequest renderRequest, RenderResponse renderResponse) throws Exception {
boolean canPortosAssegnatore = ThemeDisplay themeDisplay = (ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), org.getGroupId(), "portos_assegnatore");
boolean canPortosApprovatore =
UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), org.getGroupId(), "portos_approvatore");
boolean canPortosIstruttore = long workflowTaskId = ParamUtil.getLong(renderRequest, "workflowTaskId");
UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), org.getGroupId(), "portos_istruttore");
renderRequest.setAttribute("canPortosAssegnatore", canPortosAssegnatore); WorkflowTask workflowTask = null;
renderRequest.setAttribute("canPortosApprovatore", canPortosApprovatore);
renderRequest.setAttribute("canPortosIstruttore", canPortosIstruttore);
if (workflowTaskId > 0) {
workflowTask = WorkflowTaskManagerUtil.getWorkflowTask(themeDisplay.getCompanyId(),
workflowTaskId);
}
return originalStrutsPortletAction.render(originalStrutsPortletAction, portletConfig, renderRequest, renderResponse); String valoreTransizioneEsito = getTransitionValue(workflowTask.getWorkflowInstanceId(),
} "registra-esito");
String valoreTransizioneAssegna = getTransitionValue(workflowTask.getWorkflowInstanceId(), "assegna");
private String getTransitionValue(long taskInstanceId, String transitionName) throws PortalException, SystemException { renderRequest.setAttribute("registra-esito-value", valoreTransizioneEsito);
renderRequest.setAttribute("assegna-value", valoreTransizioneAssegna);
ClassLoader classLoaderKaleoLog = // Gestione permessi action button
(ClassLoader) PortletBeanLocatorUtil.locate( ControlloPratica controlloPratica = getControlloPratica(workflowTask.getWorkflowInstanceId());
it.tref.liferay.portos.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dqKaleoLog = DynamicQueryFactoryUtil.forClass(FormLog.class, classLoaderKaleoLog); // ADT BUG BO ID=33
dqKaleoLog.add(RestrictionsFactoryUtil.eq("workflowInstanceId", taskInstanceId)); renderRequest.setAttribute(
dqKaleoLog.add(RestrictionsFactoryUtil.eq("transitionName", transitionName)); "historyWorkflowEsitiLogs",
getHistoryWorkfloLogs(themeDisplay, workflowTask.getWorkflowInstanceId(), renderRequest,
controlloPratica));
List<FormLog> listaKaleoLog = FormLogLocalServiceUtil.dynamicQuery(dqKaleoLog); long groupIdTerritorio = controlloPratica.getGroupId();
if (listaKaleoLog != null && !listaKaleoLog.isEmpty()) { Group group = GroupLocalServiceUtil.getGroup(groupIdTerritorio);
FormLog formLog = listaKaleoLog.get(0);
JSONObject json = JSONFactoryUtil.createJSONObject(formLog.getFormParameters());
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil.getKaleoInstance(taskInstanceId); User user = themeDisplay.getUser();
ControlloPratica controlloPratica = Organization org = OrganizationLocalServiceUtil.getOrganization(group.getClassPK());
ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance.getClassPK());
if (json.has("esito")) { boolean canPortosAssegnatore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(),
String tipoEsito = ""; org.getGroupId(), "portos_assegnatore");
String appStirng = json.getString("esito"); boolean canPortosApprovatore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(),
switch (appStirng) { org.getGroupId(), "portos_approvatore");
case "IN":
tipoEsito = "Richiesta Integrazione";
break;
case "CO": boolean canPortosIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(),
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) { org.getGroupId(), "portos_istruttore");
tipoEsito = "Conforme";
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
tipoEsito = "Autorizzata";
}
break;
case "NC": renderRequest.setAttribute("canPortosAssegnatore", canPortosAssegnatore);
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) { renderRequest.setAttribute("canPortosApprovatore", canPortosApprovatore);
tipoEsito = "Non conforme"; renderRequest.setAttribute("canPortosIstruttore", canPortosIstruttore);
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
tipoEsito = "Non autorizzata";
}
break;
case "AL": return originalStrutsPortletAction.render(originalStrutsPortletAction, portletConfig, renderRequest,
tipoEsito = "Annullata"; renderResponse);
break; }
default: private String getTransitionValue(long taskInstanceId, String transitionName) throws PortalException,
break; SystemException {
}
return tipoEsito; ClassLoader classLoaderKaleoLog = (ClassLoader) PortletBeanLocatorUtil.locate(
it.tref.liferay.portos.kaleo.service.ClpSerializer.getServletContextName(),
"portletClassLoader");
DynamicQuery dqKaleoLog = DynamicQueryFactoryUtil.forClass(FormLog.class, classLoaderKaleoLog);
dqKaleoLog.add(RestrictionsFactoryUtil.eq("workflowInstanceId", taskInstanceId));
dqKaleoLog.add(RestrictionsFactoryUtil.eq("transitionName", transitionName));
List<FormLog> listaKaleoLog = FormLogLocalServiceUtil.dynamicQuery(dqKaleoLog);
if (listaKaleoLog != null && !listaKaleoLog.isEmpty()) {
FormLog formLog = listaKaleoLog.get(0);
JSONObject json = JSONFactoryUtil.createJSONObject(formLog.getFormParameters());
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil.getKaleoInstance(taskInstanceId);
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(kaleoInstance.getClassPK());
if (json.has("esito")) {
String tipoEsito = "";
String appStirng = json.getString("esito");
switch (appStirng) {
case "IN":
tipoEsito = "Richiesta Integrazione";
break;
case "CO":
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
tipoEsito = "Conforme";
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
tipoEsito = "Autorizzata";
}
break;
} else if (json.has("istruttore")) { case "NC":
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
tipoEsito = "Non conforme";
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
tipoEsito = "Non autorizzata";
}
break;
String userIdIstruttore = json.getString("istruttore"); case "AL":
User istruttore = UserLocalServiceUtil.fetchUser(Long.parseLong(userIdIstruttore)); tipoEsito = "Annullata";
if (Validator.isNotNull(istruttore)) { break;
return istruttore.getFullName();
}
} default:
break;
}
return tipoEsito;
} } else if (json.has("istruttore")) {
return null; String userIdIstruttore = json.getString("istruttore");
} User istruttore = UserLocalServiceUtil.fetchUser(Long.parseLong(userIdIstruttore));
if (Validator.isNotNull(istruttore)) {
return istruttore.getFullName();
}
private ControlloPratica getControlloPratica(long taskInstanceId) throws PortalException, SystemException { }
ClassLoader classLoaderKaleoLog = }
(ClassLoader) PortletBeanLocatorUtil.locate(
it.tref.liferay.portos.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
return null;
}
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil.getKaleoInstance(taskInstanceId); private ControlloPratica getControlloPratica(long taskInstanceId) throws PortalException, SystemException {
ControlloPratica controlloPratica =
ControlloPraticaLocalServiceUtil.getControlloPratica(kaleoInstance.getClassPK());
return controlloPratica; ClassLoader classLoaderKaleoLog = (ClassLoader) PortletBeanLocatorUtil.locate(
} it.tref.liferay.portos.kaleo.service.ClpSerializer.getServletContextName(),
"portletClassLoader");
KaleoInstance kaleoInstance = KaleoInstanceLocalServiceUtil.getKaleoInstance(taskInstanceId);
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(kaleoInstance.getClassPK());
/** return controlloPratica;
* ADT BUG BO ID=33 - implementazione nuovo metodo }
*
* @param themeDisplay
* @param workflowInstanceId
* @param renderRequest
* @param controlloPratica
* @return
*/
private Map<Long,String> getHistoryWorkfloLogs(ThemeDisplay themeDisplay,long workflowInstanceId, RenderRequest renderRequest,ControlloPratica controlloPratica) {
Map<Long,String> esitiMapByWorkflowLogID=new HashMap<Long, String>(); /**
try { * ADT BUG BO ID=33 - implementazione nuovo metodo
*
* @param themeDisplay
* @param workflowInstanceId
* @param renderRequest
* @param controlloPratica
* @return
*/
private Map<Long, String> getHistoryWorkfloLogs(ThemeDisplay themeDisplay, long workflowInstanceId,
RenderRequest renderRequest, ControlloPratica controlloPratica) {
Map<Long, String> esitiMapByWorkflowLogID = new HashMap<Long, String>();
try {
List<Integer> logTypes = new ArrayList<Integer>(); List<Integer> logTypes = new ArrayList<Integer>();
logTypes.add(WorkflowLog.TASK_ASSIGN); logTypes.add(WorkflowLog.TASK_ASSIGN);
logTypes.add(WorkflowLog.TASK_COMPLETION); logTypes.add(WorkflowLog.TASK_COMPLETION);
logTypes.add(WorkflowLog.TASK_UPDATE); logTypes.add(WorkflowLog.TASK_UPDATE);
logTypes.add(WorkflowLog.TRANSITION); logTypes.add(WorkflowLog.TRANSITION);
List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(themeDisplay.getCompanyId(), workflowInstanceId, logTypes,QueryUtil.ALL_POS, QueryUtil.ALL_POS,WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true)); List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(
themeDisplay.getCompanyId(), workflowInstanceId, logTypes, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true));
for (WorkflowLog workflowLog : workflowLogs) { for (WorkflowLog workflowLog : workflowLogs) {
try { try {
WorkflowTask wfTask = null; WorkflowTask wfTask = null;
if (workflowLog.getWorkflowTaskId() > 0) { if (workflowLog.getWorkflowTaskId() > 0) {
wfTask = WorkflowTaskManagerUtil.getWorkflowTask(themeDisplay.getCompanyId(),workflowLog.getWorkflowTaskId()); wfTask = WorkflowTaskManagerUtil.getWorkflowTask(themeDisplay.getCompanyId(),
workflowLog.getWorkflowTaskId());
ServiceContext serviceContext = ServiceContextFactory.getInstance(renderRequest); ServiceContext serviceContext = ServiceContextFactory.getInstance(renderRequest);
FormLog formLog = FormLogLocalServiceUtil.findByC_Task(serviceContext.getCompanyId(),wfTask.getWorkflowTaskId()); FormLog formLog = FormLogLocalServiceUtil.findByC_Task(serviceContext.getCompanyId(),
wfTask.getWorkflowTaskId());
if (formLog!=null&&Validator.isNotNull(formLog.getFormParameters())) { if (formLog != null && Validator.isNotNull(formLog.getFormParameters())) {
JSONObject json = JSONFactoryUtil.createJSONObject(formLog.getFormParameters()); JSONObject json = JSONFactoryUtil.createJSONObject(formLog.getFormParameters());
if (json.has("esito")) { if (json.has("esito")) {
String tipoEsito = ""; String tipoEsito = "";
@ -530,11 +545,10 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
break; break;
case "CO": case "CO":
if (AzioniPraticheUtil.isDeposito(controlloPratica if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
.getIntPraticaId())) {
tipoEsito = "Conforme"; tipoEsito = "Conforme";
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica } else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica
.getIntPraticaId())) { .getIntPraticaId())) {
tipoEsito = "Autorizzata"; tipoEsito = "Autorizzata";
} }
break; break;
@ -542,7 +556,8 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
case "NC": case "NC":
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) { if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
tipoEsito = "Non conforme"; tipoEsito = "Non conforme";
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { } else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica
.getIntPraticaId())) {
tipoEsito = "Non autorizzata"; tipoEsito = "Non autorizzata";
} }
break; break;
@ -555,7 +570,9 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
break; break;
} }
//_log.info("WorkflowLogId="+ workflowLog.getWorkflowLogId() + " "+ tipoEsito); // _log.info("WorkflowLogId="+
// workflowLog.getWorkflowLogId() + " "+
// tipoEsito);
esitiMapByWorkflowLogID.put(workflowLog.getWorkflowLogId(), tipoEsito); esitiMapByWorkflowLogID.put(workflowLog.getWorkflowLogId(), tipoEsito);
} }
} }
@ -576,25 +593,30 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
} }
/**
/** * ADT: check congruenza WF - presenza dell'istruttore
* ADT: check congruenza WF - presenza dell'istruttore *
* *
* * @param transitionName
* @param transitionName * @param workflowTaskId
* @param workflowTaskId */
*/
private void checkPresenzaIstruttore(String transitionName, long workflowTaskId) { private void checkPresenzaIstruttore(String transitionName, long workflowTaskId) {
if (transitionName.equalsIgnoreCase("registra-esito")) { if (transitionName.equalsIgnoreCase("registra-esito")) {
try { try {
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil.getKaleoTaskInstanceToken(workflowTaskId); KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
ControlloPratica controlloPratica = getControlloPratica(kaleoTaskInstanceToken.getKaleoInstanceId()); .getKaleoTaskInstanceToken(workflowTaskId);
Map<String, Serializable> wfParameters = it.tref.liferay.portos.bo.util.WorkflowUtil.getFormParameters(controlloPratica); ControlloPratica controlloPratica = getControlloPratica(kaleoTaskInstanceToken
.getKaleoInstanceId());
Map<String, Serializable> wfParameters = it.tref.liferay.portos.bo.util.WorkflowUtil
.getFormParameters(controlloPratica);
String istruttore = (String) wfParameters.get("istruttore"); String istruttore = (String) wfParameters.get("istruttore");
_log.info("checkPresenzaIstruttore - istruttore presente sul workflow= " + istruttore+ " - ControlloPraticaId = " + controlloPratica.getControlloPraticaId()); _log.info("checkPresenzaIstruttore - istruttore presente sul workflow= " + istruttore
+ " - ControlloPraticaId = " + controlloPratica.getControlloPraticaId());
if (istruttore == null) { if (istruttore == null) {
_log.info("checkPresenzaIstruttore - rilevata incongrueza WF - istruttore non presente per controlloPratica = " + controlloPratica.getControlloPraticaId()); _log.info("checkPresenzaIstruttore - rilevata incongrueza WF - istruttore non presente per controlloPratica = "
long istruttoreId = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()).getStatusByUserId(); + controlloPratica.getControlloPraticaId());
long istruttoreId = IntPraticaLocalServiceUtil.getIntPratica(
controlloPratica.getIntPraticaId()).getStatusByUserId();
if (istruttoreId > 0) { if (istruttoreId > 0) {
String jsonFormParameters = null; String jsonFormParameters = null;
Map<String, Serializable> parametri = new HashMap<String, Serializable>(); Map<String, Serializable> parametri = new HashMap<String, Serializable>();
@ -605,15 +627,19 @@ public class EditWorkflowTaskAction extends BaseStrutsPortletAction {
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId()); serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setUserId(controlloPratica.getUserId()); serviceContext.setUserId(controlloPratica.getUserId());
FormLogLocalServiceUtil.addFormLog(kaleoTaskInstanceToken.getKaleoInstanceId(), 0l, "cambio-istruttore", jsonFormParameters, serviceContext); FormLogLocalServiceUtil.addFormLog(kaleoTaskInstanceToken.getKaleoInstanceId(), 0l,
_log.info("checkPresenzaIstruttore correttamente eseguito - ControlloPraticaId = " + controlloPratica.getControlloPraticaId()); "cambio-istruttore", jsonFormParameters, serviceContext);
}else{ _log.info("checkPresenzaIstruttore correttamente eseguito - ControlloPraticaId = "
_log.info("checkPresenzaIstruttore KO - istruttore non calcolato - ControlloPraticaId = " + controlloPratica.getControlloPraticaId()); + controlloPratica.getControlloPraticaId());
} else {
_log.info("checkPresenzaIstruttore KO - istruttore non calcolato - ControlloPraticaId = "
+ controlloPratica.getControlloPraticaId());
} }
} }
} catch (Exception e) { } catch (Exception e) {
_log.error("checkPresenzaIstruttore KO per workflowTaskId = "+ workflowTaskId+" ["+e.getMessage()+" , "+e.getCause()+"]"); _log.error("checkPresenzaIstruttore KO per workflowTaskId = " + workflowTaskId + " ["
+ e.getMessage() + " , " + e.getCause() + "]");
} }
} }
} }

362
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/util/WorkflowUtil.java

@ -41,191 +41,201 @@ import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServ
public class WorkflowUtil { public class WorkflowUtil {
public static Map<String, Serializable> executeOnOpenForm(long companyId, long workflowTaskId, long assigneeUserId, public static Map<String, Serializable> executeOnOpenForm(long companyId, long workflowTaskId,
String transitionName) throws PortalException, SystemException { long assigneeUserId, String transitionName) throws PortalException, SystemException {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(companyId);
serviceContext.setUserId(assigneeUserId);
ServiceContext serviceContext = new ServiceContext(); KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
serviceContext.setCompanyId(companyId); .getKaleoTaskInstanceToken(workflowTaskId);
serviceContext.setUserId(assigneeUserId);
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
KaleoTaskInstanceTokenLocalServiceUtil.getKaleoTaskInstanceToken(workflowTaskId);
Map<String, Serializable> workflowContext = new HashMap<String, Serializable>();
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil
.getWorkflowHandler(kaleoTaskInstanceToken.getClassName());
if (workflowHandler != null) {
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE,
workflowHandler.getType(Locale.getDefault()));
}
workflowContext
.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK,
String.valueOf(kaleoTaskInstanceToken.getClassPK()));
workflowContext.put(WorkflowConstants.CONTEXT_COMPANY_ID,
String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID,
String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext.put(WorkflowConstants.CONTEXT_USER_ID, String.valueOf(assigneeUserId));
workflowContext.put(WorkflowConstants.CONTEXT_SERVICE_CONTEXT, serviceContext);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
ExecutionContext executionContext = new ExecutionContext(
kaleoTaskInstanceToken.getKaleoInstanceToken(), kaleoTaskInstanceToken, workflowContext,
serviceContext);
ActionExecutorUtil.executeKaleoActions(KaleoNode.class.getName(), kaleoTask.getKaleoNodeId(),
ExecutionType.ON_OPEN_FORM, executionContext);
return executionContext.getWorkflowContext();
}
public static Map<String, Serializable> executeOnValidation(long companyId, long workflowTaskId,
long assigneeUserId, String transitionName) throws PortalException, SystemException {
return executeOnValidation(companyId, workflowTaskId, assigneeUserId, transitionName, null);
}
public static Map<String, Serializable> executeOnValidation(long companyId, long workflowTaskId,
long assigneeUserId, String transitionName, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
if (workflowContext == null) {
workflowContext = Collections.<String, Serializable> emptyMap();
}
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(companyId);
serviceContext.setUserId(assigneeUserId);
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil
.getWorkflowHandler(kaleoTaskInstanceToken.getClassName());
if (workflowHandler != null) {
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE,
workflowHandler.getType(Locale.getDefault()));
}
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask(); workflowContext
.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK,
String.valueOf(kaleoTaskInstanceToken.getClassPK()));
workflowContext.put(WorkflowConstants.CONTEXT_COMPANY_ID,
String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID,
String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext.put(WorkflowConstants.CONTEXT_USER_ID, String.valueOf(assigneeUserId));
workflowContext.put(WorkflowConstants.CONTEXT_SERVICE_CONTEXT, serviceContext);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
Map<String, Serializable> workflowContext = new HashMap<String, Serializable>(); ExecutionContext executionContext = new ExecutionContext(
kaleoTaskInstanceToken.getKaleoInstanceToken(), kaleoTaskInstanceToken, workflowContext,
serviceContext);
ActionExecutorUtil.executeKaleoActions(KaleoNode.class.getName(), kaleoTask.getKaleoNodeId(),
ExecutionType.ON_VALIDATION, executionContext);
return executionContext.getWorkflowContext();
}
public static Map<String, Serializable> getFormParameters(long companyId, long workflowTaskId)
throws PortalException, SystemException {
return getFormParameters(companyId, 0, 0, StringPool.BLANK, workflowTaskId);
}
public static Map<String, Serializable> getFormParameters(long companyId, long groupId, long classPK,
String className, long workflowTaskId) throws PortalException, SystemException {
if (Validator.isNotNull(workflowTaskId)) {
KaleoTaskInstanceToken kaleoTaskInstanceToken = KaleoTaskInstanceTokenLocalServiceUtil
.getKaleoTaskInstanceToken(workflowTaskId);
companyId = kaleoTaskInstanceToken.getCompanyId();
groupId = kaleoTaskInstanceToken.getGroupId();
classPK = kaleoTaskInstanceToken.getClassPK();
className = kaleoTaskInstanceToken.getClassName();
}
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil
.fetchWorkflowInstanceLink(companyId, groupId, className, classPK);
if (workflowInstanceLink == null) {
throw new NoSuchWorkflowInstanceLinkException();
}
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId();
Map<String, Serializable> parameters = new HashMap<String, Serializable>();
// order asc
List<FormLog> formLogs = FormLogLocalServiceUtil.findByC_Instance(companyId, workflowInstanceId,
QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (FormLog formLog : formLogs) {
String formParameters = formLog.getFormParameters();
if (Validator.isNotNull(formParameters)) {
JSONDeserializer<Map<String, Serializable>> jsonDeserializer = JSONFactoryUtil
.<Map<String, Serializable>> createJSONDeserializer();
parameters.putAll(jsonDeserializer.deserialize(formParameters));
}
}
WorkflowHandler workflowHandler = return parameters;
WorkflowHandlerRegistryUtil.getWorkflowHandler(kaleoTaskInstanceToken.getClassName()); }
if (workflowHandler != null) {
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE, workflowHandler.getType(Locale.getDefault()));
}
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName()); public static void updateWorkflowContextWithTaskFormParameters(PortletRequest portletRequest,
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK, String.valueOf(kaleoTaskInstanceToken.getClassPK())); Map<String, Serializable> workflowContext) {
workflowContext.put(WorkflowConstants.CONTEXT_COMPANY_ID, String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID, String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext.put(WorkflowConstants.CONTEXT_USER_ID, String.valueOf(assigneeUserId));
workflowContext.put(WorkflowConstants.CONTEXT_SERVICE_CONTEXT, serviceContext);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
ExecutionContext executionContext = Map<String, String> formParameters = null;
new ExecutionContext(kaleoTaskInstanceToken.getKaleoInstanceToken(), kaleoTaskInstanceToken, workflowContext,
serviceContext); Enumeration<String> enu = portletRequest.getParameterNames();
while (enu.hasMoreElements()) {
String name = enu.nextElement();
if (!name.startsWith(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM)
&& !name.endsWith(WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM)) {
continue;
}
if (formParameters == null) {
formParameters = new HashMap<String, String>();
}
String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(),
name.length() - WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String value = StringUtil.merge(ParamUtil.getParameterValues(portletRequest, name));
formParameters.put(parameterName, value);
}
if (formParameters == null) {
HttpServletRequest httpServletRequest = PortalUtil.getOriginalServletRequest(PortalUtil
.getHttpServletRequest(portletRequest));
Enumeration<String> enums = httpServletRequest.getParameterNames();
while (enums.hasMoreElements()) {
String name = enums.nextElement();
if (!name.startsWith(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM)
&& !name.endsWith(WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM)) {
continue;
}
ActionExecutorUtil.executeKaleoActions(KaleoNode.class.getName(), kaleoTask.getKaleoNodeId(), if (formParameters == null) {
ExecutionType.ON_OPEN_FORM, executionContext); formParameters = new HashMap<String, String>();
}
return executionContext.getWorkflowContext(); String parameterName = name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(),
} name.length() - WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String value = StringUtil.merge(ParamUtil.getParameterValues(httpServletRequest, name));
formParameters.put(parameterName, value);
}
}
public static Map<String, Serializable> executeOnValidation(long companyId, long workflowTaskId, long assigneeUserId, if (formParameters != null) {
String transitionName) throws PortalException, SystemException { workflowContext
.put(WorkflowConstants.CONTEXT_TASK_FORM_PARAMETERS, (Serializable) formParameters);
return executeOnValidation(companyId, workflowTaskId, assigneeUserId, transitionName, null); }
} }
public static Map<String, Serializable> executeOnValidation(long companyId, long workflowTaskId, long assigneeUserId,
String transitionName, Map<String, Serializable> workflowContext) throws PortalException, SystemException {
if (workflowContext == null) {
workflowContext = Collections.<String, Serializable>emptyMap();
}
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(companyId);
serviceContext.setUserId(assigneeUserId);
KaleoTaskInstanceToken kaleoTaskInstanceToken =
KaleoTaskInstanceTokenLocalServiceUtil.getKaleoTaskInstanceToken(workflowTaskId);
KaleoTask kaleoTask = kaleoTaskInstanceToken.getKaleoTask();
WorkflowHandler workflowHandler =
WorkflowHandlerRegistryUtil.getWorkflowHandler(kaleoTaskInstanceToken.getClassName());
if (workflowHandler != null) {
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_TYPE, workflowHandler.getType(Locale.getDefault()));
}
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME, kaleoTaskInstanceToken.getClassName());
workflowContext.put(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK, String.valueOf(kaleoTaskInstanceToken.getClassPK()));
workflowContext.put(WorkflowConstants.CONTEXT_COMPANY_ID, String.valueOf(kaleoTaskInstanceToken.getCompanyId()));
workflowContext.put(WorkflowConstants.CONTEXT_GROUP_ID, String.valueOf(kaleoTaskInstanceToken.getGroupId()));
workflowContext.put(WorkflowConstants.CONTEXT_USER_ID, String.valueOf(assigneeUserId));
workflowContext.put(WorkflowConstants.CONTEXT_SERVICE_CONTEXT, serviceContext);
workflowContext.put(WorkflowConstants.CONTEXT_TRANSITION_NAME, transitionName);
ExecutionContext executionContext =
new ExecutionContext(kaleoTaskInstanceToken.getKaleoInstanceToken(), kaleoTaskInstanceToken, workflowContext,
serviceContext);
ActionExecutorUtil.executeKaleoActions(KaleoNode.class.getName(), kaleoTask.getKaleoNodeId(),
ExecutionType.ON_VALIDATION, executionContext);
return executionContext.getWorkflowContext();
}
public static Map<String, Serializable> getFormParameters(long companyId, long workflowTaskId)
throws PortalException, SystemException {
return getFormParameters(companyId, 0, 0, StringPool.BLANK, workflowTaskId);
}
public static Map<String, Serializable> getFormParameters(long companyId, long groupId, long classPK,
String className, long workflowTaskId) throws PortalException, SystemException {
if (Validator.isNotNull(workflowTaskId)) {
KaleoTaskInstanceToken kaleoTaskInstanceToken =
KaleoTaskInstanceTokenLocalServiceUtil.getKaleoTaskInstanceToken(workflowTaskId);
companyId = kaleoTaskInstanceToken.getCompanyId();
groupId = kaleoTaskInstanceToken.getGroupId();
classPK = kaleoTaskInstanceToken.getClassPK();
className = kaleoTaskInstanceToken.getClassName();
}
WorkflowInstanceLink workflowInstanceLink =
WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(companyId, groupId, className, classPK);
if (workflowInstanceLink == null) {
throw new NoSuchWorkflowInstanceLinkException();
}
long workflowInstanceId = workflowInstanceLink.getWorkflowInstanceId();
Map<String, Serializable> parameters = new HashMap<String, Serializable>();
// order asc
List<FormLog> formLogs =
FormLogLocalServiceUtil.findByC_Instance(companyId, workflowInstanceId, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (FormLog formLog : formLogs) {
String formParameters = formLog.getFormParameters();
if (Validator.isNotNull(formParameters)) {
JSONDeserializer<Map<String, Serializable>> jsonDeserializer =
JSONFactoryUtil.<Map<String, Serializable>>createJSONDeserializer();
parameters.putAll(jsonDeserializer.deserialize(formParameters));
}
}
return parameters;
}
public static void updateWorkflowContextWithTaskFormParameters(PortletRequest portletRequest,
Map<String, Serializable> workflowContext) {
Map<String, String> formParameters = null;
Enumeration<String> enu = portletRequest.getParameterNames();
while (enu.hasMoreElements()) {
String name = enu.nextElement();
if (!name.startsWith(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM)
&& !name.endsWith(WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM)) {
continue;
}
if (formParameters == null) {
formParameters = new HashMap<String, String>();
}
String parameterName =
name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(), name.length()
- WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String value = StringUtil.merge(ParamUtil.getParameterValues(portletRequest, name));
formParameters.put(parameterName, value);
}
if (formParameters == null) {
HttpServletRequest httpServletRequest =
PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(portletRequest));
Enumeration<String> enums = httpServletRequest.getParameterNames();
while (enums.hasMoreElements()) {
String name = enums.nextElement();
if (!name.startsWith(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM)
&& !name.endsWith(WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM)) {
continue;
}
if (formParameters == null) {
formParameters = new HashMap<String, String>();
}
String parameterName =
name.substring(WorkflowConstants.PREFIX_NAME_ELEMENT_FORM.length(), name.length()
- WorkflowConstants.SUFFIX_NAME_ELEMENT_FORM.length());
String value = StringUtil.merge(ParamUtil.getParameterValues(httpServletRequest, name));
formParameters.put(parameterName, value);
}
}
if (formParameters != null) {
workflowContext.put(WorkflowConstants.CONTEXT_TASK_FORM_PARAMETERS, (Serializable) formParameters);
}
}
} }

Caricamento…
Annulla
Salva