Sfoglia il codice sorgente

Permessi file allegati manuali

master
Salvatore La Manna 4 anni fa
parent
commit
68e67d8bd1
  1. BIN
      liferay-plugins-sdk-6.2/.ivy/ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
  2. 8
      liferay-plugins-sdk-6.2/build.properties
  3. 11
      liferay-plugins-sdk-6.2/ivy-settings.xml
  4. 28
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
  5. 83
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
  6. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
  7. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  8. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  9. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java
  10. 180
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
  11. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  12. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
  13. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
  14. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  15. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp
  16. 4
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/service.properties
  17. 2
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp
  18. 82
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp
  19. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp
  20. 366
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

BIN
liferay-plugins-sdk-6.2/.ivy/ivy-2.4.0.jar → liferay-plugins-sdk-6.2/.ivy/ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar

File binario non mostrato.

8
liferay-plugins-sdk-6.2/build.properties

@ -337,8 +337,8 @@
ivy.custom.settings.file=${sdk.dir}/ivy-settings.xml
ivy.home=${sdk.dir}/.ivy
ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar
#ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
#ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar
ivy.jar.url=https://cdn.lfrs.sl/repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
ivy.log.level=quiet
ivy.pom.developer.name=Brian Wing Shun Chan
@ -352,8 +352,8 @@
ivy.resolve.transitive.dependencies=true
ivy.resolve.transitive.dependencies.test=true
ivy.version=2.4.0
#ivy.version=2.4.0.LIFERAY-PATCHED-1-SNAPSHOT
#ivy.version=2.4.0
ivy.version=2.4.0.LIFERAY-PATCHED-1-SNAPSHOT
##
## JMX

11
liferay-plugins-sdk-6.2/ivy-settings.xml

@ -2,13 +2,20 @@
<settings defaultResolver="default" />
<resolvers>
<ibiblio m2compatible="true" name="liferay-public" root="http://repository.liferay.com/nexus/content/groups/public" />
<ibiblio m2compatible="true" name="liferay-public" root="https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public" />
<ibiblio m2compatible="true" name="local-m2" root="file://${user.home}/.m2/repository" />
<ibiblio m2compatible="true" name="io.spring.repo.maven.release" root="http://repo.spring.io/release/"/>
<chain dual="true" name="default">
<resolver ref="local-m2" />
<resolver ref="liferay-public" />
<resolver ref="io.spring.repo.maven.release" />
</chain>
</resolvers>
<repositories>
<repository>
<id>org.opensaml</id>
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
</repository>
</repositories>
</ivysettings>

28
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java

@ -46,8 +46,8 @@ public class AllegatiManualiPortlet extends MVCPortlet {
private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class);
public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
SystemException {
public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException {
try {
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
@ -72,9 +72,9 @@ public class AllegatiManualiPortlet extends MVCPortlet {
if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) {
byte[] content = FileUtil.getBytes(file);
AllegatoManuale allegatoManuale =
AllegatoManualeLocalServiceUtil.addAllegatoManuale(serviceContext.getUserId(), intPraticaId,
dettPraticaId, descrizione, content, sourceFileName, serviceContext);
AllegatoManualeLocalServiceUtil
.addAllegatoManuale(serviceContext.getUserId(), intPraticaId, dettPraticaId,
descrizione, content, sourceFileName, serviceContext);
}
}
@ -87,14 +87,15 @@ public class AllegatiManualiPortlet extends MVCPortlet {
}
public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId");
AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId);
}
@Override
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException,
PortletException {
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
throws IOException, PortletException {
String id = resourceRequest.getResourceID();
@ -110,8 +111,8 @@ public class AllegatiManualiPortlet extends MVCPortlet {
InputStream inputStream = null;
try {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
inputStream =
DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(), false);
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);
String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
zipWriter.addEntry(name, inputStream);
@ -127,8 +128,8 @@ public class AllegatiManualiPortlet extends MVCPortlet {
resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP);
resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate");
resourceResponse
.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"");
resourceResponse.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\""
+ file.getName() + "\"");
resourceResponse.setContentLength(data.length);
resourceResponse.getPortletOutputStream().write(data);
@ -143,8 +144,7 @@ public class AllegatiManualiPortlet extends MVCPortlet {
FilesImporter.importaFile(classPk, className);
PortletResponseUtil
.write(
resourceResponse,
.write(resourceResponse,
"<p style='margin-bottom:20px'><strong>Completato</strong></p><a href='#' class='btn btn-success' onclick=\"Liferay.Portlet.refresh('#p_p_id_"
+ PortletKeys.FASCICOLOFE + "_')\">Refresh</a>");

83
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java

@ -7,6 +7,7 @@ import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalService;
@ -17,6 +18,7 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DocPraticaLocalService;
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistenceImpl;
@ -96,13 +98,21 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
public void sostituisciDL(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException, PortalException, IOException {
SismicaUtil.sostituisciDL(actionRequest, actionResponse);
Long userId = null;
long userId = 0;
String title = null;
String description = null;
String mimeType = null;
String changeLog = StringPool.BLANK;
FileEntry fileEntry = null;
Date now = new Date();
long companyId = 0;
long groupId = 0;
long defaultFolderId = 0;
Folder defaultFolder = null;
String folderName = null;
byte[] bytes = null;
long folderId = 0;
long repositoryId = 0;
ServiceContext serviceContext = new ServiceContext();
String className = ParamUtil.getString(actionRequest, "className");
@ -117,18 +127,18 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
case "it.tref.liferay.portos.bo.model.DocPratica":
DocPratica pratica = DocPraticaLocalServiceUtil.getDocPratica(idOggetto);
userId = pratica.getUserId();
long companyId = pratica.getCompanyId();
long groupId = pratica.getGroupId();
companyId = pratica.getCompanyId();
groupId = pratica.getGroupId();
serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId);
long defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(pratica.getClassPk());
long folderId = defaultFolder.getFolderId();
long repositoryId = defaultFolder.getRepositoryId();
defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
folderName = PraticaUtil.getFolderName(pratica.getClassPk());
folderId = defaultFolder.getFolderId();
repositoryId = defaultFolder.getRepositoryId();
try {
folder = DLAppLocalServiceUtil.getFolder(repositoryId, folderId, folderName);
@ -137,16 +147,16 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
StringPool.BLANK, serviceContext);
}
byte[] bytes = FileUtil.getBytes(file);
bytes = FileUtil.getBytes(file);
title = pratica.getTipologia() + StringPool.UNDERLINE + sourceFileName;
description = sourceFileName;
mimeType = MimeTypesUtil.getContentType(sourceFileName);
try {
/*try {
DLAppLocalServiceUtil.deleteFileEntry(pratica.getDlFileEntryId());
} catch(PortalException e){
}
}*/
try {
fileEntry = DLAppLocalServiceUtil.getFileEntry(pratica.getDlFileEntryId());
@ -158,13 +168,60 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
mimeType, title, description, changeLog, bytes, serviceContext);
}
/*fileEntry = DLAppLocalServiceUtil.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_"
+ sourceFileName, mimeType, title, description, changeLog, bytes, serviceContext);*/
pratica.setDlFileEntryId(fileEntry.getFileEntryId());
pratica.setSha256(DigestUtils.sha256Hex(bytes));
DocPraticaLocalServiceUtil.updateDocPratica(pratica);
break;
case "it.tref.liferay.portos.bo.model.Pagamento":
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(idOggetto);
userId = pagamento.getUserId();
companyId = pagamento.getCompanyId();
groupId = pagamento.getGroupId();
serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId);
defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
folderId = defaultFolder.getFolderId();
repositoryId = defaultFolder.getRepositoryId();
try {
folder = DLAppLocalServiceUtil.getFolder(repositoryId, folderId, folderName);
} catch (NoSuchFolderException e) {
folder = DLAppLocalServiceUtil.addFolder(userId, repositoryId, folderId, folderName,
StringPool.BLANK, serviceContext);
}
bytes = FileUtil.getBytes(file);
title = now.getTime() + StringPool.UNDERLINE + "pagamento_manuale" + StringPool.UNDERLINE
+ pagamento.getPagamentoId() + StringPool.UNDERLINE + sourceFileName;
description = StringPool.BLANK;
mimeType = MimeTypesUtil.getContentType(sourceFileName);
/*try {
DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId());
} catch(PortalException e){
}*/
try {
fileEntry = DLAppLocalServiceUtil.getFileEntry(pagamento.getFileEntryId());
fileEntry = DLAppLocalServiceUtil.updateFileEntry(userId, fileEntry.getFileEntryId(),
now.getTime() + "_" + sourceFileName, mimeType, title, description, changeLog, false, bytes,
serviceContext);
} catch (PortalException e) {
fileEntry = DLAppLocalServiceUtil.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" + sourceFileName,
mimeType, title, description, changeLog, bytes, serviceContext);
}
pagamento.setFileEntryId(fileEntry.getFileEntryId());
PagamentoLocalServiceUtil.updatePagamento(pagamento);
break;
default:
break;

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

