Sfoglia il codice sorgente

Fix salvataggio geologo

Salvatore La Manna 4 anni fa
parent
commit
bf3a4a1f81
  1. BIN
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/commons-logging.jar
  2. BIN
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/log4j.jar
  3. BIN
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-bridges.jar
  4. BIN
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-taglib.jar
  5. 13
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/src/it/tref/liferay/portlet/p7mpreview/P7mPreview.java
  6. 2
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/ivy.xml.MD5
  7. 15
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/hook/CfOrganizationMembershipPolicy.java
  8. 30
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  9. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
  10. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  11. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf
  12. 13
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java
  13. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/allegati_action.jsp
  14. 3
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp
  15. 4
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp
  16. 3
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp
  17. 5
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/header.jsp
  18. 2
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/build.xml
  19. 43
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/action/StartUpAction.java
  20. 19
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java
  21. 5
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/ExtractorResponse.java
  22. 120
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaPostUtil.java
  23. 9
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaUtil.java
  24. 2
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailEngine.java
  25. 7
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/.classpath
  26. 7
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AttributesBuilder.java
  27. 34
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditModelListener.java
  28. 37
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditUtil.java
  29. 8
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/permission/HistoryPermission.java
  30. 2
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/util/Constants.java
  31. 3
      liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/util/PortletKeys.java
  32. 1
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/protocollo/model/Fascicolo.java
  33. 27
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/protocollo/model/Protocollo.java
  34. 39
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java
  35. 2
      liferay-plugins-sdk-6.2/shared/portos-kaleo-shared/.classpath

BIN
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

13
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/src/it/tref/liferay/portlet/p7mpreview/P7mPreview.java

@ -1,6 +1,8 @@
package it.tref.liferay.portlet.p7mpreview;
import com.liferay.portal.kernel.lar.PortletDataContext;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.FileVersion;
import com.liferay.portal.kernel.xml.Element;
@ -9,6 +11,7 @@ import com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor;
import java.util.List;
public class P7mPreview extends DLPreviewableProcessor {
Log _log = LogFactoryUtil.getLog(P7mPreview.class);
@Override
public void afterPropertiesSet() throws Exception {
@ -18,23 +21,21 @@ public class P7mPreview extends DLPreviewableProcessor{
@Override
public boolean isSupported(String mimeType) {
_log.info("isSupported(\"" + mimeType + "\"");
// TODO Auto-generated method stub
return false;
}
@Override
protected void doExportGeneratedFiles(
PortletDataContext portletDataContext, FileEntry fileEntry,
protected void doExportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry,
Element fileEntryElement) throws Exception {
// TODO Auto-generated method stub
}
@Override
protected void doImportGeneratedFiles(
PortletDataContext portletDataContext, FileEntry fileEntry,
FileEntry importedFileEntry, Element fileEntryElement)
throws Exception {
protected void doImportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry,
FileEntry importedFileEntry, Element fileEntryElement) throws Exception {
// TODO Auto-generated method stub
}

2
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/ivy.xml.MD5

@ -1 +1 @@
875e1c4437fb71ef78ec054720f63e50
2c267788e15963b22e4e720e12f5611c

15
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/hook/CfOrganizationMembershipPolicy.java

@ -27,7 +27,8 @@ public class CfOrganizationMembershipPolicy extends BaseOrganizationMembershipPo
private static Log _log = LogFactoryUtil.getLog(CfOrganizationMembershipPolicy.class);
@Override
public void checkMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {}
public void checkMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {
}
@Override
public boolean isMembershipAllowed(long userId, long groupId) {
@ -35,7 +36,8 @@ public class CfOrganizationMembershipPolicy extends BaseOrganizationMembershipPo
try {
Group group = GroupLocalServiceUtil.getGroup(groupId);
Company company = CompanyLocalServiceUtil.getCompany(group.getCompanyId());
String allowedCF = (String) company.getExpandoBridge().getAttribute(Constants.CF_ORGANIZATION_MEMBERSHIP, false);
String allowedCF = (String) company.getExpandoBridge().getAttribute(
Constants.CF_ORGANIZATION_MEMBERSHIP, false);
List<String> allowedCFs = Arrays.asList(allowedCF.split("\\,"));
@ -67,14 +69,17 @@ public class CfOrganizationMembershipPolicy extends BaseOrganizationMembershipPo
}
@Override
public void propagateMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {}
public void propagateMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {
}
@Override
public void verifyPolicy(Organization organization) {}
public void verifyPolicy(Organization organization) {
}
@Override
public void verifyPolicy(Organization organization, Organization oldOrganization,
List<AssetCategory> oldAssetCategories, List<AssetTag> oldAssetTags,
Map<String, Serializable> oldExpandoAttributes) {}
Map<String, Serializable> oldExpandoAttributes) {
}
}

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

@ -746,13 +746,19 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException,
PortalException {
ControlloPratica controllo = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(controlloPraticaId);
IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId());
if (pratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)) {
return 0L;
}
Date apertura = pratica.getDtPratica();
Date chiusura = null;
long stop = 0;
long stop = 0L;
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil
@ -764,35 +770,39 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
for (Avviso avviso : avvisi) {
if (!avviso.isAnnullato()) {
String tipo = avviso.getTipoDocumento().toUpperCase();
_log.debug("Avviso " + avviso.getTipoDocumento() + " " + avviso.getDtAvviso() + " "
+ avviso.getCreateDate());
if (tipo.equals(StatoPraticaConstants.INTEGRAZIONE)) {
_log.debug("Avviso " + tipo + " " + avviso.getDtAvviso() + " " + avviso.getCreateDate());
switch (tipo) {
case StatoPraticaConstants.INTEGRAZIONE:
start = avviso.getCreateDate();
end = null;
if (Validator.isNotNull(chiusura)) {
apertura = avviso.getDtAvviso();
chiusura = null;
stop = 0;
stop = 0L;
_log.debug("Reset apertura al " + apertura);
}
_log.debug("IN start = " + start + ", pratica " + pratica.getNumeroProgetto());
} else if (tipo.equals(StatoPraticaConstants.VIDIMATA)) {
break;
case StatoPraticaConstants.VIDIMATA:
if (Validator.isNull(chiusura)) {
end = avviso.getCreateDate();
_log.debug(tipo + " end = " + end + ", pratica " + pratica.getNumeroProgetto());
} else {
apertura = avviso.getDtAvviso();
chiusura = start = end = null;
stop = 0;
stop = 0L;
_log.debug("Reset apertura al " + apertura);
}
} else if (tipo.equals(StatoPraticaConstants.INTEGRAZIONE_ACCETTATA)) {
break;
case StatoPraticaConstants.INTEGRAZIONE_ACCETTATA:
end = avviso.getCreateDate();
_log.debug(tipo + " end = " + end + ", pratica " + pratica.getNumeroProgetto());
} else if (tipo.equals(StatoPraticaConstants.AUTORIZZATA)
|| tipo.equals(StatoPraticaConstants.NON_AUTORIZZATA)) {
break;
case StatoPraticaConstants.AUTORIZZATA:
case StatoPraticaConstants.NON_AUTORIZZATA:
chiusura = avviso.getCreateDate();
_log.debug("Chiusura al " + chiusura);
break;
}
}
if (Validator.isNotNull(start) && Validator.isNotNull(end)) {

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

@ -184,12 +184,11 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
boolean normDprg01, boolean normDprg02, boolean normAnr, boolean normArt3com3,
boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01,
boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt,
String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc, boolean tcNuovaCostruzioneComplessa,
ServiceContext serviceContext, boolean bozza, boolean disabledSubmit, boolean geoDisabledSubmit)
throws PortalException, SystemException {
String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc,
boolean tcNuovaCostruzioneComplessa, ServiceContext serviceContext, boolean bozza,
boolean disabledSubmit, boolean geoDisabledSubmit) throws PortalException, SystemException {
DettPratica dettPratica = null;
if (!disabledSubmit && DelegheUtil.hasDelegaCompilazioneDomanda(userId, dettPraticaId)) {
dettPratica = dettPraticaLocalService.updateDettPraticaDatiDomanda(userId, dettPraticaId,
@ -227,8 +226,8 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
normEsenteSpese, normDpr01Dep, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01,
normDm02, normDm03, normDm2018, normDprg01, normDprg02, normAnr, normArt3com3,
normArt3com4, normOrd01, normDm04, normDm05, normCI01, normLTC01, suap, normSismaBonus,
clRischioPreInt, clRischioPostInt, intervFinPub, intervFinPubDesc, tcNuovaCostruzioneComplessa,
serviceContext, bozza);
clRischioPreInt, clRischioPostInt, intervFinPub, intervFinPubDesc,
tcNuovaCostruzioneComplessa, serviceContext, bozza);
}
if (!geoDisabledSubmit && DelegheUtil.hasDelegaCompilazioneSezioneGeologica(userId, dettPraticaId)) {

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

@ -13,8 +13,8 @@
##
build.namespace=portos_bo
build.number=2526
build.date=1608047904204
build.number=2533
build.date=1608199554355
build.auto.upgrade=true
##

7
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf

@ -60,7 +60,8 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
}
//Informazioni relative al workflow
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),controlloPratica.getPrimaryKey());
controlloPratica.getCompanyId(), controlloPratica.getGroupId(), ControlloPratica.class.getName(),
controlloPratica.getPrimaryKey());
List<WorkflowTask> listaTask = null;
WorkflowInstance workflowInstance = null;
@ -215,8 +216,10 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
<liferay-ui:search-container-column-text name="GG*" cssClass="text-center">
<%
long days = ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId());
if (days > 0) {
out.print(days);
}
%>
<%=days %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-jsp path="/html/gestioneattivita/action_button.jsp" align="right" cssClass="text-center"/>

