Salvatore La Manna 4 anni fa
parent
commit
baa396e79c
  1. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.settings/org.eclipse.wst.common.component
  2. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml
  3. 42
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java
  4. 14
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java
  5. 10
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java
  6. 27
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java
  7. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java
  8. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java
  9. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java
  10. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
  12. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
  13. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
  14. 14
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java
  15. 43
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java
  16. 43
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java
  17. 54
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ControlloPraticaLocalServiceClpInvoker.java
  18. 397
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  19. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  20. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  21. 4
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component
  22. 9
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/StatoPraticaConstants.java
  23. 5
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath
  24. 167
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp
  25. 1
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.settings/org.eclipse.wst.common.component

@ -9,6 +9,12 @@
<dependent-module archiveName="portos-kaleo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-kaleo-portlet/docroot/WEB-INF/lib/portos-kaleo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-kaleo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-kaleo-portlet/docroot/WEB-INF/lib/portos-kaleo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-mail-manager-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-mail-manager-portlet/docroot/WEB-INF/lib/portos-mail-manager-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-mail-manager-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-mail-manager-portlet/docroot/WEB-INF/lib/portos-mail-manager-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml

@ -1009,6 +1009,7 @@
<column name="oldIntPraticaId" type="long" />
<column name="sospesa" type="boolean" />
<column name="dtSospensione" type="Date" />
<column name="dtViarch" type="Date" />
<column name="codiceFiscaleDelegatoFineLavori" type="String" />
<column name="codiceFiscaleDelegatoCollaudo" type="String" />

42
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java

