Sfoglia il codice sorgente

Aggiornamento condizioni per terna collaudatori

master
Salvatore La Manna 4 anni fa
parent
commit
f3c6609c64
  1. 88
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java
  2. 51
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  3. 240
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/asset/ControlloPraticaAssetRenderer.java
  4. 40
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  5. 60
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  6. 38
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
  7. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ProtocollazioneUtil.java
  8. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  9. 4
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp
  10. 1
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/.classpath
  11. 43
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/modellistener/shared/event/ModelListenerStartupAction.java
  12. 76
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/modellistener/shared/model/ModelListenerWrapper.java
  13. 39
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/protocollo/model/Fascicolo.java
  14. 30
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/protocollo/model/File.java
  15. 56
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ArtLeggeUtil.java
  16. 4
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/DocumentiPraticaUtil.java
  17. 20
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/GenericUtils.java
  18. 58
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/SistemiCostruttiviUtil.java

88
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java

@ -56,7 +56,6 @@ public class AsseverazioniUtil {
public final static String ASSEVERAZIONE_DA_ALLEGATO = "AL";
public static boolean hasAsseverazioniAttive(long dettPraticaId) throws SystemException {
return AsseverazioneLocalServiceUtil.countByDettPratica_InEsito(dettPraticaId, new String[] {
STATO_ASSEGNATA, STATO_ESEGUITA }) > 0;
}
@ -114,16 +113,10 @@ public class AsseverazioniUtil {
Arrays.asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A04,
Arrays.asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
// aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A06,
// Arrays.asList(TipoSoggettoUtil.PROGETTISTA,
// TipoSoggettoUtil.DIRETTORE_LAVORI));
aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A07,
Arrays.asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A08,
Arrays.asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
// aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A09,
// Arrays.asList(TipoSoggettoUtil.PROGETTISTA,
// TipoSoggettoUtil.DIRETTORE_LAVORI));
aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A10,
Arrays.asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
aMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A13,
@ -159,8 +152,6 @@ public class AsseverazioniUtil {
bMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A04, Arrays.asList(TipoSoggettoUtil.DITTA));
bMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A10, Arrays.asList(TipoSoggettoUtil.DITTA));
bMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A05, Arrays.asList(TipoSoggettoUtil.PROGETTISTA));
// bMap.put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A14,
// Arrays.asList(TipoSoggettoUtil.PROGETTISTA));
recommended = Collections.unmodifiableMap(bMap);
}
@ -227,12 +218,6 @@ public class AsseverazioniUtil {
return nuoviSoggetti.size() > 0;
} else {
// ADT BUG ID = 18
// Se committente e non c'è delega => true
boolean isRiparazioneLocale = dettPratica.getTcRiparazioneInterventoLocale()
&& !dettPratica.getTcNuovaCostruzione() && !dettPratica.getTcAdeguamentoSismico()
&& !dettPratica.getTcMiglioramentoSismico();
boolean collaudatoreNotRequired = dettPratica.getCollaudoStatico()
|| dettPratica.getLavoriPubblici();
boolean direttoreLavoriNotRequired = dettPratica.getLavoriPubblici();
@ -312,34 +297,6 @@ public class AsseverazioniUtil {
public static boolean allAsseverazioniCompleted(long dettPraticaId) throws SystemException,
PortalException {
// if (!hasAsseverazioniAttive(dettPraticaId)) {
// return false;
// }
// Map<String, Integer> requiredCount = new HashMap<>();
// for (String requiredTipologia : required.get(ASSEVERAZIONI_DOMANDA))
// {
// requiredCount.put(requiredTipologia, 0);
// }
//
// List<Asseverazione> asseverazioniEseguite =
// AsseverazioneLocalServiceUtil.findByDettPratica_InEsito(dettPraticaId,
// new String[] {AsseverazioniUtil.STATO_ESEGUITA}, QueryUtil.ALL_POS,
// QueryUtil.ALL_POS, null);
// for (Asseverazione asseverazione : asseverazioniEseguite) {
// List<Soggetto> soggetti =
// SoggettoLocalServiceUtil.findByDettPratica_CodiceFiscale(dettPraticaId,
// asseverazione.getCodiceFiscale());
// for (Soggetto soggetto : soggetti) {
// requiredCount.put(soggetto.getTipologiaSoggetto(),
// requiredCount.get(soggetto.getTipologiaSoggetto()) + 1);
// }
// }
//
// for (String tipologiaSoggetto : requiredCount.keySet()) {
//
// }
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
@ -414,9 +371,6 @@ public class AsseverazioniUtil {
TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.DITTA,
TipoSoggettoUtil.PROGETTISTA };
// if
// (SoggettiUtil.isTitolareInCommittenti(intPratica.getIntPraticaId()))
// {
if (ValidazionePraticaUtil.isA98Required(dettPratica)) {
tipoSoggetti = (String[]) ArrayUtils.removeElement(tipoSoggetti,
TipoSoggettoUtil.COMMITTENTE);
@ -486,40 +440,10 @@ public class AsseverazioniUtil {
return true;
}
// public static boolean allRequiredAsseverazioni(List<Soggetto> soggetti,
// List<Asseverazione>
// asseverazioni) {
// List<Long> soggettiIds = new ArrayList<Long>();
// List<Long> soggettiAsseverazioniIds = new ArrayList<Long>();
//
// for (Soggetto soggetto : soggetti) {
// soggettiIds.add(soggetto.getSoggettoId());
// }
//
// for (Asseverazione asseverazione : asseverazioni) {
// soggettiAsseverazioniIds.add(asseverazione.getUserId());
// }
//
// if (soggettiAsseverazioniIds.containsAll(soggettiIds)) {
// return true;
// }
// return false;
// }
public static boolean isRequiredTerna(String codiceDoc, List<Soggetto> ditte, List<Soggetto> committenti,
DettPratica dettPratica) throws SystemException {
// ADT BUG ID = 16
if (codiceDoc.equals(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17)) {
// return SoggettiUtil.isCommittenteAndDitta(committenti, ditte) ||
// SoggettiUtil.isCollaudatorePresent(dettPraticaId);
if (SoggettiUtil.isCommittenteAndDitta(committenti, ditte)
&& SoggettiUtil.isCollaudatorePresent(dettPratica.getDettPraticaId()))
return true;
else if (SoggettiUtil.isCommittenteAndDitta(committenti, ditte)
&& ValidazionePraticaUtil.isCollaudatoreRequired(dettPratica))
return true;
}
return false;
public static boolean isRequiredTerna(String codiceDoc, DettPratica dettPratica) throws SystemException {
return codiceDoc.equals(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17)
&& dettPratica.getNormLavoriInProprio()
&& (dettPratica.getTcInCA() || dettPratica.getTcInAcciaio());
}
public static boolean isEnoughOne(String codiceDoc) {
@ -636,9 +560,9 @@ public class AsseverazioniUtil {
}
/**
*
*
* @author ADT
*
*
* @param tipoSoggetto
* @param dettPraticaId
* @return

51
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java

@ -27,7 +27,6 @@ import it.tref.liferay.portos.bo.shared.util.GenericUtils;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.util.AsseverazioniUtil;
import java.io.IOException;
import java.util.ArrayList;
@ -625,7 +624,7 @@ public class ValidazionePraticaUtil {
/**
* ADT
*
*
* @param dettPratica
* @return
*/
@ -639,7 +638,7 @@ public class ValidazionePraticaUtil {
/**
* ADT
*
*
* @param dettPratica
* @return
*/
@ -1811,20 +1810,9 @@ public class ValidazionePraticaUtil {
List<String> tipologiaAllegati = DocumentiPraticaUtil.getDocObbligatoriDomanda(intPratica
.getTipoProcedura());
List<String> tipologiaSoggettiApp = TipoSoggettoUtil.getAllSubjects();
List<String> tipologiaSoggetti = new ArrayList<String>();
// if(dettPratica.isLavoriPubblici()){
// for(String tip : tipologiaSoggettiApp){
// if(!tip.equalsIgnoreCase(TipoSoggettoUtil.DIRETTORE_LAVORI)){
// tipologiaSoggetti.add(tip);
// }
// }
// } else {
tipologiaSoggetti = tipologiaSoggettiApp;
// }
List<String> tipologiaSoggetti = TipoSoggettoUtil.getAllSubjects();
List<String> firmeTotali = new ArrayList<>();
for (String codiceDoc : tipologiaAllegati) {
if (isDocPraticaRequired(dettPratica, codiceDoc)) {
List<DocPratica> docs = DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(
@ -1865,46 +1853,26 @@ public class ValidazionePraticaUtil {
}
} else if (codiceDoc.equalsIgnoreCase(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A06)) {
if (!isA06Valid(dettPratica, intPraticaId, signatures, doc)) {
// Return false if A06 doesn't contain (Progettista
// OR Geologo ) AND Direttore_Lavori
// ADT: bug id=22
notCompleted.add("A06 firme obbligatorie mancanti");
}
// } else if
// (DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A07.equals(codiceDoc)
// // ||
// DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A15.equals(codiceDoc))
// {
// if (!isA07A15A16Valid(dettPratica, signatures)) {
// notCompleted.add("A07 invalido");
// }
} else if (DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A07.equals(codiceDoc)) {
if (!isA07A15Valid(dettPratica, intPraticaId, signatures, doc)) {
// Return false if A07 doesn't contain Progettista
// AND Direttore_Lavori
// ADT: bug id=22
notCompleted.add("A07 firme obbligatorie mancanti");
}
} else if (codiceDoc.equalsIgnoreCase(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A09)) {
if (!isA09Valid(dettPratica, intPraticaId, signatures, doc)) {
// Return false if A09 doesn't contain Progettista
// AND Direttore_Lavori
// ADT: bug id=22
notCompleted.add("A09 firme obbligatorie mancanti");
}
} else if (codiceDoc.equalsIgnoreCase(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A15)) {
if (!isA07A15Valid(dettPratica, intPraticaId, signatures, doc)) {
// ADT: bug id=22
notCompleted.add("A15 firme obbligatorie mancanti");
}
} else if (codiceDoc.equalsIgnoreCase(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17)) {
if (!isA17Valid(dettPratica, signatures)) {
// ADT: bug id=22
notCompleted.add("A17 firme obbligatorie mancanti");
}
} else if (codiceDoc.equalsIgnoreCase(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_DELEGA)) {
if (!isA98Valid(dettPratica, intPraticaId, signatures)) {
// ADT: bug id=22
notCompleted.add("Allegato Delega firme obbligatorie mancanti");
}
} else if (isEnoughOne && signatures.isEmpty()) {
@ -1924,8 +1892,7 @@ public class ValidazionePraticaUtil {
}
// Ogni progettista e direttore dei lavori deve avere apposto almeno una
// firma sulla totalità
// degli allegati
// firma sulla totalità degli allegati
List<Soggetto> progettisti = SoggettoLocalServiceUtil.getValidTmpByIntPratica_TipologiaSoggetto(
intPraticaId, TipoSoggettoUtil.PROGETTISTA);
for (Soggetto progettista : progettisti) {
@ -2114,15 +2081,7 @@ public class ValidazionePraticaUtil {
}
private static boolean isA17Required(DettPratica dettPratica) throws SystemException {
List<Soggetto> ditte = SoggettoLocalServiceUtil.findByDettPratica_TipologiaSoggetto(
dettPratica.getDettPraticaId(), TipoSoggettoUtil.DITTA);
List<Soggetto> committenti = SoggettoLocalServiceUtil.findByDettPratica_TipologiaSoggetto(
dettPratica.getDettPraticaId(), TipoSoggettoUtil.COMMITTENTE);
boolean isRequired = AsseverazioniUtil.isRequiredTerna(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17,
ditte, committenti, dettPratica);
return isRequired;
return AsseverazioniUtil.isRequiredTerna(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17, dettPratica);
}
// Allegato Delega richiesto se il titolare Digitale pratica non è fra i

240
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/asset/ControlloPraticaAssetRenderer.java

@ -26,124 +26,126 @@ import com.liferay.portlet.asset.model.BaseAssetRenderer;
public class ControlloPraticaAssetRenderer extends BaseAssetRenderer {
public ControlloPraticaAssetRenderer(ControlloPratica entry) {
_entry = entry;
}
public String getClassName() {
return ControlloPratica.class.getName();
}
public long getClassPK() {
return _entry.getControlloPraticaId();
}
public long getGroupId() {
return _entry.getGroupId();
}
public String getSummary(Locale locale) {
return String.valueOf(_entry.getControlloPraticaId());
}
public String getTitle(Locale locale) {
return String.valueOf(_entry.getControlloPraticaId());
}
@Override
public PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws Exception {
PortletURL portletURL =
liferayPortletResponse.createLiferayPortletURL(getControlPanelPlid(liferayPortletRequest),
PortletKeys.FASCICOLO, PortletRequest.ACTION_PHASE);
portletURL.setParameter("name", "viewControlloPratica");
portletURL.setParameter("entryId", String.valueOf(_entry.getControlloPraticaId()));
return portletURL;
}
@Override
public String getURLViewInContext(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse, String noSuchEntryRedirect) throws Exception {
// PortletURL portletURL =
// liferayPortletResponse.createLiferayPortletURL(getPlid(liferayPortletRequest),
// PortletKeys.FASCICOLO,
// PortletRequest.ACTION_PHASE);
//
// portletURL.setWindowState(WindowState.MAXIMIZED);
//
// portletURL.setParameter("name", "viewControlloPratica");
// portletURL.setParameter("entryId", String.valueOf(_entry.getControlloPraticaId()));
return FascicoloURLUtil.getFascicoloViewURL(_entry.getCompanyId(), _entry.getIntPraticaId());
}
@Override
public boolean isPreviewInContext() {
return true;
}
public long getUserId() {
return _entry.getUserId();
}
public String getUserName() {
return _entry.getUserName();
}
public String getUuid() {
return _entry.getUuid();
}
@Override
public boolean hasEditPermission(PermissionChecker permissionChecker) {
// try {
// return DettPraticaEntryPermission.contains(permissionChecker, _entry.getDettPraticaId(),
// ActionKeys.UPDATE);
// } catch (Exception e) {
// }
return false;
}
@Override
public boolean hasViewPermission(PermissionChecker permissionChecker) {
// try {
// return DettPraticaEntryPermission.contains(permissionChecker, _entry.getDettPraticaId(),
// ActionKeys.VIEW);
// } catch (Exception e) {
// }
return true;
}
public String render(RenderRequest renderRequest, RenderResponse renderResponse, String template) throws Exception {
renderRequest.setAttribute("controlloPratica", _entry);
return "/html/asset/controllopratica/full_content.jsp";
}
protected long getPlid(LiferayPortletRequest liferayPortletRequest) throws PortalException, SystemException {
HttpServletRequest request = liferayPortletRequest.getHttpServletRequest();
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
Layout layout = themeDisplay.getLayout();
long plid = PortalUtil.getPlidFromPortletId(layout.getGroupId(), layout.isPrivateLayout(), PortletKeys.FASCICOLO);
if (plid == LayoutConstants.DEFAULT_PLID) {
plid = layout.getPlid();
}
return plid;
}
private ControlloPratica _entry;
public ControlloPraticaAssetRenderer(ControlloPratica entry) {
_entry = entry;
}
@Override
public String getClassName() {
return ControlloPratica.class.getName();
}
@Override
public long getClassPK() {
return _entry.getControlloPraticaId();
}
@Override
public long getGroupId() {
return _entry.getGroupId();
}
@Override
public String getSummary(Locale locale) {
return String.valueOf(_entry.getControlloPraticaId());
}
@Override
public String getTitle(Locale locale) {
return String.valueOf(_entry.getControlloPraticaId());
}
@Override
public PortletURL getURLEdit(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse) throws Exception {
PortletURL portletURL = liferayPortletResponse.createLiferayPortletURL(
getControlPanelPlid(liferayPortletRequest), PortletKeys.FASCICOLO,
PortletRequest.ACTION_PHASE);
portletURL.setParameter("name", "viewControlloPratica");
portletURL.setParameter("entryId", String.valueOf(_entry.getControlloPraticaId()));
return portletURL;
}
@Override
public String getURLViewInContext(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse, String noSuchEntryRedirect) throws Exception {
return FascicoloURLUtil.getFascicoloViewURL(_entry.getCompanyId(), _entry.getIntPraticaId());
}
@Override
public boolean isPreviewInContext() {
return true;
}
@Override
public long getUserId() {
return _entry.getUserId();
}
@Override
public String getUserName() {
return _entry.getUserName();
}
@Override
public String getUuid() {
return _entry.getUuid();
}
@Override
public boolean hasEditPermission(PermissionChecker permissionChecker) {
// try {
// return DettPraticaEntryPermission.contains(permissionChecker,
// _entry.getDettPraticaId(),
// ActionKeys.UPDATE);
// } catch (Exception e) {
// }
return false;
}
@Override
public boolean hasViewPermission(PermissionChecker permissionChecker) {
// try {
// return DettPraticaEntryPermission.contains(permissionChecker,
// _entry.getDettPraticaId(),
// ActionKeys.VIEW);
// } catch (Exception e) {
// }
return true;
}
@Override
public String render(RenderRequest renderRequest, RenderResponse renderResponse, String template)
throws Exception {
renderRequest.setAttribute("controlloPratica", _entry);
return "/html/asset/controllopratica/full_content.jsp";
}
protected long getPlid(LiferayPortletRequest liferayPortletRequest) throws PortalException,
SystemException {
HttpServletRequest request = liferayPortletRequest.getHttpServletRequest();
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
Layout layout = themeDisplay.getLayout();
long plid = PortalUtil.getPlidFromPortletId(layout.getGroupId(), layout.isPrivateLayout(),
PortletKeys.FASCICOLO);
if (plid == LayoutConstants.DEFAULT_PLID) {
plid = layout.getPlid();
}
return plid;
}
private ControlloPratica _entry;
}

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

@ -50,7 +50,6 @@ import java.util.Scanner;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import com.liferay.portal.NoSuchRepositoryEntryException;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
@ -64,7 +63,6 @@ import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@ -94,22 +92,26 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
* to access the asseverazione local service.
*/
@Override
public String anteprimaAsseverazione(String tipo, User user, DettPratica dettPratica, String relazioni)
throws IOException, SystemException, PortalException {
return testoAsseverazione(tipo, user.getScreenName(), dettPratica, relazioni, true);
}
@Override
public String testoAsseverazione(String tipo, User user, long dettPraticaId, String relazioni)
throws SystemException, PortalException, IOException {
return testoAsseverazione(tipo, user.getScreenName(), dettPraticaId, relazioni);
}
@Override
public String testoAsseverazione(String tipo, String codiceFiscale, long dettPraticaId, String relazioni)
throws PortalException, SystemException, IOException {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni);
}
@Override
public String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica,
String relazioni) throws SystemException, PortalException, IOException {
return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni, false);
@ -254,6 +256,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return html;
}
@Override
public Asseverazione addAsseverazione(long userId, long intPraticaId, long dettPraticaId,
String tipologia, String codiceFiscale, ServiceContext serviceContext) throws PortalException,
SystemException {
@ -288,6 +291,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return asseverazione;
}
@Override
public void richiediAsseverazioni(long dettPraticaId, ServiceContext serviceContext)
throws SystemException, PortalException {
@ -390,6 +394,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
}
@Override
public void resetAsseverazione(long asseverazioneId) throws PortalException, SystemException {
Asseverazione asseverazione = asseverazioneLocalService.getAsseverazione(asseverazioneId);
@ -406,11 +411,13 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
asseverazionePersistence.update(asseverazione);
}
@Override
public void annullaAsseverazioni(long dettPraticaId) throws IOException, SystemException, PortalException {
cambioStatoAsseverazioni(dettPraticaId, AsseverazioniUtil.STATO_ANNULLATA);
}
@Override
public void cambioStatoAsseverazione(long userId, long asseverazioneId, String stato) throws IOException,
SystemException, PortalException {
@ -428,6 +435,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
asseverazione = asseverazionePersistence.update(asseverazione);
}
@Override
public Asseverazione generateReportAsseverazione(Asseverazione asseverazione, long userId)
throws IOException, SystemException, PortalException {
@ -501,6 +509,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return asseverazione;
}
@Override
public void cambioStatoAsseverazioni(long dettPraticaId, String stato) throws IOException,
SystemException, PortalException {
@ -510,6 +519,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
}
}
@Override
public void concludiAsseverazioniExpired(long dettPraticaId) throws IOException, SystemException,
PortalException {
@ -522,6 +532,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
}
}
@Override
public void rimuoviFileAsseverazione(long asseverazioneId) throws SystemException, PortalException {
Asseverazione asseverazione = asseverazioneLocalService.getAsseverazione(asseverazioneId);
@ -554,6 +565,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return deleteAsseverazione(asseverazioneLocalService.getAsseverazione(asseverazioneId));
}
@Override
public FileEntry allegaFileAsseverazione(long asseverazioneId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws SystemException, PortalException {
@ -602,28 +614,33 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return fileEntry;
}
@Override
public List<Asseverazione> findByIntPratica(long intPraticaId, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return asseverazionePersistence.findByIntPratica(intPraticaId, start, end, orderByComparator);
}
@Override
public List<Asseverazione> findByDettPratica(long dettPraticaId, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return asseverazionePersistence.findByDettPratica(dettPraticaId, start, end, orderByComparator);
}
@Override
public int countByIntPratica(long intPraticaId) throws SystemException {
return asseverazionePersistence.countByIntPratica(intPraticaId);
}
@Override
public int countByDettPratica(long dettPraticaId) throws SystemException {
return asseverazionePersistence.countByDettPratica(dettPraticaId);
}
@Override
public List<Asseverazione> findByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale,
int start, int end, OrderByComparator orderByComparator) throws SystemException {
@ -631,12 +648,14 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
end, orderByComparator);
}
@Override
public int countByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale)
throws SystemException {
return asseverazionePersistence.countByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale);
}
@Override
public List<Asseverazione> findByCodiceFiscale_InEsito(String codiceFiscale, String[] esiti, int start,
int end, OrderByComparator orderByComparator) throws SystemException {
@ -644,11 +663,13 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
orderByComparator);
}
@Override
public int countByCodiceFiscale_InEsito(String codiceFiscale, String[] esiti) throws SystemException {
return asseverazionePersistence.countByCodiceFiscale_InEsito(codiceFiscale, esiti);
}
@Override
public List<Asseverazione> findByIntPratica_CodiceFiscale_InEsito(long intPraticaId,
String codiceFiscale, String[] esiti, int start, int end, OrderByComparator orderByComparator)
throws SystemException {
@ -657,6 +678,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
esiti, start, end, orderByComparator);
}
@Override
public List<Asseverazione> findByDettPratica_CodiceFiscale_InEsito(long dettPraticaId,
String codiceFiscale, String[] esiti, int start, int end, OrderByComparator orderByComparator)
throws SystemException {
@ -665,6 +687,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
esiti, start, end, orderByComparator);
}
@Override
public int countByIntPratica_CodiceFiscale_InEsito(long intPraticaId, String codiceFiscale, String[] esiti)
throws SystemException {
@ -672,6 +695,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
esiti);
}
@Override
public int countByDettPratica_CodiceFiscale_InEsito(long dettPraticaId, String codiceFiscale,
String[] esiti) throws SystemException {
@ -679,6 +703,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
esiti);
}
@Override
public List<Asseverazione> findByIntPratica_InEsito(long intPraticaId, String[] esiti, int start,
int end, OrderByComparator orderByComparator) throws SystemException {
@ -686,11 +711,13 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
orderByComparator);
}
@Override
public int countByIntPratica_InEsito(long intPraticaId, String[] esiti) throws SystemException {
return asseverazionePersistence.countByIntPratica_InEsito(intPraticaId, esiti);
}
@Override
public List<Asseverazione> findByDettPratica_InEsito(long dettPraticaId, String[] esiti, int start,
int end, OrderByComparator orderByComparator) throws SystemException {
@ -698,11 +725,13 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
orderByComparator);
}
@Override
public int countByDettPratica_InEsito(long dettPraticaId, String[] esiti) throws SystemException {
return asseverazionePersistence.countByDettPratica_InEsito(dettPraticaId, esiti);
}
@Override
public List<Asseverazione> findByCodiceFiscale_Tipologia_InEsito(String codiceFiscale, String tipologia,
String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException {
@ -710,6 +739,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
esiti, start, end, orderByComparator);
}
@Override
public int countByCodiceFiscale_Tipologia_InEsito(String codiceFiscale, String tipologia, String[] esiti)
throws SystemException {
@ -717,6 +747,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
esiti);
}
@Override
public List<Asseverazione> findByIntPratica_CodiceFiscale_Tipologia_InEsito(long intPraticaId,
String codiceFiscale, String tipologia, String[] esiti, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
@ -725,6 +756,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
codiceFiscale, tipologia, esiti, start, end, orderByComparator);
}
@Override
public int countByIntPratica_CodiceFiscale_Tipologia_InEsito(long intPraticaId, String codiceFiscale,
String tipologia, String[] esiti) throws SystemException {
@ -732,6 +764,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
codiceFiscale, tipologia, esiti);
}
@Override
public List<Asseverazione> findByIntPratica_Tipologia_InEsito(long intPraticaId, String tipologia,
String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException {
@ -739,6 +772,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
start, end, orderByComparator);
}
@Override
public List<Asseverazione> findByDettPratica_Tipologia_InEsito(long dettPraticaId, String tipologia,
String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException {
@ -746,12 +780,14 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
start, end, orderByComparator);
}
@Override
public int countByIntPratica_Tipologia_InEsito(long intPraticaId, String tipologia, String[] esiti)
throws SystemException {
return asseverazionePersistence.countByIntPratica_Tipologia_InEsito(intPraticaId, tipologia, esiti);
}
@Override
public int countByDettPratica_Tipologia_InEsito(long dettPraticaId, String tipologia, String[] esiti)
throws SystemException {

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

@ -40,6 +40,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
@ -107,6 +108,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
private static final Log _log = LogFactoryUtil.getLog(ControlloPraticaLocalServiceImpl.class);
@Override
public ControlloPratica addControlloPratica(long groupId, long userId, long intPraticaId,
long dettPraticaId, boolean updateFlagControlloObbligatorio, ServiceContext serviceContext)
throws PortalException, SystemException {
@ -181,6 +183,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return entry;
}
@Override
public ControlloPratica deleteControlloPratica(long controlloPraticaId) throws PortalException,
SystemException {
@ -189,6 +192,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return deleteControlloPratica(entry);
}
@Override
public ControlloPratica deleteControlloPratica(ControlloPratica entry) throws SystemException,
PortalException {
@ -210,17 +214,20 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return entry;
}
@Override
public List<ControlloPratica> findByIntPraticaId_Status(long intPraticaId, int status)
throws SystemException {
return controlloPraticaPersistence.findByIntPraticaId_Status(intPraticaId, status);
}
@Override
public int countByIntPraticaId_Status(long intPraticaId, int status) throws SystemException {
return controlloPraticaPersistence.countByIntPraticaId_Status(intPraticaId, status);
}
@Override
public void updateAsset(long userId, ControlloPratica entry, long[] assetCategoryIds,
String[] assetTagNames, long[] assetLinkEntryIds, Date now) throws PortalException,
SystemException {
@ -250,11 +257,13 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
AssetLinkConstants.TYPE_RELATED);
}
@Override
public void deleteAsset(ControlloPratica entry) throws PortalException, SystemException {
assetEntryLocalService.deleteEntry(ControlloPratica.class.getName(), entry.getControlloPraticaId());
}
@Override
public ControlloPratica updateStatus(long userId, long resourcePrimKey, int status,
ServiceContext serviceContext, List<ControlloPratica> wfNewListVarianti) throws PortalException,
SystemException {
@ -313,6 +322,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return entry;
}
@Override
public boolean generazioneDocumento(long controlloPraticaId, String jsonParams, String tipoAvviso,
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException,
SystemException {
@ -341,6 +351,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return true;
}
@Override
@Deprecated
public boolean updateStatoPraticaGeneraDocumentoFinale(long controlloPraticaId, String jsonParams,
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException,
@ -349,6 +360,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return generaDocumentoFinale(controlloPraticaId, jsonParams, userIdFirma, workflowContext);
}
@Override
public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma,
Map<String, Serializable> workflowContext) throws PortalException, SystemException {
@ -385,11 +397,13 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return true;
}
@Override
public void updateIstruttore(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService
.getControlloPratica(controlloPraticaId);
@SuppressWarnings("unchecked")
Map<String, String> parametri = (Map<String, String>) workflowContext
.get("CONTEXT_TASK_FORM_PARAMETERS");
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
@ -400,6 +414,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
}
@Override
@Deprecated
public String valutazioneEsitoFinale(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
@ -410,10 +425,11 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
/**
* I valori di ritorno possibili sono:
* approvato,non_approvato,annullato,richiesta_integrazione
*
*
* @throws SystemException
* @throws PortalException
*/
@Override
public String valutazioneEsitoFinaleUpdateStatoPratica(long controlloPraticaId,
Map<String, Serializable> workflowContext) throws PortalException, SystemException {
@ -483,6 +499,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return esitoScelta;
}
@Override
public void aggiornaStatoPerRichiestaIntegrazione(long controlloPraticaId,
Map<String, Serializable> workflowContext) throws PortalException, SystemException {
@ -493,6 +510,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
intPraticaLocalService.updateIntPratica(intPratica);
}
@Override
public String getJsonListaIstruttori(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
@ -518,6 +536,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return jsonObject.toString();
}
@Override
public String getJsonEsitoPratica(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
@ -577,6 +596,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return jsonObject.toString();
}
@Override
public ControlloPratica addPraticheAlControllo(long controlloPraticaId, long dettPraticaId)
throws PortalException, SystemException {
@ -591,13 +611,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
/**
* ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
*
*
* @param controlloPraticaId
* @param dettPraticaId
* @return
* @throws PortalException
* @throws SystemException
*/
@Override
public ControlloPratica addPraticheAlControlloVarianti(long controlloPraticaId, long dettPraticaId,
ServiceContext serviceContext) throws PortalException, SystemException {
_log.info("start addPraticheAlControlloVarianti per controlloPraticaId=" + controlloPraticaId);
@ -642,6 +663,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
* .equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { return
* "portos1_integrazioni"; } else { return "portos1_esito"; }
*/
@Override
public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException,
SystemException {
@ -659,6 +681,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
}
}
@Override
public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException {
String tipoEsito = "";
@ -740,10 +763,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return tipoEsito;
}
@Override
public List<ControlloPratica> findByIntPratica(long intPraticaId) throws SystemException {
return controlloPraticaPersistence.findByIntPraticaId(intPraticaId);
}
@Override
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException,
PortalException {
@ -751,7 +776,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
.fetchControlloPratica(controlloPraticaId);
IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId());
if (pratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.AUTORIZZATA)) {
return 0L;
}
@ -833,43 +858,44 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
/*
* public long calculateDateAvvioProcedimentoOld(long controlloPraticaId)
* throws SystemException, PortalException {
*
*
* long giorni = 0;
*
*
* ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
* .fetchControlloPratica(controlloPraticaId);
*
*
* Long intPraticaId = controlloPratica.getIntPraticaId();
*
*
* List<Tempistica> tempisticaList =
* TempisticaLocalServiceUtil.findByIntPratica_Tipo(intPraticaId,
* TempisticaConstants.TIPO_PRATICA);
*
*
* if (tempisticaList != null && tempisticaList.size() > 0) { Tempistica
* temp = null;
*
*
* for (Iterator iterator = tempisticaList.iterator(); iterator.hasNext();)
* { Tempistica tempistica = (Tempistica) iterator.next(); if (temp == null
* || temp.getCreateDate().before(tempistica.getCreateDate())) temp =
* tempistica; }
*
*
* long giorniMillisecFormat = 0; if (temp.getStop() > 0)
* giorniMillisecFormat = temp.getStop() - (temp.getStart() +
* temp.getWait()); else if (temp.getStop() == 0) giorniMillisecFormat =
* System.currentTimeMillis() - (temp.getStart() + temp.getWait());
*
*
* giorni = TimeUnit.DAYS.convert(giorniMillisecFormat,
* TimeUnit.MILLISECONDS); }
*
*
* return giorni; }
*/
/**
* ADT: gestione workflow varianti
*
*
* @param dettPraticaId
* @throws Exception
*/
@Override
public void gestioneWFVarianti(ControlloPratica cp) {
try {
/*
@ -898,7 +924,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
* _log.info("gestioneWFVarianti - statusByuserId determinato ="
* +statusByuserId); } long workflowInstanceId =
* WorkflowUtil.getWorkflowInstanceId(cp);
*
*
* //creazione record KaleoTaskInstanceToken di tipo ESITO
* ServiceContext serviceContext = new ServiceContext();
* serviceContext.setCompanyId(cp.getCompanyId()); KaleoInstance
@ -936,9 +962,9 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
* +cp.getControlloPraticaId());
* ////////////////////////////////////
* /////////////////////////////////
*
*
*
*
*
*
* }
*/
} catch (Exception e) {

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

@ -33,8 +33,6 @@ import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
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.Folder;
import com.liferay.portal.kernel.util.MimeTypesUtil;
@ -68,18 +66,18 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
* @see it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil
*/
public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class);
/*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* {@link it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil} to
* access the pagamento local service.
*/
@Override
public long createPagamentoId() throws SystemException {
return counterLocalService.increment(Pagamento.class.getName());
}
@Override
public Pagamento addPagamento(String codice, String causale, String mezzo,
String codiceFiscaleCommittente, String tipoPagamento, String importo, String utilizzata,
long classPk, String className, long oldPagamentoId, ServiceContext serviceContext)
@ -90,6 +88,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
serviceContext);
}
@Override
public Pagamento addPagamentoAndUpdate(String codice, String causale, String mezzo,
String codiceFiscaleCommittente, String tipoPagamento, String importo, String utilizzata,
long classPk, String className, long oldPagamentoId, ServiceContext serviceContext)
@ -100,6 +99,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
serviceContext);
}
@Override
public Pagamento addPagamentoAndUpdate(long pagamentoId, String codice, String causale, String mezzo,
String codiceFiscaleCommittente, String tipoPagamento, String importo, String utilizzata,
long classPk, String className, long oldPagamentoId, ServiceContext serviceContext)
@ -110,6 +110,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
StringPool.BLANK, null, serviceContext);
}
@Override
public Pagamento addPagamentoAndUpdate(long pagamentoId, String codice, String causale, String mezzo,
String codiceFiscaleCommittente, String tipoImporto, String importo, String utilizzata,
long classPk, String className, long oldPagamentoId, String url,
@ -241,6 +242,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return pagamento;
}
@Override
public Pagamento updatePagamento(long pagamentoId, String importo) throws PortalException,
SystemException {
@ -249,6 +251,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
@Override
public Pagamento updatePagamento(long pagamentoId, String codiceFiscaleCommittente, String importo)
throws PortalException, SystemException {
@ -258,6 +261,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
@Override
public Pagamento updatePagamentoUtilizzata(long pagamentoId, String utilizzata) throws PortalException,
SystemException {
@ -266,6 +270,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
@Override
public Pagamento annullaPagamento(long pagamentoId) throws PortalException, SystemException {
Pagamento pagamento = pagamentoPersistence.findByPrimaryKey(pagamentoId);
@ -274,6 +279,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
@Override
public List<Pagamento> findByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo, int start,
int end) throws SystemException {
@ -283,6 +289,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
OrderByComparatorFactoryUtil.create(PagamentoModelImpl.TABLE_NAME, "createDate", true));
}
@Override
public int countByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryFindByCommittente_Mezzo_Utilizzata(codiceFiscaleCommittente,
@ -290,6 +297,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public List<Pagamento> findByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata, int start, int end) throws SystemException {
@ -299,6 +307,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
OrderByComparatorFactoryUtil.create(PagamentoModelImpl.TABLE_NAME, "createDate", true));
}
@Override
public int countByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata) throws SystemException {
@ -307,6 +316,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
}
@Override
public List<Pagamento> findByMezzo_Utilizzata(String mezzo, String utilizzata, int start, int end)
throws SystemException {
@ -314,16 +324,19 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
OrderByComparatorFactoryUtil.create(PagamentoModelImpl.TABLE_NAME, "createDate", true));
}
@Override
public Pagamento findByOldPagamentoId(long oldPagamentoId) throws SystemException {
return pagamentoPersistence.fetchByOldPagamentoId(oldPagamentoId);
}
@Override
public int countByMezzo_Utilizzata(String mezzo, String utilizzata) throws SystemException {
return pagamentoPersistence.countByMezzo_Utilizzata(mezzo, utilizzata);
}
@Override
public List<Pagamento> findByMezzo_Utilizzata_CreateDate(String mezzo, String utilizzata, Date date,
int start, int end) throws SystemException {
@ -331,6 +344,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
OrderByComparatorFactoryUtil.create(PagamentoModelImpl.TABLE_NAME, "createDate", true));
}
@Override
public int countByMezzo_Utilizzata_EmailPending_CreateDate(String mezzo, String utilizzata,
boolean emailPending, Date date) throws SystemException {
@ -338,6 +352,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
emailPending, date);
}
@Override
public List<Pagamento> findByMezzo_Utilizzata_EmailPending_CreateDate(String mezzo, String utilizzata,
boolean emailPending, Date date, int start, int end) throws SystemException {
@ -346,6 +361,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
OrderByComparatorFactoryUtil.create(PagamentoModelImpl.TABLE_NAME, "createDate", true));
}
@Override
public List<Pagamento> findInPending(Date date, int start, int end, OrderByComparator comparator)
throws SystemException {
@ -353,6 +369,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return pagamentoPersistence.findWithDynamicQuery(dynamicQuery, start, end, comparator);
}
@Override
public int countInPending(Date date) throws SystemException {
DynamicQuery dynamicQuery = createPendingQuery(date);
@ -367,6 +384,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countByMezzo_Utilizzata_CreateDate(String mezzo, String utilizzata, Date date)
throws SystemException {
@ -393,6 +411,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return super.deletePagamento(pagamento);
}
@Override
public Pagamento updateEmailPendingPagamento(long pagamentoId, boolean emailPending)
throws PortalException, SystemException {
@ -428,30 +447,36 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public int countByClassPk(long classPk) throws SystemException {
return pagamentoPersistence.countByClassPk(classPk);
}
@Override
public List<Pagamento> findByClassPk(long classPk) throws SystemException {
return pagamentoPersistence.findByClassPk(classPk);
}
@Override
public List<Pagamento> findByIntPratica(long intPraticaId) throws SystemException {
return pagamentoPersistence.findByIntPratica(intPraticaId);
}
@Override
public int countByIntPratica(long intPraticaId) throws SystemException {
return pagamentoPersistence.countByIntPratica(intPraticaId);
}
@Override
public List<Pagamento> findByIntPratica_Visible(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = createPagamentiVisibleByIntPratica(intPraticaId);
return pagamentoPersistence.findWithDynamicQuery(dynamicQuery);
}
@Override
public int countByIntPratica_Visible(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = createPagamentiVisibleByIntPratica(intPraticaId);
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
@ -467,6 +492,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return dynamicQuery;
}
@Override
public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo,
String url, ServiceContext serviceContext) throws PortalException, SystemException {
@ -561,6 +587,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
}
@Override
public void updatePagamentoManuale(long pagamentoId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws IOException, PortalException, SystemException {
@ -624,6 +651,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
}
}
@Override
public void updatePagamentoManualeFromImport(long pagamentoId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws PortalException, SystemException {
@ -670,11 +698,13 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
}
}
@Override
public Pagamento fetchByOldPagamentoId(long oldPagamentoId) throws SystemException {
return pagamentoPersistence.fetchByOldPagamentoId(oldPagamentoId);
}
@Override
public Pagamento updateOtf(long pagamentoId, boolean otf) throws PortalException, SystemException {
Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
pagamento.setOtf(otf);

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

@ -29,6 +29,7 @@ import java.util.Collections;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVRecord;
@ -37,8 +38,6 @@ import org.apache.commons.io.IOUtils;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSONObject;
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.util.GetterUtil;
import com.liferay.portal.kernel.util.ParamUtil;
@ -53,8 +52,6 @@ import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
public class ProtocollazioneUtil {
private static final Log _log = LogFactoryUtil.getLog(ProtocollazioneUtil.class);
public static String protocollaPartenza(Avviso avviso, Long fileEntryId) throws Exception {
String protocollo = null;

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=2543
build.date=1611756621243
build.number=2548
build.date=1611828850885
build.auto.upgrade=true
##

4
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp

@ -525,9 +525,7 @@
} else if( codiceDoc.equalsIgnoreCase(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17) ){
boolean isValid = true;
if(signatures.isEmpty()){
List<Soggetto> ditte = SoggettoLocalServiceUtil.findByDettPratica_TipologiaSoggetto(dettPratica.getDettPraticaId(), TipoSoggettoUtil.DITTA);
List<Soggetto> committenti = SoggettoLocalServiceUtil.findByDettPratica_TipologiaSoggetto(dettPratica.getDettPraticaId(), TipoSoggettoUtil.COMMITTENTE);
boolean isRequired = AsseverazioniUtil.isRequiredTerna(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17, ditte, committenti, dettPratica);
boolean isRequired = AsseverazioniUtil.isRequiredTerna(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17, dettPratica);
if(isRequired)
isValid = false;
}

1
liferay-plugins-sdk-6.2/shared/portos-bo-shared/.classpath

@ -9,5 +9,6 @@
</classpathentry>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portlet.jar"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/jsp-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

43
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/modellistener/shared/event/ModelListenerStartupAction.java

@ -1,5 +1,9 @@
package it.tref.liferay.portos.bo.modellistener.shared.event;
import it.tref.liferay.portos.bo.modellistener.shared.core.ModelListenerHotDeployListener;
import it.tref.liferay.portos.bo.modellistener.shared.core.ModelListenerUtil;
import it.tref.liferay.portos.bo.modellistener.shared.model.ModelListenerWrapper;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.SimpleAction;
import com.liferay.portal.kernel.messaging.DestinationNames;
@ -7,38 +11,29 @@ import com.liferay.portal.kernel.messaging.MessageBusUtil;
import com.liferay.portal.kernel.servlet.ServletContextPool;
import com.liferay.portal.kernel.util.ClassLoaderPool;
import it.tref.liferay.portos.bo.modellistener.shared.core.ModelListenerHotDeployListener;
import it.tref.liferay.portos.bo.modellistener.shared.core.ModelListenerUtil;
import it.tref.liferay.portos.bo.modellistener.shared.model.ModelListenerWrapper;
public abstract class ModelListenerStartupAction extends SimpleAction {
// private final static Log _log = LogFactoryUtil.getLog(ModelListenerStartupAction.class);
@Override
public void run(String[] ids) throws ActionException {
@Override
public void run(String[] ids) throws ActionException {
Thread thread = Thread.currentThread();
ClassLoader currentClassLoader = thread.getContextClassLoader();
Thread thread = Thread.currentThread();
ClassLoader currentClassLoader = thread.getContextClassLoader();
String currentContextName = ClassLoaderPool.getContextName(currentClassLoader);
String currentContextName = ClassLoaderPool.getContextName(currentClassLoader);
ModelListenerWrapper[] modelListenerWrappers = getModelListenerWrappers();
ModelListenerWrapper[] modelListenerWrappers = getModelListenerWrappers();
for (int i = 0; modelListenerWrappers != null && i < modelListenerWrappers.length; i++) {
for (int i = 0; modelListenerWrappers != null && i < modelListenerWrappers.length; i++) {
if (ServletContextPool.containsKey(modelListenerWrappers[i].getServletContextName())) {
ModelListenerUtil.registerModelListener(modelListenerWrappers[i]);
// _log.info("Sto registrando il wrapper " + modelListenerWrappers[i].getModelClassName() +
// " - "
// + modelListenerWrappers[i].getServletContextName());
}
}
if (ServletContextPool.containsKey(modelListenerWrappers[i].getServletContextName())) {
ModelListenerUtil.registerModelListener(modelListenerWrappers[i]);
}
}
MessageBusUtil.registerMessageListener(DestinationNames.HOT_DEPLOY,
new ModelListenerHotDeployListener(currentContextName, modelListenerWrappers));
}
MessageBusUtil.registerMessageListener(DestinationNames.HOT_DEPLOY,
new ModelListenerHotDeployListener(currentContextName, modelListenerWrappers));
}
public abstract ModelListenerWrapper[] getModelListenerWrappers();
public abstract ModelListenerWrapper[] getModelListenerWrappers();
}

76
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/modellistener/shared/model/ModelListenerWrapper.java

@ -4,42 +4,44 @@ import java.io.Serializable;
public class ModelListenerWrapper implements Serializable {
private String servletContextName;
private String modelClassName;
private String[] modelListenerClassNames;
public ModelListenerWrapper(String servletContextName, String modelClassName, String modelListenerClassName) {
this(servletContextName, modelClassName, new String[] {modelListenerClassName});
}
public ModelListenerWrapper(String servletContextName, String modelClassName, String[] modelListenerClassNames) {
this.servletContextName = servletContextName;
this.modelClassName = modelClassName;
this.modelListenerClassNames = modelListenerClassNames;
}
public String getServletContextName() {
return servletContextName;
}
public void setServletContextName(String servletContextName) {
this.servletContextName = servletContextName;
}
public String getModelClassName() {
return modelClassName;
}
public void setModelClassName(String modelClassName) {
this.modelClassName = modelClassName;
}
public String[] getModelListenerClassNames() {
return modelListenerClassNames;
}
public void setModelListenerClassNames(String[] modelListenerClassNames) {
this.modelListenerClassNames = modelListenerClassNames;
}
private String servletContextName;
private String modelClassName;
private String[] modelListenerClassNames;
public ModelListenerWrapper(String servletContextName, String modelClassName,
String modelListenerClassName) {
this(servletContextName, modelClassName, new String[] { modelListenerClassName });
}
public ModelListenerWrapper(String servletContextName, String modelClassName,
String[] modelListenerClassNames) {
this.servletContextName = servletContextName;
this.modelClassName = modelClassName;
this.modelListenerClassNames = modelListenerClassNames;
}
public String getServletContextName() {
return servletContextName;
}
public void setServletContextName(String servletContextName) {
this.servletContextName = servletContextName;
}
public String getModelClassName() {
return modelClassName;
}
public void setModelClassName(String modelClassName) {
this.modelClassName = modelClassName;
}
public String[] getModelListenerClassNames() {
return modelListenerClassNames;
}
public void setModelListenerClassNames(String[] modelListenerClassNames) {
this.modelListenerClassNames = modelListenerClassNames;
}
}

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

@ -2,30 +2,31 @@ package it.tref.liferay.portos.bo.shared.protocollo.model;
public class Fascicolo {
private int anno;
private int numero;
private int anno;
private int numero;
public Fascicolo() {}
public Fascicolo() {
}
public Fascicolo(int anno, int numero) {
this.anno = anno;
this.numero = numero;
}
public Fascicolo(int anno, int numero) {
this.anno = anno;
this.numero = numero;
}
public int getAnno() {
return anno;
}
public int getAnno() {
return anno;
}
public void setAnno(int anno) {
this.anno = anno;
}
public void setAnno(int anno) {
this.anno = anno;
}
public int getNumero() {
return numero;
}
public int getNumero() {
return numero;
}
public void setNumero(int numero) {
this.numero = numero;
}
public void setNumero(int numero) {
this.numero = numero;
}
}

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

@ -1,31 +1,29 @@
package it.tref.liferay.portos.bo.shared.protocollo.model;
public class File {
private String fileId;
private String fileSha256;
private String fileId;
public String getFileId() {
private String fileSha256;
return fileId;
}
public String getFileId() {
public void setFileId(String fileId) {
return fileId;
}
this.fileId = fileId;
}
public void setFileId(String fileId) {
public String getFileSha256() {
this.fileId = fileId;
}
return fileSha256;
}
public String getFileSha256() {
public void setFileSha256(String fileSha256) {
return fileSha256;
}
this.fileSha256 = fileSha256;
}
public void setFileSha256(String fileSha256) {
this.fileSha256 = fileSha256;
}
}

56
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ArtLeggeUtil.java

@ -1,56 +0,0 @@
package it.tref.liferay.portos.bo.shared.util;
import java.util.LinkedHashMap;
import java.util.Map;
public class ArtLeggeUtil {
public static final String DPR01 = "DPR01";
public static final String DPR02 = "DPR02";
public static final String DPR03 = "DPR03";
public static final String DPR04 = "DPR04";
public static final String DM01 = "DM01";
public static final String DM02 = "DM02";
public static final String DM03 = "DM03";
public static final String DM04 = "DM04";
public static final String DM05 = "DM05";
public static final String ANR = "ANR";
public static final String DPGR01 = "DPGR01";
public static final String DPGR02 = "DPGR02";
public static final String ORD01 = "ORD01";
public static final String LTC01 = "LTC01";
public static final String CI01 = "CI01";
public static final String ART3COM3 = "ART3COM3";
public static final String ART3COM4 = "ART3COM4";
private final static Map<String, String> allArtLegge;
static {
allArtLegge = new LinkedHashMap<String, String>();
allArtLegge.put(DPR01, "D.P.R. 380/01 artt. 93 e 94, L.R. 1/05 art. 105 ter");
allArtLegge.put(DPR02, "D.P.R. 380/01 artt. 65, 93 e 94, L.R. 1/05 art. 105 ter");
allArtLegge.put(DPR03, "D.P.R. 380/01 art. 61(art.2 L64/74)");
allArtLegge.put(DPR04, "D.P.R. 380/01 artt. 65, 93 e 94, L.R. 1/05 art. 105 bis");
allArtLegge.put(DM01, "D.M. 14/01/2008");
allArtLegge.put(DM02, "D.M. 14/09/2005");
allArtLegge.put(DM03, "D.M. 16/01/1996");
allArtLegge.put(DM04, "D.M. 24/01/1986");
allArtLegge.put(DM05, "D.M. 14/09/1985");
allArtLegge.put(ANR, "Altra normativa di riferimento");
allArtLegge.put(DPGR01, "D.P.G.R. 36/R/1996");
allArtLegge.put(DPGR02, "D.P.G.R. 36/R/1996 ART.6 E 7");
allArtLegge.put(ORD01, "Ordinanza P.C.M n 3274/03 e succ.integrazione");
allArtLegge.put(LTC01, "Lettura tecnica consolidata");
allArtLegge.put(CI01, "Codici Internazionali");
allArtLegge.put(ART3COM3, "Art.3,3");
allArtLegge.put(ART3COM4, "Art.3,4");
}
public static String getLabel(String key) {
return allArtLegge.get(key);
}
}

4
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/DocumentiPraticaUtil.java

@ -1,11 +1,11 @@
package it.tref.liferay.portos.bo.shared.util;
import com.liferay.portal.kernel.language.LanguageUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.liferay.portal.kernel.language.LanguageUtil;
import javax.servlet.jsp.PageContext;
public class DocumentiPraticaUtil {

20
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/GenericUtils.java

@ -4,15 +4,15 @@ import java.util.List;
public class GenericUtils {
public static <T> void addIfnotExist(List<T> list, T item) {
if (!list.contains(item)) {
list.add(item);
}
}
public static <T> void addIfnotExist(List<T> list, T item) {
if (!list.contains(item)) {
list.add(item);
}
}
public static <T> void addAllIfnotExist(List<T> list, List<T> items) {
for (T item : items) {
addIfnotExist(list, item);
}
}
public static <T> void addAllIfnotExist(List<T> list, List<T> items) {
for (T item : items) {
addIfnotExist(list, item);
}
}
}

58
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/SistemiCostruttiviUtil.java

@ -1,58 +0,0 @@
package it.tref.liferay.portos.bo.shared.util;
import java.util.LinkedHashMap;
import java.util.Map;
public class SistemiCostruttiviUtil {
public static final String IN_CEMENTO_ARMATO = "100";
public static final String IN_OPERA = "101";
public static final String PREFABBRICATO ="102";
public static final String IN_ACCIAIO = "200";
public static final String MISTA_CEMENTO_ARMATO_E_ACCIAIO = "201";
public static final String IN_MURATURA = "300";
public static final String ORDINARIA = "301";
public static final String ARMATA = "302";
public static final String MISTA = "303";
public static final String IN_LEGNO = "400";
public static final String ALTRO = "500";
public static final String CON_DISPOSITIVI_DI_ISOLAMENTO_SISMICO_O_DISSIPAZIONE= "600";
/*
* Tipologia
*/
public static final String TIPOLOGIA_INTERVENTO_NUOVA_COSTRUZIONE = "000";
public static final String TIPOLOGIA_INTERVENTO_EDIFICI_ESISTENTI_ADEGUAMENTO_SISMICO = "001";
public static final String TIPOLOGIA_INTERVENTO_EDIFICI_ESISTENTI_MIGLIORAMENTO_SISMICO = "010";
public static final String TIPOLOGIA_INTERVENTO_EDIFICI_ESISTENTI_RIPARAZIONE = "100";
private static Map<String, String> sistemaCostruttivoLabelsMap;
static {
sistemaCostruttivoLabelsMap = new LinkedHashMap<String, String>();
sistemaCostruttivoLabelsMap.put(IN_CEMENTO_ARMATO, "gc-in-ca");
sistemaCostruttivoLabelsMap.put(IN_OPERA, "gc-in-opera");
sistemaCostruttivoLabelsMap.put(PREFABBRICATO, "gc-prefabbricato");
sistemaCostruttivoLabelsMap.put(IN_ACCIAIO, "gc-in-acciaio");
sistemaCostruttivoLabelsMap.put(MISTA_CEMENTO_ARMATO_E_ACCIAIO, "gc-mista-ca-acciaio");
sistemaCostruttivoLabelsMap.put(IN_MURATURA, "gc-in-muratura");
sistemaCostruttivoLabelsMap.put(ORDINARIA, "gc-ordinaria");
sistemaCostruttivoLabelsMap.put(ARMATA, "gc-armata");
sistemaCostruttivoLabelsMap.put(MISTA, "gc-mista");
sistemaCostruttivoLabelsMap.put(IN_LEGNO, "gc-in-legno");
sistemaCostruttivoLabelsMap.put(ALTRO, "gc-altro");
sistemaCostruttivoLabelsMap.put(CON_DISPOSITIVI_DI_ISOLAMENTO_SISMICO_O_DISSIPAZIONE, "gc-con-dispositivi-isolamento");
}
public static String getLabel(String key) {
return sistemaCostruttivoLabelsMap.get(key);
}
}
Caricamento…
Annulla
Salva