13
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java

@ -909,7 +909,6 @@ public class FascicoloFePortlet extends MVCPortlet {
}
public void saveDettPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(),
actionRequest);
long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
@ -1341,7 +1340,8 @@ public class FascicoloFePortlet extends MVCPortlet {
boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico");
boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest,
"tcRiparazioneInterventoLocale");
boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzioneComplessa");
boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest,
"tcNuovaCostruzioneComplessa");
boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA");
boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera");
@ -1590,7 +1590,8 @@ public class FascicoloFePortlet extends MVCPortlet {
normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018,
normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04,
normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, clRischioPostInt,
intervFinPub, intervFinPubDesc, tcNuovaCostruzioneComplessa, serviceContext, bozza, disabledSubmit, geoDisabledSubmit);
intervFinPub, intervFinPubDesc, tcNuovaCostruzioneComplessa, serviceContext, bozza,
disabledSubmit, geoDisabledSubmit);
String redirect = ParamUtil.getString(actionRequest, "redirect");
if (Validator.isNull(redirect)) {
@ -1800,7 +1801,8 @@ public class FascicoloFePortlet extends MVCPortlet {
boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico");
boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest,
"tcRiparazioneInterventoLocale");
boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzioneComplessa");
boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest,
"tcNuovaCostruzioneComplessa");
boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA");
boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera");
@ -2059,7 +2061,8 @@ public class FascicoloFePortlet extends MVCPortlet {
normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018,
normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04,
normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, clRischioPostInt,
intervFinPub, intervFinPubDesc, tcNuovaCostruzioneComplessa, serviceContext, bozza, disabledSubmit, geoDisabledSubmit);
intervFinPub, intervFinPubDesc, tcNuovaCostruzioneComplessa, serviceContext, bozza,
disabledSubmit, geoDisabledSubmit);
String redirect = ParamUtil.getString(actionRequest, "redirect");
if (Validator.isNull(redirect)) {

2
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/allegati_action.jsp

@ -1,5 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
@ -21,7 +20,6 @@
<%@include file="/html/allegatipratica/init.jsp"%>
<%
String redirect = ParamUtil.getString(request, "backUrl");
String comingFrom = ParamUtil.getString(request, "comingFrom");
long classPk = ParamUtil.getLong(request, "classPk");

3
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp

@ -90,7 +90,6 @@ if (Validator.isNotNull(request.getParameter("disabled"))) {
Boolean hasDelegaCompilazioneDomanda = (Boolean) SessionUtil.getDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda");
if (null == hasDelegaCompilazioneDomanda) {
hasDelegaCompilazioneDomanda = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),classPk);
SessionUtil.setDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda", hasDelegaCompilazioneDomanda);
}
disabledInput = !hasDelegaCompilazioneDomanda
&& !DelegheUtil.hasDelegaFirmaAllegati(user.getUserId(),classPk);
@ -429,7 +428,7 @@ for (String codiceDoc:tipologiaAllegati) {
<c:otherwise>
<c:if test="<%= !inBO %>">
<c:if test="<%= !disabledInput || canSignGeoDocs %>">
<liferay-util:include page="/html/allegatipratica/allegatWi_action.jsp"
<liferay-util:include page="/html/allegatipratica/allegati_action.jsp"
servletContext="<%= application %>">
<liferay-util:param name="backUrl" value="<%= currentURL %>" />
<liferay-util:param name="comingFrom" value="<%= comingFrom %>" />

4
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp

@ -1,6 +1,4 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalService"%>
@ -43,7 +41,6 @@
<%@ include file="/html/allegatipratica/init.jsp"%>
<%
Log _log = LogFactoryUtil.getLog("view_accordion.jsp");
String comingFrom = ParamUtil.getString(request,"comingFrom",
GetterUtil.getString(
PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"),
@ -151,7 +148,6 @@
<%
for(DocPratica docPratica:docPraticas){
long docPraticaId = docPratica.getDocPraticaId();
_log.info("Processo docPratica id = "+docPraticaId);
%>
<tr>
<td class="text-center"><span

3
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp

@ -53,7 +53,8 @@ Boolean pagamentoIsEnable = ValidazionePraticaUtil.pagamentoIsEnable(dettPratica
SessionUtil.setDettPraticaObject(request, dettPraticaId, "pagamentoIsEnable", pagamentoIsEnable);
boolean disabledInput = !DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(), dettPraticaId);
boolean geoDisabledInput = !hasDelegaCompilazioneDomanda || !praticaIsEditable;
boolean geoDisabledInput = !DelegheUtil.hasDelegaCompilazioneSezioneGeologica(user.getUserId(), dettPraticaId)
|| !praticaIsEditable;
String[] pageDatiDomanda = new String[] {
"page_dettagli_principali", "page_soggetti", "page_desc_edificio",

5
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/header.jsp

@ -21,7 +21,10 @@ request.setAttribute("bean.dettPratica", dettPratica);
long soggettoId = ParamUtil.getLong(request, "soggettoId");
boolean disabledInput = ParamUtil.getBoolean(request, "disabledInput");
boolean inBO = ParamUtil.getBoolean(request, "inBO", false);
boolean praticaIsEditable = (Boolean) SessionUtil.getDettPraticaObject(request, dettPratica.getDettPraticaId(), "praticaIsEditable");
Boolean praticaIsEditable = (Boolean) SessionUtil.getDettPraticaObject(request, dettPratica.getDettPraticaId(), "praticaIsEditable");
if (null == praticaIsEditable) {
praticaIsEditable = ValidazionePraticaUtil.praticaIsEditable(dettPratica.getDettPraticaId());
}
boolean hasAsseverazioniAttive = AsseverazioniUtil.hasAsseverazioniAttive(dettPratica.getDettPraticaId());
%>

2
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/build.xml

@ -2,6 +2,6 @@
<!DOCTYPE project>
<project name="portos-firma-portlet" basedir="." default="deploy">
<property name="import.shared" value="portos-firma-shared" />
<property name="import.shared" value="portos-bo-shared,portos-firma-shared" />
<import file="../build-common-portlet.xml" />
</project>

43
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/action/StartUpAction.java

@ -1,6 +1,5 @@
package it.tref.liferay.portos.firma.action;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.SimpleAction;
import com.liferay.portal.kernel.exception.PortalException;
@ -41,37 +40,41 @@ public class StartUpAction extends SimpleAction {
// Organization custom fields
addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url_pdf_extractor",
ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions);
addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url-bo-gestione-pratica-firma",
ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions);
addExpandoColumnIfNotExists(companyId, Company.class.getName(),
"url-bo-gestione-pratica-firma", ExpandoColumnConstants.STRING, true, false,
defaultActions, guestActions);
} catch (Exception e) {
_log.error("Errore nella procedura automatizzata di configurazione", e);
}
}
}
private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, int type,
boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) throws SystemException {
private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name,
int type, boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions)
throws SystemException {
long classNameId = PortalUtil.getClassNameId(className);
ExpandoTable expandoTable = null;
try {
expandoTable =
ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME);
expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId,
ExpandoTableConstants.DEFAULT_TABLE_NAME);
} catch (PortalException e) {
try {
expandoTable =
ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME);
expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId,
ExpandoTableConstants.DEFAULT_TABLE_NAME);
} catch (PortalException e1) {
}
}
ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name);
ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil
.getColumn(expandoTable.getTableId(), name);
if (expandoColumn == null) {
try {
expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type);
expandoColumn = ExpandoColumnLocalServiceUtil
.addColumn(expandoTable.getTableId(), name, type);
} catch (PortalException e) {
}
@ -106,15 +109,15 @@ public class StartUpAction extends SimpleAction {
Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER);
Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(),
guestActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(),
defaultActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(),
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(),
defaultActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId,
ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(), guestActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId,
ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(), defaultActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId,
ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(), defaultActions);
} catch (PortalException e) {
}

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