@ -102,6 +102,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
attributes.put("oldIntPraticaId", getOldIntPraticaId());
attributes.put("sospesa", getSospesa());
attributes.put("dtSospensione", getDtSospensione());
attributes.put("dtViarch", getDtViarch());
attributes.put("codiceFiscaleDelegatoFineLavori",
getCodiceFiscaleDelegatoFineLavori());
attributes.put("codiceFiscaleDelegatoCollaudo",
@ -274,6 +275,12 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
setDtSospensione(dtSospensione);
}
Date dtViarch = (Date)attributes.get("dtViarch");
if (dtViarch != null) {
setDtViarch(dtViarch);
}
String codiceFiscaleDelegatoFineLavori = (String)attributes.get(
"codiceFiscaleDelegatoFineLavori");
@ -952,6 +959,29 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
}
}
@Override
public Date getDtViarch() {
return _dtViarch;
}
@Override
public void setDtViarch(Date dtViarch) {
_dtViarch = dtViarch;
if (_intPraticaRemoteModel != null) {
try {
Class<?> clazz = _intPraticaRemoteModel.getClass();
Method method = clazz.getMethod("setDtViarch", Date.class);
method.invoke(_intPraticaRemoteModel, dtViarch);
}
catch (Exception e) {
throw new UnsupportedOperationException(e);
}
}
}
@Override
public String getCodiceFiscaleDelegatoFineLavori() {
return _codiceFiscaleDelegatoFineLavori;
@ -1328,6 +1358,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
clone.setOldIntPraticaId(getOldIntPraticaId());
clone.setSospesa(getSospesa());
clone.setDtSospensione(getDtSospensione());
clone.setDtViarch(getDtViarch());
clone.setCodiceFiscaleDelegatoFineLavori(getCodiceFiscaleDelegatoFineLavori());
clone.setCodiceFiscaleDelegatoCollaudo(getCodiceFiscaleDelegatoCollaudo());
clone.setFineLavoriParziale(getFineLavoriParziale());
@ -1387,7 +1418,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
@Override
public String toString() {
StringBundler sb = new StringBundler(67);
StringBundler sb = new StringBundler(69);
sb.append("{uuid=");
sb.append(getUuid());
@ -1441,6 +1472,8 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
sb.append(getSospesa());
sb.append(", dtSospensione=");
sb.append(getDtSospensione());
sb.append(", dtViarch=");
sb.append(getDtViarch());
sb.append(", codiceFiscaleDelegatoFineLavori=");
sb.append(getCodiceFiscaleDelegatoFineLavori());
sb.append(", codiceFiscaleDelegatoCollaudo=");
@ -1462,7 +1495,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
@Override
public String toXmlString() {
StringBundler sb = new StringBundler(103);
StringBundler sb = new StringBundler(106);
sb.append("<model><model-name>");
sb.append("it.tref.liferay.portos.bo.model.IntPratica");
@ -1572,6 +1605,10 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
"<column><column-name>dtSospensione</column-name><column-value><![CDATA[");
sb.append(getDtSospensione());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>dtViarch</column-name><column-value><![CDATA[");
sb.append(getDtViarch());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>codiceFiscaleDelegatoFineLavori</column-name><column-value><![CDATA[");
sb.append(getCodiceFiscaleDelegatoFineLavori());
@ -1634,6 +1671,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
private long _oldIntPraticaId;
private boolean _sospesa;
private Date _dtSospensione;
private Date _dtViarch;
private String _codiceFiscaleDelegatoFineLavori;
private String _codiceFiscaleDelegatoCollaudo;
private boolean _fineLavoriParziale;

14
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java

@ -492,6 +492,20 @@ public interface IntPraticaModel extends BaseModel<IntPratica>,
*/
public void setDtSospensione(Date dtSospensione);
/**
* Returns the dt viarch of this int pratica.
*
* @return the dt viarch of this int pratica
*/
public Date getDtViarch();
/**
* Sets the dt viarch of this int pratica.
*
* @param dtViarch the dt viarch of this int pratica
*/
public void setDtViarch(Date dtViarch);
/**
* Returns the codice fiscale delegato fine lavori of this int pratica.
*

10
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java

@ -57,6 +57,7 @@ public class IntPraticaSoap implements Serializable {
soapModel.setOldIntPraticaId(model.getOldIntPraticaId());
soapModel.setSospesa(model.getSospesa());
soapModel.setDtSospensione(model.getDtSospensione());
soapModel.setDtViarch(model.getDtViarch());
soapModel.setCodiceFiscaleDelegatoFineLavori(model.getCodiceFiscaleDelegatoFineLavori());
soapModel.setCodiceFiscaleDelegatoCollaudo(model.getCodiceFiscaleDelegatoCollaudo());
soapModel.setFineLavoriParziale(model.getFineLavoriParziale());
@ -332,6 +333,14 @@ public class IntPraticaSoap implements Serializable {
_dtSospensione = dtSospensione;
}
public Date getDtViarch() {
return _dtViarch;
}
public void setDtViarch(Date dtViarch) {
_dtViarch = dtViarch;
}
public String getCodiceFiscaleDelegatoFineLavori() {
return _codiceFiscaleDelegatoFineLavori;
}
@ -436,6 +445,7 @@ public class IntPraticaSoap implements Serializable {
private long _oldIntPraticaId;
private boolean _sospesa;
private Date _dtSospensione;
private Date _dtViarch;
private String _codiceFiscaleDelegatoFineLavori;
private String _codiceFiscaleDelegatoCollaudo;
private boolean _fineLavoriParziale;

27
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java

@ -76,6 +76,7 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
attributes.put("oldIntPraticaId", getOldIntPraticaId());
attributes.put("sospesa", getSospesa());
attributes.put("dtSospensione", getDtSospensione());
attributes.put("dtViarch", getDtViarch());
attributes.put("codiceFiscaleDelegatoFineLavori",
getCodiceFiscaleDelegatoFineLavori());
attributes.put("codiceFiscaleDelegatoCollaudo",
@ -248,6 +249,12 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
setDtSospensione(dtSospensione);
}
Date dtViarch = (Date)attributes.get("dtViarch");
if (dtViarch != null) {
setDtViarch(dtViarch);
}
String codiceFiscaleDelegatoFineLavori = (String)attributes.get(
"codiceFiscaleDelegatoFineLavori");
@ -899,6 +906,26 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
_intPratica.setDtSospensione(dtSospensione);
}
/**
* Returns the dt viarch of this int pratica.
*
* @return the dt viarch of this int pratica
*/
@Override
public java.util.Date getDtViarch() {
return _intPratica.getDtViarch();
}
/**
* Sets the dt viarch of this int pratica.
*
* @param dtViarch the dt viarch of this int pratica
*/
@Override
public void setDtViarch(java.util.Date dtViarch) {
_intPratica.setDtViarch(dtViarch);
}
/**
* Returns the codice fiscale delegato fine lavori of this int pratica.
*

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java

@ -377,8 +377,7 @@ public interface ControlloPraticaLocalService extends BaseLocalService,
com.liferay.portal.kernel.exception.SystemException;
/**
* I valori di ritorno possibili sono:
* approvato,non_approvato,annullato,richiesta_integrazione
* I valori di ritorno possibili sono: approvato,non_approvato,annullato,richiesta_integrazione
*
* @throws SystemException
* @throws PortalException

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java

@ -438,8 +438,7 @@ public class ControlloPraticaLocalServiceUtil {
}
/**
* I valori di ritorno possibili sono:
* approvato,non_approvato,annullato,richiesta_integrazione
* I valori di ritorno possibili sono: approvato,non_approvato,annullato,richiesta_integrazione
*
* @throws SystemException
* @throws PortalException

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java

@ -466,8 +466,7 @@ public class ControlloPraticaLocalServiceWrapper
}
/**
* I valori di ritorno possibili sono:
* approvato,non_approvato,annullato,richiesta_integrazione
* I valori di ritorno possibili sono: approvato,non_approvato,annullato,richiesta_integrazione
*
* @throws SystemException
* @throws PortalException

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql

@ -615,6 +615,7 @@ create table portos_bo_IntPratica (
oldIntPraticaId LONG,
sospesa BOOLEAN,
dtSospensione DATE null,
dtViarch DATE null,
codiceFiscaleDelegatoFineLavori VARCHAR(75) null,
codiceFiscaleDelegatoCollaudo VARCHAR(75) null,
fineLavoriParziale BOOLEAN,

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml

@ -662,6 +662,7 @@
<property name="oldIntPraticaId" type="com.liferay.portal.dao.orm.hibernate.LongType" />
<property name="sospesa" type="com.liferay.portal.dao.orm.hibernate.BooleanType" />
<property name="dtSospensione" type="org.hibernate.type.TimestampType" />
<property name="dtViarch" type="org.hibernate.type.TimestampType" />
<property name="codiceFiscaleDelegatoFineLavori" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="codiceFiscaleDelegatoCollaudo" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="fineLavoriParziale" type="com.liferay.portal.dao.orm.hibernate.BooleanType" />

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml

@ -709,6 +709,7 @@
<field name="oldIntPraticaId" type="long" />
<field name="sospesa" type="boolean" />
<field name="dtSospensione" type="Date" />
<field name="dtViarch" type="Date" />
<field name="codiceFiscaleDelegatoFineLavori" type="String" />
<field name="codiceFiscaleDelegatoCollaudo" type="String" />
<field name="fineLavoriParziale" type="boolean" />

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml

@ -844,6 +844,9 @@
<basic name="dtSospensione">
<temporal>TIMESTAMP</temporal>
</basic>
<basic name="dtViarch">
<temporal>TIMESTAMP</temporal>
</basic>
<basic name="codiceFiscaleDelegatoFineLavori" />
<basic name="codiceFiscaleDelegatoCollaudo" />
<basic name="fineLavoriParziale" />

14
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java

@ -38,7 +38,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
Externalizable {
@Override
public String toString() {
StringBundler sb = new StringBundler(67);
StringBundler sb = new StringBundler(69);
sb.append("{uuid=");
sb.append(uuid);
@ -92,6 +92,8 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
sb.append(sospesa);
sb.append(", dtSospensione=");
sb.append(dtSospensione);
sb.append(", dtViarch=");
sb.append(dtViarch);
sb.append(", codiceFiscaleDelegatoFineLavori=");
sb.append(codiceFiscaleDelegatoFineLavori);
sb.append(", codiceFiscaleDelegatoCollaudo=");
@ -226,6 +228,13 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
intPraticaImpl.setDtSospensione(new Date(dtSospensione));
}
if (dtViarch == Long.MIN_VALUE) {
intPraticaImpl.setDtViarch(null);
}
else {
intPraticaImpl.setDtViarch(new Date(dtViarch));
}
if (codiceFiscaleDelegatoFineLavori == null) {
intPraticaImpl.setCodiceFiscaleDelegatoFineLavori(StringPool.BLANK);
}
@ -279,6 +288,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
oldIntPraticaId = objectInput.readLong();
sospesa = objectInput.readBoolean();
dtSospensione = objectInput.readLong();
dtViarch = objectInput.readLong();
codiceFiscaleDelegatoFineLavori = objectInput.readUTF();
codiceFiscaleDelegatoCollaudo = objectInput.readUTF();
fineLavoriParziale = objectInput.readBoolean();
@ -357,6 +367,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
objectOutput.writeLong(oldIntPraticaId);
objectOutput.writeBoolean(sospesa);
objectOutput.writeLong(dtSospensione);
objectOutput.writeLong(dtViarch);
if (codiceFiscaleDelegatoFineLavori == null) {
objectOutput.writeUTF(StringPool.BLANK);
@ -405,6 +416,7 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
public long oldIntPraticaId;
public boolean sospesa;
public long dtSospensione;
public long dtViarch;
public String codiceFiscaleDelegatoFineLavori;
public String codiceFiscaleDelegatoCollaudo;
public boolean fineLavoriParziale;

43
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java

@ -1,13 +1,13 @@
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.bo.model.impl;
@ -24,14 +24,12 @@ import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.Validator;
/**
* The extended model implementation for the IntPratica service. Represents a
* row in the &quot;portos_bo_IntPratica&quot; database table, with each column
* mapped to a property of this class.
* The extended model implementation for the IntPratica service. Represents a row in the
* &quot;portos_bo_IntPratica&quot; database table, with each column mapped to a property of this class.
*
* <p>
* Helper methods and all application logic should be put in this class.
* Whenever methods are added, rerun ServiceBuilder to copy their definitions
* into the {@link it.tref.liferay.portos.bo.model.IntPratica} interface.
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun
* ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.IntPratica} interface.
* </p>
*
* @author Davide Barbagallo, 3F Consulting
@ -39,25 +37,22 @@ import com.liferay.portal.kernel.util.Validator;
@SuppressWarnings("serial")
public class IntPraticaImpl extends IntPraticaBaseImpl {
/*
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods
* that expect a int pratica model instance should use the {@link
* it.tref.liferay.portos.bo.model.IntPratica} interface instead.
* NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a int pratica model instance
* should use the {@link it.tref.liferay.portos.bo.model.IntPratica} interface instead.
*/
private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class);
public IntPraticaImpl() {
}
@Override
public String getTitle(Locale locale, boolean completed) {
DettPratica dettPratica = null;
try {
if (completed) {
dettPratica = DettPraticaLocalServiceUtil
.getLastCompletedByIntPraticaAndProtocolloNotEmpty(getIntPraticaId());
} else {
dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(getIntPraticaId());
if (dettPratica == null) {
@ -67,26 +62,23 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
} catch (SystemException e) {
_log.error("Error on intPraticaId=" + getIntPraticaId(), e);
}
return Validator.isNotNull(dettPratica) ? dettPratica.getTitle(locale) : "-";
}
@Override
public String getTitle(boolean completed) {
return getTitle(LocaleUtil.getSiteDefault(), completed);
}
@Override
public boolean isAnnullata() {
return Validator.isNotNull(this.getDtAnnullamento());
}
@Override
public boolean isChiusa() throws SystemException {
boolean completata = false;
DettPratica lastDettPratica = DettPraticaLocalServiceUtil
.getLastCompletedByIntPratica(getIntPraticaId());
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId());
if (getCollaudoTotale()) {
completata = true;
} else if (lastDettPratica != null && lastDettPratica.getCollaudoStatico() && getFineLavoriTotale()) {
@ -94,7 +86,6 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
} else {
completata = false;
}
return completata;
}
}

43
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java

@ -93,6 +93,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
{ "oldIntPraticaId", Types.BIGINT },
{ "sospesa", Types.BOOLEAN },
{ "dtSospensione", Types.TIMESTAMP },
{ "dtViarch", Types.TIMESTAMP },
{ "codiceFiscaleDelegatoFineLavori", Types.VARCHAR },
{ "codiceFiscaleDelegatoCollaudo", Types.VARCHAR },
{ "fineLavoriParziale", Types.BOOLEAN },
@ -101,7 +102,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
{ "collaudoTotale", Types.BOOLEAN },
{ "controlloObbligatorio", Types.BOOLEAN }
};
public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,dtSorteggio DATE null,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,oldIntPraticaId LONG,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN)";
public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,dtSorteggio DATE null,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,oldIntPraticaId LONG,sospesa BOOLEAN,dtSospensione DATE null,dtViarch DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN)";
public static final String TABLE_SQL_DROP = "drop table portos_bo_IntPratica";
public static final String ORDER_BY_JPQL = " ORDER BY intPratica.intPraticaId ASC";
public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC";
@ -166,6 +167,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
model.setOldIntPraticaId(soapModel.getOldIntPraticaId());
model.setSospesa(soapModel.getSospesa());
model.setDtSospensione(soapModel.getDtSospensione());
model.setDtViarch(soapModel.getDtViarch());
model.setCodiceFiscaleDelegatoFineLavori(soapModel.getCodiceFiscaleDelegatoFineLavori());
model.setCodiceFiscaleDelegatoCollaudo(soapModel.getCodiceFiscaleDelegatoCollaudo());
model.setFineLavoriParziale(soapModel.getFineLavoriParziale());
@ -263,6 +265,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
attributes.put("oldIntPraticaId", getOldIntPraticaId());
attributes.put("sospesa", getSospesa());
attributes.put("dtSospensione", getDtSospensione());
attributes.put("dtViarch", getDtViarch());
attributes.put("codiceFiscaleDelegatoFineLavori",
getCodiceFiscaleDelegatoFineLavori());
attributes.put("codiceFiscaleDelegatoCollaudo",
@ -435,6 +438,12 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
setDtSospensione(dtSospensione);
}
Date dtViarch = (Date)attributes.get("dtViarch");
if (dtViarch != null) {
setDtViarch(dtViarch);
}
String codiceFiscaleDelegatoFineLavori = (String)attributes.get(
"codiceFiscaleDelegatoFineLavori");
@ -919,6 +928,17 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
_dtSospensione = dtSospensione;
}
@JSON
@Override
public Date getDtViarch() {
return _dtViarch;
}
@Override
public void setDtViarch(Date dtViarch) {
_dtViarch = dtViarch;
}
@JSON
@Override
public String getCodiceFiscaleDelegatoFineLavori() {
@ -1096,6 +1116,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
intPraticaImpl.setOldIntPraticaId(getOldIntPraticaId());
intPraticaImpl.setSospesa(getSospesa());
intPraticaImpl.setDtSospensione(getDtSospensione());
intPraticaImpl.setDtViarch(getDtViarch());
intPraticaImpl.setCodiceFiscaleDelegatoFineLavori(getCodiceFiscaleDelegatoFineLavori());
intPraticaImpl.setCodiceFiscaleDelegatoCollaudo(getCodiceFiscaleDelegatoCollaudo());
intPraticaImpl.setFineLavoriParziale(getFineLavoriParziale());
@ -1327,6 +1348,15 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
intPraticaCacheModel.dtSospensione = Long.MIN_VALUE;
}
Date dtViarch = getDtViarch();
if (dtViarch != null) {
intPraticaCacheModel.dtViarch = dtViarch.getTime();
}
else {
intPraticaCacheModel.dtViarch = Long.MIN_VALUE;
}
intPraticaCacheModel.codiceFiscaleDelegatoFineLavori = getCodiceFiscaleDelegatoFineLavori();
String codiceFiscaleDelegatoFineLavori = intPraticaCacheModel.codiceFiscaleDelegatoFineLavori;
@ -1360,7 +1390,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
@Override
public String toString() {
StringBundler sb = new StringBundler(67);
StringBundler sb = new StringBundler(69);
sb.append("{uuid=");
sb.append(getUuid());
@ -1414,6 +1444,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
sb.append(getSospesa());
sb.append(", dtSospensione=");
sb.append(getDtSospensione());
sb.append(", dtViarch=");
sb.append(getDtViarch());
sb.append(", codiceFiscaleDelegatoFineLavori=");
sb.append(getCodiceFiscaleDelegatoFineLavori());
sb.append(", codiceFiscaleDelegatoCollaudo=");
@ -1435,7 +1467,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
@Override
public String toXmlString() {
StringBundler sb = new StringBundler(103);
StringBundler sb = new StringBundler(106);
sb.append("<model><model-name>");
sb.append("it.tref.liferay.portos.bo.model.IntPratica");
@ -1545,6 +1577,10 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
"<column><column-name>dtSospensione</column-name><column-value><![CDATA[");
sb.append(getDtSospensione());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>dtViarch</column-name><column-value><![CDATA[");
sb.append(getDtViarch());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>codiceFiscaleDelegatoFineLavori</column-name><column-value><![CDATA[");
sb.append(getCodiceFiscaleDelegatoFineLavori());
@ -1625,6 +1661,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
private boolean _setOriginalOldIntPraticaId;
private boolean _sospesa;
private Date _dtSospensione;
private Date _dtViarch;
private String _codiceFiscaleDelegatoFineLavori;
private String _codiceFiscaleDelegatoCollaudo;
private boolean _fineLavoriParziale;

54
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ControlloPraticaLocalServiceClpInvoker.java

@ -218,35 +218,35 @@ public class ControlloPraticaLocalServiceClpInvoker {
_methodParameterTypes237 = new String[] { "long", "java.util.Map" };
_methodName238 = "addPraticheAlControllo";
_methodName239 = "addPraticheAlControllo";
_methodParameterTypes238 = new String[] { "long", "long" };
_methodParameterTypes239 = new String[] { "long", "long" };
_methodName239 = "addPraticheAlControlloVarianti";
_methodName240 = "addPraticheAlControlloVarianti";
_methodParameterTypes239 = new String[] {
_methodParameterTypes240 = new String[] {
"long", "long", "com.liferay.portal.service.ServiceContext"
};
_methodName240 = "getReturnValueScriptIniziale";
_methodParameterTypes240 = new String[] { "long" };
_methodName241 = "getTipoEsito";
_methodName241 = "getReturnValueScriptIniziale";
_methodParameterTypes241 = new String[] { "long" };
_methodName242 = "findByIntPratica";
_methodName242 = "getTipoEsito";
_methodParameterTypes242 = new String[] { "long" };
_methodName243 = "calculateDateAvvioProcedimento";
_methodName243 = "findByIntPratica";
_methodParameterTypes243 = new String[] { "long" };
_methodName244 = "gestioneWFVarianti";
_methodName244 = "calculateDateAvvioProcedimento";
_methodParameterTypes244 = new String[] { "long" };
_methodParameterTypes244 = new String[] {
_methodName245 = "gestioneWFVarianti";
_methodParameterTypes245 = new String[] {
"it.tref.liferay.portos.bo.model.ControlloPratica"
};
}
@ -498,41 +498,41 @@ public class ControlloPraticaLocalServiceClpInvoker {
(java.util.Map<java.lang.String, java.io.Serializable>)arguments[1]);
}
if (_methodName238.equals(name) &&
Arrays.deepEquals(_methodParameterTypes238, parameterTypes)) {
if (_methodName239.equals(name) &&
Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.addPraticheAlControllo(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue());
}
if (_methodName239.equals(name) &&
Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) {
if (_methodName240.equals(name) &&
Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.addPraticheAlControlloVarianti(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
(com.liferay.portal.service.ServiceContext)arguments[2]);
}
if (_methodName240.equals(name) &&
Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.getReturnValueScriptIniziale(((Long)arguments[0]).longValue());
}
if (_methodName241.equals(name) &&
Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.getTipoEsito(((Long)arguments[0]).longValue());
return ControlloPraticaLocalServiceUtil.getReturnValueScriptIniziale(((Long)arguments[0]).longValue());
}
if (_methodName242.equals(name) &&
Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.findByIntPratica(((Long)arguments[0]).longValue());
return ControlloPraticaLocalServiceUtil.getTipoEsito(((Long)arguments[0]).longValue());
}
if (_methodName243.equals(name) &&
Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(((Long)arguments[0]).longValue());
return ControlloPraticaLocalServiceUtil.findByIntPratica(((Long)arguments[0]).longValue());
}
if (_methodName244.equals(name) &&
Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) {
return ControlloPraticaLocalServiceUtil.calculateDateAvvioProcedimento(((Long)arguments[0]).longValue());
}
if (_methodName245.equals(name) &&
Arrays.deepEquals(_methodParameterTypes245, parameterTypes)) {
ControlloPraticaLocalServiceUtil.gestioneWFVarianti((it.tref.liferay.portos.bo.model.ControlloPratica)arguments[0]);
return null;
@ -619,8 +619,6 @@ public class ControlloPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes236;
private String _methodName237;
private String[] _methodParameterTypes237;
private String _methodName238;
private String[] _methodParameterTypes238;
private String _methodName239;
private String[] _methodParameterTypes239;
private String _methodName240;
@ -633,4 +631,6 @@ public class ControlloPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes243;
private String _methodName244;
private String[] _methodParameterTypes244;
private String _methodName245;
private String[] _methodParameterTypes245;
}

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

@ -1,13 +1,13 @@
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.bo.service.impl;
@ -23,12 +23,12 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.Constants;
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.UnitaOperativeUtil;
import it.tref.liferay.portos.bo.util.AvvisoUtil;
import it.tref.liferay.portos.bo.util.AzioniPraticheUtil;
import it.tref.liferay.portos.bo.util.Constants;
import it.tref.liferay.portos.bo.util.GestioneFirmeUtil;
import it.tref.liferay.portos.bo.util.TempisticaConstants;
import it.tref.liferay.portos.bo.util.WorkflowConstants;
@ -44,6 +44,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
@ -85,15 +86,12 @@ import com.liferay.portlet.asset.model.AssetLinkConstants;
* The implementation of the controllo pratica local service.
*
* <p>
* All custom service methods should be put in this class. Whenever methods are
* added, rerun ServiceBuilder to copy their definitions into the
* {@link it.tref.liferay.portos.bo.service.ControlloPraticaLocalService}
* interface.
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.ControlloPraticaLocalService} interface.
*
* <p>
* This is a local service. Methods of this service will not have security
* checks based on the propagated JAAS credentials because this service can only
* be accessed from within the same VM.
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
* </p>
*
* @author Davide Barbagallo, 3F Consulting
@ -102,17 +100,17 @@ import com.liferay.portlet.asset.model.AssetLinkConstants;
*/
public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServiceBaseImpl {
/*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* {@link
* it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil} to
* access the controllo pratica local service.
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil} to access the controllo pratica local
* service.
*/
private static final Log _log = LogFactoryUtil.getLog(ControlloPraticaLocalServiceImpl.class);
public ControlloPratica addControlloPratica(long groupId, long userId, long intPraticaId,
long dettPraticaId, boolean updateFlagControlloObbligatorio, ServiceContext serviceContext)
throws PortalException, SystemException {
@Override
public ControlloPratica addControlloPratica(long groupId, long userId, long intPraticaId, long dettPraticaId,
boolean updateFlagControlloObbligatorio, ServiceContext serviceContext) throws PortalException,
SystemException {
User user = userPersistence.findByPrimaryKey(userId);
@ -143,8 +141,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
// aggiorno int e dett pratica per avvio workflow
IntPratica intPratica = intPraticaLocalService.updateStatoPratica(intPraticaId,
StatoPraticaConstants.SOTTOPOSTA_A_PARERE);
if (updateFlagControlloObbligatorio
&& Constants.TIPO_PRATICA_DEPOSITO.equals(intPratica.getTipoPratica())) {
if (updateFlagControlloObbligatorio && Constants.TIPO_PRATICA_DEPOSITO.equals(intPratica.getTipoPratica())) {
intPratica.setControlloObbligatorio(true);
intPratica = intPraticaLocalService.updateIntPratica(intPratica);
}
@ -162,9 +159,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
// ///////////
// Workflow
WorkflowHandlerRegistryUtil.startWorkflowInstance(entry.getCompanyId(), entry.getGroupId(),
entry.getUserId(), ControlloPratica.class.getName(), entry.getPrimaryKey(), entry,
serviceContext, wfContextMap);
WorkflowHandlerRegistryUtil.startWorkflowInstance(entry.getCompanyId(), entry.getGroupId(), entry.getUserId(),
ControlloPratica.class.getName(), entry.getPrimaryKey(), entry, serviceContext, wfContextMap);
Date dtInvio = null;
if (intPratica.getDtSorteggio() != null) {
@ -173,22 +169,22 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
dtInvio = entry.getCreateDate();
}
TempisticaLocalServiceUtil.addTempistica(intPraticaId, dettPraticaId,
TempisticaConstants.TIPO_PRATICA, dtInvio, serviceContext);
TempisticaLocalServiceUtil.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA,
dtInvio, serviceContext);
return entry;
}
public ControlloPratica deleteControlloPratica(long controlloPraticaId) throws PortalException,
SystemException {
@Override
public ControlloPratica deleteControlloPratica(long controlloPraticaId) throws PortalException, SystemException {
ControlloPratica entry = controlloPraticaPersistence.findByPrimaryKey(controlloPraticaId);
return deleteControlloPratica(entry);
}
public ControlloPratica deleteControlloPratica(ControlloPratica entry) throws SystemException,
PortalException {
@Override
public ControlloPratica deleteControlloPratica(ControlloPratica entry) throws SystemException, PortalException {
// Resources
resourceLocalService.deleteResource(entry.getCompanyId(), ControlloPratica.class.getName(),
@ -200,28 +196,29 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
// Workflow
workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks(entry.getCompanyId(),
entry.getGroupId(), ControlloPratica.class.getName(), entry.getControlloPraticaId());
workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks(entry.getCompanyId(), entry.getGroupId(),
ControlloPratica.class.getName(), entry.getControlloPraticaId());
controlloPraticaPersistence.remove(entry);
return entry;
}
public List<ControlloPratica> findByIntPraticaId_Status(long intPraticaId, int status)
throws SystemException {
@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);
}
public void updateAsset(long userId, ControlloPratica entry, long[] assetCategoryIds,
String[] assetTagNames, long[] assetLinkEntryIds, Date now) throws PortalException,
SystemException {
@Override
public void updateAsset(long userId, ControlloPratica entry, long[] assetCategoryIds, String[] assetTagNames,
long[] assetLinkEntryIds, Date now) throws PortalException, SystemException {
boolean visible = false;
@ -239,23 +236,24 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
}
AssetEntry assetEntry = assetEntryLocalService.updateEntry(userId, entry.getGroupId(), now, now,
ControlloPratica.class.getName(), entry.getControlloPraticaId(), entry.getUuid(), 0,
assetCategoryIds, assetTagNames, visible, null, null, null, null, ContentTypes.TEXT_PLAIN,
String.valueOf(entry.getPrimaryKey()), String.valueOf(entry.getPrimaryKey()), null, null, 0,
0, null, false);
ControlloPratica.class.getName(), entry.getControlloPraticaId(), entry.getUuid(), 0, assetCategoryIds,
assetTagNames, visible, null, null, null, null, ContentTypes.TEXT_PLAIN,
String.valueOf(entry.getPrimaryKey()), String.valueOf(entry.getPrimaryKey()), null, null, 0, 0, null,
false);
assetLinkLocalService.updateLinks(userId, assetEntry.getEntryId(), assetLinkEntryIds,
AssetLinkConstants.TYPE_RELATED);
}
@Override
public void deleteAsset(ControlloPratica entry) throws PortalException, SystemException {
assetEntryLocalService.deleteEntry(ControlloPratica.class.getName(), entry.getControlloPraticaId());
}
public ControlloPratica updateStatus(long userId, long resourcePrimKey, int status,
ServiceContext serviceContext, List<ControlloPratica> wfNewListVarianti) throws PortalException,
SystemException {
@Override
public ControlloPratica updateStatus(long userId, long resourcePrimKey, int status, ServiceContext serviceContext,
List<ControlloPratica> wfNewListVarianti) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date();
@ -276,8 +274,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
List<DettPratica> successivePratiche = dettPraticaLocalService
.findCompletedByIntPraticaAndSuccessivoDettPratica(entry.getIntPraticaId(),
entry.getDettPraticaId());
boolean autorizzazione = Constants.TIPO_PRATICA_AUTORIZZAZIONE.equalsIgnoreCase(intPratica
.getTipoPratica());
boolean autorizzazione = Constants.TIPO_PRATICA_AUTORIZZAZIONE
.equalsIgnoreCase(intPratica.getTipoPratica());
boolean avvioWorkflow = false;
for (DettPratica dettPraticaSuc : successivePratiche) {
if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPraticaSuc.getTipoIntegrazione())
@ -311,14 +309,12 @@ 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 {
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica
.getDettPraticaId());
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId());
@ -339,21 +335,20 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return true;
}
@Override
@Deprecated
public boolean updateStatoPraticaGeneraDocumentoFinale(long controlloPraticaId, String jsonParams,
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException,
SystemException {
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException, SystemException {
return generaDocumentoFinale(controlloPraticaId, jsonParams, userIdFirma, workflowContext);
}
@Override
public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma,
Map<String, Serializable> workflowContext) throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica
.getDettPraticaId());
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId());
@ -385,14 +380,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);
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId);
@SuppressWarnings("unchecked")
Map<String, String> parametri = (Map<String, String>) workflowContext
.get("CONTEXT_TASK_FORM_PARAMETERS");
Map<String, String> parametri = (Map<String, String>) workflowContext.get("CONTEXT_TASK_FORM_PARAMETERS");
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
long istruttore = GetterUtil.getLong(parametri.get("istruttore"));
intPratica.setStatusByUserId(istruttore);
@ -401,6 +395,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
}
@Override
@Deprecated
public String valutazioneEsitoFinale(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
@ -409,22 +404,21 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
}
/**
* I valori di ritorno possibili sono:
* approvato,non_approvato,annullato,richiesta_integrazione
* 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 {
String esito = getEsitoFinale(controlloPraticaId, workflowContext);
String ramoWorkflow = StringPool.BLANK;
ControlloPratica controlloPratica = controlloPraticaLocalService
.getControlloPratica(controlloPraticaId);
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId);
Avviso avviso = avvisoLocalService.fetchLastAvvisoByIntPraticaPerStatoFinale(controlloPratica
.getIntPraticaId());
Avviso avviso = avvisoLocalService
.fetchLastAvvisoByIntPraticaPerStatoFinale(controlloPratica.getIntPraticaId());
if (avviso != null && avviso.getRifiutato()) {
ramoWorkflow = "rifiuto_firma";
} else {
@ -467,8 +461,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
// Map<String, String> parametri = (Map<String, String>)
// workflowContext.get("CONTEXT_TASK_FORM_PARAMETERS");
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(controlloPraticaId);
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica);
String esitoScelta = (String) parametri.get("esito");
@ -483,8 +476,9 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return esitoScelta;
}
public void aggiornaStatoPerRichiestaIntegrazione(long controlloPraticaId,
Map<String, Serializable> workflowContext) throws PortalException, SystemException {
@Override
public void aggiornaStatoPerRichiestaIntegrazione(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
ControlloPratica controllo = controlloPraticaLocalService.getControlloPratica(controlloPraticaId);
IntPratica pratica = intPraticaLocalService.getIntPratica(controllo.getIntPraticaId());
@ -496,11 +490,11 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
intPraticaLocalService.updateIntPratica(pratica);
}
@Override
public String getJsonListaIstruttori(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(controlloPraticaId);
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
int unitaOperativa = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId())
.getUnitaOperativa();
boolean preassegnazione = (0 == unitaOperativa);
@ -551,83 +545,85 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return jsonObject.toString();
}
@Override
public String getJsonEsitoPratica(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
return jsonDeposito;
}
switch (intPratica.getTipoProcedura()) {
case Constants.PROCEDURA_P3:
if (Validator.isNull(intPratica.getDtViarch())) {
return jsonViarchStart;
} else {
return jsonViarchEnd;
}
}
return jsonAutorizzazione;
}
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.getControlloPratica(controlloPraticaId);
private static final String jsonDeposito = StringPool.BLANK;
private static final String jsonAutorizzazione = getJsonAutorizzazione();
private static final String jsonViarchStart = getJsonViarchStart();
private static final String jsonViarchEnd = getJsonViarchStart();
private static String getJsonAutorizzazione() {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
jsonObject.put("esito", jsonArray);
if (AzioniPraticheUtil.isDeposito(controlloPratica.getIntPraticaId())) {
JSONObject etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", StatoPraticaConstants.getEsitoDeposito(StatoPraticaConstants.CONFORME));
etichette.put("label", StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.AUTORIZZATA));
etichette.put("value", StatoPraticaConstants.CONFORME);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette
.put("label", StatoPraticaConstants.getEsitoDeposito(StatoPraticaConstants.NON_CONFORME));
etichette.put("label", StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.NON_CONFORME));
etichette.put("value", StatoPraticaConstants.NON_CONFORME);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette
.put("label", StatoPraticaConstants.getEsitoDeposito(StatoPraticaConstants.INTEGRAZIONE));
etichette.put("label", StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.INTEGRAZIONE));
etichette.put("value", StatoPraticaConstants.INTEGRAZIONE);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", StatoPraticaConstants.getEsitoDeposito(StatoPraticaConstants.ANNULLATA));
etichette.put("value", StatoPraticaConstants.ANNULLATA);
etichette.put("default", false);
jsonArray.put(etichette);
} else if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
JSONObject etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label",
StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.AUTORIZZATA));
etichette.put("value", StatoPraticaConstants.CONFORME);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label",
StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.NON_CONFORME));
etichette.put("value", StatoPraticaConstants.NON_CONFORME);
etichette.put("label", StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.PREAVVISO_CONTRARIO));
etichette.put("value", StatoPraticaConstants.PREAVVISO_CONTRARIO);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label",
StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.INTEGRAZIONE));
etichette.put("value", StatoPraticaConstants.INTEGRAZIONE);
etichette.put("label", StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.NO_PARERE));
etichette.put("value", StatoPraticaConstants.NO_PARERE);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label",
StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.PREAVVISO_CONTRARIO));
etichette.put("value", StatoPraticaConstants.PREAVVISO_CONTRARIO);
return jsonObject.toString();
}
private static String getJsonViarchStart() {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
jsonObject.put("esito", jsonArray);
JSONObject etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label", "Attiva VIArch");
etichette.put("value", StatoPraticaConstants.VIARCH);
etichette.put("default", false);
jsonArray.put(etichette);
etichette = JSONFactoryUtil.createJSONObject();
etichette.put("label",
StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.NO_PARERE));
etichette.put("value", StatoPraticaConstants.NO_PARERE);
etichette.put("label", StatoPraticaConstants.getEsitoAutorizzazione(StatoPraticaConstants.INTEGRAZIONE));
etichette.put("value", StatoPraticaConstants.INTEGRAZIONE);
etichette.put("default", false);
jsonArray.put(etichette);
}
return jsonObject.toString();
}
public ControlloPratica addPraticheAlControllo(long controlloPraticaId, long dettPraticaId)
throws PortalException, SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService
.getControlloPratica(controlloPraticaId);
@Override
public ControlloPratica addPraticheAlControllo(long controlloPraticaId, long dettPraticaId) throws PortalException,
SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId);
controlloPratica.setDettPraticaId(dettPraticaId);
controlloPratica.setModifiedDate(new Date());
return controlloPraticaPersistence.update(controlloPratica);
}
@ -640,11 +636,11 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
* @throws PortalException
* @throws SystemException
*/
@Override
public ControlloPratica addPraticheAlControlloVarianti(long controlloPraticaId, long dettPraticaId,
ServiceContext serviceContext) throws PortalException, SystemException {
_log.info("start addPraticheAlControlloVarianti per controlloPraticaId=" + controlloPraticaId);
ControlloPratica controlloPratica = controlloPraticaLocalService
.getControlloPratica(controlloPraticaId);
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId);
controlloPratica.setDettPraticaId(dettPraticaId);
controlloPratica.setModifiedDate(new Date());
ControlloPratica result = controlloPraticaPersistence.update(controlloPratica);
@ -660,22 +656,19 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
FormLogLocalServiceUtil.addFormLog(lastTask.getWorkflowInstanceId(), 0l, "cambio-istruttore",
jsonFormParameters, serviceContext);
} catch (Exception e) {
_log.error(
"Errore in addPraticheAlControlloVarianti - inserimento log non riuscito -controlloPraticaId = "
_log.error("Errore in addPraticheAlControlloVarianti - inserimento log non riuscito -controlloPraticaId = "
+ controlloPraticaId, e);
}
return result;
}
public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException,
SystemException {
@Override
public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException {
ControlloPratica controlloPratica = controlloPraticaLocalService
.getControlloPratica(controlloPraticaId);
ControlloPratica controlloPratica = controlloPraticaLocalService.getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica
.getDettPraticaId());
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
return "portos1_integrazioni";
@ -684,16 +677,15 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
}
}
@Override
public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException {
String tipoEsito = StringPool.BLANK;
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(controlloPraticaId);
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId);
ClassLoader classLoaderKaleo = (ClassLoader) PortletBeanLocatorUtil.locate(
com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(),
"portletClassLoader");
com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dqKaleo = DynamicQueryFactoryUtil.forClass(KaleoInstance.class, classLoaderKaleo);
dqKaleo.add(RestrictionsFactoryUtil.eq("classPK", controlloPraticaId));
@ -708,10 +700,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
it.tref.liferay.portos.kaleo.service.ClpSerializer.getServletContextName(),
"portletClassLoader");
DynamicQuery dqKaleoLog = DynamicQueryFactoryUtil
.forClass(FormLog.class, classLoaderKaleoLog);
dqKaleoLog.add(RestrictionsFactoryUtil.eq("workflowInstanceId",
kaleoInstance.getKaleoInstanceId()));
DynamicQuery dqKaleoLog = DynamicQueryFactoryUtil.forClass(FormLog.class, classLoaderKaleoLog);
dqKaleoLog.add(RestrictionsFactoryUtil.eq("workflowInstanceId", kaleoInstance.getKaleoInstanceId()));
dqKaleoLog.add(RestrictionsFactoryUtil.eq("transitionName", "registra-esito"));
Order defaultOrder = OrderFactoryUtil.desc("createDate");
@ -735,26 +725,26 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return tipoEsito;
}
@Override
public List<ControlloPratica> findByIntPratica(long intPraticaId) throws SystemException {
return controlloPraticaPersistence.findByIntPraticaId(intPraticaId);
}
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException,
PortalException {
ControlloPratica controllo = ControlloPraticaLocalServiceUtil
.fetchControlloPratica(controlloPraticaId);
@Override
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException {
ControlloPratica controllo = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId);
IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId());
Date apertura = pratica.getDtPratica();
Date chiusura = null;
long stop = 0;
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS, OrderByComparatorFactoryUtil
.getOrderByComparatorFactory().create("portos_bo_Avviso", "createDate", true));
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica(
pratica.getIntPraticaId(),
QueryUtil.ALL_POS,
QueryUtil.ALL_POS,
OrderByComparatorFactoryUtil.getOrderByComparatorFactory().create("portos_bo_Avviso", "createDate",
true));
Date start = null;
Date end = null;
_log.debug("Pratica " + pratica.getNumeroProgetto());
for (Avviso avviso : avvisi) {
if (!avviso.isAnnullato()) {
@ -800,139 +790,26 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
start = end = null;
}
}
// C'è uno stop ancora attivo
if (Validator.isNotNull(start)) {
chiusura = start;
}
Long giorni = null;
if (Validator.isNull(chiusura)) {
giorni = SismicaUtil.daysPast(apertura);
} else {
giorni = SismicaUtil.daysBetween(apertura, chiusura);
}
return giorni - stop;
}
/*
* 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 {
/*
* DettPratica
* dettPratica=DettPraticaLocalServiceUtil.getDettPratica
* (cp.getDettPraticaId());
* if(dettPratica.getTipoIntegrazione().equals
* (TipoIntegrazioneUtil.VARIANTE)){ _log.info(
* "gestioneWFVarianti - avviato workflow per variante dettPraticaId="
* +cp.getDettPraticaId()+" -ControlloPraticaId="+cp.
* getControlloPraticaId()); IntPratica intPratica=
* IntPraticaLocalServiceUtil.fetchIntPratica(cp.getIntPraticaId());
* long statusByuserId=intPratica.getStatusByUserId();
* _log.info("gestioneWFVarianti -statusByuserId="
* +statusByuserId+" per int pratica="
* +intPratica.getIntPraticaId()); //WorkflowInstanceLink
* workflowInstanceLink =
* WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink(
* // cp.getCompanyId(),cp.getGroupId(),
* ControlloPratica.class.getName(),cp.getPrimaryKey());
* //_log.info(
* "gestioneWFVarianti - workflowInstanceLink=="+workflowInstanceLink
* .getWorkflowInstanceId()); if (statusByuserId==0){
* _log.info("gestioneWFVarianti - KO - statusByuserId="
* +statusByuserId); return; }else{
* _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
* kaleoInstance =
* KaleoInstanceLocalServiceUtil.getKaleoInstance(workflowInstanceId
* ); KaleoInstanceToken rootKaleoInstanceToken =
* kaleoInstance.getRootKaleoInstanceToken(serviceContext);
* _log.info("gestioneWFVarianti - rootKaleoInstanceToken="+
* rootKaleoInstanceToken.getCurrentKaleoNodeName()); long
* kaleoTaskInstanceTokenID=CounterLocalServiceUtil.increment(
* "com.liferay.counter.model.Counter");
* _log.info("kaleoTaskInstanceTokenID="+kaleoTaskInstanceTokenID);
* KaleoTaskInstanceToken x =
* KaleoTaskInstanceTokenLocalServiceUtil.
* createKaleoTaskInstanceToken(kaleoTaskInstanceTokenID);
* x.setKaleoTaskId(21642); x.setKaleoTaskName("Esito");
* x.setCompleted(false); x.setGroupId(cp.getGroupId());
* x.setClassName
* ("it.tref.liferay.portos.bo.model.ControlloPratica");
* x.setClassPK(kaleoInstance.getClassPK());
* x.setCompanyId(kaleoInstance.getCompanyId());
* x.setUserId(kaleoInstance.getUserId());
* x.setUserName(kaleoInstance.getUserName()); x.setCreateDate(new
* Date());
* x.setKaleoInstanceId(kaleoInstance.getKaleoInstanceId());
* x.setKaleoDefinitionId(kaleoInstance.getKaleoDefinitionId());
* x.setKaleoInstanceTokenId
* (rootKaleoInstanceToken.getKaleoInstanceTokenId());
* x.setWorkflowContext(kaleoInstance.getWorkflowContext());
* x=KaleoTaskInstanceTokenLocalServiceUtil
* .updateKaleoTaskInstanceToken(x); _log.info(
* "gestioneWFVarianti - KaleoTaskInstanceToken di tipo ESITO creato - KaleoTaskInstanceTokenId = "
* +x.getKaleoTaskInstanceTokenId()); _log.info(
* "gestioneWFVarianti - correttamente eseguito - ControlloPraticaId = "
* +cp.getControlloPraticaId());
* ////////////////////////////////////
* /////////////////////////////////
*
*
*
* }
*/
} catch (Exception e) {
_log.error(
"gestioneWFVarianti - Errore in gestioneWFVarianti - dettaPratiacaId="
+ cp.getDettPraticaId(), e);
// throw e;
}
}
}

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