@ -34,6 +34,7 @@ import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -121,6 +122,7 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);

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

@ -63,6 +63,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
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;
@ -577,6 +578,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

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

@ -62,6 +62,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@ -982,7 +983,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("fileEntryIdInvio", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.ne("fileEntryIdBase", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rifiutato", false));
List avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery);
List<Avviso> avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery);
return avvisi;
}
@ -1083,6 +1084,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave);
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(),
folder.getRepositoryId(), folderId, fileName,
MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", "", "", bytes,

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

@ -31,6 +31,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -141,6 +142,8 @@ public class DocAggiuntivaLocalServiceImpl extends DocAggiuntivaLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);

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

@ -45,6 +45,7 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.model.RoleConstants;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.RoleLocalServiceUtil;
@ -57,13 +58,14 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the doc 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
* 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.DocPraticaLocalService} 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
@ -72,9 +74,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
*/
public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
/*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil} to access the doc pratica local
* service.
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* {@link it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil} to
* access the doc pratica local service.
*/
private Log _log = LogFactoryUtil.getLog(DocPraticaLocalServiceImpl.class);
@ -100,21 +102,22 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return deleteDocPratica(docPraticaLocalService.getDocPratica(docPraticaId));
}
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, byte[] dlFileEntry,
String fileName, String version, boolean praticaValidata, String descLong, String tipologia, String sha256,
boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione,
ServiceContext serviceContext) throws PortalException, SystemException {
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
long dettPraticaIdRimozione, Date dtDataRimozione, ServiceContext serviceContext)
throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date();
validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, fileName, version,
praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione,
dtDataRimozione);
validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry,
fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari,
dettPraticaIdRimozione, dtDataRimozione);
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
@ -146,15 +149,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica;
}
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, byte[] dlFileEntry,
String fileName, String tipologia, String jsonFirmatari, ServiceContext serviceContext) throws PortalException,
SystemException {
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
byte[] dlFileEntry, String fileName, String tipologia, String jsonFirmatari,
ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date();
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
@ -185,15 +189,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica;
}
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, long fileEntryId,
String fileName, String tipologia, String jsonFirmatari, ServiceContext serviceContext) throws PortalException,
SystemException {
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
long fileEntryId, String fileName, String tipologia, String jsonFirmatari,
ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date();
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(user.getUserId());
@ -223,18 +228,19 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
public DocPratica addDocPraticaForImport(long userId, String className, long classPk, long intPraticaId,
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, String tipologia,
String sha256, boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione,
long oldDocPraticaId, ServiceContext serviceContext) throws PortalException, SystemException {
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
long dettPraticaIdRimozione, Date dtDataRimozione, long oldDocPraticaId,
ServiceContext serviceContext) throws PortalException, SystemException {
Date now = new Date();
validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, fileName, version,
praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione,
dtDataRimozione);
validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry,
fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari,
dettPraticaIdRimozione, dtDataRimozione);
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(userId);
@ -269,7 +275,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
FileEntry fileEntry = null;
// DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
// DettPratica dettPratica =
// dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
Territorio territorio = territorioPersistence.fetchByPrimaryKey(intPratica.getTerritorioId());
@ -277,9 +284,9 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
long groupId = territorio.getGroupId();
// TODO forse è meglio ragionare con un'altra logica per i permessi
User user =
UserLocalServiceUtil.getRoleUsers(
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()).get(0);
User user = UserLocalServiceUtil.getRoleUsers(
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR)
.getRoleId()).get(0);
try {
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(user));
} catch (Exception e) {
@ -292,11 +299,10 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId);
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
// TODO forse mettiamo i permesssi ma non mi pare sicuro.
long defaultFolderId =
configurazioneLocalService.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(companyId,
ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
@ -304,12 +310,12 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
defaultFolder.getFolderId(), folderName);
} catch (NoSuchFolderException e) {
// cartella non presente -> creo cartella
folder =
dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName,
StringPool.BLANK, serviceContext);
folder = dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(),
defaultFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
}
Date now = new Date();
String title = tipoAllegato + StringPool.UNDERLINE + sourceFileName;
@ -317,13 +323,13 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
String mimeType = MimeTypesUtil.getContentType(sourceFileName);
String changeLog = StringPool.BLANK;
fileEntry =
dlAppLocalService.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_"
+ sourceFileName, mimeType, title, description, changeLog, content, serviceContext);
fileEntry = dlAppLocalService.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(),
now.getTime() + "_" + sourceFileName, mimeType, title, description, changeLog, content,
serviceContext);
try {
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(UserLocalServiceUtil
.getUser(delegaUserId)));
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil
.create(UserLocalServiceUtil.getUser(delegaUserId)));
} catch (Exception e) {
throw new SystemException(e);
@ -344,7 +350,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService.updateDocPratica(docPratica);
}
public void addFirmeAndApprova(long docPraticaId, List<String> codiciFiscali) throws PortalException, SystemException {
public void addFirmeAndApprova(long docPraticaId, List<String> codiciFiscali) throws PortalException,
SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
String jsonFirmatari = docPratica.getJsonFirmatari();
@ -357,7 +364,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService.updateDocPratica(docPratica);
}
public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException, SystemException {
public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException,
SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
docPratica.setModifiedDate(new Date());
@ -376,16 +384,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
private void validate(long groupId, long docPraticaId, String className, long classPk, long intPraticaId,
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, String tipologia,
String sha256, boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione)
throws PortalException, SystemException {
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
long dettPraticaIdRimozione, Date dtDataRimozione) throws PortalException, SystemException {
// TODO Write your own validation code
}
public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato) throws SystemException {
public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato)
throws SystemException {
DocPratica docPratica = docPraticaPersistence.fetchByPrimaryKey(docPraticaId);
docPratica.setAggiornato(aggiornato);
@ -436,7 +444,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPraticaPersistence.findByClassPk(classPk);
}
public List<DocPratica> findByStaus(int status, int start, int end, OrderByComparator order) throws SystemException {
public List<DocPratica> findByStaus(int status, int start, int end, OrderByComparator order)
throws SystemException {
return docPraticaPersistence.findByStatus(status, start, end, order);
}
@ -467,8 +476,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk, String tipologia,
int start, int end) throws SystemException {
public List<DocPratica> findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk,
String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -478,8 +487,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk, List<String> tipologie)
throws SystemException {
public List<DocPratica> findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk,
List<String> tipologie) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -500,7 +509,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version) throws SystemException {
public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version)
throws SystemException {
return docPraticaPersistence.fetchByDlFileEntry_Version(dlFileEntryId, version);
}
@ -520,7 +530,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
throws SystemException {
DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("dlFileEntryId")));
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil
.property("dlFileEntryId")));
dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
Junction or = RestrictionsFactoryUtil.disjunction();
for (long classPk : classPks) {
@ -540,8 +551,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
public List<DocPratica> getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
throws SystemException {
public List<DocPratica> getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -551,7 +562,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia) throws SystemException {
public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -559,8 +571,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
}
public List<DocPratica> getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
throws SystemException {
public List<DocPratica> getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -569,8 +581,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId, long dettPraticaId, String tipologia, int start, int end)
throws SystemException {
public List<DocPratica> getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId,
long dettPraticaId, String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -581,8 +593,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie, int start, int end)
throws SystemException {
public List<DocPratica> getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie,
int start, int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
@ -591,7 +603,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie) throws SystemException {
public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
@ -626,14 +639,15 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
public List<DocPratica> getValidUntilClassPkByIntPratica(long intPraticaId, long classPk, String tipologia,
int start, int end) throws SystemException {
public List<DocPratica> getValidUntilClassPkByIntPratica(long intPraticaId, long classPk,
String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
// dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
// dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione",
// null));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
return dynamicQuery(dynamicQuery, start, end);
@ -661,15 +675,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
// ADT BUG FE ID = 9
public DocPratica addDocPraticaAnnullamento(long userId, String className, long classPk, long intPraticaId, long fileEntryId,
String fileName, String tipologia, String sha256, String jsonFirmatari, ServiceContext serviceContext) throws PortalException,
SystemException {
public DocPratica addDocPraticaAnnullamento(long userId, String className, long classPk,
long intPraticaId, long fileEntryId, String fileName, String tipologia, String sha256,
String jsonFirmatari, ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date();
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(user.getUserId());
@ -699,7 +714,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica;
}
/**
* Metodo nuovo ADT
*
@ -711,8 +725,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
* @return
* @throws SystemException
*/
public List<DocPratica> findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk, String tipologia,
int start, int end) throws SystemException {
public List<DocPratica> findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk,
String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));

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

@ -74,6 +74,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;
@ -107,6 +108,7 @@ import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil;
import com.liferay.portal.kernel.workflow.WorkflowTask;
import com.liferay.portal.model.User;
import com.liferay.portal.model.WorkflowInstanceLink;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
@ -1133,6 +1135,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

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

@ -44,6 +44,7 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@ -68,6 +69,7 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
*/
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
@ -272,7 +274,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
@SuppressWarnings("unchecked")
public List<Pagamento> findByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo, int start,
int end) throws SystemException {
@ -289,7 +290,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
}
@SuppressWarnings("unchecked")
public List<Pagamento> findByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata, int start, int end) throws SystemException {
@ -585,6 +585,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
@ -644,6 +645,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

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

@ -31,6 +31,7 @@ import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
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;
@ -116,6 +117,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

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=2474
build.date=1602313407057
build.number=2477
build.date=1602754023327
build.auto.upgrade=true
##

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp

@ -169,6 +169,8 @@ String dataProssimoSorteggio =
<aui:option label="Seleziona tipo di oggetto" value=""></aui:option>
<aui:option label="DocPratica (allegati)" selected="<%=oggetto.equals(DocPratica.class.getName())%>"
value="<%=DocPratica.class.getName()%>"></aui:option>
<aui:option label="Pagamento (allegato)" selected="<%=oggetto.equals(Pagamento.class.getName())%>"
value="<%=Pagamento.class.getName()%>"></aui:option>
</aui:select>
<aui:input type="file" name="file" label="File" />
<aui:input name="classPK" label="Id oggetto">

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

@ -13,8 +13,8 @@
##
build.namespace=portos_calendar_appointments
build.number=173
build.date=1576157134948
build.number=174
build.date=1602593587481
build.auto.upgrade=true
##

2
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp

@ -24,7 +24,7 @@
if(isIstruttoreForOrgs){
selectedOrganizationId = "" + defaultBoUserOrganization;
} else {
selectedOrganizationId = "21055";
selectedOrganizationId = "14287050";
}
}

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

@ -1,3 +1,5 @@
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
@ -41,6 +43,7 @@
<%@ include file="/html/allegatipratica/init.jsp"%>
<%
Log _log = LogFactoryUtil.getLog("view_accordion.jsp");
String comingFrom = ParamUtil.getString(request,"comingFrom",
GetterUtil.getString(
PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"),
@ -88,9 +91,9 @@
tipologiaAllegati.add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO);
type="ad";
}
%>
<liferay-portlet:resourceURL portletName="4_WAR_portosfeportlet" var="downloadAllURLs" id="downloadAllDocPraticas">
<liferay-portlet:resourceURL portletName="4_WAR_portosfeportlet" var="downloadAllURLs"
id="downloadAllDocPraticas">
<liferay-portlet:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId())%>" />
<liferay-portlet:param name="classPk" value="<%=String.valueOf(classPk)%>" />
<liferay-portlet:param name="comingFrom" value="<%=comingFrom%>" />
@ -98,17 +101,15 @@
</liferay-portlet:resourceURL>
<div class="container_btn_all_allegati padding_bottom">
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<span class="tooltip-info" title="Download Allegati">
<aui:button id='<%=renderResponse.getNamespace()+"download_all"%>'
icon="fa fa-download" cssClass="btn btn-primary btn-action"
href="<%= downloadAllURLs %>"
/>
<liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true"
cssClass="inline_toolbar">
<span class="tooltip-info" title="Download Allegati"> <aui:button
id='<%=renderResponse.getNamespace()+"download_all"%>' icon="fa fa-download"
cssClass="btn btn-primary btn-action" href="<%=downloadAllURLs%>" />
</span>
</liferay-ui:icon-menu>
</div>
<%
for(String codiceDoc:tipologiaAllegati){
List<DocPratica> docPraticas;
if(fullVersion){
@ -124,8 +125,7 @@
<a class="collapse_a" data-toggle="collapse" href="#collapse-<%=codiceDoc%>_<%=type%>">
<h4 class="panel-title allegato-group__title">
<liferay-ui:message key='<%="label-documenti-tipologia-"+codiceDoc%>' />
</h4>
<span class='num_allegati <%= docPraticas.size()>0 ? "green" : "red" %>'><%=docPraticas.size()%></span>
</h4> <span class='num_allegati <%=docPraticas.size()>0 ? "green" : "red"%>'><%=docPraticas.size()%></span>
</a>
</div>
<div id="collapse-<%=codiceDoc%>_<%=type%>" class="panel-collapse collapse lfr-search-container">
@ -133,7 +133,8 @@
if(!docPraticas.isEmpty()){
%>
<table class="table table-striped allegati-tipologia-table" id="<portlet:namespace/>allegati-table-<%= codiceDoc %>">
<table class="table table-striped allegati-tipologia-table"
id="<portlet:namespace/>allegati-table-<%=codiceDoc%>">
<thead class="table-columns allegato-group__head">
<tr>
<th class="text-center">STATO</th>
@ -150,14 +151,13 @@
<%
for(DocPratica docPratica:docPraticas){
long docPraticaId = docPratica.getDocPraticaId();
_log.info("Processo docPratica id = "+docPraticaId);
%>
<tr>
<td class="text-center">
<span class='fa fa-circle <%= Validator.isNull(docPratica.getDtDataRimozione()) ? "txt-green" : "txt-red" %>'></span>
</td>
<td>
<%= docPratica.getFileName() %>
<td class="text-center"><span
class='fa fa-circle <%=Validator.isNull(docPratica.getDtDataRimozione()) ? "txt-green" : "txt-red"%>'></span>
</td>
<td><%=docPratica.getFileName()%></td>
<td class="text-center">
<%
FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari());
@ -187,15 +187,12 @@
}
}
if(firme.numeroFirme()>0){
%>
<span class="fa fa-check icon-asseverazioni tooltip-info" title="<%=title.toString() %>" style="color:green">
<sub style="font-weight: bold"><%=firme.numeroFirme() %></sub>
</span>
<%
%> <span class="fa fa-check icon-asseverazioni tooltip-info" title="<%=title.toString()%>"
style="color: green"> <sub style="font-weight: bold"><%=firme.numeroFirme()%></sub>
</span> <%
}else{
%>
<span class="fa fa-close icon-asseverazioni tooltip-info" title="Non ci sono firme sul file" style="color:red"></span>
<%
%> <span class="fa fa-close icon-asseverazioni tooltip-info" title="Non ci sono firme sul file"
style="color: red"></span> <%
}
%>
</td>
@ -228,9 +225,7 @@
<%
DettPratica removing = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getDettPraticaIdRimozione());
if(removing != null){
%>
<%= removing.getFullDescription() %>
<%
%> <%=removing.getFullDescription()%> <%
}
%>
</td>
@ -239,26 +234,28 @@
%> --%>
<td class="text-center action-col">
<c:choose>
<td class="text-center action-col"><c:choose>
<c:when test="<%=Validator.isNotNull(docPratica.getDlFileEntryId())%>">
<liferay-portlet:renderURL var="previewURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="fileEntryId" value="<%= String.valueOf(docPratica.getDlFileEntryId()) %>" />
<liferay-portlet:param name="fileEntryId"
value="<%=String.valueOf(docPratica.getDlFileEntryId())%>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</liferay-portlet:renderURL>
<liferay-ui:icon id='<%="open_"+docPraticaId %>' linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard" message="Visualizza" url="<%=previewURL%>" useDialog="true"/>
<liferay-ui:icon id='<%="download_"+docPraticaId %>' linkCssClass="btn btn-action" iconCssClass="fa fa-download" message="Download" url="<%=docPratica.getDownloadUrl(themeDisplay)%>"/>
<liferay-ui:icon id='<%="open_"+docPraticaId%>' linkCssClass="btn btn-action"
iconCssClass="fa fa-clipboard" message="Visualizza" url="<%=previewURL%>" useDialog="true" />
<liferay-ui:icon id='<%="download_"+docPraticaId%>' linkCssClass="btn btn-action"
iconCssClass="fa fa-download" message="Download" url="<%=docPratica.getDownloadUrl(themeDisplay)%>" />
</c:when>
<c:otherwise>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" portletId="<%= PortletKeys.FASCICOLO %>" >
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%=application%>"
portletId="<%=PortletKeys.FASCICOLO%>">
<liferay-util:param name="classPK" value="<%=String.valueOf(docPratica.getDocPraticaId())%>" />
<liferay-util:param name="classNAME" value="<%=DocPratica.class.getName()%>" />
<liferay-util:param name="message" value="Download" />
</liferay-util:include>
</c:otherwise>
</c:choose>
</td>
</c:choose></td>
</tr>
<%
}
@ -275,18 +272,13 @@
}
%>
<script type="text/javascript">
YUI().use(
'aui-tooltip',
function(Y) {
new Y.TooltipDelegate(
{
YUI().use('aui-tooltip', function(Y) {
new Y.TooltipDelegate({
trigger : '.allegati-tipologia-table .tooltip-info',
position : 'top',
cssClass : 'tooltip-help',
html : true,
opacity : 1
}
);
}
);
});
});
</script>

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

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
@ -13,7 +12,6 @@
<%@page import="com.liferay.portal.kernel.util.ArrayUtil"%>
<%@ include file="/html/fascicolofe/init.jsp" %>
<%
String backURL = ParamUtil.getString(request, "backURL");

