Sfoglia il codice sorgente

Correzioni moduli

master
Salvatore La Manna 4 anni fa
parent
commit
b96ddb5410
  1. 2
      jasper/Modello_autorizzazione.jrxml
  2. 2
      jasper/Modello_diniego.jrxml
  3. 2
      jasper/Modello_non_competenza.jrxml
  4. 2
      jasper/Modello_preavviso.jrxml
  5. 310
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java
  6. 7
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaGetUtil.java
  7. 15
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/html/firma/init.jsp
  8. 4
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/service.properties
  9. 1
      liferay-plugins-sdk-6.2/view_panel_pagamenti_spese.jsp

2
jasper/Modello_autorizzazione.jrxml

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

2
jasper/Modello_diniego.jrxml

@ -383,7 +383,7 @@ L’eventuale ricorso gerarchico, debitamente sottoscritto e regolarizzato in bo
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/> <font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Il sopritendente]]></text> <text><![CDATA[Il soprintendente]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="4" y="120" width="547" height="10" uuid="42bb187f-a205-4b2e-85d2-3c3655078c1b"> <reportElement x="4" y="120" width="547" height="10" uuid="42bb187f-a205-4b2e-85d2-3c3655078c1b">

2
jasper/Modello_non_competenza.jrxml

@ -370,7 +370,7 @@ esaminata la documentazione allegata all’istanza;]]></text>
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/> <font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Il sopritendente]]></text> <text><![CDATA[Il soprintendente]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="4" y="30" width="547" height="10" uuid="e484cc67-3e66-431a-ad1f-bc7fc56c0836"> <reportElement x="4" y="30" width="547" height="10" uuid="e484cc67-3e66-431a-ad1f-bc7fc56c0836">

2
jasper/Modello_preavviso.jrxml

@ -326,7 +326,7 @@ Trascorso infruttuosamente tale termine si procederà all’emissione di provved
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font fontName="DejaVu Sans" size="12" isBold="false"/> <font fontName="DejaVu Sans" size="12" isBold="false"/>
</textElement> </textElement>
<text><![CDATA[Il sopritendente]]></text> <text><![CDATA[Il soprintendente]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement x="4" y="90" width="547" height="10" uuid="6cddce1d-3ed3-4b5e-b923-6761daf35645"> <reportElement x="4" y="90" width="547" height="10" uuid="6cddce1d-3ed3-4b5e-b923-6761daf35645">

310
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java

@ -33,156 +33,162 @@ import javax.servlet.http.HttpServletResponse;
public class FirmaServlet extends HttpServlet { public class FirmaServlet extends HttpServlet {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String GET_CONFIGURATION = "get-configuration"; // get private static final String GET_CONFIGURATION = "get-configuration"; // get
private static final String GET_FILE_LIST = "get-file-list"; // post private static final String GET_FILE_LIST = "get-file-list"; // post
private static final String GET_FILE = "get-file"; // post private static final String GET_FILE = "get-file"; // post
private static final String GET_TYPE = "get-type"; // get private static final String GET_TYPE = "get-type"; // get
private static final String GET_TYPE_VERBALE = "get-type-verbale"; // get private static final String GET_TYPE_VERBALE = "get-type-verbale"; // get
private static final String LOGIN = "login"; // get private static final String LOGIN = "login"; // get
private static final String OPEN_PRATICA = "open-pratica"; // post private static final String OPEN_PRATICA = "open-pratica"; // post
private static final String RIFIUTA = "rifiuta"; // post private static final String RIFIUTA = "rifiuta"; // post
private static final String SET_FILE = "set-file"; // post private static final String SET_FILE = "set-file"; // post
private static final String VERSION = "version"; // get private static final String VERSION = "version"; // get
private static final String GET_STILE = "get-stile"; // get private static final String GET_STILE = "get-stile"; // get
private static final Log _log = LogFactoryUtil.getLog(FirmaServlet.class); private static final Log _log = LogFactoryUtil.getLog(FirmaServlet.class);
/** /**
* @see HttpServlet#HttpServlet() * @see HttpServlet#HttpServlet()
*/ */
public FirmaServlet() { public FirmaServlet() {
super(); super();
} }
/** /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
*/ * response)
@Override */
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
String pathInfo = request.getPathInfo().substring(1); IOException {
String[] pathArray = StringUtil.split(pathInfo, "/");
FirmaGetUtil firmaGetUtil = new FirmaGetUtil(); String pathInfo = request.getPathInfo().substring(1);
String metodo = pathArray[0]; String[] pathArray = StringUtil.split(pathInfo, "/");
Risposta<?> risposta = new Risposta<>(); FirmaGetUtil firmaGetUtil = new FirmaGetUtil();
String metodo = pathArray[0];
switch (metodo) { Risposta<?> risposta = new Risposta<>();
case GET_CONFIGURATION:
risposta = firmaGetUtil.getConfiguration(); switch (metodo) {
break; case GET_CONFIGURATION:
risposta = firmaGetUtil.getConfiguration();
case GET_TYPE: break;
risposta = firmaGetUtil.getType();
break; case GET_TYPE:
risposta = firmaGetUtil.getType();
case GET_TYPE_VERBALE: break;
risposta = firmaGetUtil.getTypeVerbale();
break; case GET_TYPE_VERBALE:
risposta = firmaGetUtil.getTypeVerbale();
case LOGIN: break;
if (pathArray.length == 2) {
String codiceFiscale = pathArray[1]; case LOGIN:
risposta = firmaGetUtil.loginCodiceFiscale(codiceFiscale); if (pathArray.length == 2) {
} String codiceFiscale = pathArray[1];
if (pathArray.length == 3) { risposta = firmaGetUtil.loginCodiceFiscale(codiceFiscale);
String nome = pathArray[1]; }
String cognome = pathArray[2]; if (pathArray.length == 3) {
risposta = firmaGetUtil.loginNomeCognome(nome, cognome); String nome = pathArray[1];
} String cognome = pathArray[2];
break; risposta = firmaGetUtil.loginNomeCognome(nome, cognome);
}
case VERSION: break;
risposta = firmaGetUtil.version();
break; case VERSION:
risposta = firmaGetUtil.version();
case GET_STILE: break;
risposta = firmaGetUtil.getStile();
break; case GET_STILE:
risposta = firmaGetUtil.getStile();
} break;
JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
jsonSerializer.exclude("*.class"); }
String jsonResponse = jsonSerializer.serializeDeep(risposta); JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
jsonSerializer.exclude("*.class");
response.setContentType("application/json; charset=UTF-8"); String jsonResponse = jsonSerializer.serializeDeep(risposta);
ServletResponseUtil.write(response, jsonResponse);
response.setContentType("application/json; charset=UTF-8");
} ServletResponseUtil.write(response, jsonResponse);
/** }
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/ /**
@Override * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { * response)
*/
String pathInfo = request.getPathInfo().substring(1); @Override
String[] pathArray = StringUtil.split(pathInfo, "/"); protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
StreamUtil.transfer(request.getInputStream(), outputStream); String pathInfo = request.getPathInfo().substring(1);
String token = new String(outputStream.toByteArray(), StandardCharsets.UTF_8); String[] pathArray = StringUtil.split(pathInfo, "/");
FirmaPostUtil firmaPostUtil = new FirmaPostUtil(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
String metodo = pathArray[0]; StreamUtil.transfer(request.getInputStream(), outputStream);
Risposta<?> risposta = new Risposta<>(); String token = new String(outputStream.toByteArray(), StandardCharsets.UTF_8);
switch (metodo) { FirmaPostUtil firmaPostUtil = new FirmaPostUtil();
case GET_FILE: String metodo = pathArray[0];
if (pathArray.length == 3) { Risposta<?> risposta = new Risposta<>();
String tipo = pathArray[1];
String id = pathArray[2]; switch (metodo) {
risposta = firmaPostUtil.getFile(token, tipo, id); case GET_FILE:
} if (pathArray.length == 3) {
break; String tipo = pathArray[1];
String id = pathArray[2];
case GET_FILE_LIST: risposta = firmaPostUtil.getFile(token, tipo, id);
risposta = firmaPostUtil.getFileList(token); }
break; break;
case OPEN_PRATICA: case GET_FILE_LIST:
if (pathArray.length == 2) { risposta = firmaPostUtil.getFileList(token);
String idFile = pathArray[1]; break;
risposta = firmaPostUtil.openPratica(token, idFile);
} case OPEN_PRATICA:
break; if (pathArray.length == 2) {
String idFile = pathArray[1];
case RIFIUTA: risposta = firmaPostUtil.openPratica(token, idFile);
if (pathArray.length == 5) { }
String idFile = pathArray[1]; break;
String messaggio = pathArray[2];
String cambiaFase = pathArray[3]; case RIFIUTA:
String assegna = pathArray[4]; if (pathArray.length == 5) {
risposta = firmaPostUtil.rifiuta(token, idFile, messaggio, cambiaFase, assegna); String idFile = pathArray[1];
} String messaggio = pathArray[2];
break; String cambiaFase = pathArray[3];
String assegna = pathArray[4];
case SET_FILE: risposta = firmaPostUtil.rifiuta(token, idFile, messaggio, cambiaFase, assegna);
if (pathArray.length == 3) { }
String tipo = pathArray[1]; break;
String idFile = pathArray[2];
JSONDeserializer<Map<String, String>> jsonDeserializer = JSONFactoryUtil.createJSONDeserializer(); case SET_FILE:
Map<String, String> map = jsonDeserializer.deserialize(token); if (pathArray.length == 3) {
String tipo = pathArray[1];
ServiceContext serviceContext = null; String idFile = pathArray[2];
try { JSONDeserializer<Map<String, String>> jsonDeserializer = JSONFactoryUtil
serviceContext = ServiceContextFactory.getInstance(request); .createJSONDeserializer();
} catch (PortalException | SystemException e) { Map<String, String> map = jsonDeserializer.deserialize(token);
_log.error(e.getMessage());
} ServiceContext serviceContext = null;
try {
risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile, serviceContext); serviceContext = ServiceContextFactory.getInstance(request);
} } catch (PortalException | SystemException e) {
break; _log.error(e.getMessage());
} }
JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile,
jsonSerializer.exclude("*.class"); serviceContext);
String jsonResponse = jsonSerializer.serialize(risposta); }
break;
response.setContentType("application/json; charset=UTF-8"); }
ServletResponseUtil.write(response, jsonResponse);
} JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
jsonSerializer.exclude("*.class");
String jsonResponse = jsonSerializer.serialize(risposta);
response.setContentType("application/json; charset=UTF-8");
ServletResponseUtil.write(response, jsonResponse);
}
} }

