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; package it.tref.liferay.portlet.p7mpreview;
import com.liferay.portal.kernel.lar.PortletDataContext; 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.FileEntry;
import com.liferay.portal.kernel.repository.model.FileVersion; import com.liferay.portal.kernel.repository.model.FileVersion;
import com.liferay.portal.kernel.xml.Element; import com.liferay.portal.kernel.xml.Element;
@ -9,6 +11,7 @@ import com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor;
import java.util.List; import java.util.List;
public class P7mPreview extends DLPreviewableProcessor { public class P7mPreview extends DLPreviewableProcessor {
Log _log = LogFactoryUtil.getLog(P7mPreview.class);
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
@ -18,23 +21,21 @@ public class P7mPreview extends DLPreviewableProcessor{
@Override @Override
public boolean isSupported(String mimeType) { public boolean isSupported(String mimeType) {
_log.info("isSupported(\"" + mimeType + "\"");
// TODO Auto-generated method stub // TODO Auto-generated method stub
return false; return false;
} }
@Override @Override
protected void doExportGeneratedFiles( protected void doExportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry,
PortletDataContext portletDataContext, FileEntry fileEntry,
Element fileEntryElement) throws Exception { Element fileEntryElement) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
@Override @Override
protected void doImportGeneratedFiles( protected void doImportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry,
PortletDataContext portletDataContext, FileEntry fileEntry, FileEntry importedFileEntry, Element fileEntryElement) throws Exception {
FileEntry importedFileEntry, Element fileEntryElement)
throws Exception {
// TODO Auto-generated method stub // 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); private static Log _log = LogFactoryUtil.getLog(CfOrganizationMembershipPolicy.class);
@Override @Override
public void checkMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {} public void checkMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {
}
@Override @Override
public boolean isMembershipAllowed(long userId, long groupId) { public boolean isMembershipAllowed(long userId, long groupId) {
@ -35,7 +36,8 @@ public class CfOrganizationMembershipPolicy extends BaseOrganizationMembershipPo
try { try {
Group group = GroupLocalServiceUtil.getGroup(groupId); Group group = GroupLocalServiceUtil.getGroup(groupId);
Company company = CompanyLocalServiceUtil.getCompany(group.getCompanyId()); 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("\\,")); List<String> allowedCFs = Arrays.asList(allowedCF.split("\\,"));
@ -67,14 +69,17 @@ public class CfOrganizationMembershipPolicy extends BaseOrganizationMembershipPo
} }
@Override @Override
public void propagateMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {} public void propagateMembership(long[] userIds, long[] addOrganizationIds, long[] removeOrganizationIds) {
}
@Override @Override
public void verifyPolicy(Organization organization) {} public void verifyPolicy(Organization organization) {
}
@Override @Override
public void verifyPolicy(Organization organization, Organization oldOrganization, public void verifyPolicy(Organization organization, Organization oldOrganization,
List<AssetCategory> oldAssetCategories, List<AssetTag> oldAssetTags, 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, public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException,
PortalException { PortalException {
ControlloPratica controllo = ControlloPraticaLocalServiceUtil ControlloPratica controllo = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(controlloPraticaId); .fetchControlloPratica(controlloPraticaId);
IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId()); IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId());
if (pratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)) {
return 0L;
}
Date apertura = pratica.getDtPratica(); Date apertura = pratica.getDtPratica();
Date chiusura = null; Date chiusura = null;
long stop = 0; long stop = 0L;
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(), List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil
@ -764,35 +770,39 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
for (Avviso avviso : avvisi) { for (Avviso avviso : avvisi) {
if (!avviso.isAnnullato()) { if (!avviso.isAnnullato()) {
String tipo = avviso.getTipoDocumento().toUpperCase(); String tipo = avviso.getTipoDocumento().toUpperCase();
_log.debug("Avviso " + avviso.getTipoDocumento() + " " + avviso.getDtAvviso() + " " _log.debug("Avviso " + tipo + " " + avviso.getDtAvviso() + " " + avviso.getCreateDate());
+ avviso.getCreateDate()); switch (tipo) {
if (tipo.equals(StatoPraticaConstants.INTEGRAZIONE)) { case StatoPraticaConstants.INTEGRAZIONE:
start = avviso.getCreateDate(); start = avviso.getCreateDate();
end = null; end = null;
if (Validator.isNotNull(chiusura)) { if (Validator.isNotNull(chiusura)) {
apertura = avviso.getDtAvviso(); apertura = avviso.getDtAvviso();
chiusura = null; chiusura = null;
stop = 0; stop = 0L;
_log.debug("Reset apertura al " + apertura); _log.debug("Reset apertura al " + apertura);
} }
_log.debug("IN start = " + start + ", pratica " + pratica.getNumeroProgetto()); _log.debug("IN start = " + start + ", pratica " + pratica.getNumeroProgetto());
} else if (tipo.equals(StatoPraticaConstants.VIDIMATA)) { break;
case StatoPraticaConstants.VIDIMATA:
if (Validator.isNull(chiusura)) { if (Validator.isNull(chiusura)) {
end = avviso.getCreateDate(); end = avviso.getCreateDate();
_log.debug(tipo + " end = " + end + ", pratica " + pratica.getNumeroProgetto()); _log.debug(tipo + " end = " + end + ", pratica " + pratica.getNumeroProgetto());
} else { } else {
apertura = avviso.getDtAvviso(); apertura = avviso.getDtAvviso();
chiusura = start = end = null; chiusura = start = end = null;
stop = 0; stop = 0L;
_log.debug("Reset apertura al " + apertura); _log.debug("Reset apertura al " + apertura);
} }
} else if (tipo.equals(StatoPraticaConstants.INTEGRAZIONE_ACCETTATA)) { break;
case StatoPraticaConstants.INTEGRAZIONE_ACCETTATA:
end = avviso.getCreateDate(); end = avviso.getCreateDate();
_log.debug(tipo + " end = " + end + ", pratica " + pratica.getNumeroProgetto()); _log.debug(tipo + " end = " + end + ", pratica " + pratica.getNumeroProgetto());
} else if (tipo.equals(StatoPraticaConstants.AUTORIZZATA) break;
|| tipo.equals(StatoPraticaConstants.NON_AUTORIZZATA)) { case StatoPraticaConstants.AUTORIZZATA:
case StatoPraticaConstants.NON_AUTORIZZATA:
chiusura = avviso.getCreateDate(); chiusura = avviso.getCreateDate();
_log.debug("Chiusura al " + chiusura); _log.debug("Chiusura al " + chiusura);
break;
} }
} }
if (Validator.isNotNull(start) && Validator.isNotNull(end)) { 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 normDprg01, boolean normDprg02, boolean normAnr, boolean normArt3com3,
boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01, boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01,
boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt, boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt,
String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc, boolean tcNuovaCostruzioneComplessa, String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc,
ServiceContext serviceContext, boolean bozza, boolean disabledSubmit, boolean geoDisabledSubmit) boolean tcNuovaCostruzioneComplessa, ServiceContext serviceContext, boolean bozza,
throws PortalException, SystemException { boolean disabledSubmit, boolean geoDisabledSubmit) throws PortalException, SystemException {
DettPratica dettPratica = null; DettPratica dettPratica = null;
if (!disabledSubmit && DelegheUtil.hasDelegaCompilazioneDomanda(userId, dettPraticaId)) { if (!disabledSubmit && DelegheUtil.hasDelegaCompilazioneDomanda(userId, dettPraticaId)) {
dettPratica = dettPraticaLocalService.updateDettPraticaDatiDomanda(userId, dettPraticaId, dettPratica = dettPraticaLocalService.updateDettPraticaDatiDomanda(userId, dettPraticaId,
@ -227,8 +226,8 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
normEsenteSpese, normDpr01Dep, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normEsenteSpese, normDpr01Dep, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01,
normDm02, normDm03, normDm2018, normDprg01, normDprg02, normAnr, normArt3com3, normDm02, normDm03, normDm2018, normDprg01, normDprg02, normAnr, normArt3com3,
normArt3com4, normOrd01, normDm04, normDm05, normCI01, normLTC01, suap, normSismaBonus, normArt3com4, normOrd01, normDm04, normDm05, normCI01, normLTC01, suap, normSismaBonus,
clRischioPreInt, clRischioPostInt, intervFinPub, intervFinPubDesc, tcNuovaCostruzioneComplessa, clRischioPreInt, clRischioPostInt, intervFinPub, intervFinPubDesc,
serviceContext, bozza); tcNuovaCostruzioneComplessa, serviceContext, bozza);
} }
if (!geoDisabledSubmit && DelegheUtil.hasDelegaCompilazioneSezioneGeologica(userId, dettPraticaId)) { 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.namespace=portos_bo
build.number=2526 build.number=2533
build.date=1608047904204 build.date=1608199554355
build.auto.upgrade=true 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 //Informazioni relative al workflow
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink( 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; List<WorkflowTask> listaTask = null;
WorkflowInstance workflowInstance = null; WorkflowInstance workflowInstance = null;
@ -215,8 +216,10 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP
<liferay-ui:search-container-column-text name="GG*" cssClass="text-center"> <liferay-ui:search-container-column-text name="GG*" cssClass="text-center">
<% <%
long days = ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId()); long days = ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(controlloPratica.getControlloPraticaId());
if (days > 0) {
out.print(days);
}
%> %>
<%=days %>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-jsp path="/html/gestioneattivita/action_button.jsp" align="right" cssClass="text-center"/> <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 { public void saveDettPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(),
actionRequest); actionRequest);
long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId"); long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
@ -1341,7 +1340,8 @@ public class FascicoloFePortlet extends MVCPortlet {
boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico"); boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico");
boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest, boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest,
"tcRiparazioneInterventoLocale"); "tcRiparazioneInterventoLocale");
boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzioneComplessa"); boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest,
"tcNuovaCostruzioneComplessa");
boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA"); boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA");
boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera"); boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera");
@ -1590,7 +1590,8 @@ public class FascicoloFePortlet extends MVCPortlet {
normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018,
normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04, normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04,
normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, clRischioPostInt, 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"); String redirect = ParamUtil.getString(actionRequest, "redirect");
if (Validator.isNull(redirect)) { if (Validator.isNull(redirect)) {
@ -1800,7 +1801,8 @@ public class FascicoloFePortlet extends MVCPortlet {
boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico"); boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico");
boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest, boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest,
"tcRiparazioneInterventoLocale"); "tcRiparazioneInterventoLocale");
boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzioneComplessa"); boolean tcNuovaCostruzioneComplessa = ParamUtil.getBoolean(actionRequest,
"tcNuovaCostruzioneComplessa");
boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA"); boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA");
boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera"); boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera");
@ -2059,7 +2061,8 @@ public class FascicoloFePortlet extends MVCPortlet {
normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018,
normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04, normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04,
normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, clRischioPostInt, 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"); String redirect = ParamUtil.getString(actionRequest, "redirect");
if (Validator.isNull(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 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.DettPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> <%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
@ -21,7 +20,6 @@
<%@include file="/html/allegatipratica/init.jsp"%> <%@include file="/html/allegatipratica/init.jsp"%>
<% <%
String redirect = ParamUtil.getString(request, "backUrl"); String redirect = ParamUtil.getString(request, "backUrl");
String comingFrom = ParamUtil.getString(request, "comingFrom"); String comingFrom = ParamUtil.getString(request, "comingFrom");
long classPk = ParamUtil.getLong(request, "classPk"); 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"); Boolean hasDelegaCompilazioneDomanda = (Boolean) SessionUtil.getDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda");
if (null == hasDelegaCompilazioneDomanda) { if (null == hasDelegaCompilazioneDomanda) {
hasDelegaCompilazioneDomanda = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),classPk); hasDelegaCompilazioneDomanda = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),classPk);
SessionUtil.setDettPraticaObject(request, classPk, "hasDelegaCompilazioneDomanda", hasDelegaCompilazioneDomanda);
} }
disabledInput = !hasDelegaCompilazioneDomanda disabledInput = !hasDelegaCompilazioneDomanda
&& !DelegheUtil.hasDelegaFirmaAllegati(user.getUserId(),classPk); && !DelegheUtil.hasDelegaFirmaAllegati(user.getUserId(),classPk);
@ -429,7 +428,7 @@ for (String codiceDoc:tipologiaAllegati) {
<c:otherwise> <c:otherwise>
<c:if test="<%= !inBO %>"> <c:if test="<%= !inBO %>">
<c:if test="<%= !disabledInput || canSignGeoDocs %>"> <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 %>"> servletContext="<%= application %>">
<liferay-util:param name="backUrl" value="<%= currentURL %>" /> <liferay-util:param name="backUrl" value="<%= currentURL %>" />
<liferay-util:param name="comingFrom" value="<%= comingFrom %>" /> <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 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.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalService"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalService"%>
@ -43,7 +41,6 @@
<%@ include file="/html/allegatipratica/init.jsp"%> <%@ include file="/html/allegatipratica/init.jsp"%>
<% <%
Log _log = LogFactoryUtil.getLog("view_accordion.jsp");
String comingFrom = ParamUtil.getString(request,"comingFrom", String comingFrom = ParamUtil.getString(request,"comingFrom",
GetterUtil.getString( GetterUtil.getString(
PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"), PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"),
@ -151,7 +148,6 @@
<% <%
for(DocPratica docPratica:docPraticas){ for(DocPratica docPratica:docPraticas){
long docPraticaId = docPratica.getDocPraticaId(); long docPraticaId = docPratica.getDocPraticaId();
_log.info("Processo docPratica id = "+docPraticaId);
%> %>
<tr> <tr>
<td class="text-center"><span <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); SessionUtil.setDettPraticaObject(request, dettPraticaId, "pagamentoIsEnable", pagamentoIsEnable);
boolean disabledInput = !DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(), dettPraticaId); boolean disabledInput = !DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(), dettPraticaId);
boolean geoDisabledInput = !hasDelegaCompilazioneDomanda || !praticaIsEditable; boolean geoDisabledInput = !DelegheUtil.hasDelegaCompilazioneSezioneGeologica(user.getUserId(), dettPraticaId)
|| !praticaIsEditable;
String[] pageDatiDomanda = new String[] { String[] pageDatiDomanda = new String[] {
"page_dettagli_principali", "page_soggetti", "page_desc_edificio", "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"); long soggettoId = ParamUtil.getLong(request, "soggettoId");
boolean disabledInput = ParamUtil.getBoolean(request, "disabledInput"); boolean disabledInput = ParamUtil.getBoolean(request, "disabledInput");
boolean inBO = ParamUtil.getBoolean(request, "inBO", false); 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()); boolean hasAsseverazioniAttive = AsseverazioniUtil.hasAsseverazioniAttive(dettPratica.getDettPraticaId());
%> %>

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

@ -2,6 +2,6 @@
<!DOCTYPE project> <!DOCTYPE project>
<project name="portos-firma-portlet" basedir="." default="deploy"> <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" /> <import file="../build-common-portlet.xml" />
</project> </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; package it.tref.liferay.portos.firma.action;
import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.events.SimpleAction;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
@ -41,37 +40,41 @@ public class StartUpAction extends SimpleAction {
// Organization custom fields // Organization custom fields
addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url_pdf_extractor", addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url_pdf_extractor",
ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions); ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions);
addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url-bo-gestione-pratica-firma", addExpandoColumnIfNotExists(companyId, Company.class.getName(),
ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions); "url-bo-gestione-pratica-firma", ExpandoColumnConstants.STRING, true, false,
defaultActions, guestActions);
} catch (Exception e) { } catch (Exception e) {
_log.error("Errore nella procedura automatizzata di configurazione", e); _log.error("Errore nella procedura automatizzata di configurazione", e);
} }
} }
} }
private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, int type, private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name,
boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) throws SystemException { int type, boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions)
throws SystemException {
long classNameId = PortalUtil.getClassNameId(className); long classNameId = PortalUtil.getClassNameId(className);
ExpandoTable expandoTable = null; ExpandoTable expandoTable = null;
try { try {
expandoTable = expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId,
ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); ExpandoTableConstants.DEFAULT_TABLE_NAME);
} catch (PortalException e) { } catch (PortalException e) {
try { try {
expandoTable = expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId,
ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); ExpandoTableConstants.DEFAULT_TABLE_NAME);
} catch (PortalException e1) { } catch (PortalException e1) {
} }
} }
ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil
.getColumn(expandoTable.getTableId(), name);
if (expandoColumn == null) { if (expandoColumn == null) {
try { try {
expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type); expandoColumn = ExpandoColumnLocalServiceUtil
.addColumn(expandoTable.getTableId(), name, type);
} catch (PortalException e) { } catch (PortalException e) {
} }
@ -106,15 +109,15 @@ public class StartUpAction extends SimpleAction {
Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER); Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER);
Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER); Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId,
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(), ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
guestActions); String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(), guestActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId,
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(), ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
defaultActions); String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(), defaultActions);
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId,
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(), ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL,
defaultActions); String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(), defaultActions);
} catch (PortalException e) { } 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() * @see HttpServlet#HttpServlet()
*/ */
public FirmaServlet() { public FirmaServlet() {
super(); super();
} }
/** /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/ */
@Override @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 pathInfo = request.getPathInfo().substring(1);
String[] pathArray = StringUtil.split(pathInfo, "/"); 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 @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 pathInfo = request.getPathInfo().substring(1);
String[] pathArray = StringUtil.split(pathInfo, "/"); String[] pathArray = StringUtil.split(pathInfo, "/");
@ -163,7 +166,8 @@ public class FirmaServlet extends HttpServlet {
if (pathArray.length == 3) { if (pathArray.length == 3) {
String tipo = pathArray[1]; String tipo = pathArray[1];
String idFile = pathArray[2]; 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); Map<String, String> map = jsonDeserializer.deserialize(token);
ServiceContext serviceContext = null; ServiceContext serviceContext = null;
@ -173,7 +177,8 @@ public class FirmaServlet extends HttpServlet {
_log.error(e.getMessage()); _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; 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; import java.util.List;
public class ExtractorResponse { public class ExtractorResponse {
private boolean success; private boolean success;
private List<String> cf; private List<String> cf;
public boolean isSuccess() { public boolean isSuccess() {
return success; return success;
} }
public List<String> getCf() { public List<String> getCf() {
return cf; 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) { 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 * Verificare che il token sia il codice fiscale altrimenti c e un
* dal token userCodiceFiscalePrimaFirma = al cod fisc di Avviso...tipoAvviso = S && * metodo che estre il cod fisc dal token userCodiceFiscalePrimaFirma =
* fileEntryIdInvio = 0 && fileEntryIdBase != 0 && !rifiutato ( aggiungere campo al service e * al cod fisc di Avviso...tipoAvviso = S && fileEntryIdInvio = 0 &&
* anche campo dtRifiuto) con il fileEntryIdBase prendo il file e uso per riempire lista di * fileEntryIdBase != 0 && !rifiutato ( aggiungere campo al service e
* ritorno * 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 * NEL RITORNO "tipoDocumento" è documenttype con intPraticaId faccio
* intPratica e prendo campo tipopratica * fetch su tabella intPratica e prendo campo tipopratica
* *
*/ */
long[] companyIds = PortalUtil.getCompanyIds(); long[] companyIds = PortalUtil.getCompanyIds();
Risposta<List<RestFile>> risposta = new Risposta<List<RestFile>>(); Risposta<List<RestFile>> risposta = new Risposta<List<RestFile>>();
for (long companyId : companyIds) { for (long companyId : companyIds) {
Company company = null; Company company = null;
try { try {
company = CompanyLocalServiceUtil.getCompany(companyId); company = CompanyLocalServiceUtil.getCompany(companyId);
} catch (Exception e) { } catch (Exception e) {
_log.error(e, 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)) { if (Validator.isNotNull(urlPdfExtractor)) {
byte[] fileArray = Base64.decode(token); byte[] fileArray = Base64.decode(token);
@ -75,20 +76,17 @@ public class FirmaPostUtil {
List<RestFile> listaFile = new ArrayList<RestFile>(); List<RestFile> listaFile = new ArrayList<RestFile>();
// Ricordarsi di verificare che nel token ci sia il cod fisc in chiaro altrimenti va
// estratto
try { try {
// List<Avviso> listaAvvisi = AvvisoLocalServiceUtil.findByIntPratica(1001, -1, -1, null);
List<Avviso> listaAvvisi = AvvisoLocalServiceUtil.getListaAvvisiPerApplet(cf); List<Avviso> listaAvvisi = AvvisoLocalServiceUtil.getListaAvvisiPerApplet(cf);
if (Validator.isNotNull(listaAvvisi) && listaAvvisi.size() > 0) { if (Validator.isNotNull(listaAvvisi) && listaAvvisi.size() > 0) {
for (Avviso avviso : listaAvvisi) { for (Avviso avviso : listaAvvisi) {
if (Validator.isNotNull(avviso.getFileEntryIdBase())) { if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso.getFileEntryIdBase()); DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId()); .getFileEntryIdBase());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso
.getIntPraticaId());
if (Validator.isNotNull(fileEntry)) { if (Validator.isNotNull(fileEntry)) {
RestFile restFile = new RestFile(); RestFile restFile = new RestFile();
@ -98,12 +96,14 @@ public class FirmaPostUtil {
String tipoDocumento = avviso.translateTipoDocumento(); String tipoDocumento = avviso.translateTipoDocumento();
restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY
restFile.setNomeFile(LanguageUtil.get(Locale.ITALIAN, tipoDocumento) + StringPool.SPACE restFile.setNomeFile(LanguageUtil.get(Locale.ITALIAN, tipoDocumento)
+ StringPool.DASH + StringPool.SPACE + intPratica.getTitle(Locale.ITALIAN, true)); + StringPool.SPACE + StringPool.DASH + StringPool.SPACE
+ intPratica.getTitle(Locale.ITALIAN, true));
restFile.setFile(""); restFile.setFile("");
Group group = GroupLocalServiceUtil.getGroup(avviso.getGroupId()); Group group = GroupLocalServiceUtil.getGroup(avviso.getGroupId());
Organization organization = OrganizationLocalServiceUtil.getOrganization(group.getOrganizationId()); Organization organization = OrganizationLocalServiceUtil
.getOrganization(group.getOrganizationId());
restFile.setTipoPratica(organization.getName()); restFile.setTipoPratica(organization.getName());
listaFile.add(restFile); listaFile.add(restFile);
@ -127,8 +127,8 @@ public class FirmaPostUtil {
public Risposta<RestFile> getFile(String token, String tipo, String id) { 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 * verra passato l avviso id facciamo query per riprendere file entry e
* il contenuto * ritorniamo quel file con il contenuto
*/ */
Risposta<RestFile> risposta = new Risposta<RestFile>(); Risposta<RestFile> risposta = new Risposta<RestFile>();
@ -139,28 +139,21 @@ public class FirmaPostUtil {
if (Validator.isNotNull(avviso)) { if (Validator.isNotNull(avviso)) {
if (Validator.isNotNull(avviso.getFileEntryIdBase())) { if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso.getFileEntryIdBase()); DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso
.getFileEntryIdBase());
if (Validator.isNotNull(fileEntry)) { if (Validator.isNotNull(fileEntry)) {
RestFile restFile = new RestFile(); RestFile restFile = new RestFile();
restFile.setIdFile(GetterUtil.getInteger(avviso.getAvvisoId())); restFile.setIdFile(GetterUtil.getInteger(avviso.getAvvisoId()));
restFile.setDataInvio(new Date()); restFile.setDataInvio(new Date());
restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY 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); 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 // Inserisco il contenuto del file in Base64
InputStream fileInputStream = DLFileEntryLocalServiceUtil.getFileAsStream(
InputStream fileInputStream = fileEntry.getFileEntryId(), fileEntry.getVersion());
DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion());
ByteArrayOutputStream bao = new ByteArrayOutputStream(); ByteArrayOutputStream bao = new ByteArrayOutputStream();
IOUtils.copy(fileInputStream, bao); IOUtils.copy(fileInputStream, bao);
restFile.setFile(Base64.encode(bao.toByteArray())); restFile.setFile(Base64.encode(bao.toByteArray()));
@ -172,13 +165,7 @@ public class FirmaPostUtil {
} }
} }
} catch (SystemException e) { } catch (SystemException | PortalException | IOException 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) {
_log.error(e.getMessage(), e); _log.error(e.getMessage(), e);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE);
} }
@ -189,9 +176,10 @@ public class FirmaPostUtil {
public Risposta<String> openPratica(String token, String idFile) { 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 * mi arriva l'avviso id e mi recupero l intpraticaid bisogna ritornare
* bo con la view sistemata per gestire direttamente la pratica portos-bo-portlet fascicolo * ad una pagina privata di bo con la view sistemata per gestire
* portlet ..... intpraticaid * direttamente la pratica portos-bo-portlet fascicolo portlet .....
* intpraticaid
*/ */
Risposta<String> risposta = new Risposta<String>(); Risposta<String> risposta = new Risposta<String>();
@ -200,22 +188,24 @@ public class FirmaPostUtil {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile)); Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile));
if (Validator.isNotNull(avviso)) { if (Validator.isNotNull(avviso)) {
// Prendo la url della pagina da ritornare settata nel expando custom field della company // Prendo la url della pagina da ritornare settata nel expando
// di riferimento e ci aggiungo nella url l attributo relativo all id della intPratica // custom field della company
// di riferimento e ci aggiungo nella url l attributo relativo
// all id della intPratica
Company company = CompanyLocalServiceUtil.fetchCompany(avviso.getCompanyId()); Company company = CompanyLocalServiceUtil.fetchCompany(avviso.getCompanyId());
if (Validator.isNotNull(company)) { if (Validator.isNotNull(company)) {
String urlToBack = String urlToBack = GetterUtil.getString(company.getExpandoBridge().getAttribute(
GetterUtil.getString(company.getExpandoBridge().getAttribute("url-bo-gestione-pratica-firma", false)); "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.setObj(urlToBack);
risposta.setRisposta(RispostaCostanti.OK); risposta.setRisposta(RispostaCostanti.OK);
} }
} }
} catch (SystemException e) { } catch (SystemException e) {
_log.error(e.getMessage(), e); _log.error(e.getMessage(), e);
risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); 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>(); Risposta<Boolean> risposta = new Risposta<Boolean>();
try { try {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile)); Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile));
@ -261,17 +252,16 @@ public class FirmaPostUtil {
ServiceContext serviceContext) { ServiceContext serviceContext) {
/** /**
* Mi arriverà l avviso id e il contenuto e creero un file entry e aggiornero l avviso con il * Mi arriverà l avviso id e il contenuto e creero un file entry e
* fileEntryIdInvio * aggiornero l avviso con il fileEntryIdInvio
* *
* per la creazione del fileentry devo vedere SchedulerGeneraDocumento per creare il filename e * per la creazione del fileentry devo vedere SchedulerGeneraDocumento
* la folder * per creare il filename e la folder
* *
*/ */
Risposta<Boolean> risposta = new Risposta<Boolean>(); Risposta<Boolean> risposta = new Risposta<Boolean>();
try { try {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile)); Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile));
if (Validator.isNotNull(avviso)) { if (Validator.isNotNull(avviso)) {
@ -280,22 +270,12 @@ public class FirmaPostUtil {
serviceContext.setScopeGroupId(avviso.getGroupId()); serviceContext.setScopeGroupId(avviso.getGroupId());
serviceContext.setUserId(avviso.getUserId()); serviceContext.setUserId(avviso.getUserId());
avviso = avviso = AvvisoLocalServiceUtil.addFileFirmato(avviso.getAvvisoId(), avviso.getClassPk(),
AvvisoLocalServiceUtil fileToSave, serviceContext);
.addFileFirmato(avviso.getAvvisoId(), avviso.getClassPk(), fileToSave, serviceContext);
risposta.setObj(true); risposta.setObj(true);
risposta.setRisposta(RispostaCostanti.OK); 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) { } catch (Exception e) {
_log.error(e.getMessage(), e); _log.error(e.getMessage(), e);
risposta.setObj(false); 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; String preferencesXML;
javax.portlet.PortletPreferences jxPortletPreferences = null; javax.portlet.PortletPreferences jxPortletPreferences = null;
try { try {
pr = pr = PortletPreferencesLocalServiceUtil.getPortletPreferences(
PortletPreferencesLocalServiceUtil.getPortletPreferences(PortletKeys.PREFS_OWNER_TYPE_COMPANY, 0, PortletKeys.PREFS_OWNER_TYPE_COMPANY, 0, "firma_WAR_portosfirmaportlet");
"firma_WAR_portosfirmaportlet");
preferencesXML = pr.get(0).getPreferences(); preferencesXML = pr.get(0).getPreferences();
jxPortletPreferences = PortletPreferencesFactoryUtil.fromDefaultXML(preferencesXML); jxPortletPreferences = PortletPreferencesFactoryUtil.fromDefaultXML(preferencesXML);
} catch (SystemException e) { } catch (SystemException e) {
@ -57,7 +56,6 @@ public class FirmaUtil {
// long companyId = CompanyThreadLocal.getCompanyId(); // long companyId = CompanyThreadLocal.getCompanyId();
ContentBody body = new FileBody(file); ContentBody body = new FileBody(file);
MultipartEntity entity = new MultipartEntity(); MultipartEntity entity = new MultipartEntity();
@ -70,7 +68,8 @@ public class FirmaUtil {
HttpResponse response = client.execute(request); HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() != 200) { 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(); 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 Wing Shun Chan
* @author Brian Myunghun Kim * @author Brian Myunghun Kim
* @author Jorge Ferrer * @author Jorge Ferrer
* @author Neil Griffin * @author Neil Griffin<<
* @author Thiago Moreira * @author Thiago Moreira
* @author Brett Swaim * @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"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src"/> <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"/> <classpathentry kind="output" path="classes"/>
</classpath> </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) { 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 newValueObj = BeanPropertiesUtil.getObject(_newBean, name);
Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name); Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name);
@ -52,7 +53,8 @@ public class AttributesBuilder<T> {
public void addLocalized(String name) { 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 newValueObj = BeanPropertiesUtil.getObject(_newBean, name);
Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name); Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name);
@ -121,7 +123,6 @@ public class AttributesBuilder<T> {
} }
} }
class Attribute { class Attribute {
private String _name; 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> { public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseModelListener<T> {
@Override @Override
public void onBeforeCreate(T model) throws ModelListenerException { 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"); String newValue = array.getJSONObject(i).getString("newValue");
if (name.equalsIgnoreCase(getStatoAttributesName())) { if (name.equalsIgnoreCase(getStatoAttributesName())) {
routeAuditMessage(convertStatoToEventString(newValue), newModel, getMessage(newModel), attributes, true); routeAuditMessage(convertStatoToEventString(newValue), newModel,
getMessage(newModel), attributes, true);
if (array.length() == 1) { if (array.length() == 1) {
isUpdate = false; isUpdate = false;
@ -57,8 +57,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
} }
} }
if (isUpdate) { if (isUpdate) {
boolean sended = boolean sended = routeAuditMessage(Constants.UPDATE.toUpperCase(), newModel,
routeAuditMessage(Constants.UPDATE.toUpperCase(), newModel, getMessage(newModel), attributes, false); getMessage(newModel), attributes, false);
if (sended) { if (sended) {
onBeforeRealUpdate(newModel, oldModel); onBeforeRealUpdate(newModel, oldModel);
} }
@ -98,7 +98,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
protected JSONObject getModifiedAttributes(T newRelazioniAnagrafiche, T oldRelazioniAnagrafiche) { 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(); Map<String, Object> model = newRelazioniAnagrafiche.getModelAttributes();
Iterator<String> modelList = model.keySet().iterator(); Iterator<String> modelList = model.keySet().iterator();
@ -112,8 +113,8 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
return attributesBuilder.getAttributesJSON(); return attributesBuilder.getAttributesJSON();
} }
protected boolean routeAuditMessage(String eventAction, T model, String message, JSONObject additionalInfo, protected boolean routeAuditMessage(String eventAction, T model, String message,
boolean cambiostato) throws ModelListenerException { JSONObject additionalInfo, boolean cambiostato) throws ModelListenerException {
String className = getClassName(model); String className = getClassName(model);
if (cambiostato) { if (cambiostato) {
AuditUtil.doCambioStato(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, 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) { } else if (additionalInfo == null) {
AuditUtil.doLog(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, AuditUtil.doLog(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message,
getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model), getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model),
getRelatedClassName(model), getRelatedClassPk(model), getAdditionalInfoForLogEvent(eventAction, model)); getRelatedClassName(model), getRelatedClassPk(model),
getAdditionalInfoForLogEvent(eventAction, model));
onBeforeLog(model); onBeforeLog(model);
return true; return true;
} else { } else {
return AuditUtil.doStorico(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, return AuditUtil.doStorico(getEventType(model), className, (Long) model.getPrimaryKeyObj(),
getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model), message, getEventCategory(model), eventAction, getParentClassName(model),
getRelatedClassName(model), getRelatedClassPk(model), additionalInfo, null); getParentClassPk(model), getRelatedClassName(model), getRelatedClassPk(model),
additionalInfo, null);
} }
} }
@ -139,11 +142,14 @@ public abstract class AuditModelListener<T extends BaseModel<T>> extends BaseMod
return null; 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) { protected Long getParentClassPk(T model) {
return 0l; 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) public static void doLog(String eventType, String className, long classPK, String message)
throws ModelListenerException { throws ModelListenerException {
doLog(eventType, className, classPK, message, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK, 0l, doLog(eventType, className, classPK, message, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK,
StringPool.BLANK, 0l, null); 0l, StringPool.BLANK, 0l, null);
} }
public static void doLog(String eventType, String className, long classPK, String message, String eventCategory, public static void doLog(String eventType, String className, long classPK, String message,
String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, Long relatedClassPK, String eventCategory, String eventAction, String parentClassName, Long parentClassPK,
JSONObject additionalInfo) throws ModelListenerException { String relatedClassName, Long relatedClassPK, JSONObject additionalInfo)
throws ModelListenerException {
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_LOG, eventCategory, eventAction, doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_LOG, eventCategory, eventAction,
parentClassName, parentClassPK, relatedClassName, relatedClassPK, null, additionalInfo); parentClassName, parentClassPK, relatedClassName, relatedClassPK, null, additionalInfo);
} }
public static boolean doStorico(String eventType, String className, long classPK, String message, public static boolean doStorico(String eventType, String className, long classPK, String message,
String eventCategory, String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, String eventCategory, String eventAction, String parentClassName, Long parentClassPK,
Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) throws ModelListenerException { String relatedClassName, Long relatedClassPK, JSONObject diff, JSONObject additionalInfo)
throws ModelListenerException {
if (diff != null && !diff.isNull("attributes") && diff.getJSONArray("attributes").length() > 0) { if (diff != null && !diff.isNull("attributes") && diff.getJSONArray("attributes").length() > 0) {
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_STORICO, eventCategory, eventAction, doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_STORICO, eventCategory,
parentClassName, parentClassPK, relatedClassName, relatedClassPK, diff, additionalInfo); eventAction, parentClassName, parentClassPK, relatedClassName, relatedClassPK, diff,
additionalInfo);
return true; return true;
} else { } else {
return false; return false;
@ -50,14 +53,15 @@ public class AuditUtil {
public static void doCambioStato(String eventType, String className, long classPK, String message, public static void doCambioStato(String eventType, String className, long classPK, String message,
String eventCategory, String eventAction) throws ModelListenerException { String eventCategory, String eventAction) throws ModelListenerException {
doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_CAMBIO_STATO, eventCategory, eventAction, doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_CAMBIO_STATO, eventCategory,
StringPool.BLANK, 0l, StringPool.BLANK, 0l, null, null); eventAction, StringPool.BLANK, 0l, StringPool.BLANK, 0l, null, null);
} }
private static void doAudit(String eventType, String className, long classPK, String message, String auditEventTable, private static void doAudit(String eventType, String className, long classPK, String message,
String eventCategory, String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, String auditEventTable, String eventCategory, String eventAction, String parentClassName,
Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) throws ModelListenerException { Long parentClassPK, String relatedClassName, Long relatedClassPK, JSONObject diff,
JSONObject additionalInfo) throws ModelListenerException {
try { try {
if (additionalInfo == null) if (additionalInfo == null)
@ -90,9 +94,8 @@ public class AuditUtil {
additionalInfo.put("doAsUserName", PortalUtil.getUserName(userId, StringPool.BLANK)); additionalInfo.put("doAsUserName", PortalUtil.getUserName(userId, StringPool.BLANK));
} }
AuditMessage auditMessage = AuditMessage auditMessage = new AuditMessage(eventType, companyId, realUserId, realUserName,
new AuditMessage(eventType, companyId, realUserId, realUserName, className, String.valueOf(classPK), message, className, String.valueOf(classPK), message, additionalInfo);
additionalInfo);
AuditRouterUtil.route(auditMessage); AuditRouterUtil.route(auditMessage);
} catch (PortalException e) { } 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 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)) { if (!contains(permissionChecker, groupId, actionId)) {
throw new PrincipalException(); throw new PrincipalException();
@ -20,9 +21,8 @@ public class HistoryPermission {
public static boolean contains(PermissionChecker permissionChecker, long groupId, String actionId) { public static boolean contains(PermissionChecker permissionChecker, long groupId, String actionId) {
Boolean hasPermission = Boolean hasPermission = StagingPermissionUtil.hasPermission(permissionChecker, groupId,
StagingPermissionUtil.hasPermission(permissionChecker, groupId, RESOURCE_NAME, groupId, RESOURCE_NAME, groupId, PortletKeys.AUDIT_DETAIL, actionId);
PortletKeys.AUDIT_DETAIL, actionId);
if (hasPermission != null) { if (hasPermission != null) {
return hasPermission.booleanValue(); 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; package it.tref.liferay.portos.audit.shared.util;
public class Constants implements com.liferay.portal.kernel.util.Constants { public class Constants implements com.liferay.portal.kernel.util.Constants {
public static final String ATTIVA = "ATTIVA"; public static final String ATTIVA = "ATTIVA";
public static final String DISATTIVA = "DISATTIVA"; 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; package it.tref.liferay.portos.audit.shared.util;
public class PortletKeys extends com.liferay.portal.util.PortletKeys { public class PortletKeys extends com.liferay.portal.util.PortletKeys {
public static final String AUDIT = "1_WAR_portosauditportlet"; public static final String AUDIT = "1_WAR_portosauditportlet";
public static final String AUDIT_DETAIL = "2_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 { public class Fascicolo {
private int anno; private int anno;
private int numero; private int numero;
public Fascicolo() {} 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 class Protocollo {
public enum TipoProtocollo { public enum TipoProtocollo {
INGRESSO, INGRESSO, USCITA
USCITA
} }
private Date dataInserimento; private Date dataInserimento;
private boolean chiuso; private boolean chiuso;
private String ufficioId; private String ufficioId;
private String praticaId; private String praticaId;
private String utenteId; private String utenteId;
private String oggetto; private String oggetto;
private TipoProtocollo tipo; private TipoProtocollo tipo;
private List<File> files; private List<File> files;
public boolean isChiuso() { public boolean isChiuso() {
return chiuso; return chiuso;
} }
public void setChiuso(boolean chiuso) { public void setChiuso(boolean chiuso) {
this.chiuso = chiuso; this.chiuso = chiuso;
} }
public String getUfficioId() { public String getUfficioId() {
return ufficioId; return ufficioId;
} }
public void setUfficioId(String ufficioId) { public void setUfficioId(String ufficioId) {
this.ufficioId = ufficioId; this.ufficioId = ufficioId;
} }
public String getUtenteId() { public String getUtenteId() {
return utenteId; return utenteId;
} }
public void setUtenteId(String utenteId) { public void setUtenteId(String utenteId) {
this.utenteId = utenteId; this.utenteId = utenteId;
} }
public String getOggetto() { public String getOggetto() {
return oggetto; return oggetto;
} }
public void setOggetto(String oggetto) { public void setOggetto(String oggetto) {
this.oggetto = oggetto; this.oggetto = oggetto;
} }
public TipoProtocollo getTipo() { public TipoProtocollo getTipo() {
return tipo; return tipo;
} }
public void setTipo(TipoProtocollo tipo) { public void setTipo(TipoProtocollo tipo) {
this.tipo = tipo; this.tipo = tipo;
} }
public List<File> getFiles() { public List<File> getFiles() {
return files; return files;
} }
public void setFiles(List<File> files) { public void setFiles(List<File> files) {
this.files = files; this.files = files;
} }
public String getPraticaId() { public String getPraticaId() {
return praticaId; return praticaId;
} }
public void setPraticaId(String praticaId) { public void setPraticaId(String praticaId) {
this.praticaId = praticaId; this.praticaId = praticaId;
} }
public Date getDataInserimento() { public Date getDataInserimento() {
return dataInserimento; return dataInserimento;
} }
public void setDataInserimento(Date dataInserimento) { public void setDataInserimento(Date dataInserimento) {
this.dataInserimento = 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.LinkedHashMap;
import java.util.Map; import java.util.Map;
public class StatoPraticaConstants { public class StatoPraticaConstants {
public final static String SORTEGGIATA = "SO"; public final static String SORTEGGIATA = "SO";
@ -27,7 +26,6 @@ public class StatoPraticaConstants {
public static final String ANNULLATA = "AL"; public static final String ANNULLATA = "AL";
// public static final String INTEGRAZIONE_RIFIUTATA = "NI";
public static final String INTEGRAZIONE_ACCETTATA = "SI"; public static final String INTEGRAZIONE_ACCETTATA = "SI";
/* Stati "virtuali" */ /* Stati "virtuali" */
@ -36,10 +34,7 @@ public class StatoPraticaConstants {
public final static String NON_AUTORIZZATA = "AN"; public final static String NON_AUTORIZZATA = "AN";
public final static String ANNULLA_ISTANZA = "AI"; public final static String ANNULLA_ISTANZA = "AI";
public final static String VARIAZIONE_SOGGETTI = "VS"; public final static String VARIAZIONE_SOGGETTI = "VS";
// public static final String ASSEGNATA = "AS"; public static final String INVIO_AVVISO_MANUALE = "MA";
// public static final String ATTESA_FIRMA = "AF";
// public static final String APPROVAZIONE = "AP";
// public static final String FINE_LAVORI_CON_ANOMALIA = "FA";
private static final Map<String, String> statusLabel; private static final Map<String, String> statusLabel;
private static final Map<String, String> statusFilterLabel; private static final Map<String, String> statusFilterLabel;
@ -47,34 +42,32 @@ public class StatoPraticaConstants {
static { static {
statusLabel = new LinkedHashMap<String, String>(); statusLabel = new LinkedHashMap<String, String>();
statusLabel.put(StatoPraticaConstants.SORTEGGIATA, "label.admingeniocivile.statopratica.sorteggiata"); 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.VIDIMATA, "label.admingeniocivile.statopratica.vidimata");
statusLabel.put(StatoPraticaConstants.CONFORME, "label.admingeniocivile.statopratica.conforme"); statusLabel.put(StatoPraticaConstants.CONFORME, "label.admingeniocivile.statopratica.conforme");
statusLabel.put(StatoPraticaConstants.NON_CONFORME, "label.admingeniocivile.statopratica.nonconforme"); statusLabel
statusLabel.put(StatoPraticaConstants.AUTORIZZATA, "label.admingeniocivile.statopratica.autorizzazione"); .put(StatoPraticaConstants.NON_CONFORME, "label.admingeniocivile.statopratica.nonconforme");
statusLabel.put(StatoPraticaConstants.NON_AUTORIZZATA, "label.admingeniocivile.statopratica.autorizzazionenegata"); statusLabel.put(StatoPraticaConstants.AUTORIZZATA,
statusLabel.put(StatoPraticaConstants.INTEGRAZIONE, "label.admingeniocivile.statopratica.integrazione"); "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.RIFIUTATA, "label.admingeniocivile.statopratica.rifiutata");
statusLabel.put(StatoPraticaConstants.FINE_LAVORI, "label.admingeniocivile.statopratica.finelavori"); statusLabel.put(StatoPraticaConstants.FINE_LAVORI, "label.admingeniocivile.statopratica.finelavori");
statusLabel.put(StatoPraticaConstants.COLLAUDO, "label.admingeniocivile.statopratica.collaudo"); statusLabel.put(StatoPraticaConstants.COLLAUDO, "label.admingeniocivile.statopratica.collaudo");
statusLabel.put(StatoPraticaConstants.FINE_LAVORI_PARZIALE, statusLabel.put(StatoPraticaConstants.FINE_LAVORI_PARZIALE,
"label.admingeniocivile.statopratica.finelavoriparziale"); "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.ANNULLATA, "label.admingeniocivile.statopratica.annullata");
statusLabel.put(StatoPraticaConstants.CAMBIO_ISTRUTTORE, "label.admingeniocivile.statopratica.cambiIstruttore"); statusLabel.put(StatoPraticaConstants.CAMBIO_ISTRUTTORE,
// statusLabel.put(StatoPraticaConstants.ASSEGNATA, "label.admingeniocivile.statopratica.cambiIstruttore");
// "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");
statusFilterLabel = new LinkedHashMap<String, String>(); statusFilterLabel = new LinkedHashMap<String, String>();
for (String statoPratica : statusLabel.keySet()) { for (String statoPratica : statusLabel.keySet()) {
if (/* !statoPratica.equals(StatoPraticaConstants.FINE_LAVORI_CON_ANOMALIA) && */ if (!statoPratica.equals(StatoPraticaConstants.SORTEGGIATA)) {
!statoPratica.equals(StatoPraticaConstants.SORTEGGIATA)) {
statusFilterLabel.put(statoPratica, statusLabel.get(statoPratica)); 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"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src"/> <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"> <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> <attributes>
<attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/> <attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/>

Caricamento…
Annulla
Salva