@ -53,15 +53,16 @@ public class FirmaServlet extends HttpServlet {
* @see HttpServlet#HttpServlet()
*/
public FirmaServlet() {
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 {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
String pathInfo = request.getPathInfo().substring(1);
String[] pathArray = StringUtil.split(pathInfo, "/");
@ -113,10 +114,12 @@ public class FirmaServlet extends HttpServlet {
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
String pathInfo = request.getPathInfo().substring(1);
String[] pathArray = StringUtil.split(pathInfo, "/");
@ -163,7 +166,8 @@ public class FirmaServlet extends HttpServlet {
if (pathArray.length == 3) {
String tipo = pathArray[1];
String idFile = pathArray[2];
JSONDeserializer<Map<String, String>> jsonDeserializer = JSONFactoryUtil.createJSONDeserializer();
JSONDeserializer<Map<String, String>> jsonDeserializer = JSONFactoryUtil
.createJSONDeserializer();
Map<String, String> map = jsonDeserializer.deserialize(token);
ServiceContext serviceContext = null;
@ -173,7 +177,8 @@ public class FirmaServlet extends HttpServlet {
_log.error(e.getMessage());
}
risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile, serviceContext);
risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile,
serviceContext);
}
break;
}

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

@ -3,19 +3,14 @@ package it.tref.liferay.portos.firma.util;
import java.util.List;
public class ExtractorResponse {
private boolean success;
private List<String> cf;
public boolean isSuccess() {
return success;
}
public List<String> getCf() {
return cf;
}
}

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

@ -45,28 +45,29 @@ public class FirmaPostUtil {
public Risposta<List<RestFile>> getFileList(String token) {
/**
* Verificare che il token sia il codice fiscale altrimenti c e un metodo che estre il cod fisc
* dal token userCodiceFiscalePrimaFirma = al cod fisc di Avviso...tipoAvviso = S &&
* fileEntryIdInvio = 0 && fileEntryIdBase != 0 && !rifiutato ( aggiungere campo al service e
* anche campo dtRifiuto) con il fileEntryIdBase prendo il file e uso per riempire lista di
* ritorno
* Verificare che il token sia il codice fiscale altrimenti c e un
* metodo che estre il cod fisc dal token userCodiceFiscalePrimaFirma =
* al cod fisc di Avviso...tipoAvviso = S && fileEntryIdInvio = 0 &&
* fileEntryIdBase != 0 && !rifiutato ( aggiungere campo al service e
* anche campo dtRifiuto) con il fileEntryIdBase prendo il file e uso
* per riempire lista di ritorno
*
* NEL RITORNO "tipoDocumento" è documenttype con intPraticaId faccio fetch su tabella
* intPratica e prendo campo tipopratica
* NEL RITORNO "tipoDocumento" è documenttype con intPraticaId faccio
* fetch su tabella intPratica e prendo campo tipopratica
*
*/
long[] companyIds = PortalUtil.getCompanyIds();
Risposta<List<RestFile>> risposta = new Risposta<List<RestFile>>();
for (long companyId : companyIds) {
Company company = null;
try {
company = CompanyLocalServiceUtil.getCompany(companyId);
} catch (Exception e) {
_log.error(e, e);
}
String urlPdfExtractor = (String) company.getExpandoBridge().getAttribute("url_pdf_extractor", false);
String urlPdfExtractor = (String) company.getExpandoBridge().getAttribute("url_pdf_extractor",
false);
if (Validator.isNotNull(urlPdfExtractor)) {
byte[] fileArray = Base64.decode(token);
@ -75,20 +76,17 @@ public class FirmaPostUtil {
List<RestFile> listaFile = new ArrayList<RestFile>();
// Ricordarsi di verificare che nel token ci sia il cod fisc in chiaro altrimenti va
// estratto
try {
// List<Avviso> listaAvvisi = AvvisoLocalServiceUtil.findByIntPratica(1001, -1, -1, null);
List<Avviso> listaAvvisi = AvvisoLocalServiceUtil.getListaAvvisiPerApplet(cf);
if (Validator.isNotNull(listaAvvisi) && listaAvvisi.size() > 0) {
for (Avviso avviso : listaAvvisi) {
if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso.getFileEntryIdBase());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso
.getFileEntryIdBase());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso
.getIntPraticaId());
if (Validator.isNotNull(fileEntry)) {
RestFile restFile = new RestFile();
@ -98,12 +96,14 @@ public class FirmaPostUtil {
String tipoDocumento = avviso.translateTipoDocumento();
restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY
restFile.setNomeFile(LanguageUtil.get(Locale.ITALIAN, tipoDocumento) + StringPool.SPACE
+ StringPool.DASH + StringPool.SPACE + intPratica.getTitle(Locale.ITALIAN, true));
restFile.setNomeFile(LanguageUtil.get(Locale.ITALIAN, tipoDocumento)
+ StringPool.SPACE + StringPool.DASH + StringPool.SPACE
+ intPratica.getTitle(Locale.ITALIAN, true));
restFile.setFile("");
Group group = GroupLocalServiceUtil.getGroup(avviso.getGroupId());
Organization organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId());
Organization organization = OrganizationLocalServiceUtil
.getOrganization(group.getOrganizationId());
restFile.setTipoPratica(organization.getName());
listaFile.add(restFile);
@ -127,8 +127,8 @@ public class FirmaPostUtil {
public Risposta<RestFile> getFile(String token, String tipo, String id) {
/*
* verra passato l avviso id facciamo query per riprendere file entry e ritorniamo quel file con
* il contenuto
* verra passato l avviso id facciamo query per riprendere file entry e
* ritorniamo quel file con il contenuto
*/
Risposta<RestFile> risposta = new Risposta<RestFile>();
@ -139,28 +139,21 @@ public class FirmaPostUtil {
if (Validator.isNotNull(avviso)) {
if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso.getFileEntryIdBase());
DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso
.getFileEntryIdBase());
if (Validator.isNotNull(fileEntry)) {
RestFile restFile = new RestFile();
restFile.setIdFile(GetterUtil.getInteger(avviso.getAvvisoId()));
restFile.setDataInvio(new Date());
restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY
restFile.setNomeFile(fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension());
restFile.setNomeFile(fileEntry.getTitle() + StringPool.PERIOD
+ fileEntry.getExtension());
restFile.setTipoPratica(StringPool.BLANK);
// Recupero il tipo di pratica
/*
* if (Validator.isNotNull(avviso.getIntPraticaId())) { IntPratica intPratica =
* IntPraticaLocalServiceUtil.fetchIntPratica(avviso.getIntPraticaId()); if
* (Validator.isNotNull(intPratica)) {
* restFile.setTipoPratica(intPratica.getTipoPratica()); } }
*/
// Inserisco il contenuto del file in Base64
InputStream fileInputStream =
DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion());
InputStream fileInputStream = DLFileEntryLocalServiceUtil.getFileAsStream(
fileEntry.getFileEntryId(), fileEntry.getVersion());
ByteArrayOutputStream bao = new ByteArrayOutputStream();
IOUtils.copy(fileInputStream, bao);
restFile.setFile(Base64.encode(bao.toByteArray()));
@ -172,13 +165,7 @@ public class FirmaPostUtil {
}
}
} catch (SystemException e) {
_log.error(e.getMessage(), e);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
} catch (PortalException e) {
_log.error(e.getMessage(), e);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
} catch (IOException e) {
} catch (SystemException | PortalException | IOException e) {
_log.error(e.getMessage(), e);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
}
@ -189,9 +176,10 @@ public class FirmaPostUtil {
public Risposta<String> openPratica(String token, String idFile) {
/**
* mi arriva l'avviso id e mi recupero l intpraticaid bisogna ritornare ad una pagina privata di
* bo con la view sistemata per gestire direttamente la pratica portos-bo-portlet fascicolo
* portlet ..... intpraticaid
* mi arriva l'avviso id e mi recupero l intpraticaid bisogna ritornare
* ad una pagina privata di bo con la view sistemata per gestire
* direttamente la pratica portos-bo-portlet fascicolo portlet .....
* intpraticaid
*/
Risposta<String> risposta = new Risposta<String>();
@ -200,22 +188,24 @@ public class FirmaPostUtil {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile));
if (Validator.isNotNull(avviso)) {
// Prendo la url della pagina da ritornare settata nel expando custom field della company
// di riferimento e ci aggiungo nella url l attributo relativo all id della intPratica
// Prendo la url della pagina da ritornare settata nel expando
// custom field della company
// di riferimento e ci aggiungo nella url l attributo relativo
// all id della intPratica
Company company = CompanyLocalServiceUtil.fetchCompany(avviso.getCompanyId());
if (Validator.isNotNull(company)) {
String urlToBack =
GetterUtil.getString(company.getExpandoBridge().getAttribute("url-bo-gestione-pratica-firma", false));
String urlToBack = GetterUtil.getString(company.getExpandoBridge().getAttribute(
"url-bo-gestione-pratica-firma", false));
urlToBack = urlToBack + "&_1_WAR_portosboportlet_intPraticaId=" + avviso.getIntPraticaId();
urlToBack = urlToBack + "&_1_WAR_portosboportlet_intPraticaId="
+ avviso.getIntPraticaId();
risposta.setObj(urlToBack);
risposta.setRisposta(RispostaCostanti.OK);
}
}
} catch (SystemException e) {
_log.error(e.getMessage(), e);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
@ -225,16 +215,17 @@ public class FirmaPostUtil {
}
public Risposta<Boolean> rifiuta(String token, String idFile, String messaggio, String cambiaFase, String assegna) {
public Risposta<Boolean> rifiuta(String token, String idFile, String messaggio, String cambiaFase,
String assegna) {
/**
* mi arriva l'avviso id lo recupero e setto rifiutato e dtRifiuto e aggiorno
* mi arriva l'avviso id lo recupero e setto rifiutato e dtRifiuto e
* aggiorno
*
*
*/
Risposta<Boolean> risposta = new Risposta<Boolean>();
try {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile));
@ -261,17 +252,16 @@ public class FirmaPostUtil {
ServiceContext serviceContext) {
/**
* Mi arriverà l avviso id e il contenuto e creero un file entry e aggiornero l avviso con il
* fileEntryIdInvio
* Mi arriverà l avviso id e il contenuto e creero un file entry e
* aggiornero l avviso con il fileEntryIdInvio
*
* per la creazione del fileentry devo vedere SchedulerGeneraDocumento per creare il filename e
* la folder
* per la creazione del fileentry devo vedere SchedulerGeneraDocumento
* per creare il filename e la folder
*
*/
Risposta<Boolean> risposta = new Risposta<Boolean>();
try {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile));
if (Validator.isNotNull(avviso)) {
@ -280,22 +270,12 @@ public class FirmaPostUtil {
serviceContext.setScopeGroupId(avviso.getGroupId());
serviceContext.setUserId(avviso.getUserId());
avviso =
AvvisoLocalServiceUtil
.addFileFirmato(avviso.getAvvisoId(), avviso.getClassPk(), fileToSave, serviceContext);
avviso = AvvisoLocalServiceUtil.addFileFirmato(avviso.getAvvisoId(), avviso.getClassPk(),
fileToSave, serviceContext);
risposta.setObj(true);
risposta.setRisposta(RispostaCostanti.OK);
}
} catch (SystemException e) {
_log.error(e.getMessage(), e);
risposta.setObj(false);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
} catch (PortalException e) {
_log.error(e.getMessage(), e);
risposta.setObj(false);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
} catch (Exception e) {
_log.error(e.getMessage(), e);
risposta.setObj(false);

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

@ -33,9 +33,8 @@ public class FirmaUtil {
String preferencesXML;
javax.portlet.PortletPreferences jxPortletPreferences = null;
try {
pr =
PortletPreferencesLocalServiceUtil.getPortletPreferences(PortletKeys.PREFS_OWNER_TYPE_COMPANY, 0,
"firma_WAR_portosfirmaportlet");
pr = PortletPreferencesLocalServiceUtil.getPortletPreferences(
PortletKeys.PREFS_OWNER_TYPE_COMPANY, 0, "firma_WAR_portosfirmaportlet");
preferencesXML = pr.get(0).getPreferences();
jxPortletPreferences = PortletPreferencesFactoryUtil.fromDefaultXML(preferencesXML);
} catch (SystemException e) {
@ -57,7 +56,6 @@ public class FirmaUtil {
// long companyId = CompanyThreadLocal.getCompanyId();
ContentBody body = new FileBody(file);
MultipartEntity entity = new MultipartEntity();
@ -70,7 +68,8 @@ public class FirmaUtil {
HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() != 200) {
throw new RuntimeException("Failed : HTTP error code : " + response.getStatusLine().getStatusCode());
throw new RuntimeException("Failed : HTTP error code : "
+ response.getStatusLine().getStatusCode());
}
InputStream inputStream = response.getEntity().getContent();

2
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailEngine.java

@ -59,7 +59,7 @@ import javax.mail.internet.MimeMultipart;
* @author Brian Wing Shun Chan
* @author Brian Myunghun Kim
* @author Jorge Ferrer
* @author Neil Griffin
* @author Neil Griffin<<
* @author Thiago Moreira
* @author Brett Swaim
*/

7
liferay-plugins-sdk-6.2/shared/portos-audit-shared/.classpath

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portal-service.jar" sourcepath="/home/portos/sources/liferay-portal-src-6.2-ce-ga6">
<attributes>
<attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="classes"/>
</classpath>

7
liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AttributesBuilder.java

@ -31,7 +31,8 @@ public class AttributesBuilder<T> {
public void add(String name) {
DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z", TimeZone.getTimeZone("UTC"));
DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z",
TimeZone.getTimeZone("UTC"));
Object newValueObj = BeanPropertiesUtil.getObject(_newBean, name);
Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name);
@ -52,7 +53,8 @@ public class AttributesBuilder<T> {
public void addLocalized(String name) {
DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z", TimeZone.getTimeZone("UTC"));
DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z",
TimeZone.getTimeZone("UTC"));
Object newValueObj = BeanPropertiesUtil.getObject(_newBean, name);
Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name);
@ -121,7 +123,6 @@ public class AttributesBuilder<T> {
}
}
class Attribute {
private String _name;

34
liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditModelListener.java

@ -16,7 +16,6 @@ import com.liferay.portal.model.BaseModelListener;
public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseModelListener<T> {
@Override
public void onBeforeCreate(T model) throws ModelListenerException {
@ -45,7 +44,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
String newValue = array.getJSONObject(i).getString("newValue");
if (name.equalsIgnoreCase(getStatoAttributesName())) {
routeAuditMessage(convertStatoToEventString(newValue), newModel, getMessage(newModel), attributes, true);
routeAuditMessage(convertStatoToEventString(newValue), newModel,
getMessage(newModel), attributes, true);
if (array.length() == 1) {
isUpdate = false;
@ -57,8 +57,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
}
}
if (isUpdate) {
boolean sended =
routeAuditMessage(Constants.UPDATE.toUpperCase(), newModel, getMessage(newModel), attributes, false);
boolean sended = routeAuditMessage(Constants.UPDATE.toUpperCase(), newModel,
getMessage(newModel), attributes, false);
if (sended) {
onBeforeRealUpdate(newModel, oldModel);
}
@ -98,7 +98,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
protected JSONObject getModifiedAttributes(T newRelazioniAnagrafiche, T oldRelazioniAnagrafiche) {
AttributesBuilder<T> attributesBuilder = new AttributesBuilder<T>(newRelazioniAnagrafiche, oldRelazioniAnagrafiche);
AttributesBuilder<T> attributesBuilder = new AttributesBuilder<T>(newRelazioniAnagrafiche,
oldRelazioniAnagrafiche);
Map<String, Object> model = newRelazioniAnagrafiche.getModelAttributes();
Iterator<String> modelList = model.keySet().iterator();
@ -112,8 +113,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
return attributesBuilder.getAttributesJSON();
}
protected boolean routeAuditMessage(String eventAction, T model, String message, JSONObject additionalInfo,
boolean cambiostato) throws ModelListenerException {
protected boolean routeAuditMessage(String eventAction, T model, String message,
JSONObject additionalInfo, boolean cambiostato) throws ModelListenerException {
String className = getClassName(model);
if (cambiostato) {
AuditUtil.doCambioStato(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message,
@ -123,13 +124,15 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
} else if (additionalInfo == null) {
AuditUtil.doLog(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message,
getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model),
getRelatedClassName(model), getRelatedClassPk(model), getAdditionalInfoForLogEvent(eventAction, model));
getRelatedClassName(model), getRelatedClassPk(model),
getAdditionalInfoForLogEvent(eventAction, model));
onBeforeLog(model);
return true;
} else {
return AuditUtil.doStorico(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message,
getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model),
getRelatedClassName(model), getRelatedClassPk(model), additionalInfo, null);
return AuditUtil.doStorico(getEventType(model), className, (Long) model.getPrimaryKeyObj(),
message, getEventCategory(model), eventAction, getParentClassName(model),
getParentClassPk(model), getRelatedClassName(model), getRelatedClassPk(model),
additionalInfo, null);
}
}
@ -139,11 +142,14 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
return null;
}
protected void onBeforeRealUpdate(T newModel, T oldModel) throws ModelListenerException {}
protected void onBeforeRealUpdate(T newModel, T oldModel) throws ModelListenerException {
}
protected void onBeforeLog(T model) throws ModelListenerException {}
protected void onBeforeLog(T model) throws ModelListenerException {
}
protected void onBeforeCambioStato(T model) throws ModelListenerException {}
protected void onBeforeCambioStato(T model) throws ModelListenerException {
}
protected Long getParentClassPk(T model) {
return 0l;

37
liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditUtil.java

@ -24,24 +24,27 @@ public class AuditUtil {
public static void doLog(String eventType, String className, long classPK, String message)
throws ModelListenerException {
doLog(eventType, className, classPK, message, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK, 0l,
StringPool.BLANK, 0l, null);
doLog(eventType, className, classPK, message, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK,
0l, StringPool.BLANK, 0l, null);
}
public static void doLog(String eventType, String className, long classPK, String message, String eventCategory,
String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, Long relatedClassPK,
JSONObject additionalInfo) throws ModelListenerException {
public static void doLog(String eventType, String className, long classPK, String message,
String eventCategory, String eventAction, String parentClassName, Long parentClassPK,
String relatedClassName, Long relatedClassPK, JSONObject additionalInfo)
throws ModelListenerException {
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_LOG, eventCategory, eventAction,
parentClassName, parentClassPK, relatedClassName, relatedClassPK, null, additionalInfo);
}
public static boolean doStorico(String eventType, String className, long classPK, String message,
String eventCategory, String eventAction, String parentClassName, Long parentClassPK, String relatedClassName,
Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) throws ModelListenerException {
String eventCategory, String eventAction, String parentClassName, Long parentClassPK,
String relatedClassName, Long relatedClassPK, JSONObject diff, JSONObject additionalInfo)
throws ModelListenerException {
if (diff != null && !diff.isNull("attributes") && diff.getJSONArray("attributes").length() > 0) {
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_STORICO, eventCategory, eventAction,
parentClassName, parentClassPK, relatedClassName, relatedClassPK, diff, additionalInfo);
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_STORICO, eventCategory,
eventAction, parentClassName, parentClassPK, relatedClassName, relatedClassPK, diff,
additionalInfo);
return true;
} else {
return false;
@ -50,14 +53,15 @@ public class AuditUtil {
public static void doCambioStato(String eventType, String className, long classPK, String message,
String eventCategory, String eventAction) throws ModelListenerException {
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_CAMBIO_STATO, eventCategory, eventAction,
StringPool.BLANK, 0l, StringPool.BLANK, 0l, null, null);
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_CAMBIO_STATO, eventCategory,
eventAction, StringPool.BLANK, 0l, StringPool.BLANK, 0l, null, null);
}
private static void doAudit(String eventType, String className, long classPK, String message, String auditEventTable,
String eventCategory, String eventAction, String parentClassName, Long parentClassPK, String relatedClassName,
Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) throws ModelListenerException {
private static void doAudit(String eventType, String className, long classPK, String message,
String auditEventTable, String eventCategory, String eventAction, String parentClassName,
Long parentClassPK, String relatedClassName, Long relatedClassPK, JSONObject diff,
JSONObject additionalInfo) throws ModelListenerException {
try {
if (additionalInfo == null)
@ -90,9 +94,8 @@ public class AuditUtil {
additionalInfo.put("doAsUserName", PortalUtil.getUserName(userId, StringPool.BLANK));
}
AuditMessage auditMessage =
new AuditMessage(eventType, companyId, realUserId, realUserName, className, String.valueOf(classPK), message,
additionalInfo);
AuditMessage auditMessage = new AuditMessage(eventType, companyId, realUserId, realUserName,
className, String.valueOf(classPK), message, additionalInfo);
AuditRouterUtil.route(auditMessage);
} catch (PortalException e) {

8
liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/permission/HistoryPermission.java

@ -11,7 +11,8 @@ public class HistoryPermission {
public static final String RESOURCE_NAME = "it.tref.liferay.portos.audit.history";
public static void check(PermissionChecker permissionChecker, long groupId, String actionId) throws PortalException {
public static void check(PermissionChecker permissionChecker, long groupId, String actionId)
throws PortalException {
if (!contains(permissionChecker, groupId, actionId)) {
throw new PrincipalException();
@ -20,9 +21,8 @@ public class HistoryPermission {
public static boolean contains(PermissionChecker permissionChecker, long groupId, String actionId) {
Boolean hasPermission =
StagingPermissionUtil.hasPermission(permissionChecker, groupId, RESOURCE_NAME, groupId,
PortletKeys.AUDIT_DETAIL, actionId);
Boolean hasPermission = StagingPermissionUtil.hasPermission(permissionChecker, groupId,
RESOURCE_NAME, groupId, PortletKeys.AUDIT_DETAIL, actionId);
if (hasPermission != null) {
return hasPermission.booleanValue();

2
liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/util/Constants.java

@ -1,8 +1,6 @@
package it.tref.liferay.portos.audit.shared.util;
public class Constants implements com.liferay.portal.kernel.util.Constants {
public static final String ATTIVA = "ATTIVA";
public static final String DISATTIVA = "DISATTIVA";
}

3
liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/util/PortletKeys.java

@ -1,9 +1,6 @@
package it.tref.liferay.portos.audit.shared.util;
public class PortletKeys extends com.liferay.portal.util.PortletKeys {
public static final String AUDIT = "1_WAR_portosauditportlet";
public static final String AUDIT_DETAIL = "2_WAR_portosauditportlet";
}

1
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/protocollo/model/Fascicolo.java

@ -3,7 +3,6 @@ package it.tref.liferay.portos.bo.shared.protocollo.model;
public class Fascicolo {
private int anno;
private int numero;
public Fascicolo() {}

27
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/protocollo/model/Protocollo.java

@ -6,104 +6,79 @@ import java.util.List;
public class Protocollo {
public enum TipoProtocollo {
INGRESSO,
USCITA
INGRESSO, USCITA
}
private Date dataInserimento;
private boolean chiuso;
private String ufficioId;
private String praticaId;
private String utenteId;
private String oggetto;
private TipoProtocollo tipo;
private List<File> files;
public boolean isChiuso() {
return chiuso;
}
public void setChiuso(boolean chiuso) {
this.chiuso = chiuso;
}
public String getUfficioId() {
return ufficioId;
}
public void setUfficioId(String ufficioId) {
this.ufficioId = ufficioId;
}
public String getUtenteId() {
return utenteId;
}
public void setUtenteId(String utenteId) {
this.utenteId = utenteId;
}
public String getOggetto() {
return oggetto;
}
public void setOggetto(String oggetto) {
this.oggetto = oggetto;
}
public TipoProtocollo getTipo() {
return tipo;
}
public void setTipo(TipoProtocollo tipo) {
this.tipo = tipo;
}
public List<File> getFiles() {
return files;
}
public void setFiles(List<File> files) {
this.files = files;
}
public String getPraticaId() {
return praticaId;
}
public void setPraticaId(String praticaId) {
this.praticaId = praticaId;
}
public Date getDataInserimento() {
return dataInserimento;
}
public void setDataInserimento(Date dataInserimento) {
this.dataInserimento = dataInserimento;
}
}

39
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java

@ -3,7 +3,6 @@ package it.tref.liferay.portos.bo.shared.util;
import java.util.LinkedHashMap;
import java.util.Map;
public class StatoPraticaConstants {
public final static String SORTEGGIATA = "SO";
@ -27,7 +26,6 @@ public class StatoPraticaConstants {
public static final String ANNULLATA = "AL";
// public static final String INTEGRAZIONE_RIFIUTATA = "NI";
public static final String INTEGRAZIONE_ACCETTATA = "SI";
/* Stati "virtuali" */
@ -36,10 +34,7 @@ public class StatoPraticaConstants {
public final static String NON_AUTORIZZATA = "AN";
public final static String ANNULLA_ISTANZA = "AI";
public final static String VARIAZIONE_SOGGETTI = "VS";
// public static final String ASSEGNATA = "AS";
// public static final String ATTESA_FIRMA = "AF";
// public static final String APPROVAZIONE = "AP";
// public static final String FINE_LAVORI_CON_ANOMALIA = "FA";
public static final String INVIO_AVVISO_MANUALE = "MA";
private static final Map<String, String> statusLabel;
private static final Map<String, String> statusFilterLabel;
@ -47,34 +42,32 @@ public class StatoPraticaConstants {
static {
statusLabel = new LinkedHashMap<String, String>();
statusLabel.put(StatoPraticaConstants.SORTEGGIATA, "label.admingeniocivile.statopratica.sorteggiata");
statusLabel.put(StatoPraticaConstants.SOTTOPOSTA_A_PARERE, "label.admingeniocivile.statopratica.sottopostaaparere");
statusLabel.put(StatoPraticaConstants.SOTTOPOSTA_A_PARERE,
"label.admingeniocivile.statopratica.sottopostaaparere");
statusLabel.put(StatoPraticaConstants.VIDIMATA, "label.admingeniocivile.statopratica.vidimata");
statusLabel.put(StatoPraticaConstants.CONFORME, "label.admingeniocivile.statopratica.conforme");
statusLabel.put(StatoPraticaConstants.NON_CONFORME, "label.admingeniocivile.statopratica.nonconforme");
statusLabel.put(StatoPraticaConstants.AUTORIZZATA, "label.admingeniocivile.statopratica.autorizzazione");
statusLabel.put(StatoPraticaConstants.NON_AUTORIZZATA, "label.admingeniocivile.statopratica.autorizzazionenegata");
statusLabel.put(StatoPraticaConstants.INTEGRAZIONE, "label.admingeniocivile.statopratica.integrazione");
statusLabel
.put(StatoPraticaConstants.NON_CONFORME, "label.admingeniocivile.statopratica.nonconforme");
statusLabel.put(StatoPraticaConstants.AUTORIZZATA,
"label.admingeniocivile.statopratica.autorizzazione");
statusLabel.put(StatoPraticaConstants.NON_AUTORIZZATA,
"label.admingeniocivile.statopratica.autorizzazionenegata");
statusLabel.put(StatoPraticaConstants.INTEGRAZIONE,
"label.admingeniocivile.statopratica.integrazione");
statusLabel.put(StatoPraticaConstants.RIFIUTATA, "label.admingeniocivile.statopratica.rifiutata");
statusLabel.put(StatoPraticaConstants.FINE_LAVORI, "label.admingeniocivile.statopratica.finelavori");
statusLabel.put(StatoPraticaConstants.COLLAUDO, "label.admingeniocivile.statopratica.collaudo");
statusLabel.put(StatoPraticaConstants.FINE_LAVORI_PARZIALE,
"label.admingeniocivile.statopratica.finelavoriparziale");
statusLabel.put(StatoPraticaConstants.COLLAUDO_PARZIALE, "label.admingeniocivile.statopratica.collaudoparziale");
statusLabel.put(StatoPraticaConstants.COLLAUDO_PARZIALE,
"label.admingeniocivile.statopratica.collaudoparziale");
statusLabel.put(StatoPraticaConstants.ANNULLATA, "label.admingeniocivile.statopratica.annullata");
statusLabel.put(StatoPraticaConstants.CAMBIO_ISTRUTTORE, "label.admingeniocivile.statopratica.cambiIstruttore");
// statusLabel.put(StatoPraticaConstants.ASSEGNATA,
// "label.admingeniocivile.statopratica.assegnata");
// statusLabel.put(StatoPraticaConstants.ATTESA_FIRMA,
// "label.admingeniocivile.statopratica.attesafirma");
// statusLabel.put(StatoPraticaConstants.APPROVAZIONE,
// "label.admingeniocivile.statopratica.approvazione");
// statusLabel.put(StatoPraticaConstants.FINE_LAVORI_CON_ANOMALIA,
// "label.admingeniocivile.statopratica.finelavorianomalia");
statusLabel.put(StatoPraticaConstants.CAMBIO_ISTRUTTORE,
"label.admingeniocivile.statopratica.cambiIstruttore");
statusFilterLabel = new LinkedHashMap<String, String>();
for (String statoPratica : statusLabel.keySet()) {
if (/* !statoPratica.equals(StatoPraticaConstants.FINE_LAVORI_CON_ANOMALIA) && */
!statoPratica.equals(StatoPraticaConstants.SORTEGGIATA)) {
if (!statoPratica.equals(StatoPraticaConstants.SORTEGGIATA)) {
statusFilterLabel.put(statoPratica, statusLabel.get(statoPratica));
}
}

2
liferay-plugins-sdk-6.2/shared/portos-kaleo-shared/.classpath

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portal-service.jar" sourcepath="/home/portos/sources/liferay-portal-src-6.2-ce-ga6">
<attributes>
<attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/>

Caricamento…
Annulla
Salva