7
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaGetUtil.java

@ -150,12 +150,11 @@ public class FirmaGetUtil {
if (codiceFiscale.equals(codiceFiscaleTest)) { if (codiceFiscale.equals(codiceFiscaleTest)) {
String tokenTest = jxPortletPreferences.getValue("tokenTest", StringPool.BLANK); String tokenTest = jxPortletPreferences.getValue("tokenTest", StringPool.BLANK);
risposta.setObj(tokenTest); risposta.setObj(tokenTest);
risposta.setRisposta(RispostaCostanti.OK);
} else { } else {
// TODO da migliorare per sicurezza e poi modificare a giro // TODO da migliorare per sicurezza e poi modificare a giro
risposta.setObj(codiceFiscale); risposta.setObj(codiceFiscale);
risposta.setRisposta(RispostaCostanti.OK);
} }
risposta.setRisposta(RispostaCostanti.OK);
return risposta; return risposta;
} }
@ -178,7 +177,9 @@ public class FirmaGetUtil {
javax.portlet.PortletPreferences jxPortletPreferences = FirmaUtil.getPortletPreferences(); javax.portlet.PortletPreferences jxPortletPreferences = FirmaUtil.getPortletPreferences();
String versione = jxPortletPreferences.getValue("versione", StringPool.BLANK); String versione = jxPortletPreferences.getValue("versione", StringPool.BLANK);
Risposta<String> risposta = new Risposta<>(); Risposta<String> risposta = new Risposta<>();
if (!Validator.isBlank(versione)) { if (Validator.isBlank(versione)) {
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
} else {
risposta.setObj(versione); risposta.setObj(versione);
risposta.setRisposta(RispostaCostanti.OK); risposta.setRisposta(RispostaCostanti.OK);
} }

15
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/html/firma/init.jsp

@ -1,8 +1,7 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://liferay.com/tld/aui" prefix="aui"%> <%@taglib uri="http://liferay.com/tld/aui" prefix="aui"%>
<%@taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%> <%@taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%>
<%@taglib uri="http://liferay.com/tld/security" <%@taglib uri="http://liferay.com/tld/security" prefix="liferay-security"%>
prefix="liferay-security"%>
<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%> <%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%>
<%@taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%> <%@taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%>
<%@taglib uri="http://liferay.com/tld/util" prefix="liferay-util"%> <%@taglib uri="http://liferay.com/tld/util" prefix="liferay-util"%>
@ -24,10 +23,10 @@
<portlet:defineObjects /> <portlet:defineObjects />
<% <%
String listaFileTest = portletPreferences.getValue("listaFileTest", StringPool.BLANK); String listaFileTest = portletPreferences.getValue("listaFileTest", StringPool.BLANK);
String codiceFiscaleTest = portletPreferences.getValue("codiceFiscaleTest", StringPool.BLANK); String codiceFiscaleTest = portletPreferences.getValue("codiceFiscaleTest", StringPool.BLANK);
String tokenTest = portletPreferences.getValue("tokenTest", StringPool.BLANK); String tokenTest = portletPreferences.getValue("tokenTest", StringPool.BLANK);
String nomeTest = portletPreferences.getValue("nomeTest", StringPool.BLANK); String nomeTest = portletPreferences.getValue("nomeTest", StringPool.BLANK);
String cognomeTest = portletPreferences.getValue("cognomeTest", StringPool.BLANK); String cognomeTest = portletPreferences.getValue("cognomeTest", StringPool.BLANK);
String versione = portletPreferences.getValue("versione", StringPool.BLANK); String versione = portletPreferences.getValue("versione", StringPool.BLANK);
%> %>

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=81 build.number=82
build.date=1606914570374 build.date=1607506075611
build.auto.upgrade=true build.auto.upgrade=true
## ##

1
liferay-plugins-sdk-6.2/view_panel_pagamenti_spese.jsp

@ -1 +0,0 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
Caricamento…
Annulla
Salva