366
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

@ -1,6 +1,11 @@
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Delega"%>
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="javax.portlet.PortletResponse"%>
<%@page import="com.liferay.portal.model.Portlet"%>
<%@page import="java.util.HashMap"%>
@ -23,71 +28,72 @@
<%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%>
<div class="pull-right">
<%
Log _log = LogFactoryUtil.getLog("save_actions.jspf");
String randomId = StringUtil.randomId();
String formName = "fmDomande";
String buttonId = "fmbuttonsalvaconferma_" + randomId;
String buttonAsseverazioneId = "fmbuttonasseverazione_" + randomId;
String script =
"var el_relazioni = $('textarea[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Relazioni]');" +
"if (el_relazioni.length) {" +
"var el_coniugio = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]');" +
"var el_coniugiochk = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]:checked');" +
String script = "var el_relazioni = $('textarea[name=_"
+ PortletKeys.FASCICOLOFE
+ "_{{prefix}}Relazioni]');"
+ "if (el_relazioni.length) {"
+ "var el_coniugio = $('input[name=_"
+ PortletKeys.FASCICOLOFE
+ "_{{prefix}}Coniugio]');"
+ "var el_coniugiochk = $('input[name=_"
+ PortletKeys.FASCICOLOFE
+ "_{{prefix}}Coniugio]:checked');"
+
"console.log('length: ' + el_relazioni.length);" +
"console.log('length: ' + el_relazioni.length);"
+
"var err_coniugio = (el_coniugiochk.length == 0);" +
"var err_relazioni = ((el_relazioni.val().replace(/\\s*/g, '').length < 10) && (el_coniugiochk.val() == 1));" +
"var err_coniugio = (el_coniugiochk.length == 0);"
+ "var err_relazioni = ((el_relazioni.val().replace(/\\s*/g, '').length < 10) && (el_coniugiochk.val() == 1));"
+
"el_coniugio.parent().css({color:(err_coniugio ? '#a94442' : '#333')});" +
"el_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" +
"el_coniugio.parent().css({color:(err_coniugio ? '#a94442' : '#333')});"
+ "el_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" +
"if (err_coniugio || err_relazioni) {" +
"$('#" + renderResponse.getNamespace() + "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" +
"return false;" +
"}" +
"}" +
"saveDettPratica(false, '{{type}}');";
"if (err_coniugio || err_relazioni) {" + "$('#" + renderResponse.getNamespace()
+ "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" + "return false;"
+ "}" + "}" + "saveDettPratica(false, '{{type}}');";
%>
<aui:input type="hidden" name="cmd" value="" />
<aui:input type="hidden" name="verifyArea" value="" />
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true"
cssClass="inline_toolbar">
<c:if test="<%=!TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>">
<c:if test="<%=intPratica.getUserId() == user.getUserId()%>">
<liferay-ui:icon
iconCssClass="fa fa-save"
message="salva-bozza"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
</c:if>
<c:if test="<%= intPratica.getUserId() == user.getUserId()
<c:if
test="<%=intPratica.getUserId() == user.getUserId()
&& !DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId)
&& !AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon
iconCssClass="fa fa-check-square"
message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');"
linkCssClass="btn btn-primary"
/>
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');" linkCssClass="btn btn-primary" />
</c:if>
<c:if test="<%=DelegheUtil.canCompilaDomanda(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon
iconCssClass="fa fa-users"
linkCssClass='<%= ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId)?"btn":"btn disabled" %>'
message="gestione-deleghe"
url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');"
/>
<liferay-ui:icon iconCssClass="fa fa-users"
linkCssClass='<%=ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId) ? "btn"
: "btn disabled"%>'
message="gestione-deleghe" url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');" />
</c:if>
<c:if test="<%=DelegheUtil.canDoPayment(user.getUserId(), dettPraticaId)%>">
<%
boolean isEsente = dettPratica.getNormEsenteBollo() && dettPratica.getNormEsenteSpese();
boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE);
boolean isEsente = dettPratica.getNormEsenteBollo()
&& dettPratica.getNormEsenteSpese();
boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals(
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE);
%>
<%-- <c:if test="<%= !isEsente && !isIntegrazione && DelegheUtil.canDoPayment(user.getUserId(),dettPraticaId) %>">
<liferay-ui:icon
@ -108,69 +114,70 @@
<liferay-portlet:param name="comingFrom" value="domanda" />
</liferay-portlet:renderURL>
<c:if test="<%=isIntegrazione%>">
<liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL"
windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" />
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" />
<liferay-portlet:param name="redirect" value="<%=completedURL%>" />
</liferay-portlet:actionURL>
<liferay-ui:icon
linkCssClass='<%= ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ?"btn btn-primary":"btn btn-primary disabled" %>'
iconCssClass="fa fa-check"
message="Concludi Integrazione"
url="<%= completeIntegrazioneURL %>"
data="<%= dataMap %>"
/>
linkCssClass='<%=ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ? "btn btn-primary"
: "btn btn-primary disabled"%>'
iconCssClass="fa fa-check" message="Concludi Integrazione" url="<%=completeIntegrazioneURL%>"
data="<%=dataMap%>" />
</c:if>
<c:if test="<%=!isIntegrazione%>">
<c:if test="<%=isEsente%>">
<liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL"
windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" />
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" />
<liferay-portlet:param name="redirect" value="<%=completedURL%>" />
</liferay-portlet:actionURL>
<liferay-ui:icon
linkCssClass='<%= ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ?"btn btn-primary":"btn btn-primary disabled" %>'
iconCssClass="fa fa-check"
useDialog="<%= true %>"
message="Concludi Domanda"
url="<%= completeDomandaEsenteURL %>"
data="<%= dataMap %>"
/>
linkCssClass='<%=ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ? "btn btn-primary"
: "btn btn-primary disabled"%>'
iconCssClass="fa fa-check" useDialog="<%=true%>" message="Concludi Domanda"
url="<%=completeDomandaEsenteURL%>" data="<%=dataMap%>" />
</c:if>
<c:if test="<%=!isEsente%>">
<liferay-ui:icon
iconCssClass="fa fa-cogs"
linkCssClass='<%=ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId)?"btn btn-primary":"btn btn-primary disabled" %>'
message='<%= PagamentoLocalServiceUtil.countByClassPk(dettPraticaId)>0 ? LanguageUtil.get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext, "calcola-importo") %>'
url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');"
data="<%= dataMap %>"
/>
<liferay-ui:icon iconCssClass="fa fa-cogs"
linkCssClass='<%=ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId) ? "btn btn-primary"
: "btn btn-primary disabled"%>'
message='<%=PagamentoLocalServiceUtil.countByClassPk(dettPraticaId) > 0 ? LanguageUtil
.get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext,
"calcola-importo")%>'
url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');" data="<%=dataMap%>" />
</c:if>
</c:if>
</c:if>
<c:if test="<%=DelegheUtil.hasDelegaAttiva(user.getUserId(),dettPraticaId) && !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId) %>">
<liferay-ui:icon
iconCssClass="fa fa-save"
message="save"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<c:if
test="<%=DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId)
&& !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon iconCssClass="fa fa-save" message="save" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
<%
long delegaId = ParamUtil.getLong(request, "delegaId");
if (delegaId == 0) {
_log.error("Errore pratica id " + intPratica.getIntPraticaId() + ", utente "
+ user.getScreenName() + ", delegaId = 0");
}
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
boolean validated = true;
StringBuilder tooltipSection = new StringBuilder();
if (delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)) {
//List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil.hasDelegaGeologoCompleted(dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil
.hasDelegaGeologoCompleted(dettPraticaId);
if (!notCompleted.isEmpty()) {
validated = false;
tooltipSection.append("<ul class='list-body-modal'>");
for (String incomplete : notCompleted) {
tooltipSection.append("<li class='item-body-modal'>"+LanguageUtil.get(pageContext, incomplete)+"</li>");
tooltipSection.append("<li class='item-body-modal'>"
+ LanguageUtil.get(pageContext, incomplete) + "</li>");
}
tooltipSection.append("</ul>");
}
@ -182,13 +189,8 @@
String buttonIdVerifica = "fmbuttonverifica_" + randomId;
%>
<!-- ADT BUG FE ID = 14 -->
<liferay-ui:icon
id="<%= buttonIdVerifica %>"
iconCssClass="fa fa-times-circle txt-red"
message="verifica-delega"
url="javascript:saveDettPratica(true,'saveAndVerify');"
linkCssClass="btn"
/>
<liferay-ui:icon id="<%=buttonIdVerifica%>" iconCssClass="fa fa-times-circle txt-red"
message="verifica-delega" url="javascript:saveDettPratica(true,'saveAndVerify');" linkCssClass="btn" />
<!-- ADT BUG FE ID = 14 -->
<div id="${isBar}" hidden>
@ -210,110 +212,183 @@
</div>
</c:if>
<c:if test="<%= validated && DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia()) %>">
<liferay-ui:icon
iconCssClass="fa fa-check-circle txt-green"
message="verifica-delega"
url="javascript:void(0)"
linkCssClass="btn disabled"
/>
<c:if test="<%=validated
&& DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia())%>">
<liferay-ui:icon iconCssClass="fa fa-check-circle txt-green" message="verifica-delega"
url="javascript:void(0)" linkCssClass="btn disabled" />
</c:if>
<span class="<%= !validated ? "tooltip-info" : StringPool.BLANK %>" title="Delega incompleta">
<liferay-ui:icon
id="<%=buttonId %>"
iconCssClass="fa fa-check-circle"
message="concludi-delega"
url="javascript:void(0)"
linkCssClass='<%= !validated ? "btn btn-primary disabled" : "btn btn-primary" %>'
/>
<span class="<%=!validated ? "tooltip-info" : StringPool.BLANK%>" title="Delega incompleta"> <liferay-ui:icon
id="<%=buttonId%>" iconCssClass="fa fa-check-circle" message="concludi-delega" url="javascript:void(0)"
linkCssClass='<%=!validated ? "btn btn-primary disabled" : "btn btn-primary"%>' />
</span>
<c:if test="<%=validated%>">
<div id='<%=renderResponse.getNamespace() + "dgSaveAndCloseDiv_" + randomId%>' class="hide">
<span>
<c:choose>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-totale", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<span> <c:choose>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-totale",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_COMPILAZIONE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-compilazione", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_COMPILAZIONE)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-compilazione",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<c:when
test="<%=delega.getTipologia()
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_dgPresenti" value="1" />
Dichiara<br>
<label><input required type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_dgConiugio" onclick="$('#<portlet:namespace />dgrelazioni').hide()" value="0" /> di non trovarsi in rapporti di coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br>
<label><input type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_dgConiugio" onclick="$('#<portlet:namespace />dgrelazioni').show()" value="1" /> di trovarsi in rapporti di coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile (indicare un nominativo per riga).</label>
<textarea id="<portlet:namespace />dgrelazioni" name="_<%= PortletKeys.FASCICOLOFE %>_dgRelazioni" style="display:none"></textarea>
<label><input required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio"
onclick="$('#<portlet:namespace />dgrelazioni').hide()" value="0" /> di non trovarsi in rapporti di
coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i
dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label>
<br>
<label><input type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio"
onclick="$('#<portlet:namespace />dgrelazioni').show()" value="1" /> di trovarsi in rapporti di
coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio
Civile (indicare un nominativo per riga).</label>
<textarea id="<portlet:namespace />dgrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_dgRelazioni"
style="display: none"></textarea>
<hr>
<div class="anteprimaasseverazione"><%= AsseverazioneLocalServiceUtil.anteprimaAsseverazione(TipoSoggettoUtil.GEOLOGO, user, dettPratica, null) %></div>
<div class="anteprimaasseverazione"><%=AsseverazioneLocalServiceUtil.anteprimaAsseverazione(
TipoSoggettoUtil.GEOLOGO, user, dettPratica, null)%></div>
</c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-firma-inserimento", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-firma-inserimento",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_FINE_LAVORI) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-fine-lavori", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_FINE_LAVORI)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-fine-lavori",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_VISUALIZZAZIONE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-visualizzazione", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_VISUALIZZAZIONE)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-visualizzazione",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_COLLAUDO) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-collaudo", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_COLLAUDO)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-collaudo",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
</c:choose>
</span>
</div>
<liferay-portlet:resourceURL id="isCompletedDelegaGeologo" var="isCompletedDelegaGeologoURL" />
<%
String function = "A.io.request('"+isCompletedDelegaGeologoURL+"',{data: {"+renderResponse.getNamespace()+"classPk: "+dettPraticaId+"},"+
"dataType: 'json',on: {success: function(event, id, obj) {console.log(this.get('responseData'));var response = this.get('responseData');"+
"console.log(response.isCompleted);"+
"if(!response.isCompleted){var body = A.one('#"+renderResponse.getNamespace()+"dgSaveAndCloseDiv_"+randomId+"');"+
"body.html('<p class=\"text-center\">Delega incompleta<a href=\"javascript:void(0)\" class=\"btn btn-success\" style=\"margin-bottom:20px\" onclick=\"window.location.reload()\">Refresh</a></p>');"+
"body.ancestor('.modal-body').next('.modal-footer').remove();return;}"+
"}, complete: function(event){A.one('#"+renderResponse.getNamespace()+"dgSaveAndCloseDiv_"+randomId+"').show();modal.show();}"+
"}});";
String function = "A.io.request('"
+ isCompletedDelegaGeologoURL
+ "',{data: {"
+ renderResponse.getNamespace()
+ "classPk: "
+ dettPraticaId
+ "},"
+ "dataType: 'json',on: {success: function(event, id, obj) {console.log(this.get('responseData'));var response = this.get('responseData');"
+ "console.log(response.isCompleted);"
+ "if(!response.isCompleted){var body = A.one('#"
+ renderResponse.getNamespace()
+ "dgSaveAndCloseDiv_"
+ randomId
+ "');"
+ "body.html('<p class=\"text-center\">Delega incompleta<a href=\"javascript:void(0)\" class=\"btn btn-success\" style=\"margin-bottom:20px\" onclick=\"window.location.reload()\">Refresh</a></p>');"
+ "body.ancestor('.modal-body').next('.modal-footer').remove();return;}"
+ "}, complete: function(event){A.one('#" + renderResponse.getNamespace()
+ "dgSaveAndCloseDiv_" + randomId + "').show();modal.show();}" + "}});";
%>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>">
<liferay-util:param name="formName" value="<%=formName%>"></liferay-util:param>
<liferay-util:param name="onClick" value="<%= script.replace(\"{{prefix}}\", \"dg\").replace(\"{{type}}\", \"delega\") %>"></liferay-util:param>
<liferay-util:param name="onClick"
value="<%=script.replace(\"{{prefix}}\",\"dg\")
.replace(\"{{type}}\",\"delega\")%>"></liferay-util:param>
<liferay-util:param name="titolo" value="Conclusione Delega"></liferay-util:param>
<liferay-util:param name="contentDiv" value='<%="dgSaveAndCloseDiv_" + randomId%>'></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonId%>"></liferay-util:param>
<liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param>
<liferay-util:param name="width" value="500"></liferay-util:param>
<liferay-util:param name="height" value="320"></liferay-util:param>
<c:if test='<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) %>'>
<c:if test='<%=delega.getTipologia()
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)%>'>
<liferay-util:param name="function" value="<%=function%>"></liferay-util:param>
</c:if>
</liferay-util:include>
</c:if>
</c:if>
<c:if test="<%=AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId)%>">
<liferay-ui:icon
id="<%=buttonAsseverazioneId %>"
iconCssClass="fa fa-save"
message="Assevera"
url="#"
linkCssClass="btn btn-primary"
/>
<liferay-ui:icon id="<%=buttonAsseverazioneId%>" iconCssClass="fa fa-save" message="Assevera" url="#"
linkCssClass="btn btn-primary" />
<div id='<%=renderResponse.getNamespace() + "asSaveAndCloseDiv_" + randomId%>' class="hide">
<input type="hidden" name="_<%= PortletKeys.FASCICOLOFE %>_asPresenti" value="1" />
<label><input required type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_asConiugio" onclick="$('#<portlet:namespace />asrelazioni').hide()" value="0" /> di non trovarsi in rapporti di coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br>
<label><input type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_asConiugio" onclick="$('#<portlet:namespace />asrelazioni').show()" value="1" /> di trovarsi in rapporti di coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile (indicare un nominativo per riga).</label>
<textarea id="<portlet:namespace />asrelazioni" name="_<%= PortletKeys.FASCICOLOFE %>_asRelazioni" style="display:none"></textarea>
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_asPresenti" value="1" /> <label><input
required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_asConiugio"
onclick="$('#<portlet:namespace />asrelazioni').hide()" value="0" /> di non trovarsi in rapporti di
coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i
dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br> <label><input
type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_asConiugio"
onclick="$('#<portlet:namespace />asrelazioni').show()" value="1" /> di trovarsi in rapporti di
coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile
(indicare un nominativo per riga).</label>
<textarea id="<portlet:namespace />asrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_asRelazioni"
style="display: none"></textarea>
<hr>
<ol class="asseverazioni-list">
<%
List<Asseverazione> asseverazioni = AsseverazioneServiceUtil.findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, user.getScreenName(), new String[] {DelegheUtil.STATO_ASSEGNATA}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
List<Asseverazione> asseverazioni = AsseverazioneServiceUtil
.findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, user.getScreenName(),
new String[] { DelegheUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null);
for (Asseverazione asseverazione : asseverazioni) {
%>
<li class="anteprimaasseverazione">
<p>
<c:if test="<%= asseverazione.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<c:if test="<%=asseverazione.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%
String testoAsseverazione = AsseverazioneLocalServiceUtil.anteprimaAsseverazione(asseverazione.getTipologia(), user, dettPratica, null);
String testoAsseverazione = AsseverazioneLocalServiceUtil
.anteprimaAsseverazione(asseverazione.getTipologia(), user,
dettPratica, null);
if (Validator.isNull(testoAsseverazione)) {
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione, user.getScreenName());
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(
asseverazione, user.getScreenName());
}
%>
<%=testoAsseverazione%>
@ -327,7 +402,8 @@
</div>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>">
<liferay-util:param name="formName" value="formAsseverazione"></liferay-util:param>
<liferay-util:param name="onClick" value="<%= script.replace(\"{{prefix}}\", \"as\").replace(\"{{type}}\", \"asseverazione\") %>"></liferay-util:param>
<liferay-util:param name="onClick"
value="<%=script.replace(\"{{prefix}}\",\"as\").replace(\"{{type}}\",\"asseverazione\")%>"></liferay-util:param>
<liferay-util:param name="titolo" value="Conferma Asseverazione"></liferay-util:param>
<liferay-util:param name="contentDiv" value='<%="asSaveAndCloseDiv_" + randomId%>'></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonAsseverazioneId%>"></liferay-util:param>
@ -338,19 +414,11 @@
</c:if>
<c:if test="<%=TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>">
<liferay-ui:icon
iconCssClass="fa fa-save"
message="salva-bozza"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
<liferay-ui:icon
iconCssClass="fa fa-check-square"
message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda');"
linkCssClass="btn btn-primary"
/>
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda');" linkCssClass="btn btn-primary" />
</c:if>
</liferay-ui:icon-menu>

Caricamento…
Annulla
Salva