@ -4668,6 +4668,7 @@ public class IntPraticaPersistenceImpl extends BasePersistenceImpl<IntPratica>
intPraticaImpl.setOldIntPraticaId(intPratica.getOldIntPraticaId());
intPraticaImpl.setSospesa(intPratica.isSospesa());
intPraticaImpl.setDtSospensione(intPratica.getDtSospensione());
intPraticaImpl.setDtViarch(intPratica.getDtViarch());
intPraticaImpl.setCodiceFiscaleDelegatoFineLavori(intPratica.getCodiceFiscaleDelegatoFineLavori());
intPraticaImpl.setCodiceFiscaleDelegatoCollaudo(intPratica.getCodiceFiscaleDelegatoCollaudo());
intPraticaImpl.setFineLavoriParziale(intPratica.isFineLavoriParziale());

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=2912
build.date=1615307426711
build.number=2913
build.date=1615991433242
build.auto.upgrade=true
##

4
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component

@ -2,10 +2,10 @@
<wb-module deploy-name="portos-fe-portlet">
<wb-resource deploy-path="/" source-path="/docroot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/src"/>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependent-module archiveName="hms-taglib-hook-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/hms-taglib-hook/docroot/WEB-INF/lib/hms-taglib-hook-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="hms-taglib-hook-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/hms-taglib-hook/docroot/WEB-INF/lib/hms-taglib-hook-service.jar">
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="portos-fe-portlet"/>

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

@ -7,7 +7,6 @@ import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.StringPool;
@SuppressWarnings("serial")
public class StatoPraticaConstants {
public static final String ANNULLATA = "AL";
@ -33,14 +32,15 @@ public class StatoPraticaConstants {
public static final String CAMBIO_ISTRUTTORE = "CI";
public static final String NON_AUTORIZZATA = "AN";
public static final String VARIAZIONE_SOGGETTI = "VS";
public static final String VIARCH = "IA";
/*
* Probabilmente non è il posto più corretto, però si usa dovunque lo stato
* della pratica per impostare tipo avviso, tranne che per quello manuale,
* che era spesso hardcoded "es. avviso.setTipoDocumento("MA")"
* Probabilmente non è il posto più corretto, però si usa dovunque lo stato della pratica per impostare tipo avviso,
* tranne che per quello manuale, che era spesso hardcoded "es. avviso.setTipoDocumento("MA")"
*/
public static final String INVIO_AVVISO_MANUALE = "MA";
@SuppressWarnings("serial")
private static final Map<String, String> statusLabel = new HashMap<String, String>() {
{
put(ANNULLATA, "label.admingeniocivile.statopratica.annullata");
@ -63,6 +63,7 @@ public class StatoPraticaConstants {
}
};
@SuppressWarnings("serial")
private final static Map<String, String> esitoAutorizzazione = new HashMap<String, String>() {
{
put(ANNULLATA, getLabel(ANNULLATA));

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

@ -24,5 +24,10 @@
<classpathentry kind="lib" path="docroot/WEB-INF/lib/portos-bo-portlet-service.jar"/>
<classpathentry kind="lib" path="/home/portos/sources/portos-src/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portos-kaleo-shared.jar"/>
<classpathentry kind="lib" path="/home/portos/sources/portos-src/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/portos-bo-shared.jar"/>
<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="docroot/WEB-INF/classes"/>
</classpath>

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

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

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

@ -155,7 +155,6 @@ long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getC
<portlet:param name="redirect" value="<%= currentURL %>" />
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" />
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" />
<!-- ADT BUG BO id = 27 -->
<portlet:param name="classPkForCarichiLavoro" value="<%= classPkForCarichiLavoro %>" />
</portlet:actionURL>

Caricamento…
Annulla
Salva