diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/persistence/AuditEventPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/persistence/AuditEventPersistenceImpl.java index 8436cb5b..14a029f4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/persistence/AuditEventPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/persistence/AuditEventPersistenceImpl.java @@ -43,7 +43,6 @@ import it.tref.liferay.portos.audit.NoSuchAuditEventException; import it.tref.liferay.portos.audit.model.AuditEvent; import it.tref.liferay.portos.audit.model.impl.AuditEventImpl; import it.tref.liferay.portos.audit.model.impl.AuditEventModelImpl; -import it.tref.liferay.portos.audit.service.persistence.AuditEventPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/details_column.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/details_column.jsp index 3b091aab..851b5a30 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/details_column.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/details_column.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.util.TextFormatter"%> <%@page import="com.liferay.portal.kernel.json.JSONArray"%> <%@page import="it.tref.liferay.portos.audit.model.AuditEvent"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/relations_column.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/relations_column.jsp index 72b2cb90..f5287023 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/relations_column.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/common/relations_column.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.util.TextFormatter"%> <%@page import="com.liferay.portal.kernel.json.JSONArray"%> <%@page import="it.tref.liferay.portos.audit.model.AuditEvent"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/detail.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/detail.jsp index 94e694cc..ffc929c3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/detail.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/detail.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%> <%@page import="com.liferay.portal.security.permission.ActionKeys"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view.jsp index 3c18f252..3d6b7058 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%> <%@page import="com.liferay.portal.security.permission.ActionKeys"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view_list.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view_list.jsp index ff21f2e4..f77b3e2e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view_list.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/detail/view_list.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.audit.shared.permission.HistoryPermission"%> <%@page import="com.liferay.portal.security.permission.ActionKeys"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/edit.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/edit.jsp index 646951b9..cb89ae81 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/edit.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/edit.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/view.jsp index ff47f72b..8447c350 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/storicizzazione/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-hook.xml index 8234053b..5dc0d86c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateFunzionarioException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateFunzionarioException.java index 6a9e1899..0eb7de10 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateFunzionarioException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateFunzionarioException.java @@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class DuplicateFunzionarioException extends PortalException { public DuplicateFunzionarioException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicatePrenotazioneException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicatePrenotazioneException.java index 8ddd98e0..f36f0237 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicatePrenotazioneException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicatePrenotazioneException.java @@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class DuplicatePrenotazioneException extends PortalException { public DuplicatePrenotazioneException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateProfessionistaException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateProfessionistaException.java index a6ed4a53..15346fde 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateProfessionistaException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/DuplicateProfessionistaException.java @@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class DuplicateProfessionistaException extends PortalException { public DuplicateProfessionistaException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchDisponibilitaException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchDisponibilitaException.java index 1a9c7f25..767cb4f0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchDisponibilitaException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchDisponibilitaException.java @@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class NoSuchDisponibilitaException extends NoSuchModelException { public NoSuchDisponibilitaException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchFunzionarioException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchFunzionarioException.java index ca5c71de..7cb3399a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchFunzionarioException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchFunzionarioException.java @@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class NoSuchFunzionarioException extends NoSuchModelException { public NoSuchFunzionarioException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchPrenotazioneException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchPrenotazioneException.java index 9a831064..77e4c805 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchPrenotazioneException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchPrenotazioneException.java @@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class NoSuchPrenotazioneException extends NoSuchModelException { public NoSuchPrenotazioneException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchProfessionistaException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchProfessionistaException.java index 24e17d50..7314eb85 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchProfessionistaException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/NoSuchProfessionistaException.java @@ -13,7 +13,6 @@ import com.liferay.portal.NoSuchModelException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class NoSuchProfessionistaException extends NoSuchModelException { public NoSuchProfessionistaException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/SlotNotAvailableException.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/SlotNotAvailableException.java index 58a65b67..d1db8c58 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/SlotNotAvailableException.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service/it/tref/portos/calendar/appointments/SlotNotAvailableException.java @@ -13,7 +13,6 @@ import com.liferay.portal.kernel.exception.PortalException; /** * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class SlotNotAvailableException extends PortalException { public SlotNotAvailableException() { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/DisponibilitaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/DisponibilitaImpl.java index f6278f0c..eeed0fd5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/DisponibilitaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/DisponibilitaImpl.java @@ -20,7 +20,6 @@ package it.tref.portos.calendar.appointments.model.impl; * * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class DisponibilitaImpl extends DisponibilitaBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a disponibilita model instance diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/FunzionarioImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/FunzionarioImpl.java index eddb1e39..8bdec5dd 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/FunzionarioImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/FunzionarioImpl.java @@ -22,7 +22,6 @@ import com.liferay.portal.kernel.util.StringPool; * * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class FunzionarioImpl extends FunzionarioBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a funzionario model instance @@ -30,8 +29,7 @@ public class FunzionarioImpl extends FunzionarioBaseImpl { */ public FunzionarioImpl() {} - @Override - public String getFullDescription() { - return getNome() + StringPool.SPACE + getCognome(); - } + public String getFullDescription() { + return getNome() + StringPool.SPACE + getCognome(); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/PrenotazioneImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/PrenotazioneImpl.java index a1cec9bd..73c6cce8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/PrenotazioneImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/PrenotazioneImpl.java @@ -24,7 +24,6 @@ import org.apache.commons.lang.time.DateUtils; * * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class PrenotazioneImpl extends PrenotazioneBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a prenotazione model instance @@ -32,9 +31,17 @@ public class PrenotazioneImpl extends PrenotazioneBaseImpl { */ public PrenotazioneImpl() {} - @Override - public boolean isExpired(Date now) { + public boolean isExpired(Date now) { - return now.after(getStartDate()) || DateUtils.isSameDay(now, getStartDate()); - } + if (now.after(getStartDate())) { + return true; + } + + if (DateUtils.isSameDay(now, getStartDate())) { + return true; + + } + + return false; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/ProfessionistaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/ProfessionistaImpl.java index ae04c853..dce6ea28 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/ProfessionistaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/model/impl/ProfessionistaImpl.java @@ -20,7 +20,6 @@ package it.tref.portos.calendar.appointments.model.impl; * * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class ProfessionistaImpl extends ProfessionistaBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a professionista model instance diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java index 57dd49bb..65f88c60 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java @@ -316,10 +316,10 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase List results = disponibilitaPersistence.findWithDynamicQuery(dynamicQuery); return results; + } } - public List findByFunzionario_StartDate(long funzionarioId, Date date, long presidio) throws SystemException { Date start = DateUtils.truncate(date, Calendar.DAY_OF_MONTH); Date end = DateUtils.addHours(start, 22); DynamicQuery dynamicQuery = dynamicQuery(); @@ -372,9 +372,9 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase Role dirigenteGenerale = RoleLocalServiceUtil.getRole(user.getCompanyId(), "dirigente_generale"); boolean isDirigenteGenerale = RoleLocalServiceUtil.hasUserRole(user.getUserId(), dirigenteGenerale.getRoleId()); - if(isDirigenteGenerale){ - - List orgs = OrganizationLocalServiceUtil.getOrganizations(-1, -1); + if (isDirigenteGenerale) { + List orgs = + OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, QueryUtil.ALL_POS); for (Organization organization : orgs) { if (organization.getParentOrganization() != null) { orgIds.add(organization.getOrganizationId()); @@ -427,9 +427,9 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase Role dirigenteGenerale = RoleLocalServiceUtil.getRole(user.getCompanyId(), "dirigente_generale"); boolean isDirigenteGenerale = RoleLocalServiceUtil.hasUserRole(user.getUserId(), dirigenteGenerale.getRoleId()); - if(isDirigenteGenerale){ - - List orgs = OrganizationLocalServiceUtil.getOrganizations(-1, -1); + if (isDirigenteGenerale) { + List orgs = + OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, QueryUtil.ALL_POS); for (Organization organization : orgs) { if (organization.getParentOrganization() != null) { orgIds.add(organization.getOrganizationId()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaServiceImpl.java index 153110f6..5ffdc835 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaServiceImpl.java @@ -11,6 +11,7 @@ package it.tref.portos.calendar.appointments.service.impl; import it.tref.portos.calendar.appointments.model.Disponibilita; import it.tref.portos.calendar.appointments.model.Funzionario; import it.tref.portos.calendar.appointments.model.Prenotazione; +import it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil; import it.tref.portos.calendar.appointments.service.base.DisponibilitaServiceBaseImpl; import java.text.ParseException; @@ -37,6 +38,7 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; +import com.liferay.portal.service.UserLocalServiceUtil; /** * The implementation of the disponibilita remote service. @@ -61,7 +63,6 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { private static Log _log = LogFactoryUtil.getLog(DisponibilitaServiceImpl.class); - @Override public Disponibilita addDisponibilita(long userId, long funzionarioId, Date startDate, Date endDate, long presidio, ServiceContext serviceContext) throws SystemException, PortalException { @@ -69,7 +70,6 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { serviceContext); } - @Override public List addDisponibilitaGenerale(long presidio, long userId, Date dataInizioDisponibilita, Date dataFineDisponibilita, String giornoSettimana, String oraInizioDisponibilita, String oraFineDisponibilita, ServiceContext serviceContext) throws SystemException, PortalException { @@ -87,9 +87,7 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { return listDisponibilita; } - @Override - public String verifyDisponibilitaByDateHour(String presidio, String date, String[] oreInizio, String idFunzionario) - throws SystemException, ParseException { + public String verifyDisponibilitaByDateHour(String presidio, String date,String[] oreInizio, String idFunzionario) throws SystemException, ParseException { JSONObject json = JSONFactoryUtil.createJSONObject(); JSONArray array = JSONFactoryUtil.createJSONArray(); @@ -101,9 +99,18 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { String oraInizio = oreInizio[i]; jsonFiglio.put("ora", oraInizio); Date dateVerify = formatDateTime(oraInizio, dateVerifyTemp); - List lista = prenotazioneLocalService.findByDateHourFunzionario(dateVerify, - Long.parseLong(idFunzionario), org.getGroupId()); - jsonFiglio.put("disponibile", lista.isEmpty()); + + + List lista = + PrenotazioneLocalServiceUtil.findByDateHourFunzionario( + dateVerify, Long.parseLong(idFunzionario), org.getGroupId()); + + if(lista.isEmpty()){ + jsonFiglio.put("disponibile", true); + } else { + jsonFiglio.put("disponibile", false); + } + array.put(jsonFiglio); } json.put("slot", array); @@ -117,23 +124,32 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); List userDefinitivo = new ArrayList(); try { - if (organization != null) { - List users = userLocalService.getOrganizationUsers(Long.valueOf(presidio)); + + if(organization != null){ + List users = UserLocalServiceUtil.getOrganizationUsers(Long.valueOf(presidio)); + for (User user : users) { Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); - Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), - "portos_calendario"); - if (!userLocalService.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())) { - boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), - organization.getGroupId(), portosIstruttore.getRoleId()); - if (isIstruttore) { + + Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_calendario"); + + if(!UserLocalServiceUtil.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())){ + + boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole( + user.getUserId(), organization.getGroupId(), portosIstruttore.getRoleId()); + + + if(isIstruttore){ userDefinitivo.add(user); } } } } - } catch (NumberFormatException | PortalException | SystemException e) { - _log.error(e, e); + + } catch (NumberFormatException | SystemException e) { + _log.error(e,e); + } catch (PortalException e) { + _log.error(e,e); } Date startDate = new SimpleDateFormat("dd/MM/yyyy").parse(date); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioLocalServiceImpl.java index 21ca8470..3feb7d48 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioLocalServiceImpl.java @@ -40,9 +40,8 @@ public class FunzionarioLocalServiceImpl extends FunzionarioLocalServiceBaseImpl * service. */ - @Override - public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia, - ServiceContext serviceContext) throws PortalException, SystemException { + public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia, + ServiceContext serviceContext) throws PortalException, SystemException { User user = userPersistence.findByPrimaryKey(userId); Date now = new Date(); @@ -75,9 +74,8 @@ public class FunzionarioLocalServiceImpl extends FunzionarioLocalServiceBaseImpl return this.deleteFunzionario(funzionario); } - @Override - public List findByPresidio(String presidio) throws SystemException { + public List findByPresidio(String presidio) throws SystemException { - return funzionarioPersistence.findByPresidio(presidio); - } + return funzionarioPersistence.findByPresidio(presidio); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioServiceImpl.java index 447943fe..60dfe822 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/FunzionarioServiceImpl.java @@ -8,7 +8,6 @@ package it.tref.portos.calendar.appointments.service.impl; -import it.tref.liferay.portos.bo.shared.util.Constants; import it.tref.portos.calendar.appointments.model.Funzionario; import it.tref.portos.calendar.appointments.service.base.FunzionarioServiceBaseImpl; @@ -23,7 +22,6 @@ import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.model.Organization; import com.liferay.portal.model.Role; @@ -32,6 +30,8 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; +import com.liferay.portal.service.UserLocalServiceUtil; +import it.tref.liferay.portos.bo.shared.util.Constants; /** * The implementation of the funzionario remote service. @@ -55,59 +55,67 @@ public class FunzionarioServiceImpl extends FunzionarioServiceBaseImpl { private static Log _log = LogFactoryUtil.getLog(FunzionarioServiceImpl.class); - @Override - public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia, - ServiceContext serviceContext) throws PortalException, SystemException { + public Funzionario addFunzionario(long userId, String nome, String cognome, String presidio, String tipologia, + ServiceContext serviceContext) throws PortalException, SystemException { return funzionarioLocalService.addFunzionario(userId, nome, cognome, presidio, tipologia, serviceContext); } - @Override - public String getFunzionariByPresidio(String presidio) { - - JSONArray json = JSONFactoryUtil.createJSONArray(); - try { - Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); - if (organization != null) { - List users = userLocalService.getOrganizationUsers(Long.valueOf(presidio)); - Collections.sort(users, new UserComparator()); - for (User user : users) { - Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); - Role portosGeologo = RoleLocalServiceUtil.getRole(organization.getCompanyId(), - Constants.ROLE_NAME_GEOLOGO); - Role portosCalendario = RoleLocalServiceUtil.getRole(organization.getCompanyId(), - "portos_calendario"); - Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), - Constants.ROLE_NAME_ISTRUTTORE); - if (!userLocalService.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())) { - boolean isCalendario = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), - organization.getGroupId(), portosCalendario.getRoleId()); - boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), - organization.getGroupId(), portosIstruttore.getRoleId()); - boolean isGeologo = userLocalService.hasRoleUser(portosGeologo.getRoleId(), - user.getUserId()); - if (isCalendario) { - JSONObject jsonFunzionario = JSONFactoryUtil.createJSONObject(); - jsonFunzionario.put("id", user.getUserId()); - jsonFunzionario.put("nome", user.getFirstName()); - jsonFunzionario.put("cognome", user.getLastName()); - if (isIstruttore) { - jsonFunzionario.put("tipologia", "Istruttore"); - } else if (isGeologo) { - jsonFunzionario.put("tipologia", "Geologo"); - } else { - jsonFunzionario.put("tipologia", StringPool.BLANK); - } - json.put(jsonFunzionario); + public String getFunzionariByPresidio(String presidio) { + + JSONArray json = JSONFactoryUtil.createJSONArray(); + try { + Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); + if(organization != null){ + + List users = UserLocalServiceUtil.getOrganizationUsers(Long.valueOf(presidio)); + + //Bug 32935 + Collections.sort(users, new UserComparator()); + for (User user : users) { + Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); + + Role portosGeologo = RoleLocalServiceUtil.getRole(organization.getCompanyId(), Constants.ROLE_NAME_GEOLOGO); + + Role portosCalendario = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_calendario"); + + Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), Constants.ROLE_NAME_ISTRUTTORE); + + if(!UserLocalServiceUtil.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())){ + + boolean isCalendario = UserGroupRoleLocalServiceUtil.hasUserGroupRole( + user.getUserId(), organization.getGroupId(), portosCalendario.getRoleId()); + + boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole( + user.getUserId(), organization.getGroupId(), portosIstruttore.getRoleId()); + + boolean isGeologo = UserLocalServiceUtil.hasRoleUser(portosGeologo.getRoleId(), user.getUserId()); + + + if(isCalendario){ + JSONObject jsonFunzionario = JSONFactoryUtil.createJSONObject(); + jsonFunzionario.put("id", user.getUserId()); + jsonFunzionario.put("nome", user.getFirstName()); + jsonFunzionario.put("cognome", user.getLastName()); + if(isIstruttore){ + jsonFunzionario.put("tipologia", "Istruttore"); + } else if(isGeologo){ + jsonFunzionario.put("tipologia", "Geologo"); + } else { + jsonFunzionario.put("tipologia", ""); } + json.put(jsonFunzionario); } } } - } catch (NumberFormatException | PortalException | SystemException e) { - _log.error(e, e); } - return json.toString(); + } catch (NumberFormatException | SystemException e) { + _log.error(e,e); + } catch (PortalException e) { + _log.error(e,e); } + return json.toString(); + } } class UserComparator implements Comparator { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/PrenotazioneServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/PrenotazioneServiceImpl.java index 2137487c..5d27ed97 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/PrenotazioneServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/PrenotazioneServiceImpl.java @@ -10,6 +10,7 @@ package it.tref.portos.calendar.appointments.service.impl; import it.tref.portos.calendar.appointments.SlotNotAvailableException; import it.tref.portos.calendar.appointments.model.Prenotazione; +import it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil; import it.tref.portos.calendar.appointments.service.base.PrenotazioneServiceBaseImpl; import java.text.ParseException; @@ -34,6 +35,7 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; +import com.liferay.portal.service.UserLocalServiceUtil; /** * The implementation of the prenotazione remote service. @@ -57,7 +59,7 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl { private static Log _log = LogFactoryUtil.getLog(PrenotazioneServiceImpl.class); - @Override + //Product Backlog Item 32934 public void addPrenotazione(long userId, long funzionarioId, long professionistaId, Date startDate, Date endDate, String descrizione, String telefono, String email, long presidio, ServiceContext serviceContext) throws SystemException, PortalException { @@ -69,11 +71,10 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl { descrizione, telefono, email, presidio, serviceContext); } - @Override public void updatePrenotazione(long prenotazioneId, long userId, Date startDate, Date endDate, String descrizione, ServiceContext serviceContext) throws SystemException, PortalException { - Prenotazione prenotazione = prenotazioneLocalService.fetchPrenotazione(prenotazioneId); + Prenotazione prenotazione = PrenotazioneLocalServiceUtil.fetchPrenotazione(prenotazioneId); if (prenotazione.getUserId() != userId) { throw new SystemException("error.calendar.appointments.prenotazione.not.allowed.update " + prenotazioneId + " user " + userId); @@ -81,37 +82,50 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl { prenotazioneLocalService.updatePrenotazione(prenotazioneId, startDate, endDate, descrizione, serviceContext); } - @Override public void deletePrenotazione(long prenotazioneId, long userId) throws SystemException, PortalException { + Prenotazione prenotazione = PrenotazioneLocalServiceUtil.fetchPrenotazione(prenotazioneId); + + //Product Backlog Item 32933 +// if (prenotazione.getUserId() != userId) { +// throw new SystemException("error.calendar.appointments.prenotazione.not.allowed.update " + prenotazioneId +// + " user " + userId); +// } + prenotazioneLocalService.deletePrenotazione(prenotazioneId); } - @Override - public String getPrenotazioniByDate(String presidio, String date, String userId) throws SystemException, - ParseException { + public String getPrenotazioniByDate(String presidio, String date, String userId) throws SystemException, ParseException { long loggetUserId = Long.parseLong(userId); Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); List userDefinitivo = new ArrayList(); try { - if (organization != null) { - List users = userLocalService.getOrganizationUsers(Long.valueOf(presidio)); + if(organization != null){ + List users = UserLocalServiceUtil.getOrganizationUsers(Long.valueOf(presidio)); + for (User user : users) { Role portosSupporto = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_supporto"); - Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), - "portos_calendario"); - if (!userLocalService.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())) { - boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), - organization.getGroupId(), portosIstruttore.getRoleId()); - if (isIstruttore) { + + Role portosIstruttore = RoleLocalServiceUtil.getRole(organization.getCompanyId(), "portos_calendario"); + + if(!UserLocalServiceUtil.hasRoleUser(portosSupporto.getRoleId(), user.getUserId())){ + + boolean isIstruttore = UserGroupRoleLocalServiceUtil.hasUserGroupRole( + user.getUserId(), organization.getGroupId(), portosIstruttore.getRoleId()); + + + if(isIstruttore){ userDefinitivo.add(user); } } } } - } catch (NumberFormatException | PortalException | SystemException e) { - _log.error(e, e); + + } catch (NumberFormatException | SystemException e) { + _log.error(e,e); + } catch (PortalException e) { + _log.error(e,e); } Date startDate = new SimpleDateFormat("dd/MM/yyyy").parse(date); @@ -132,8 +146,10 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl { jsonPrenotazione.put("idPrenotazione", prenotazione.getPrenotazioneId()); jsonPrenotazione.put("inizio", sdf.format(prenotazione.getStartDate())); jsonPrenotazione.put("fine", sdf.format(prenotazione.getEndDate())); - User richiedente = userLocalService.fetchUser(prenotazione.getProfessionistaId()); - if (loggetUserId == prenotazione.getProfessionistaId()) { + + User richiedente = UserLocalServiceUtil.fetchUser(prenotazione.getProfessionistaId()); + + if(loggetUserId == prenotazione.getProfessionistaId()){ jsonPrenotazione.put("visible", true); } else { jsonPrenotazione.put("visible", canSeeFullInformations(loggetUserId)); @@ -154,8 +170,9 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl { private boolean canSeeFullInformations(long loggetUserId) throws SystemException { boolean canDo = false; - User user = userLocalService.fetchUser(loggetUserId); - if (user != null) { + + User user = UserLocalServiceUtil.fetchUser(loggetUserId); + if(user != null){ Group siteBO = GroupLocalServiceUtil.fetchGroup(user.getCompanyId(), "Portos BackOffice"); boolean isBoUser = GroupLocalServiceUtil.hasUserGroup(user.getUserId(), siteBO.getGroupId()); if (isBoUser) { @@ -165,7 +182,6 @@ public class PrenotazioneServiceImpl extends PrenotazioneServiceBaseImpl { return canDo; } - @Override public boolean isSlotAvailable(long funzionarioId, Date startDate, Date endDate) throws SystemException { return prenotazioneLocalService.getAvailableSlotByStartDate_EndDate(funzionarioId, startDate, endDate) == 0; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java index 37cc5b1e..4b114261 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java @@ -5,6 +5,7 @@ import it.tref.portos.calendar.appointments.model.Prenotazione; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.regex.Matcher; @@ -13,6 +14,8 @@ import java.util.regex.Pattern; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; +import org.apache.log4j.net.TelnetAppender; + import com.liferay.mail.service.MailServiceUtil; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.mail.MailMessage; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/init.jsp index 8e7e7acd..d654039d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="java.util.ArrayList"%> <%@page import="com.liferay.portal.model.Role"%> <%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp index 35e4ace3..6a89a46b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil"%> <%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> <%@page import="com.liferay.portal.model.Organization"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp index 2f0ab821..f373ee8e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> <%@page import="com.liferay.portal.model.Organization"%> <%@page import="it.tref.portos.calendar.appointments.service.DisponibilitaLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita_action.jsp index 5815f9f3..c732457f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita_action.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.portos.calendar.appointments.model.Disponibilita"%> <%@ include file="/html/calendar_appointments/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/view.jsp index b8d77306..161d8081 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%> <%@ include file="/html/calendar_appointments/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/init.jsp index 11c883c0..f3db762d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="java.text.Format"%> <%@page import="com.liferay.portal.kernel.util.FastDateFormatFactoryUtil"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/view.jsp index 07d5fcb0..8a21a366 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% /** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. diff --git a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/companyconfig/portlet/CompanyConfigurationPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/companyconfig/portlet/CompanyConfigurationPortlet.java index 0374cd0b..2ef3c8b7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/companyconfig/portlet/CompanyConfigurationPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/companyconfig/portlet/CompanyConfigurationPortlet.java @@ -2,8 +2,6 @@ package it.tref.liferay.portos.companyconfig.portlet; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.model.Company; import com.liferay.portal.service.CompanyLocalServiceUtil; import com.liferay.portal.service.ServiceContext; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/init.jsp index 7ab610cb..4866d541 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/init.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/init.jsp" %> <%@page import="com.liferay.portal.kernel.util.ParamUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/view.jsp index 07d16cae..f13448b6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/company_configuration/view.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="javax.portlet.PortletURL"%> <%@page import="javax.portlet.PortletRequest"%> <%@page import="com.liferay.portal.util.PortletKeys"%> @@ -16,12 +17,9 @@ companyCustomFieldsURL.setParameter("modelResource", Company.class.getName());
- + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/init.jsp index 0afcda91..065d3d8b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/liferay-hook.xml index 7ea9cf5f..f4efe922 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/init.jsp index ab7501ce..0deaecc7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/init.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="java.text.SimpleDateFormat"%> <%@page import="com.liferay.portlet.PortletURLUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp index 492629d1..8f7517bc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.util.PortalUtil"%> <%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.StringPool"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/service.xml index 8aeea4af..50d63c36 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + Matteo diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java index 52e3fb79..185ccbd7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java @@ -8,8 +8,9 @@ import com.liferay.portlet.BaseControlPanelEntry; public class DeployAlertControl extends BaseControlPanelEntry { - public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) - throws Exception { + @Override + public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) + throws Exception { long companyId = PortalUtil.getDefaultCompanyId(); if (companyId == permissionChecker.getCompanyId()) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/portlet/NotificatorPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/portlet/NotificatorPortlet.java index a305bf92..1db8998c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/portlet/NotificatorPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/portlet/NotificatorPortlet.java @@ -13,10 +13,6 @@ import it.tref.liferay.portos.deployalert.service.NotificationMailLocalServiceUt import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; - -/** - * Portlet implementation class AdminDeployNotificatorPortlet - */ public class NotificatorPortlet extends MVCPortlet { public void addNotification(ActionRequest request, ActionResponse response) throws PortalException, SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java index 8f83689b..6b3e8ead 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java @@ -35,7 +35,8 @@ import java.util.Date; */ public class NotificationLogLocalServiceImpl extends NotificationLogLocalServiceBaseImpl { - public NotificationLog addNotification(String nomePlugin, String tipo) throws SystemException, PortalException { + @Override + public NotificationLog addNotification(String nomePlugin, String tipo) throws SystemException, PortalException { Date now = new Date(); validate(nomePlugin, tipo); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java index f4045561..ddd42548 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java @@ -44,8 +44,9 @@ import java.util.List; */ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServiceBaseImpl { - public NotificationMail addNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext) - throws PortalException, SystemException { + @Override + public NotificationMail addNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext) + throws PortalException, SystemException { User user = userPersistence.findByPrimaryKey(serviceContext.getUserId()); Date now = new Date(); @@ -75,8 +76,9 @@ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServi } } - public NotificationMail updateNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext, - long notificationId) throws SystemException, PortalException { + @Override + public NotificationMail updateNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext, + long notificationId) throws SystemException, PortalException { Date now = new Date(); NotificationMail notification = getNotificationMail(notificationId); @@ -89,44 +91,44 @@ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServi return notification; } - public List findNotifications(long companyId, int start, int end) throws SystemException { + @Override + public List findNotifications(long companyId, int start, int end) throws SystemException { - // return notificationMailPersistence.findBycompanyId(companyId, start, end); - DynamicQuery query = notificationMailLocalService.dynamicQuery(); - query.addOrder(OrderFactoryUtil.asc("nomePlugin")); - List notifications = null; - try { - notifications = NotificationMailLocalServiceUtil.dynamicQuery(query); - } catch (SystemException e) { - e.printStackTrace(); - } - return notifications; - } + DynamicQuery query = dynamicQuery(); + query.addOrder(OrderFactoryUtil.asc("nomePlugin")); + List notifications = null; + try { + notifications = NotificationMailLocalServiceUtil.dynamicQuery(query); + } catch (SystemException e) { + e.printStackTrace(); + } + return notifications; + } - public List findNotifications(long companyId) throws SystemException { + @Override + public List findNotifications(long companyId) throws SystemException { return notificationMailPersistence.findBycompanyId(companyId); } - public int getNotificationCount(long companyId) throws SystemException { + @Override + public int getNotificationCount(long companyId) throws SystemException { return notificationMailPersistence.countBycompanyId(companyId); } - public List findNotifications(long companyId, String servletContextName) throws SystemException { - - DynamicQuery dynamicQuery = notificationMailLocalService.dynamicQuery(); - - if (Validator.isNull(servletContextName)) { - Disjunction or = RestrictionsFactoryUtil.disjunction(); - or.add(RestrictionsFactoryUtil.isNull("nomePlugin")); - or.add(RestrictionsFactoryUtil.eq("nomePlugin", StringPool.BLANK)); - - dynamicQuery.add(or); - } else { - dynamicQuery.add(RestrictionsFactoryUtil.eq("nomePlugin", servletContextName)); - } - - return notificationMailPersistence.findWithDynamicQuery(dynamicQuery); - } + @Override + public List findNotifications(long companyId, String servletContextName) throws SystemException { + + DynamicQuery dynamicQuery = dynamicQuery(); + if (Validator.isNull(servletContextName)) { + Disjunction or = RestrictionsFactoryUtil.disjunction(); + or.add(RestrictionsFactoryUtil.isNull("nomePlugin")); + or.add(RestrictionsFactoryUtil.eq("nomePlugin", StringPool.BLANK)); + dynamicQuery.add(or); + } else { + dynamicQuery.add(RestrictionsFactoryUtil.eq("nomePlugin", servletContextName)); + } + return notificationMailPersistence.findWithDynamicQuery(dynamicQuery); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationLogPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationLogPersistenceImpl.java index c9c20815..78a471b1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationLogPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationLogPersistenceImpl.java @@ -45,6 +45,7 @@ import it.tref.liferay.portos.deployalert.NoSuchNotificationLogException; import it.tref.liferay.portos.deployalert.model.NotificationLog; import it.tref.liferay.portos.deployalert.model.impl.NotificationLogImpl; import it.tref.liferay.portos.deployalert.model.impl.NotificationLogModelImpl; +import it.tref.liferay.portos.deployalert.service.persistence.NotificationLogPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationMailPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationMailPersistenceImpl.java index 2940148c..9297ba1f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationMailPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/persistence/NotificationMailPersistenceImpl.java @@ -45,6 +45,7 @@ import it.tref.liferay.portos.deployalert.NoSuchNotificationMailException; import it.tref.liferay.portos.deployalert.model.NotificationMail; import it.tref.liferay.portos.deployalert.model.impl.NotificationMailImpl; import it.tref.liferay.portos.deployalert.model.impl.NotificationMailModelImpl; +import it.tref.liferay.portos.deployalert.service.persistence.NotificationMailPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java index 2379bcf7..f8c8c287 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java @@ -1,5 +1,11 @@ package it.tref.liferay.portos.deployalert.util; +import it.tref.liferay.portos.deployalert.constants.MailConstants; +import it.tref.liferay.portos.mailmanager.shared.messaging.util.MailManagerUtil; + +import java.text.SimpleDateFormat; +import java.util.Date; + import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp index bb88947c..0ae60c99 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/edit_notification.jsp b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/edit_notification.jsp index 425e8af6..e2cef758 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/edit_notification.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/edit_notification.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%> <%@ include file="/html/notificator/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/init.jsp index ea913f23..dd526767 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/init.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp"%> <%@ page import="it.tref.liferay.portos.deployalert.service.NotificationMailLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/view.jsp index 78964c30..eb713391 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/notificator/view.jsp @@ -1,3 +1,4 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/notificator/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-hook.xml index 944195a7..967a6059 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-portlet.xml index 8796c801..41b5d165 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,10 +2,18 @@ - 1 + + it.tref.liferay.portos.kaleo.controller.scheduler.SchedulerKaleoController + + + 240 + second + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml index 3013f16a..669d4b42 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + 3FC + Manifattura Web Group s.r.l. diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenImpl.java index a4c148b8..1fbfd4ba 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl; * * @author 3FC + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class KaleoInstanceTokenImpl extends KaleoInstanceTokenBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo instance token model diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoLogImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoLogImpl.java index 77d355a7..7b3ed9f5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoLogImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoLogImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl; * * @author 3FC + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class KaleoLogImpl extends KaleoLogBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo log model instance diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeImpl.java index 7a09744c..95c3ef40 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl; * * @author 3FC + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class KaleoNodeImpl extends KaleoNodeBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo node model instance diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceImpl.java index 7964dc04..ba2c7535 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceImpl.java @@ -19,8 +19,8 @@ package it.tref.liferay.portos.kaleo.controller.model.impl; * * @author 3FC + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") -public class KaleoTaskAssignmentInstanceImpl extends KaleoTaskAssignmentInstanceBaseImpl { +public class KaleoTaskAssignmentInstanceImpl + extends KaleoTaskAssignmentInstanceBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task assignment * instance model instance should use the {@link diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskImpl.java index 75d3958d..4f935241 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl; * * @author 3FC + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class KaleoTaskImpl extends KaleoTaskBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task model instance diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskInstanceTokenImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskInstanceTokenImpl.java index d84351ee..f47d858a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskInstanceTokenImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskInstanceTokenImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.controller.model.impl; * * @author 3FC + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") public class KaleoTaskInstanceTokenImpl extends KaleoTaskInstanceTokenBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task instance token diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstancePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstancePersistenceImpl.java index 28866438..9d9ec735 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstancePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstancePersistenceImpl.java @@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoInstanceException; import it.tref.liferay.portos.kaleo.controller.model.KaleoInstance; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoInstancePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstanceTokenPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstanceTokenPersistenceImpl.java index 27df2a02..8b000567 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstanceTokenPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoInstanceTokenPersistenceImpl.java @@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoInstanceTokenException import it.tref.liferay.portos.kaleo.controller.model.KaleoInstanceToken; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoInstanceTokenPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoLogPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoLogPersistenceImpl.java index 6974011b..21070bfb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoLogPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoLogPersistenceImpl.java @@ -43,6 +43,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoLogException; import it.tref.liferay.portos.kaleo.controller.model.KaleoLog; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoLogPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoNodePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoNodePersistenceImpl.java index 920a5c9a..05b4a076 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoNodePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoNodePersistenceImpl.java @@ -41,6 +41,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoNodeException; import it.tref.liferay.portos.kaleo.controller.model.KaleoNode; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoNodePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskAssignmentInstancePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskAssignmentInstancePersistenceImpl.java index 58e757b8..bc0caff3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskAssignmentInstancePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskAssignmentInstancePersistenceImpl.java @@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoTaskAssignmentInstance import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskAssignmentInstance; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoTaskAssignmentInstancePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskInstanceTokenPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskInstanceTokenPersistenceImpl.java index 581b1937..e3500813 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskInstanceTokenPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskInstanceTokenPersistenceImpl.java @@ -42,6 +42,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoTaskInstanceTokenExcep import it.tref.liferay.portos.kaleo.controller.model.KaleoTaskInstanceToken; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoTaskInstanceTokenPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskPersistenceImpl.java index 641cd927..612bf233 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/persistence/KaleoTaskPersistenceImpl.java @@ -40,6 +40,7 @@ import it.tref.liferay.portos.kaleo.controller.NoSuchKaleoTaskException; import it.tref.liferay.portos.kaleo.controller.model.KaleoTask; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl; import it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl; +import it.tref.liferay.portos.kaleo.controller.service.persistence.KaleoTaskPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/liferay-hook.xml index 967a6059..944195a7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service.xml index 8b9a04f4..4a9d3804 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormDefinitionLinkImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormDefinitionLinkImpl.java index e0e765dd..2a3cdcaa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormDefinitionLinkImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormDefinitionLinkImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.model.impl; * * @author */ -@SuppressWarnings("serial") public class FormDefinitionLinkImpl extends FormDefinitionLinkBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form definition link model diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormLogImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormLogImpl.java index 1ba04359..bf449f81 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormLogImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormLogImpl.java @@ -18,7 +18,6 @@ package it.tref.liferay.portos.kaleo.model.impl; * * @author */ -@SuppressWarnings("serial") public class FormLogImpl extends FormLogBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form log model instance diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormTemplateLinkImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormTemplateLinkImpl.java index caf798c6..0758a627 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormTemplateLinkImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/model/impl/FormTemplateLinkImpl.java @@ -19,7 +19,6 @@ package it.tref.liferay.portos.kaleo.model.impl; * * @author */ -@SuppressWarnings("serial") public class FormTemplateLinkImpl extends FormTemplateLinkBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a form template link model diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/portlet/WorkflowFormAdminPortletControlPanelEntry.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/portlet/WorkflowFormAdminPortletControlPanelEntry.java index 06c048b2..d001cb81 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/portlet/WorkflowFormAdminPortletControlPanelEntry.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/portlet/WorkflowFormAdminPortletControlPanelEntry.java @@ -12,6 +12,11 @@ public class WorkflowFormAdminPortletControlPanelEntry extends BaseControlPanelE protected boolean hasAccessPermissionDenied(PermissionChecker permissionChecker, Group group, Portlet portlet) throws Exception { - return group.isLayoutSetPrototype() || !WorkflowEngineManagerUtil.isDeployed(); - } + if (group.isLayoutSetPrototype() || !WorkflowEngineManagerUtil.isDeployed()) { + + return true; + } + + return false; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormDefinitionLinkLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormDefinitionLinkLocalServiceImpl.java index 567b830e..c20e3c14 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormDefinitionLinkLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormDefinitionLinkLocalServiceImpl.java @@ -48,9 +48,8 @@ public class FormDefinitionLinkLocalServiceImpl extends FormDefinitionLinkLocalS * service. */ - @Override - public FormDefinitionLink addFormDefinitionLink(String name, String definitionName, int definitionVersion, - long ddmStructureId, ServiceContext serviceContext) throws PortalException, SystemException { + public FormDefinitionLink addFormDefinitionLink(String name, String definitionName, int definitionVersion, + long ddmStructureId, ServiceContext serviceContext) throws PortalException, SystemException { User user = userLocalService.getUser(serviceContext.getUserId()); Date now = new Date(); @@ -67,10 +66,9 @@ public class FormDefinitionLinkLocalServiceImpl extends FormDefinitionLinkLocalS return addFormDefinitionLink(formDefinitionLink); } - @Override - public FormDefinitionLink updateFormDefinitionLink(long formDefinitionLinkId, String name, String definitionName, - int definitionVersion, long ddmStructureId, ServiceContext serviceContext) throws PortalException, - SystemException { + public FormDefinitionLink updateFormDefinitionLink(long formDefinitionLinkId, String name, String definitionName, + int definitionVersion, long ddmStructureId, ServiceContext serviceContext) throws PortalException, + SystemException { FormDefinitionLink formDefinitionLink = formDefinitionLinkLocalService .getFormDefinitionLink(formDefinitionLinkId); @@ -101,45 +99,40 @@ public class FormDefinitionLinkLocalServiceImpl extends FormDefinitionLinkLocalS return formDefinitionLink; } - @Override - public int countByCompany(long companyId) throws SystemException { + public int countByCompany(long companyId) throws SystemException { + return formDefinitionLinkPersistence.countByCompany(companyId); + } - return formDefinitionLinkPersistence.countByCompany(companyId); - } + public List findByCompany(long companyId) throws SystemException { + return formDefinitionLinkPersistence.findByCompany(companyId); + } - @Override - public List findByCompany(long companyId) throws SystemException { + public List findByCompany(long companyId, int start, int end) throws SystemException { + return formDefinitionLinkPersistence.findByCompany(companyId, start, end); + } - return formDefinitionLinkPersistence.findByCompany(companyId); - } + public List findByCompany(long companyId, int start, int end, OrderByComparator orderByComparator) + throws SystemException { + return formDefinitionLinkPersistence.findByCompany(companyId, start, end, orderByComparator); + } - @Override - public List findByCompany(long companyId, int start, int end) throws SystemException { + public int countByDDMStructureId(long ddmStructureId) throws SystemException { + return formDefinitionLinkPersistence.countByDDMStructureId(ddmStructureId); + } - return formDefinitionLinkPersistence.findByCompany(companyId, start, end); - } + public FormDefinitionLink fetchByC_DefinitionName_DefinitionVersion(long companyId, String definitionName, + int definitionVersion) throws SystemException { - @Override - public List findByCompany(long companyId, int start, int end, - OrderByComparator orderByComparator) throws SystemException { + List formDefinitionLinks = + formDefinitionLinkPersistence.findByC_DefinitionName_DefinitionVersion(companyId, definitionName, + definitionVersion); - return formDefinitionLinkPersistence.findByCompany(companyId, start, end, orderByComparator); - } - - @Override - public int countByDDMStructureId(long ddmStructureId) throws SystemException { - - return formDefinitionLinkPersistence.countByDDMStructureId(ddmStructureId); - } + if (formDefinitionLinks.isEmpty()) { + return null; + } - @Override - public FormDefinitionLink fetchByC_DefinitionName_DefinitionVersion(long companyId, String definitionName, - int definitionVersion) throws SystemException { - - List formDefinitionLinks = formDefinitionLinkPersistence - .findByC_DefinitionName_DefinitionVersion(companyId, definitionName, definitionVersion); - return formDefinitionLinks.isEmpty() ? null : formDefinitionLinks.get(0); - } + return formDefinitionLinks.get(0); + } private void setFormDefinitionLink(FormDefinitionLink formDefinitionLink, String name, String definitionName, int definitionVersion, long ddmStructureId) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormLogLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormLogLocalServiceImpl.java index 82c61219..1de6654d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormLogLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormLogLocalServiceImpl.java @@ -39,9 +39,8 @@ public class FormLogLocalServiceImpl extends FormLogLocalServiceBaseImpl { * it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil} to access the form log local service. */ - @Override - public FormLog addFormLog(long workflowInstanceId, long workflowTaskId, String transitionName, - String formParameters, ServiceContext serviceContext) throws SystemException, PortalException { + public FormLog addFormLog(long workflowInstanceId, long workflowTaskId, String transitionName, String formParameters, + ServiceContext serviceContext) throws SystemException, PortalException { Date now = new Date(); User user = userLocalService.getUser(serviceContext.getUserId()); @@ -59,9 +58,8 @@ public class FormLogLocalServiceImpl extends FormLogLocalServiceBaseImpl { return addFormLog(formLog); } - @Override - public FormLog updateFormLog(long formLogId, long workflowInstanceId, long workflowTaskId, String transitionName, - String formParameters, ServiceContext serviceContext) throws SystemException, PortalException { + public FormLog updateFormLog(long formLogId, long workflowInstanceId, long workflowTaskId, String transitionName, + String formParameters, ServiceContext serviceContext) throws SystemException, PortalException { FormLog formLog = formLogLocalService.getFormLog(formLogId); formLog.setModifiedDate(serviceContext.getModifiedDate(new Date())); @@ -72,26 +70,20 @@ public class FormLogLocalServiceImpl extends FormLogLocalServiceBaseImpl { return updateFormLog(formLog); } - @Override - public List findByC_Instance(long companyId, long workflowInstanceId, int start, int end) - throws SystemException { + public List findByC_Instance(long companyId, long workflowInstanceId, int start, int end) + throws SystemException { + return formLogPersistence.findByC_Instance(companyId, workflowInstanceId, start, end); + } - return formLogPersistence.findByC_Instance(companyId, workflowInstanceId, start, end); - } - - @Override - public FormLog findByC_Task(long companyId, long workflowTaskId) throws SystemException { - - List list = formLogPersistence.findByC_Task(companyId, workflowTaskId, 0, 1); - return list.isEmpty() ? null : list.get(0); - } - - @Override - public FormLog findByC_Task_TransitionName(long companyId, long workflowTaskId, String transitionName) - throws SystemException { + public FormLog findByC_Task(long companyId, long workflowTaskId) throws SystemException { + List list = formLogPersistence.findByC_Task(companyId, workflowTaskId, 0, 1); + return list.isEmpty() ? null : list.get(0); + } - List list = formLogPersistence.findByC_Task_TransitionName(companyId, workflowTaskId, transitionName, - 0, 1); - return list.isEmpty() ? null : list.get(0); - } + public FormLog findByC_Task_TransitionName(long companyId, long workflowTaskId, String transitionName) + throws SystemException { + List list = + formLogPersistence.findByC_Task_TransitionName(companyId, workflowTaskId, transitionName, 0, 1); + return list.isEmpty() ? null : list.get(0); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormTemplateLinkLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormTemplateLinkLocalServiceImpl.java index dbc9a2b1..8a4f45fc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormTemplateLinkLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/service/impl/FormTemplateLinkLocalServiceImpl.java @@ -43,9 +43,8 @@ public class FormTemplateLinkLocalServiceImpl extends FormTemplateLinkLocalServi * service. */ - @Override - public FormTemplateLink addFormTemplateLink(long formDefinitionLinkId, long ddmTemplateId, long kaleoNodeId, - String transitionName) throws SystemException, PortalException { + public FormTemplateLink addFormTemplateLink(long formDefinitionLinkId, long ddmTemplateId, long kaleoNodeId, + String transitionName) throws SystemException, PortalException { validate(0, formDefinitionLinkId, ddmTemplateId, kaleoNodeId, transitionName); FormTemplateLink formTemplateLink = createFormTemplateLink(counterLocalService.increment(FormTemplateLink.class @@ -54,9 +53,8 @@ public class FormTemplateLinkLocalServiceImpl extends FormTemplateLinkLocalServi return addFormTemplateLink(formTemplateLink); } - @Override - public FormTemplateLink updateFormTemplateLink(long formTemplateLinkId, long formDefinitionLinkId, - long ddmTemplateId, long kaleoNodeId, String transitionName) throws SystemException, PortalException { + public FormTemplateLink updateFormTemplateLink(long formTemplateLinkId, long formDefinitionLinkId, + long ddmTemplateId, long kaleoNodeId, String transitionName) throws SystemException, PortalException { FormTemplateLink formTemplateLink = getFormTemplateLink(formTemplateLinkId); validate(formTemplateLinkId, formDefinitionLinkId, ddmTemplateId, kaleoNodeId, transitionName); @@ -64,34 +62,25 @@ public class FormTemplateLinkLocalServiceImpl extends FormTemplateLinkLocalServi return updateFormTemplateLink(formTemplateLink); } - @Override - public int countByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException { - - return formTemplateLinkPersistence.countByFormDefinitionLinkId(formDefinitionLinkId); - } + public int countByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException { + return formTemplateLinkPersistence.countByFormDefinitionLinkId(formDefinitionLinkId); + } - @Override - public List findByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException { - - return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId); - } + public List findByFormDefinitionLinkId(long formDefinitionLinkId) throws SystemException { + return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId); + } - @Override - public List findByFormDefinitionLinkId(long formDefinitionLinkId, int start, int end) - throws SystemException { + public List findByFormDefinitionLinkId(long formDefinitionLinkId, int start, int end) + throws SystemException { + return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId, start, end); + } - return formTemplateLinkPersistence.findByFormDefinitionLinkId(formDefinitionLinkId, start, end); - } - - @Override - public int countByDDMTemplateId(long ddmTemplateId) throws SystemException { - - return formTemplateLinkPersistence.countByDDMTemplateId(ddmTemplateId); - } + public int countByDDMTemplateId(long ddmTemplateId) throws SystemException { + return formTemplateLinkPersistence.countByDDMTemplateId(ddmTemplateId); + } - @Override - public FormTemplateLink fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(long formDefinitionLinkId, - long kaleoNodeId, String transitionName) throws SystemException { + public FormTemplateLink fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(long formDefinitionLinkId, + long kaleoNodeId, String transitionName) throws SystemException { return formTemplateLinkPersistence.fetchByFormDefinitionLinkId_KaleoNodeId_TransitionName(formDefinitionLinkId, kaleoNodeId, transitionName); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/init.jsp index 1c412f4a..f48c6d2d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%> <%@page import="java.util.Arrays"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/edit_form_definition_link.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/edit_form_definition_link.jsp index 7c27449c..79ab159f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/edit_form_definition_link.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/edit_form_definition_link.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.workflow.kaleo.definition.NodeType"%> <%@page import="com.liferay.portal.workflow.kaleo.model.KaleoTransition"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/form_definition_link_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/form_definition_link_action.jsp index 1df8200b..cc24d1b3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/form_definition_link_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/form_definition_link_action.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.kaleo.model.FormDefinitionLink"%> <%@page import="com.liferay.portal.kernel.util.Validator"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/init.jsp index 771a9225..2a47faca 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/init.jsp @@ -1,3 +1,2 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/select_workflow_definition.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/select_workflow_definition.jsp index fcdf48fb..4a484421 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/select_workflow_definition.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/select_workflow_definition.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/edit_form_template_link.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/edit_form_template_link.jsp index b299e5d0..ebdf9125 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/edit_form_template_link.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/edit_form_template_link.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.kaleo.service.FormDefinitionLinkLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.kaleo.FormTemplateLinkKaleoNodeIdException"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/form_template_link_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/form_template_link_action.jsp index bee31ed9..bf3646b2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/form_template_link_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/form_template_link_action.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.kaleo.model.FormTemplateLink"%> <%@page import="com.liferay.portal.kernel.util.Validator"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/template_toolbar.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/template_toolbar.jsp index 5b28a987..7ed5a235 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/template_toolbar.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/template_toolbar.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="javax.portlet.PortletRequest"%> <%@page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/view_form_template_links.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/view_form_template_links.jsp index 5935af2d..d362e95f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/view_form_template_links.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/template/view_form_template_links.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.language.UnicodeLanguageUtil"%> <%@page import="com.liferay.portal.kernel.dao.search.RowChecker"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/toolbar.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/toolbar.jsp index 29837573..a71783d3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/toolbar.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/toolbar.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> <%@page import="javax.portlet.PortletRequest"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/view.jsp index ad2dc99a..86a69556 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/html/workflow_form_admin/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> <%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-hook.xml index f4efe922..7ea9cf5f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java index d9142b9e..cecb30d8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java @@ -28,9 +28,9 @@ import com.liferay.portal.util.PortalUtil; import eu.bitwalker.useragentutils.UserAgent; import it.tref.portos.liferay.log.camel.core.CamelCoreInitializer; import it.tref.portos.liferay.log.model.LogActionDetails; +import it.tref.portos.liferay.log.shared.util.Constants; import it.tref.portos.liferay.log.spring.SpringContextBeanScanner; import it.tref.portos.liferay.log.utility.ClassUtils; -import it.tref.portos.liferay.log.utility.Constants; import java.lang.reflect.Field; import java.text.ParseException; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java index 22b7df63..6a5d6e77 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java @@ -1,7 +1,5 @@ package it.tref.portos.liferay.log.action; -import it.tref.portos.liferay.log.utility.Constants; - import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.exception.PortalException; @@ -26,6 +24,9 @@ import com.liferay.portlet.expando.model.ExpandoTableConstants; import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; +import it.tref.portos.liferay.log.shared.util.Constants; + + public class LogStartupAction extends SimpleAction { private static Log _log = LogFactoryUtil.getLog(LogStartupAction.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/html/init.jsp index d43a95e8..bce00918 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/view.jsp index 27251fd3..486845c9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% /** * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-hook.xml index 01e21b2d..4bc6119b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml index f326de8a..5e530faf 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/messaging/MailManagerMessageListener.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/messaging/MailManagerMessageListener.java index c1982e22..73479b6b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/messaging/MailManagerMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/messaging/MailManagerMessageListener.java @@ -30,7 +30,8 @@ public class MailManagerMessageListener implements MessageListener { String mode = (String) message.get("mode"); MailMessage mailMessage = (MailMessage) message.getPayload(); ServiceContext serviceContext = (ServiceContext) message.get("serviceContext"); - boolean checkPermission = GetterUtil.getBoolean(message.get("checkPermission"), true); + boolean checkPermission = GetterUtil.getBoolean(message.get("checkPermission"), Boolean.TRUE); + String className = GetterUtil.getString(message.get("className")); long classPK = GetterUtil.getLong(message.get("classPK")); boolean sendSync = false; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailAttachmentLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailAttachmentLocalServiceImpl.java index dcf03919..e63fc4fe 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailAttachmentLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailAttachmentLocalServiceImpl.java @@ -45,14 +45,15 @@ import com.liferay.portal.service.ServiceContext; * @see it.noovle.azimut.icf.mailmanager.service.EmailAttachmentLocalServiceUtil */ public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.noovle.azimut.icf.mailmanager.service.EmailAttachmentLocalServiceUtil} to access the email attachment local - * service. - */ - @Override - public EmailAttachment addEmailAttachment(long companyId, long emailId, long folderId, String fileName, File file) - throws PortalException, SystemException { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link + * it.noovle.azimut.icf.mailmanager.service.EmailAttachmentLocalServiceUtil} to access the + * email attachment local service. + */ + public EmailAttachment addEmailAttachment(long companyId, long emailId, long folderId, String fileName, File file) + throws PortalException, SystemException { Company company = companyLocalService.getCompany(companyId); @@ -78,19 +79,18 @@ public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalService dlAppLocalService.addFileEntry(defaultUser.getUserId(), folder.getRepositoryId(), folder.getFolderId(), sourceFileName, mimeType, title, StringPool.BLANK, StringPool.BLANK, file, serviceContext); - EmailAttachment emailAttachment = - createEmailAttachment(new EmailAttachmentPK(emailId, fileEntry - .getFileEntryId())); + EmailAttachment emailAttachment = + emailAttachmentLocalService.createEmailAttachment(new EmailAttachmentPK(emailId, fileEntry.getFileEntryId())); - return addEmailAttachment(emailAttachment); - } + return emailAttachmentLocalService.addEmailAttachment(emailAttachment); + } - @Override - public EmailAttachment deleteEmailAttachment(EmailAttachmentPK emailAttachmentPK) throws PortalException, - SystemException { - EmailAttachment emailAttachment = getEmailAttachment(emailAttachmentPK); - return deleteEmailAttachment(emailAttachment); - } + @Override + public EmailAttachment deleteEmailAttachment(EmailAttachmentPK emailAttachmentPK) throws PortalException, + SystemException { + EmailAttachment emailAttachment = emailAttachmentLocalService.getEmailAttachment(emailAttachmentPK); + return deleteEmailAttachment(emailAttachment); + } @Override public EmailAttachment deleteEmailAttachment(EmailAttachment emailAttachment) throws SystemException { @@ -106,25 +106,21 @@ public class EmailAttachmentLocalServiceImpl extends EmailAttachmentLocalService return emailAttachment; } - @Override - public List findByEmailId(long emailId) throws SystemException { - return emailAttachmentPersistence.findByEmailId(emailId); - } + public List findByEmailId(long emailId) throws SystemException { + return emailAttachmentPersistence.findByEmailId(emailId); + } - @Override - public List findByEmailId(long emailId, int start, int end) throws SystemException { - return emailAttachmentPersistence.findByEmailId(emailId); - } + public List findByEmailId(long emailId, int start, int end) throws SystemException { + return emailAttachmentPersistence.findByEmailId(emailId); + } - @Override - public int countByEmailId(long emailId) throws SystemException { - return emailAttachmentPersistence.countByEmailId(emailId); - } + public int countByEmailId(long emailId) throws SystemException { + return emailAttachmentPersistence.countByEmailId(emailId); + } - @Override - public EmailAttachment fetchByFileEntryId(long fileEntryId) throws SystemException { - return emailAttachmentPersistence.fetchByFileEntryId(fileEntryId); - } + public EmailAttachment fetchByFileEntryId(long fileEntryId) throws SystemException { + return emailAttachmentPersistence.fetchByFileEntryId(fileEntryId); + } private void validate(long emailId, String fileName, File file) throws PortalException, SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailLocalServiceImpl.java index 75c4fb19..e4eb1948 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailLocalServiceImpl.java @@ -7,6 +7,24 @@ package it.tref.liferay.portos.mailmanager.service.impl; +import com.liferay.mail.model.FileAttachment; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.repository.model.Folder; +import com.liferay.portal.kernel.util.FileUtil; +import com.liferay.portal.kernel.util.OrderByComparator; +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.Company; +import com.liferay.portal.model.Group; +import com.liferay.portal.model.User; +import com.liferay.portal.security.permission.ActionKeys; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portlet.documentlibrary.model.DLFolderConstants; + import it.tref.liferay.portos.mailmanager.EmailBccException; import it.tref.liferay.portos.mailmanager.EmailBulkAddressesException; import it.tref.liferay.portos.mailmanager.EmailCcException; @@ -27,24 +45,9 @@ import java.util.Collections; import java.util.Date; import java.util.List; -import com.liferay.mail.model.FileAttachment; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.repository.model.Folder; -import com.liferay.portal.kernel.util.FileUtil; -import com.liferay.portal.kernel.util.OrderByComparator; -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.Company; -import com.liferay.portal.model.Group; -import com.liferay.portal.model.User; -import com.liferay.portal.security.permission.ActionKeys; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portlet.documentlibrary.model.DLFolderConstants; - /** * The implementation of the email local service. + * *

* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * their definitions into the {@link it.noovle.azimut.icf.mailmanager.service.EmailLocalService} interface. @@ -63,63 +66,61 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { * it.noovle.azimut.icf.mailmanager.service.EmailLocalServiceUtil} to access the email local service. */ - @Override - public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], - String subject, String body, boolean htmlFormat, ServiceContext serviceContext) throws Exception { + private final static Log _log = LogFactoryUtil.getLog(EmailLocalServiceImpl.class); - return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, - 0, false, null, null, Collections. emptyList(), serviceContext); + public Email addEmail(String className, long classPK, String from, String to[], String cc[], + String bcc[], String subject, String body, boolean htmlFormat, ServiceContext serviceContext) + throws Exception { + return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, + null, null, 0, false, null, null, Collections. emptyList(), serviceContext); } - @Override - public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], - String subject, String body, boolean htmlFormat, List fileAttachments, - ServiceContext serviceContext) throws Exception { - - return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, - 0, false, null, null, fileAttachments, false, null, serviceContext); + public Email addEmail(String className, long classPK, String from, String to[], String cc[], + String bcc[], String subject, String body, boolean htmlFormat, + List fileAttachments, ServiceContext serviceContext) throws Exception { + return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, + null, null, 0, false, null, null, fileAttachments, false, null, serviceContext); } - @Override - public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], - String[] bulkAddresses, String subject, String body, boolean htmlFormat, String[] replyTo, - String messageId, String inReplyTo, String smtpHost, int smtpPort, boolean smtpSecure, String smtpUsername, - String smtpPassword, List fileAttachments, ServiceContext serviceContext) throws Exception { - - return addEmail(className, classPK, from, to, cc, bcc, bulkAddresses, subject, body, htmlFormat, replyTo, - messageId, inReplyTo, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, fileAttachments, - false, null, serviceContext); + public Email addEmail(String className, long classPK, String from, String to[], String cc[], + String bcc[], String[] bulkAddresses, String subject, String body, boolean htmlFormat, + String[] replyTo, String messageId, String inReplyTo, String smtpHost, int smtpPort, + boolean smtpSecure, String smtpUsername, String smtpPassword, + List fileAttachments, ServiceContext serviceContext) throws Exception { + return addEmail(className, classPK, from, to, cc, bcc, bulkAddresses, subject, body, htmlFormat, + replyTo, messageId, inReplyTo, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, + fileAttachments, false, null, serviceContext); } - @Override - public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], - String subject, String body, boolean htmlFormat, List fileAttachments, boolean sendSync, - ServiceContext serviceContext) throws Exception { - - return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, - 0, false, null, null, fileAttachments, sendSync, null, serviceContext); + public Email addEmail(String className, long classPK, String from, String to[], String cc[], + String bcc[], String subject, String body, boolean htmlFormat, + List fileAttachments, boolean sendSync, ServiceContext serviceContext) + throws Exception { + return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, + null, null, 0, false, null, null, fileAttachments, sendSync, null, serviceContext); } - @Override - public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], - String subject, String body, boolean htmlFormat, List fileAttachments, boolean sendSync, - String templateName, ServiceContext serviceContext) throws Exception { - - return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, null, null, - 0, false, null, null, fileAttachments, sendSync, templateName, serviceContext); + public Email addEmail(String className, long classPK, String from, String to[], String cc[], + String bcc[], String subject, String body, boolean htmlFormat, + List fileAttachments, boolean sendSync, String templateName, + ServiceContext serviceContext) throws Exception { + return addEmail(className, classPK, from, to, cc, bcc, null, subject, body, htmlFormat, null, null, + null, null, 0, false, null, null, fileAttachments, sendSync, templateName, serviceContext); } - @Override - public Email addEmail(String className, long classPK, String from, String to[], String cc[], String bcc[], - String[] bulkAddresses, String subject, String body, boolean htmlFormat, String[] replyTo, - String messageId, String inReplyTo, String smtpHost, int smtpPort, boolean smtpSecure, String smtpUsername, - String smtpPassword, List fileAttachments, boolean sendSync, String templateName, + public Email addEmail(String className, long classPK, String from, String to[], String cc[], + String bcc[], String[] bulkAddresses, String subject, String body, boolean htmlFormat, + String[] replyTo, String messageId, String inReplyTo, String smtpHost, int smtpPort, + boolean smtpSecure, String smtpUsername, String smtpPassword, + List fileAttachments, boolean sendSync, String templateName, ServiceContext serviceContext) throws Exception { User user = userLocalService.getUser(serviceContext.getUserId()); Date now = new Date(); validate(from, to, cc, bcc, bulkAddresses, subject, body, replyTo); - Email email = createEmail(counterLocalService.increment(Email.class.getName())); + + Email email = emailLocalService.createEmail(counterLocalService.increment(Email.class.getName())); + email.setGroupId(serviceContext.getScopeGroupId()); email.setCompanyId(serviceContext.getCompanyId()); email.setCreateDate(serviceContext.getCreateDate(now)); @@ -171,11 +172,11 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { return email; } - @Override - public Email updateEmail(long emailId, String from, String to[], String cc[], String bcc[], String subject, - String body, ServiceContext serviceContext) throws Exception { + public Email updateEmail(long emailId, String from, String to[], String cc[], String bcc[], + String subject, String body, ServiceContext serviceContext) throws Exception { + + Email email = emailLocalService.getEmail(emailId); - Email email = getEmail(emailId); validate(from, to, cc, bcc, null, subject, body, null); email.setModifiedDate(new Date()); email.setFrom(from); @@ -187,10 +188,10 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { return updateEmail(email); } - @Override - public Email markAsSent(long emailId, Date sentDate, String statusMessage) throws PortalException, SystemException { + public Email markAsSent(long emailId, Date sentDate, String statusMessage) throws PortalException, + SystemException { - Email email = getEmail(emailId); + Email email = emailLocalService.getEmail(emailId); email.setModifiedDate(new Date()); email.setSent(true); email.setSentDate(sentDate); @@ -198,19 +199,18 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { return updateEmail(email); } - @Override - public Email updateStatusMessage(long emailId, String statusMessage) throws PortalException, SystemException { + public Email updateStatusMessage(long emailId, String statusMessage) throws PortalException, + SystemException { - Email email = getEmail(emailId); + Email email = emailLocalService.getEmail(emailId); email.setModifiedDate(new Date()); email.setStatusMessage(statusMessage); return updateEmail(email); } - @Override public Email resendEmail(long emailId) throws PortalException, SystemException { - Email email = getEmail(emailId); + Email email = emailLocalService.getEmail(emailId); email.setModifiedDate(new Date()); email.setStatusMessage(""); email.setSent(false); @@ -219,10 +219,9 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { return updateEmail(email); } - @Override public Email cancelEmail(long emailId) throws PortalException, SystemException { - Email email = getEmail(emailId); + Email email = emailLocalService.getEmail(emailId); email.setModifiedDate(new Date()); email.setCancel(true); return updateEmail(email); @@ -230,8 +229,7 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { @Override public Email deleteEmail(long emailId) throws PortalException, SystemException { - - Email email = getEmail(emailId); + Email email = emailLocalService.getEmail(emailId); return deleteEmail(email); } @@ -247,92 +245,76 @@ public class EmailLocalServiceImpl extends EmailLocalServiceBaseImpl { return email; } - @Override public List findByCompany(long companyId) throws SystemException { return emailPersistence.findByCompany(companyId); } - @Override public List findByCompany(long companyId, int start, int end) throws SystemException { return emailPersistence.findByCompany(companyId, start, end); } - @Override public List findByCompany(long companyId, int start, int end, OrderByComparator orderByComparator) throws SystemException { return emailPersistence.findByCompany(companyId, start, end, orderByComparator); } - @Override public int countByCompany(long companyId) throws SystemException { return emailPersistence.countByCompany(companyId); } - @Override public List findByC_G(long companyId, long groupId) throws SystemException { return emailPersistence.findByC_G(companyId, groupId); } - @Override public List findByC_G(long companyId, long groupId, int start, int end) throws SystemException { return emailPersistence.findByC_G(companyId, groupId, start, end); } - @Override - public List findByC_G(long companyId, long groupId, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - + public List findByC_G(long companyId, long groupId, int start, int end, + OrderByComparator orderByComparator) throws SystemException { return emailPersistence.findByC_G(companyId, groupId, start, end, orderByComparator); } - @Override public int countByC_G(long companyId, long groupId) throws SystemException { return emailPersistence.countByC_G(companyId, groupId); } - @Override public List findByC_G_T(long companyId, long groupId, String templateName) throws SystemException { return emailPersistence.findByC_G_T(companyId, groupId, templateName); } - @Override public List findByC_G_T(long companyId, long groupId, String templateName, int start, int end) throws SystemException { return emailPersistence.findByC_G_T(companyId, groupId, templateName, start, end); } - @Override public int countByC_G_T(long companyId, long groupId, String templateName) throws SystemException { return emailPersistence.countByC_G_T(companyId, groupId, templateName); } - @Override public List findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK) throws SystemException { return emailPersistence.findByC_G_C_C(companyId, groupId, classNameId, classPK); } - @Override - public List findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK, int start, int end) - throws SystemException { - + public List findByC_G_C_C(long companyId, long groupId, long classNameId, long classPK, int start, + int end) throws SystemException { return emailPersistence.findByC_G_C_C(companyId, groupId, classNameId, classPK, start, end); } - @Override - public int countByC_G_C_C(long companyId, long groupId, long classNameId, long classPK) throws SystemException { - + public int countByC_G_C_C(long companyId, long groupId, long classNameId, long classPK) + throws SystemException { return emailPersistence.countByC_G_C_C(companyId, groupId, classNameId, classPK); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailTemplateLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailTemplateLocalServiceImpl.java index f929eeef..ec5814cf 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailTemplateLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/service/impl/EmailTemplateLocalServiceImpl.java @@ -59,57 +59,71 @@ public class EmailTemplateLocalServiceImpl extends EmailTemplateLocalServiceBase String subject, String body, boolean attachmentPermitted, ServiceContext serviceContext) throws SystemException, PortalException { - User user = userLocalService.getUser(serviceContext.getUserId()); - Date now = new Date(); - validate(templateName, from, to, cc, ccn, subject, body); - EmailTemplate emailTemplate = createEmailTemplate(counterLocalService.increment(EmailTemplate.class.getName())); - emailTemplate.setCompanyId(serviceContext.getCompanyId()); - emailTemplate.setUserId(user.getUserId()); - emailTemplate.setUserName(user.getFullName()); - emailTemplate.setCreateDate(serviceContext.getCreateDate(now)); - emailTemplate.setModifiedDate(serviceContext.getModifiedDate(now)); - emailTemplate.setGroupId(serviceContext.getScopeGroupId()); - emailTemplate.setTemplateName(templateName); - emailTemplate.setFrom(from); - emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA)); - emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA)); - emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA)); - emailTemplate.setSubject(subject); - emailTemplate.setBody(body); - emailTemplate.setAttachmentPermitted(attachmentPermitted); - emailTemplate = addEmailTemplate(emailTemplate); - // Resource - resourceLocalService.addResources(emailTemplate.getCompanyId(), emailTemplate.getGroupId(), - emailTemplate.getUserId(), EmailTemplate.class.getName(), emailTemplate.getPrimaryKey(), false, true, - true); - return emailTemplate; - } + User user = userLocalService.getUser(serviceContext.getUserId()); + Date now = new Date(); + validate(templateName, from, to, cc, ccn, subject, body); + + EmailTemplate emailTemplate = + emailTemplateLocalService.createEmailTemplate(counterLocalService.increment(EmailTemplate.class.getName())); + + emailTemplate.setCompanyId(serviceContext.getCompanyId()); + emailTemplate.setUserId(user.getUserId()); + emailTemplate.setUserName(user.getFullName()); + emailTemplate.setCreateDate(serviceContext.getCreateDate(now)); + emailTemplate.setModifiedDate(serviceContext.getModifiedDate(now)); + emailTemplate.setGroupId(serviceContext.getScopeGroupId()); + + emailTemplate.setTemplateName(templateName); + + emailTemplate.setFrom(from); + emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA)); + emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA)); + emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA)); + emailTemplate.setSubject(subject); + emailTemplate.setBody(body); + + emailTemplate.setAttachmentPermitted(attachmentPermitted); + + emailTemplate = emailTemplateLocalService.addEmailTemplate(emailTemplate); + + // Resource + + resourceLocalService.addResources(emailTemplate.getCompanyId(), emailTemplate.getGroupId(), + emailTemplate.getUserId(), EmailTemplate.class.getName(), emailTemplate.getPrimaryKey(), false, true, true); + + return emailTemplate; + } @Override public EmailTemplate updateEmailTemplate(long emailTemplateId, String templateName, String from, String[] to, String[] cc, String[] ccn, String subject, String body, boolean attachmentPermitted, ServiceContext serviceContext) throws SystemException, PortalException { - EmailTemplate emailTemplate = getEmailTemplate(emailTemplateId); - validate(templateName, from, to, cc, ccn, subject, body); - emailTemplate.setModifiedDate(serviceContext.getModifiedDate(new Date())); - emailTemplate.setFrom(from); - emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA)); - emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA)); - emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA)); - emailTemplate.setSubject(subject); - emailTemplate.setBody(body); - emailTemplate.setAttachmentPermitted(attachmentPermitted); - emailTemplate = updateEmailTemplate(emailTemplate); - return emailTemplate; - } + EmailTemplate emailTemplate = emailTemplateLocalService.getEmailTemplate(emailTemplateId); - @Override - public EmailTemplate deleteEmailTemplate(long emailTemplateId) throws PortalException, SystemException { + validate(templateName, from, to, cc, ccn, subject, body); - EmailTemplate emailTemplate = getEmailTemplate(emailTemplateId); - return deleteEmailTemplate(emailTemplate); - } + emailTemplate.setModifiedDate(serviceContext.getModifiedDate(new Date())); + + emailTemplate.setFrom(from); + emailTemplate.setTo(StringUtil.merge(to, StringPool.COMMA)); + emailTemplate.setCc(StringUtil.merge(cc, StringPool.COMMA)); + emailTemplate.setCcn(StringUtil.merge(ccn, StringPool.COMMA)); + emailTemplate.setSubject(subject); + emailTemplate.setBody(body); + + emailTemplate.setAttachmentPermitted(attachmentPermitted); + + emailTemplate = emailTemplateLocalService.updateEmailTemplate(emailTemplate); + + return emailTemplate; + } + + @Override + public EmailTemplate deleteEmailTemplate(long emailTemplateId) throws PortalException, SystemException { + EmailTemplate emailTemplate = emailTemplateLocalService.getEmailTemplate(emailTemplateId); + return deleteEmailTemplate(emailTemplate); + } @Override public EmailTemplate deleteEmailTemplate(EmailTemplate emailTemplate) throws SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailEngine.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailEngine.java index e22be439..5f01e625 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailEngine.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailEngine.java @@ -64,6 +64,8 @@ import javax.mail.internet.MimeMultipart; * @author Brett Swaim */ public class MailEngine { + + private static boolean mwgDebug = false; public static Session getSession() { return getSession(false); @@ -74,7 +76,7 @@ public class MailEngine { Session session = Session.getInstance(properties); - if (_log.isDebugEnabled()) { + if (mwgDebug || _log.isDebugEnabled()) { session.setDebug(true); session.getProperties().list(System.out); @@ -89,14 +91,14 @@ public class MailEngine { try { session = MailServiceUtil.getSession(); } catch (SystemException se) { - if (_log.isWarnEnabled()) { + if (mwgDebug || _log.isWarnEnabled()) { _log.warn(se, se); } session = InfrastructureUtil.getMailSession(); } - if (_log.isDebugEnabled()) { + if (mwgDebug || _log.isDebugEnabled()) { session.setDebug(true); session.getProperties().list(System.out); @@ -151,7 +153,7 @@ public class MailEngine { long startTime = System.currentTimeMillis(); - if (_log.isDebugEnabled()) { + if (mwgDebug || _log.isDebugEnabled()) { _log.debug("From: " + from); _log.debug("To: " + Arrays.toString(to)); _log.debug("CC: " + Arrays.toString(cc)); @@ -164,7 +166,7 @@ public class MailEngine { _log.debug("Message ID: " + messageId); _log.debug("In Reply To: " + inReplyTo); - if ((fileAttachments != null) && _log.isDebugEnabled()) { + if ((fileAttachments != null) && (mwgDebug || _log.isDebugEnabled())) { for (int i = 0; i < fileAttachments.size(); i++) { FileAttachment fileAttachment = fileAttachments.get(i); @@ -326,7 +328,7 @@ public class MailEngine { throw new MailEngineException(e); } - if (_log.isDebugEnabled()) { + if (mwgDebug || _log.isDebugEnabled()) { _log.debug("Sending mail takes " + (System.currentTimeMillis() - startTime) + " ms"); } } @@ -503,7 +505,7 @@ public class MailEngine { } } catch (MessagingException me) { if (me.getNextException() instanceof SocketException) { - if (_log.isWarnEnabled()) { + if (mwgDebug || _log.isWarnEnabled()) { _log.warn("Failed to connect to a valid mail server. Please " + "make sure one is properly configured. " + me.getMessage()); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailManagerUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailManagerUtil.java index e0aeda5b..1d65582c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailManagerUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/util/MailManagerUtil.java @@ -24,6 +24,8 @@ import java.util.List; public class MailManagerUtil { + private final static Log _log = LogFactoryUtil.getLog(MailManagerUtil.class); + public static Email addEmailByTemplate(String className, long classPK, long emailTemplateId, JSONObject templateParamJSON, List fileAttachments, ServiceContext serviceContext) throws Exception { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/common/email_dialog_attachment.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/common/email_dialog_attachment.jsp index 39f77085..a4859bbe 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/common/email_dialog_attachment.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/common/email_dialog_attachment.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/edit.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/edit.jsp index 114d25d0..fdde85d0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/edit.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/edit.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_send_popup_button.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_send_popup_button.jsp index 25082e4d..7e89ec84 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_send_popup_button.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_send_popup_button.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_template_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_template_action.jsp index f69c6d61..d451e1e9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_template_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/email_template_action.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/init.jsp index 79168c4b..291e245a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/init.jsp" %> <%@page import="org.apache.log4j.Logger"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/close_popup.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/close_popup.jsp index 67111b66..73bfc8be 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/close_popup.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/close_popup.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/send_popup/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/init.jsp index 5ce28676..ea4e3093 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/init.jsp" %> <% String className = ParamUtil.getString(request, "className"); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/view.jsp index 0450532b..e84a3723 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/send_popup/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/send_popup/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/toolbar.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/toolbar.jsp index 57316f64..490715d3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/toolbar.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/toolbar.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/view.jsp index f513b796..ca92fe43 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/email_templates/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/email_templates/init.jsp" %> <%@page import="it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp index f7a89418..191d09e8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.util.PortalUtil"%> <%@page import="com.liferay.portlet.PortletURLUtil"%> @@ -28,6 +27,8 @@ <%@page import="it.tref.liferay.portos.mailmanager.shared.util.MailManagerConstants"%> +<%@ page contentType="text/html; charset=UTF-8" %> + <%@page import="com.liferay.portal.kernel.util.GetterUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/edit.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/edit.jsp index 89ef8581..72c4f394 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/edit.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/edit.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/mail_manager/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_action.jsp index 43de79f2..03f22413 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_action.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/mail_manager/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_history_popup_button.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_history_popup_button.jsp index 08210e78..96e85b6f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_history_popup_button.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/email_history_popup_button.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/mail_manager/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/init.jsp index e1014604..8936f925 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/init.jsp" %> <%@page import="com.liferay.portal.kernel.util.TextFormatter"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/view.jsp index 5a3f7523..8057dbba 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/mail_manager/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/mail_manager/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-hook.xml index 6141f4eb..47e9c9fa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/service.xml index 88c74249..fb874c15 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/AdminMaintenancePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/AdminMaintenancePortlet.java index 56360468..5a857eb3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/AdminMaintenancePortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/AdminMaintenancePortlet.java @@ -26,6 +26,10 @@ import com.liferay.portal.service.ServiceContextFactory; import com.liferay.portal.util.PortalUtil; import com.liferay.util.bridges.mvc.MVCPortlet; + +/** + * Portlet implementation class AdminMaintenancePortlet + */ public class AdminMaintenancePortlet extends MVCPortlet { private static final Log _log = LogFactoryUtil.getLog(AdminMaintenancePortlet.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/persistence/MaintenanceSchedulePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/persistence/MaintenanceSchedulePersistenceImpl.java index efe4a7f2..2d43c614 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/persistence/MaintenanceSchedulePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/persistence/MaintenanceSchedulePersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.maintenance.NoSuchMaintenanceScheduleException; import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; import it.tref.liferay.portos.maintenance.model.impl.MaintenanceScheduleImpl; import it.tref.liferay.portos.maintenance.model.impl.MaintenanceScheduleModelImpl; -import it.tref.liferay.portos.maintenance.service.persistence.MaintenanceSchedulePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/custom_jsps/html/portlet/login/login.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/custom_jsps/html/portlet/login/login.jsp index 0025417d..dce6f59c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/custom_jsps/html/portlet/login/login.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/custom_jsps/html/portlet/login/login.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%-- /** * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/edit.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/edit.jsp index e6211f90..828aeff3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/edit.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/edit.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceType"%> <%@page import="it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceOnReboot"%> <%@include file="/html/admin_maintenance/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/init.jsp index eb4f843f..bc3709cb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp" %> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> <%@page import="it.tref.liferay.portos.maintenance.model.MaintenanceSchedule"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/login_alert.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/login_alert.jsp index 03471ada..f9fd8c27 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/login_alert.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/login_alert.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/admin_maintenance/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/maintenance_action.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/maintenance_action.jsp index de935915..4fe2697a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/maintenance_action.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/maintenance_action.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/admin_maintenance/init.jsp"%> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/toolbar.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/toolbar.jsp index a2ce1bd1..fc9c070f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/toolbar.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/toolbar.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/admin_maintenance/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/view.jsp index bf3879d1..9d478468 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/admin_maintenance/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/admin_maintenance/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/init.jsp index 62f983fd..17ee0431 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="java.text.SimpleDateFormat"%> <%@page import="com.liferay.portlet.PortletURLUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/init.jsp index fc2ebbf3..3d749f84 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/view.jsp index 64293d88..c2f4fef2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/html/poller_maintenance/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/poller_maintenance/init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/fascicolomap/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/fascicolomap/view.jsp index 73846011..0d7187ac 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/fascicolomap/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/fascicolomap/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/init.jsp index 7e4b2740..0ed21100 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portlet.PortletURLUtil"%> <%@page import="javax.portlet.PortletURL"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/init.jsp index a45de3b9..f3b2be04 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.mapit.constants.WebKeys"%> <%@page import="javax.portlet.PortletPreferences"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp index aa1f367c..3caf7e4b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.security.permission.ResourceActionsUtil"%> <%@page import="com.liferay.portal.util.PortalUtil"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> @@ -60,7 +59,7 @@ String verifyComune = ParamUtil.getString(request, "verifyComune", "true"); }

- +
@@ -81,7 +80,7 @@ String verifyComune = ParamUtil.getString(request, "verifyComune", "true"); var portletNamespace = "<%= portletNamespace %>", mapItMap; -var verifyComune = <%= verifyComune %>; + Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getServletContextName() %>', function(event) { AUI().use('liferay-mapit-map', 'aui-io-request', function(A) { @@ -93,9 +92,8 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer mapItMap = Liferay.MapItMap.get(portletId); var latitude = AUI().one("#"+portletNamespace+"lat"), - longitude = AUI().one("#"+portletNamespace+"long"); - var isEditable = AUI().one("#"+portletNamespace+"geoIsEditable"); - isEditable = (undefined == isEditable) || (isEditable.val() == "true"); + longitude = AUI().one("#"+portletNamespace+"long"), + isEditable = AUI().one("#"+portletNamespace+"geoIsEditable").val() == "true"; var editableLatitude = AUI().one("#"+portletNamespace+"lat_hidden"), editableLongitude = AUI().one("#"+portletNamespace+"long_hidden"), @@ -108,7 +106,87 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer var geographic = new OpenLayers.Projection("EPSG:4326"); var mercator = new OpenLayers.Projection( "EPSG:3857"); extent.transform(geographic,mercator ); - + //mapItMap.addOption({restrictedExtent: extent}); + + /* var boxes = new OpenLayers.Layer.Boxes("boxes"); + var box = new OpenLayers.Marker.Box(extent); + boxes.addMarker(box); + mapItMap.addWMSLayer(boxes); */ + + + var civici = new OpenLayers.Layer.WMS( + 'Numeri Civici', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsosm_d&map_resolution=91&', { + styles: 'etichette_blu', + layers: 'rt_osm.civici.point', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(civici); + + var comuni = new OpenLayers.Layer.WMS( + 'Comuni', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsambamm&map_resolution=91', { + styles: 'contorno_senza_etichette', + layers: 'rt_ambamm.idcomuni.rt.poly', transparent: true}, + {isBaseLayer: false} + ); + //mapItMap.addWMSLayer(comuni); + + var topografico = new OpenLayers.Layer.WMS( + 'Topografico', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscartoteca&map_resolution=91&', { + styles: 'senza_etichette', + layers: 'rt_cartoteca.dbt.2k', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(topografico); + + var rischio_bacini_regionali = new OpenLayers.Layer.WMS( + 'Rischio Idrogeologico', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsperidr&map_resolution=91&language=ita&', { + styles: 'default', + layers: 'rt_peridr.rischio_bacini_regionali', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(rischio_bacini_regionali); + + var catasto_strade = new OpenLayers.Layer.WMS( + 'Strade', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { + styles: 'terra_di_siena_bruciata', + layers: 'rt_cat.idcatstrade.rt', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(catasto_strade); + + var catasto_fabbricati = new OpenLayers.Layer.WMS( + 'Fabbricati', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { + styles: 'carminio_chiaro', + layers: 'rt_cat.idcatfabbr.rt', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(catasto_fabbricati); + + var catasto_fogli = new OpenLayers.Layer.WMS( + 'Fogli Catastali', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { + styles: 'solo_contorno_viola_fine_con_etichette', + layers: 'rt_cat.idcatbdfog.rt', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(catasto_fogli); + + var catasto_particelle = new OpenLayers.Layer.WMS( + 'Particelle Catastali', + 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { + styles: 'contorno_rosso_mattone_con_etichette', + layers: 'rt_cat.idcatpart.rt', transparent: true}, + {isBaseLayer: false, visibility : false} + ); + //mapItMap.addWMSLayer(catasto_particelle); + + var markerStyle = { graphicHeight: 29, graphicWidth: 22, @@ -174,19 +252,44 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer Liferay.fire('mapIt-ready'); - A.one("#map").append('
'); - var lockButton = A.one('#container_btn .bloccamap'), - lockLayer = A.one('#map .layermap'), - latValue = editableLatitude != null ? editableLatitude.val() : latitude.val(), - longValue = editableLongitude != null ? editableLongitude.val() : longitude.val(), - locked = latValue != "" && longValue != ""; - lockMap(lockButton, lockLayer, latValue, longValue, !locked) - - A.one('#container_btn .bloccamap').on('click', function(event) { - var nodeObject = event.currentTarget, - locked = event.currentTarget.hasClass('fa-lock'); - lockMap(lockButton, lockLayer, latValue, longValue, locked); - }); + + /* featurePicker = new OpenLayers.Control.WMSGetFeatureInfo({ + url: 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', + title: 'Identify features by clicking', + layers: [catasto_particelle, catasto_fogli], + queryVisible: false, + output:'features', + + eventListeners: { + getfeatureinfo: function(event) { + console.log(event); + console.log(event.features); + console.log(event.text); + }, + nogetfeatureinfo: function(event) { + console.err("No queriable layers found"); + } + + } + }); + + mapItMap.insertControl(featurePicker); + featurePicker.activate(); + console.log("Activated"); */ + + A.one("#map").append('
'); + var lockButton = A.one('#container_btn .bloccamap'), + lockLayer = A.one('#map .layermap'), + latValue = editableLatitude != null ? editableLatitude.val() : latitude.val(), + longValue = editableLongitude != null ? editableLongitude.val() : longitude.val(), + locked = latValue!="" && longValue!=""; + lockMap(lockButton, lockLayer, latValue, longValue, !locked) + + A.one('#container_btn .bloccamap').on('click', function(event){ + var nodeObject = event.currentTarget, + locked = event.currentTarget.hasClass('fa-lock'); + lockMap(lockButton, lockLayer, latValue, longValue, locked); + }); } }); @@ -219,7 +322,9 @@ Liferay.on('geolocation-ready',function(event) { if (latitude != "" && longitude != "") { var zoom = mapItMap.getCurrentZoom() > 8 ? mapItMap.getCurrentZoom() : 12; - if (full) { + console.log(full); + if(full){ + //zoom = 14; var markerStyle = { graphicHeight: 29, graphicWidth: 22, @@ -282,64 +387,73 @@ function updateCoords(lat_coord, long_coord, zoom_coord, fullUpdate, noTransform if (fullUpdate) { A.io.request(url, { - dataType: 'json', - on: { - success: function() { - var response = this.get('responseData'), - town = response.address.city != undefined - ? response.address.city - : (response.address.town != undefined - ? response.address.town - : response.address.village) - .replaceAll(' ', '-') - .toLowerCase(); - - if (verifyComune && city.val().toLowerCase().split(" ").join("-") != town) { - alert("Attenzione!\nHai selezionato un punto esterno al comune di riferimento..."); - address.val(""); - } else { - var fullAddress = ''; - if(response.address.road != undefined) { - fullAddress += response.address.road; - } else if (response.address.pedestrian != undefined) { - fullAddress += response.address.pedestrian; - } - if (fullAddress != '') { - fullAddress += (response.address.house_number != undefined ? " " + response.address.house_number : ""); - } - address.val(fullAddress); - if (!verifyComune) { - var provincia = response.address.county.replaceAll(' ', '-').toLowerCase(); - var province = window[portletNamespace + 'province']; - if (undefined != province[provincia]) { - AUI().use('event', 'node-event-simulate', function(A) { - A.one('#' + portletNamespace + 'provincia') - .set('value', province[provincia]) - .simulate('change'); - window[portletNamespace + 'comuneSelezionato'] = town.replaceAll(' ', '-').toLowerCase(); - }); - } - } - } - } + dataType: 'json', + on: { + success: function() { + + var response = this.get('responseData'), + town = response.address.city!=undefined ? response.address.city : (response.address.town!=undefined ? response.address.town : response.address.village); + + if(city.val().toLowerCase().split(" ").join("_") != town.toLowerCase().split(" ").join("_")){ + alert("Attenzione!\nHai selezionato un punto esterno al comune di riferimento..."); + address.val(""); + } else { + + var fullAddress = ''; + if(response.address.road != undefined) + fullAddress += response.address.road; + else if(response.address.pedestrian != undefined) + fullAddress += response.address.pedestrian; + + if(fullAddress != '') + fullAddress += (response.address.house_number != undefined ? " " + response.address.house_number : ""); + + address.val(fullAddress); + } + } + } }); } editableLatitude.val(newlonLat.lat); - latitude.val(newlonLat.lat); - editableLongitude.val(newlonLat.lon); - longitude.val(newlonLat.lon); - editableZoom.val(zoom_coord); + latitude.val(newlonLat.lat); + editableLongitude.val(newlonLat.lon); + editableZoom.val(zoom_coord); + longitude.val(newlonLat.lon); + }); } window.alert = function(msg){ - $('.customAlertMessage').text(msg); - $('.customAlert').css('animation', 'fadeIn 0.3s linear'); - $('.customAlert').css('display', 'inline'); - setTimeout(function(){ - $('.customAlert').css('animation', 'none'); - }, 100); + $('.customAlertMessage').text(msg); + $('.customAlert').css('animation', 'fadeIn 0.3s linear'); + $('.customAlert').css('display', 'inline'); + setTimeout(function(){ + $('.customAlert').css('animation', 'none'); + }, 100); +}; + +$(function(){ + $('.confirmButton').click(function(){ + $('.customAlert').css('animation', 'fadeOut 0.3s linear'); + setTimeout(function(){ + $('.customAlert').css('animation', 'none'); + $('.customAlert').css('display', 'none'); + }, 100); + }); +}); + +/* +var globalGeolocationParams; +window.confirm = function(msg, callback){ + $('.message').text(msg); + $('.customConfirm').css('animation', 'fadeIn 0.3s linear'); + $('.customConfirm').css('display', 'inline'); + setTimeout(function(){ + $('.customConfirm').css('animation', 'none'); + }, 100); + + globalGeolocationParams = callback; }; $(function() { @@ -348,7 +462,27 @@ $(function() { setTimeout(function() { $('.customAlert').css('animation', 'none'); $('.customAlert').css('display', 'none'); - }, 100); + }, 100); + }); + $('.agreeButton').click(function(){ + console.log('agree'); + $('.customConfirm').css('animation', 'fadeOut 0.3s linear'); + setTimeout(function(){ + $('.customConfirm').css('animation', 'none'); + $('.customConfirm').css('display', 'none'); + }, 100); + + updateCoords(globalGeolocationParams.x, globalGeolocationParams.y, globalGeolocationParams.z); + }); -}); + $('.refuseButton').click(function(){ + console.log('refused'); + $('.customConfirm').css('animation', 'fadeOut 0.3s linear'); + setTimeout(function(){ + $('.customConfirm').css('animation', 'none'); + $('.customConfirm').css('display', 'none'); + }, 100); + return; + }); +}); */ \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/view.jsp index e28deb24..73ccf13b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% /** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-hook.xml index f4efe922..7ea9cf5f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/service.xml index b5718e1c..def90ed4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + 3F Consulting + Manifattura Web Group s.r.l. diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceImpl.java index 29882b7a..9740e498 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceImpl.java @@ -19,8 +19,8 @@ package it.tref.liferay.portos.report.model.impl; * * @author 3F Consulting + Manifattura Web Group s.r.l. */ -@SuppressWarnings("serial") -public class KaleoTaskAssignmentInstanceImpl extends KaleoTaskAssignmentInstanceBaseImpl { +public class KaleoTaskAssignmentInstanceImpl + extends KaleoTaskAssignmentInstanceBaseImpl { /* * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a kaleo task assignment * instance model instance should use the {@link it.tref.liferay.portos.report.model.KaleoTaskAssignmentInstance} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/KaleoTaskAssignmentInstanceLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/KaleoTaskAssignmentInstanceLocalServiceImpl.java index eb7dc52c..19cd1f96 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/KaleoTaskAssignmentInstanceLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/KaleoTaskAssignmentInstanceLocalServiceImpl.java @@ -32,20 +32,17 @@ import com.liferay.portal.kernel.exception.SystemException; * @see it.tref.liferay.portos.report.service.KaleoTaskAssignmentInstanceLocalServiceUtil */ public class KaleoTaskAssignmentInstanceLocalServiceImpl extends KaleoTaskAssignmentInstanceLocalServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.report.service.KaleoTaskAssignmentInstanceLocalServiceUtil} to access the kaleo task - * assignment instance local service. - */ - - @Override - public List distinctKaleoAssignee() throws SystemException { + /* + * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link + * it.tref.liferay.portos.report.service.KaleoTaskAssignmentInstanceLocalServiceUtil} to access + * the kaleo task assignment instance local service. + */ + public List distinctKaleoAssignee() throws SystemException { return KaleoTaskAssignmentInstanceFinderUtil.distinctKaleoAssignee(); } - @Override - public List distinctKaleoAssigneeId(long userId) throws SystemException { + public List distinctKaleoAssigneeId(long userId) throws SystemException { return KaleoTaskAssignmentInstanceFinderUtil.distinctKaleoAssigneeId(userId); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/persistence/KaleoTaskAssignmentInstanceFinderImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/persistence/KaleoTaskAssignmentInstanceFinderImpl.java index c4b09bab..ddadcd0e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/persistence/KaleoTaskAssignmentInstanceFinderImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/persistence/KaleoTaskAssignmentInstanceFinderImpl.java @@ -23,8 +23,7 @@ public class KaleoTaskAssignmentInstanceFinderImpl extends BasePersistenceImpl distinctKaleoAssignee() throws SystemException { + public List distinctKaleoAssignee() throws SystemException { Session session = null; try { @@ -45,8 +44,7 @@ public class KaleoTaskAssignmentInstanceFinderImpl extends BasePersistenceImpl distinctKaleoAssigneeId(long userId) throws SystemException { + public List distinctKaleoAssigneeId(long userId) throws SystemException { Session session = null; try { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportScadenzarioIstruttorie.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportScadenzarioIstruttorie.java index fe3c0cad..419f295a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportScadenzarioIstruttorie.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportScadenzarioIstruttorie.java @@ -31,7 +31,6 @@ import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.model.Organization; import com.liferay.portal.service.OrganizationLocalServiceUtil; @@ -42,8 +41,8 @@ public class ReportScadenzarioIstruttorie implements PortosReportInterface { @Override public String generateHTML(HttpServletRequest httpServletRequest) { + String html = ""; - String html = StringPool.BLANK; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); JasperHtmlExporterBuilder htmlExporter = DynamicReports.export.htmlExporter(bos).setIgnoreHyperLink(true); @@ -62,62 +61,45 @@ public class ReportScadenzarioIstruttorie implements PortosReportInterface { public JasperReportBuilder generateReport(HttpServletRequest request) { String tipoPraticaSelected = ParamUtil.getString(request, "tipologiaPratica", null); - TextColumnBuilder presidioColumn = DynamicReports.col.column("Ufficio", "presidioColumn", - DynamicReports.type.stringType()); - TextColumnBuilder numeroPraticheDaAssegnareColumn = DynamicReports.col.column( - "N° pratiche da assegnare da parte delle PO", "numeroPraticheDaAssegnareColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheDaApprovareColumn = DynamicReports.col.column( - "N° pratiche da approvare da parte delle PO", "numeroPraticheDaApprovareColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheInIstruttoriaOrdinarieColumn = DynamicReports.col.column( - "N° pratiche In Istruttoria", "numeroPraticheInIstruttoriaOrdinarieColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheConIntegrazOrdinarieColumn = DynamicReports.col.column( - "N° pratiche con Int.Richieste", "numeroPraticheConIntegrazOrdinarieColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheInIstruttoriaInScadenzaColumn = DynamicReports.col.column( - "N° pratiche In Istruttoria", "numeroPraticheInIstruttoriaInScadenzaColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheConIntegrazInScadenzaColumn = DynamicReports.col.column( - "N° pratiche con Int.Richieste", "numeroPraticheConIntegrazInScadenzaColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheInIstruttoriaScaduteColumn = DynamicReports.col.column( - "N° pratiche In Istruttoria", "numeroPraticheInIstruttoriaScaduteColumn", - DynamicReports.type.integerType()); - TextColumnBuilder numeroPraticheConIntegrazScaduteColumn = DynamicReports.col.column( - "N° pratiche con Int.Richieste", "numeroPraticheConIntegrazScaduteColumn", - DynamicReports.type.integerType()); - ColumnTitleGroupBuilder titleGroupOrdinarie = DynamicReports.grid.titleGroup(tipoPraticaSelected - + " Ordinarie ( 0-39 gg) ", numeroPraticheInIstruttoriaOrdinarieColumn, - numeroPraticheConIntegrazOrdinarieColumn); - ColumnTitleGroupBuilder titleGroupInScadenza = DynamicReports.grid.titleGroup(tipoPraticaSelected - + " In Scadenza ( 40-60 gg) ", numeroPraticheInIstruttoriaInScadenzaColumn, - numeroPraticheConIntegrazInScadenzaColumn); - ColumnTitleGroupBuilder titleGroupScadute = DynamicReports.grid.titleGroup(tipoPraticaSelected - + " Scadute ( oltre 60 gg) ", numeroPraticheInIstruttoriaScaduteColumn, - numeroPraticheConIntegrazScaduteColumn); + + TextColumnBuilder presidioColumn = DynamicReports.col.column("Ufficio", "presidioColumn", DynamicReports.type.stringType()); + TextColumnBuilder numeroPraticheDaAssegnareColumn = DynamicReports.col.column("N�pratiche da assegnare da parte delle PO", "numeroPraticheDaAssegnareColumn", DynamicReports.type.integerType()); + + TextColumnBuilder numeroPraticheDaApprovareColumn = DynamicReports.col.column("N� pratiche da approvare da parte delle PO", "numeroPraticheDaApprovareColumn", DynamicReports.type.integerType()); + + // + TextColumnBuilder numeroPraticheInIstruttoriaOrdinarieColumn = DynamicReports.col.column("N�pratiche In Istruttoria", "numeroPraticheInIstruttoriaOrdinarieColumn", DynamicReports.type.integerType()); + + TextColumnBuilder numeroPraticheConIntegrazOrdinarieColumn = DynamicReports.col.column("N� pratiche con Int.Richieste", "numeroPraticheConIntegrazOrdinarieColumn", DynamicReports.type.integerType()); + + // + TextColumnBuilder numeroPraticheInIstruttoriaInScadenzaColumn = DynamicReports.col.column("N� pratiche In Istruttoria", "numeroPraticheInIstruttoriaInScadenzaColumn", DynamicReports.type.integerType()); + + TextColumnBuilder numeroPraticheConIntegrazInScadenzaColumn = DynamicReports.col.column("N� pratiche con Int.Richieste", "numeroPraticheConIntegrazInScadenzaColumn", DynamicReports.type.integerType()); + // + TextColumnBuilder numeroPraticheInIstruttoriaScaduteColumn = DynamicReports.col.column("N� pratiche In Istruttoria", "numeroPraticheInIstruttoriaScaduteColumn", DynamicReports.type.integerType()); + TextColumnBuilder numeroPraticheConIntegrazScaduteColumn = DynamicReports.col.column("N� pratiche con Int.Richieste", "numeroPraticheConIntegrazScaduteColumn", DynamicReports.type.integerType()); + + ColumnTitleGroupBuilder titleGroupOrdinarie = DynamicReports.grid.titleGroup(tipoPraticaSelected + " Ordinarie ( 0-39gg) ", numeroPraticheInIstruttoriaOrdinarieColumn, numeroPraticheConIntegrazOrdinarieColumn); + + ColumnTitleGroupBuilder titleGroupInScadenza = DynamicReports.grid.titleGroup(tipoPraticaSelected + " In Scadenza ( 40-60 gg) ", numeroPraticheInIstruttoriaInScadenzaColumn, numeroPraticheConIntegrazInScadenzaColumn); + + ColumnTitleGroupBuilder titleGroupScadute = DynamicReports.grid.titleGroup(tipoPraticaSelected + " Scadute ( oltre 60 gg) ", numeroPraticheInIstruttoriaScaduteColumn, numeroPraticheConIntegrazScaduteColumn); + JasperReportBuilder builder = DynamicReports .report() .setTemplate(TemplatesADV.reportTemplate) - .columnGrid(presidioColumn, numeroPraticheDaAssegnareColumn, numeroPraticheDaApprovareColumn, - titleGroupOrdinarie, titleGroupInScadenza, titleGroupScadute) - .columns(presidioColumn, numeroPraticheDaAssegnareColumn, numeroPraticheDaApprovareColumn, - numeroPraticheInIstruttoriaOrdinarieColumn, numeroPraticheConIntegrazOrdinarieColumn, - numeroPraticheInIstruttoriaInScadenzaColumn, numeroPraticheConIntegrazInScadenzaColumn, - numeroPraticheInIstruttoriaScaduteColumn, numeroPraticheConIntegrazScaduteColumn) - .setDataSource(createDataSource(request)) + .columnGrid(presidioColumn, numeroPraticheDaAssegnareColumn, numeroPraticheDaApprovareColumn, titleGroupOrdinarie, titleGroupInScadenza, titleGroupScadute) + .columns(presidioColumn, numeroPraticheDaAssegnareColumn, numeroPraticheDaApprovareColumn, numeroPraticheInIstruttoriaOrdinarieColumn, numeroPraticheConIntegrazOrdinarieColumn, numeroPraticheInIstruttoriaInScadenzaColumn, + numeroPraticheConIntegrazInScadenzaColumn, numeroPraticheInIstruttoriaScaduteColumn, numeroPraticheConIntegrazScaduteColumn).setDataSource(createDataSource(request)) .addProperty("net.sf.jasperreports.export.xls.detect.cell.type", "true"); return builder; } private JRDataSource createDataSource(HttpServletRequest request) { + DRDataSource dataSource = new DRDataSource("presidioColumn", "numeroPraticheDaAssegnareColumn", "numeroPraticheDaApprovareColumn", "numeroPraticheInIstruttoriaOrdinarieColumn", "numeroPraticheConIntegrazOrdinarieColumn", + "numeroPraticheInIstruttoriaInScadenzaColumn", "numeroPraticheConIntegrazInScadenzaColumn", "numeroPraticheInIstruttoriaScaduteColumn", "numeroPraticheConIntegrazScaduteColumn"); - DRDataSource dataSource = new DRDataSource("presidioColumn", "numeroPraticheDaAssegnareColumn", - "numeroPraticheDaApprovareColumn", "numeroPraticheInIstruttoriaOrdinarieColumn", - "numeroPraticheConIntegrazOrdinarieColumn", "numeroPraticheInIstruttoriaInScadenzaColumn", - "numeroPraticheConIntegrazInScadenzaColumn", "numeroPraticheInIstruttoriaScaduteColumn", - "numeroPraticheConIntegrazScaduteColumn"); try { String dateMaxString = ParamUtil.getString(request, "dateMax", null); String tipoPraticaSelected = ParamUtil.getString(request, "tipologiaPratica", null); @@ -149,16 +131,19 @@ public class ReportScadenzarioIstruttorie implements PortosReportInterface { for (Organization org : orgs) { if (org.getParentOrganization() != null) { long groupId = org.getGroup().getGroupId(); - Map dbResult = ReportEngineServiceUtil.praticheAperte(dateMax, groupId, - tipoPraticaSelected); - numPraticheOrdInIstruttoriaTecnico = dbResult.get("numPraticheOrdInIstruttoriaTecnico"); - numPraticheOrdInAttesaIntegrazione = dbResult.get("numPraticheOrdInAttesaIntegrazione"); + + Map dbResult=ReportEngineServiceUtil.praticheAperte(dateMax,groupId,tipoPraticaSelected); + + numPraticheOrdInIstruttoriaTecnico=dbResult.get("numPraticheOrdInIstruttoriaTecnico"); + numPraticheOrdInAttesaIntegrazione=dbResult.get("numPraticheOrdInAttesaIntegrazione"); numPraticheInScadenzaInIstruttoriaTecnico = dbResult .get("numPraticheInScadenzaInIstruttoriaTecnico"); numPraticheInScadenzaInAttesaIntegrazione = dbResult .get("numPraticheInScadenzaInAttesaIntegrazione"); - numPraticheScaduteInIstruttoriaTecnico = dbResult.get("numPraticheScaduteInIstruttoriaTecnico"); - numPraticheScaduteInAttesaIntegrazione = dbResult.get("numPraticheScaduteInAttesaIntegrazione"); + numPraticheScaduteInIstruttoriaTecnico=dbResult.get("numPraticheScaduteInIstruttoriaTecnico"); + numPraticheScaduteInAttesaIntegrazione=dbResult.get("numPraticheScaduteInAttesaIntegrazione"); + + totPraticheAperteFinePeriodo += dbResult.get("totPraticheAperteFinePeriodo"); numeroPraticheDaAssegnareColumnTOTALE += numeroPraticheDaAssegnareColumn; numeroPraticheDaApprovareColumnTOTALE += numeroPraticheDaApprovareColumn; @@ -181,7 +166,11 @@ public class ReportScadenzarioIstruttorie implements PortosReportInterface { numPraticheInScadenzaInAttesaIntegrazioneTOTALE, numPraticheScaduteInIstruttoriaTecnicoTOTALE, numPraticheScaduteInAttesaIntegrazioneTOTALE); } - } catch (ParseException | PortalException | SystemException e) { + } catch (SystemException e) { + _log.error(e, e); + } catch (PortalException e) { + _log.error(e, e); + } catch (ParseException e) { _log.error(e, e); } return dataSource; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportTempisticheIstruttorie.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportTempisticheIstruttorie.java index 4948b61f..29b41712 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportTempisticheIstruttorie.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/ReportTempisticheIstruttorie.java @@ -1,9 +1,11 @@ package it.tref.portos.report.engine; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.portos.report.engine.PortosSearchTermsReport.FieldType; import it.tref.portos.report.engine.annotation.PortosReport; import it.tref.portos.report.engine.template.TemplatesADV; import it.tref.portos.report.engine.util.ReportEngineServiceUtil; +import it.tref.portos.report.engine.util.ReportTempisticheBean; import java.io.ByteArrayOutputStream; import java.text.ParseException; @@ -11,8 +13,10 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletRequest; @@ -32,7 +36,6 @@ import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.model.Organization; import com.liferay.portal.service.OrganizationLocalServiceUtil; @@ -47,20 +50,26 @@ public class ReportTempisticheIstruttorie implements PortosReportInterface { @Override public String generateHTML(HttpServletRequest httpServletRequest) { + String html = ""; - String html = StringPool.BLANK; - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - JasperHtmlExporterBuilder htmlExporter = DynamicReports.export.htmlExporter(bos).setIgnoreHyperLink(true); - JasperReportBuilder builder = generateReport(httpServletRequest); - builder.pageFooter(DynamicReports.cmp.pageNumber().setStyle(TemplatesADV.boldCenteredStyle)); - builder.toHtml(htmlExporter); - byte[] byteArray = bos.toByteArray(); - html = new String(byteArray); - } catch (DRException e) { - _log.error(e, e); - } - return html; + try { + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + + JasperHtmlExporterBuilder htmlExporter = DynamicReports.export.htmlExporter(bos).setIgnoreHyperLink(true); + + JasperReportBuilder builder = generateReport(httpServletRequest); + builder.pageFooter(DynamicReports.cmp.pageNumber().setStyle(TemplatesADV.boldCenteredStyle)); + builder.toHtml(htmlExporter); + + byte[] byteArray = bos.toByteArray(); + html = new String(byteArray); + + } catch (DRException e) { + _log.error(e, e); + } + + return html; } @Override @@ -96,16 +105,16 @@ public class ReportTempisticheIstruttorie implements PortosReportInterface { TextFieldBuilder note2 = DynamicReports.cmp.text(nota2); note1.setStyle(DynamicReports.stl.style(TemplatesADV.rootStyle).setFontSize(6)); note2.setStyle(DynamicReports.stl.style(TemplatesADV.rootStyle).setFontSize(6)); - JasperReportBuilder builder = DynamicReports - .report() - .setTemplate(TemplatesADV.reportTemplate) - .pageFooter(note1, note2) - .columnGrid(presidioColumn, numeroPraticheTotaliColumn, titleGroupInScadenza, titleGroupScadute) - .columns(presidioColumn, numeroPraticheTotaliColumn, numeroTotaleAutorizzateInScadenzaColumn, - durataMediaIstruttorieInScadenzaColumn, durataMediaApprovazionePraticaInScadenzaColumn, - numeroTotaleAutorizzateScaduteColumn, durataMediaIstruttorieScaduteColumn, - durataMediaApprovazionePraticaScaduteColumn).setDataSource(createDataSource(request)) - .addProperty("net.sf.jasperreports.export.xls.detect.cell.type", "true"); + + JasperReportBuilder builder = + DynamicReports.report().setTemplate(TemplatesADV.reportTemplate) + .pageFooter(note1, note2) + .columnGrid(presidioColumn, numeroPraticheTotaliColumn, titleGroupInScadenza, titleGroupScadute) + .columns(presidioColumn, numeroPraticheTotaliColumn + , numeroTotaleAutorizzateInScadenzaColumn, durataMediaIstruttorieInScadenzaColumn, durataMediaApprovazionePraticaInScadenzaColumn + , numeroTotaleAutorizzateScaduteColumn, durataMediaIstruttorieScaduteColumn, durataMediaApprovazionePraticaScaduteColumn) + .setDataSource(createDataSource(request)).addProperty("net.sf.jasperreports.export.xls.detect.cell.type", "true");; + return builder; } @@ -132,48 +141,57 @@ public class ReportTempisticheIstruttorie implements PortosReportInterface { dateMax = calendarMax.getTime(); List orgs = new ArrayList(); orgs = OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, QueryUtil.ALL_POS); - int numeroPraticheTotaliTotale = 0; - int numeroTotaleAutorizzateInScadenzaTotale = 0; - float durataMediaIstruttorieInScadenzaTotale = 0; - float durataMediaApprovazionePraticaInScadenzaTotale = 0; - int numeroTotaleAutorizzateScaduteTotale = 0; - float durataMediaIstruttorieScaduteTotale = 0; - float durataMediaApprovazionePraticaScaduteTotale = 0; + + int numeroPraticheTotaliTotale = 0; + int numeroTotaleAutorizzateInScadenzaTotale = 0; + float durataMediaIstruttorieInScadenzaTotale = 0; + float durataMediaApprovazionePraticaInScadenzaTotale = 0; + int numeroTotaleAutorizzateScaduteTotale = 0; + float durataMediaIstruttorieScaduteTotale = 0; + float durataMediaApprovazionePraticaScaduteTotale = 0; + int countOrganization = 0; int countOrganizationPraticheInScadenza = 0; int countOrganizationPraticheScadute = 0; for (Organization org : orgs) { if (org.getParentOrganization() != null) { long groupId = org.getGroup().getGroupId(); - Map dbResult = ReportEngineServiceUtil.praticheChiuse(dateMin, dateMax, groupId, - tipoPraticaSelected); - int numeroPraticheTotali = dbResult.get("count").intValue(); + + + //Retrieve data from DB + //Map dbResult=elaboraAutorizzazioniNew(dateMin,dateMax,groupId,tipoPraticaSelected); + Map dbResult=ReportEngineServiceUtil.praticheChiuse(dateMin, dateMax, groupId, tipoPraticaSelected); + + + int numeroPraticheTotali =dbResult.get("count").intValue(); int numeroTotaleAutorizzateInScadenza = dbResult.get("countOrdinarie").intValue(); int numeroTotaleAutorizzateScadute = dbResult.get("countScadute").intValue(); - float durataMediaIstruttorieInScadenza = dbResult.get("countOrdinarie") > 0 ? dbResult - .get("giorniTotOrdinarieIstruttorie") / dbResult.get("countOrdinarie") : 0; - float durataMediaApprovazionePraticaInScadenza = dbResult.get("countOrdinarie") > 0 ? dbResult - .get("giorniTotOrdinarieApprovazioni") / dbResult.get("countOrdinarie") : 0; - float durataMediaIstruttorieScadute = dbResult.get("countScadute") > 0 ? dbResult - .get("giorniTotScaduteIstruttorie") / dbResult.get("countScadute") : 0; - float durataMediaApprovazionePraticaScadute = dbResult.get("countScadute") > 0 ? dbResult - .get("giorniTotScaduteApprovazioni") / dbResult.get("countScadute") : 0; - dataSource.add(org.getName(), numeroPraticheTotali, numeroTotaleAutorizzateInScadenza, - durataMediaIstruttorieInScadenza, durataMediaApprovazionePraticaInScadenza, - numeroTotaleAutorizzateScadute, durataMediaIstruttorieScadute, - durataMediaApprovazionePraticaScadute); - numeroPraticheTotaliTotale += numeroPraticheTotali; - numeroTotaleAutorizzateInScadenzaTotale += numeroTotaleAutorizzateInScadenza; - numeroTotaleAutorizzateScaduteTotale += numeroTotaleAutorizzateScadute; - durataMediaApprovazionePraticaInScadenzaTotale += durataMediaApprovazionePraticaInScadenza; - durataMediaApprovazionePraticaScaduteTotale += durataMediaApprovazionePraticaScadute; - durataMediaIstruttorieInScadenzaTotale += durataMediaIstruttorieInScadenza; - durataMediaIstruttorieScaduteTotale += durataMediaIstruttorieScadute; - if (numeroTotaleAutorizzateInScadenza > 0) { - countOrganizationPraticheInScadenza++; - } - if (numeroTotaleAutorizzateScadute > 0) { - countOrganizationPraticheScadute++; - } + + float durataMediaIstruttorieInScadenza =dbResult.get("countOrdinarie")>0? dbResult.get("giorniTotOrdinarieIstruttorie")/dbResult.get("countOrdinarie"):0; + float durataMediaApprovazionePraticaInScadenza =dbResult.get("countOrdinarie")>0? dbResult.get("giorniTotOrdinarieApprovazioni")/dbResult.get("countOrdinarie"):0; + + float durataMediaIstruttorieScadute = dbResult.get("countScadute")>0?dbResult.get("giorniTotScaduteIstruttorie")/dbResult.get("countScadute"):0; + float durataMediaApprovazionePraticaScadute =dbResult.get("countScadute")>0?dbResult.get("giorniTotScaduteApprovazioni")/dbResult.get("countScadute"):0; + + dataSource.add(org.getName(), numeroPraticheTotali + , numeroTotaleAutorizzateInScadenza, durataMediaIstruttorieInScadenza, durataMediaApprovazionePraticaInScadenza + , numeroTotaleAutorizzateScadute, durataMediaIstruttorieScadute, durataMediaApprovazionePraticaScadute); + + numeroPraticheTotaliTotale+=numeroPraticheTotali; + numeroTotaleAutorizzateInScadenzaTotale+=numeroTotaleAutorizzateInScadenza; + numeroTotaleAutorizzateScaduteTotale+=numeroTotaleAutorizzateScadute; + durataMediaApprovazionePraticaInScadenzaTotale+=durataMediaApprovazionePraticaInScadenza; + durataMediaApprovazionePraticaScaduteTotale+=durataMediaApprovazionePraticaScadute; + durataMediaIstruttorieInScadenzaTotale+=durataMediaIstruttorieInScadenza; + durataMediaIstruttorieScaduteTotale+=durataMediaIstruttorieScadute; + + + if (numeroTotaleAutorizzateInScadenza>0) + countOrganizationPraticheInScadenza++; + if (numeroTotaleAutorizzateScadute>0) + countOrganizationPraticheScadute++; + + + countOrganization++; } } dataSource.add("TOTALI", numeroPraticheTotaliTotale, numeroTotaleAutorizzateInScadenzaTotale, @@ -186,7 +204,11 @@ public class ReportTempisticheIstruttorie implements PortosReportInterface { countOrganizationPraticheScadute > 0 ? durataMediaApprovazionePraticaScaduteTotale / countOrganizationPraticheScadute : 0); } - } catch (ParseException | PortalException | SystemException e) { + } catch (SystemException e) { + _log.error(e, e); + } catch (PortalException e) { + _log.error(e, e); + } catch (ParseException e) { _log.error(e, e); } return dataSource; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/template/TemplatesADV.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/template/TemplatesADV.java index a6e4d87f..4358503d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/template/TemplatesADV.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/template/TemplatesADV.java @@ -12,6 +12,8 @@ import java.util.Locale; import javax.servlet.http.HttpServletRequest; +import com.liferay.portal.kernel.util.ParamUtil; + import net.sf.dynamicreports.report.base.expression.AbstractValueFormatter; import net.sf.dynamicreports.report.builder.HyperLinkBuilder; import net.sf.dynamicreports.report.builder.ReportTemplateBuilder; @@ -26,9 +28,6 @@ import net.sf.dynamicreports.report.constant.SplitType; import net.sf.dynamicreports.report.constant.VerticalTextAlignment; import net.sf.dynamicreports.report.definition.ReportParameters; -import com.liferay.portal.kernel.util.ParamUtil; -import com.liferay.portal.kernel.util.StringPool; - public class TemplatesADV { public static final StyleBuilder rootStyle; @@ -90,54 +89,76 @@ public class TemplatesADV { .setDetailSplitType(SplitType.PREVENT); currencyType = new CurrencyType(); - HyperLinkBuilder link = hyperLink(StringPool.BLANK); - - dynamicReportsComponent = cmp.horizontalList( - cmp.verticalList( - cmp.text("GENIO CIVILE").setStyle(bold15CenteredStyle) - .setHorizontalTextAlignment(HorizontalTextAlignment.LEFT), cmp.text(StringPool.BLANK) - .setStyle(italicStyle).setHyperLink(link))).setFixedWidth(300); - footerComponent = cmp.pageXofY().setStyle(stl.style(boldCenteredStyle).setTopBorder(stl.pen1Point())); - } - - // Creates custom component which is possible to add to any report band component - public static ComponentBuilder createTitleComponent(String label) { - - HorizontalListBuilder horizontalListBuilder = cmp.horizontalList(); - horizontalListBuilder.add(dynamicReportsComponent, cmp.text(label).setStyle(bold15CenteredStyle) - .setHorizontalTextAlignment(HorizontalTextAlignment.RIGHT)); - horizontalListBuilder.newRow(); - return horizontalListBuilder; - } - - // ADT: BUG BO ID=34 - REPORT PRATICHE VIDIMATE - public static ComponentBuilder createTitleComponentNew(String label, String className, - HttpServletRequest request) { - - if (className.equalsIgnoreCase(ReportPraticheVidimate.class.getName())) { - HorizontalListBuilder horizontalListBuilder = cmp.horizontalList(); - HyperLinkBuilder link = hyperLink(StringPool.BLANK); - StringBuilder stBuilder = new StringBuilder(); - if (className.equalsIgnoreCase(ReportPraticheVidimate.class.getName())) { - String dateMinString = ParamUtil.getString(request, "dateMin", null); - String dateMaxString = ParamUtil.getString(request, "dateMax", null); - stBuilder.append("Periodo di Osservazione: dal "); - stBuilder.append(dateMinString); - stBuilder.append(" al "); - stBuilder.append(dateMaxString); - } - ComponentBuilder dynamicReportsComponentNew = cmp.horizontalList( - cmp.verticalList(cmp.text(stBuilder.toString()).setStyle(bold15CenteredStyle) - .setHorizontalTextAlignment(HorizontalTextAlignment.LEFT), cmp.text(StringPool.BLANK) - .setStyle(italicStyle).setHyperLink(link))).setFixedWidth(300); - horizontalListBuilder.add(dynamicReportsComponentNew, cmp.text(label).setStyle(bold15CenteredStyle) - .setHorizontalTextAlignment(HorizontalTextAlignment.RIGHT)); - horizontalListBuilder.newRow(); - return horizontalListBuilder; - } else { - return null; - } - } + HyperLinkBuilder link = hyperLink(""); + + dynamicReportsComponent = + cmp.horizontalList( + // cmp.image(TemplatesADV.class.getResource("images/aaa.png")).setFixedDimension(60, 60), + cmp.verticalList( + cmp.text("GENIO CIVILE").setStyle(bold15CenteredStyle) + .setHorizontalTextAlignment(HorizontalTextAlignment.LEFT), cmp.text("").setStyle(italicStyle) + .setHyperLink(link))).setFixedWidth(300); + footerComponent = cmp.pageXofY().setStyle(stl.style(boldCenteredStyle).setTopBorder(stl.pen1Point())); + + } + + /** + * + * Creates custom component which is possible to add to any report band component + */ + + public static ComponentBuilder createTitleComponent(String label) { + HorizontalListBuilder horizontalListBuilder = cmp.horizontalList(); + horizontalListBuilder.add(dynamicReportsComponent, cmp.text(label).setStyle(bold15CenteredStyle) + .setHorizontalTextAlignment(HorizontalTextAlignment.RIGHT)); + horizontalListBuilder.newRow(); + return horizontalListBuilder; + + } + + + /** + * ADT: BUG BO ID=34 � REPORT PRATICHE VIDIMATE + * + * @param label + * @param className + * @param request + * @return + */ + public static ComponentBuilder createTitleComponentNew(String label,String className,HttpServletRequest request) { + + + if (className.equalsIgnoreCase(ReportPraticheVidimate.class.getName())){ + HorizontalListBuilder horizontalListBuilder = cmp.horizontalList(); + HyperLinkBuilder link = hyperLink(""); + StringBuilder stBuilder=new StringBuilder(); + if (className.equalsIgnoreCase(ReportPraticheVidimate.class.getName())){ + String dateMinString = ParamUtil.getString(request, "dateMin", null); + String dateMaxString = ParamUtil.getString(request, "dateMax", null); + stBuilder.append("Periodo di Osservazione: dal "); + stBuilder.append(dateMinString); + stBuilder.append(" al "); + stBuilder.append(dateMaxString); + } + ComponentBuilder dynamicReportsComponentNew = + cmp.horizontalList( + // cmp.image(TemplatesADV.class.getResource("images/aaa.png")).setFixedDimension(60, 60), + cmp.verticalList( + cmp.text(stBuilder.toString()).setStyle(bold15CenteredStyle) + .setHorizontalTextAlignment(HorizontalTextAlignment.LEFT), cmp.text("").setStyle(italicStyle) + .setHyperLink(link))).setFixedWidth(300); + + + horizontalListBuilder.add(dynamicReportsComponentNew, cmp.text(label).setStyle(bold15CenteredStyle) + .setHorizontalTextAlignment(HorizontalTextAlignment.RIGHT)); + horizontalListBuilder.newRow(); + return horizontalListBuilder; + + }else{ + return null; + } + + } public static CurrencyValueFormatter createCurrencyValueFormatter(String label) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportEngineServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportEngineServiceUtil.java index 04a92f4a..c53fc06c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportEngineServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportEngineServiceUtil.java @@ -1,5 +1,7 @@ package it.tref.portos.report.engine.util; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; + import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; @@ -11,8 +13,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; -import org.omg.CORBA.SystemException; - +import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; @@ -153,7 +154,7 @@ public class ReportEngineServiceUtil { throws SystemException { Map> map = new HashMap>(); Map returnedMap = new HashMap(); - List returnedList = new ArrayList<>(); + List returnedList; boolean co = type.equalsIgnoreCase("Depositi a controllo obbligatorio"); String tipoDocumentoApprovato = co ? "CO" : "AU"; try { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/service.xml index eb52e37b..d16aa930 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/service.xml @@ -1,4 +1,4 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/html/core/HeaderFooterPageEvent.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/html/core/HeaderFooterPageEvent.java index 0cd178cd..63d14518 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/html/core/HeaderFooterPageEvent.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/html/core/HeaderFooterPageEvent.java @@ -1,7 +1,5 @@ package it.tref.liferay.portos.report.html.core; -import java.io.IOException; - import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Element; @@ -14,6 +12,8 @@ import com.itextpdf.tool.xml.ElementList; import com.itextpdf.tool.xml.XMLWorkerHelper; import com.liferay.portal.kernel.util.Validator; +import java.io.IOException; + public class HeaderFooterPageEvent extends PdfPageEventHelper { private ElementList header; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/provider/AbstractReportProvider.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/provider/AbstractReportProvider.java index 409411a8..3702fb04 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/provider/AbstractReportProvider.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/provider/AbstractReportProvider.java @@ -175,12 +175,22 @@ public abstract class AbstractReportProvider { exporter.setParameter(JRPdfExporterParameter.METADATA_AUTHOR, getMetadataAuthor()); exporter.setParameter(JRPdfExporterParameter.METADATA_CREATOR, getMetadataCreator()); exporter.setParameter(JRPdfExporterParameter.IS_TAGGED, true); - if (getPermission() != null) { - exporter.setParameter(JRPdfExporterParameter.PERMISSIONS, getPermission()); - } - } else if (exportType == ReportEngine.EXPORT_TO_DOC || exportType == ReportEngine.EXPORT_TO_RTF) { - } else if (exportType == ReportEngine.EXPORT_TO_DOCX) {} else if (exportType == ReportEngine.EXPORT_TO_HTML - || exportType == ReportEngine.EXPORT_TO_HTM) {} else if (exportType == ReportEngine.EXPORT_TO_CSV) { + if (getPermission() != null) + exporter.setParameter( + JRPdfExporterParameter.PERMISSIONS, getPermission()); + } + else if (exportType == ReportEngine.EXPORT_TO_DOC || + exportType == ReportEngine.EXPORT_TO_RTF) { + + } + else if (exportType == ReportEngine.EXPORT_TO_DOCX) { + + } + else if (exportType == ReportEngine.EXPORT_TO_HTML || + exportType == ReportEngine.EXPORT_TO_HTM) { + + } + else if (exportType == ReportEngine.EXPORT_TO_CSV) { exporter = null; } return exporter; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/report/BeanReport.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/report/BeanReport.java index ea83560c..cabf6af1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/report/BeanReport.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/report/BeanReport.java @@ -16,13 +16,11 @@ public class BeanReport implements ReportInterface { this.bean = bean; } - @Override public boolean isValido() { return true; } - @Override public JRDataSource generaDataSource() { JRDataSource ds = null; @@ -36,10 +34,10 @@ public class BeanReport implements ReportInterface { return ds; } - @Override - public void closeDataSource() {} + public void closeDataSource() { + + } - @Override public byte[] getCSVBytes() { return null; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ProtocolloMessageListener.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ProtocolloMessageListener.java index 69e16e5a..e4336442 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ProtocolloMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ProtocolloMessageListener.java @@ -131,26 +131,16 @@ public class ProtocolloMessageListener extends BaseMessageListener { ServiceContext serviceContext = new ServiceContext(); serviceContext.setUserId(userId); serviceContext.setCompanyId(companyId); - long repositoryId = fileEntry.getRepositoryId(); - long folderId = fileEntry.getFolderId(); - String sourceFileName = reportDto.getFileName() + ".pdf"; - String mimeType = ContentTypes.APPLICATION_PDF; - String title = reportDto.getFileName(); - String description = StringPool.BLANK; - String changeLog = StringPool.BLANK; - FileEntry newFileEntry; + FileEntry newFileEntry = null; try { - newFileEntry = - DLAppLocalServiceUtil.addFileEntry(userId, repositoryId, folderId, sourceFileName, - mimeType, title, description, changeLog, outputBytes, serviceContext); + newFileEntry = DLAppLocalServiceUtil.addFileEntry(userId, fileEntry.getRepositoryId(), + fileEntry.getFolderId(), reportDto.getFileName() + ".pdf", ContentTypes.APPLICATION_PDF, + reportDto.getFileName(), StringPool.BLANK, StringPool.BLANK, outputBytes, serviceContext); } catch (DuplicateFileException e) { - FileEntry fe = - DLAppServiceUtil.getFileEntry(fileEntry.getGroupId(), fileEntry.getFolderId(), - reportDto.getFileName()); - DLAppLocalServiceUtil.deleteFileEntry(fe.getFileEntryId()); - newFileEntry = - DLAppLocalServiceUtil.addFileEntry(userId, repositoryId, folderId, sourceFileName, - mimeType, title, description, changeLog, outputBytes, serviceContext); + FileEntry fe = DLAppServiceUtil.getFileEntry(fileEntry.getGroupId(), fileEntry.getFolderId(), + reportDto.getFileName()); + _log.info("File duplicato : " + fe.getFileEntryId()); + return; } if (Validator.isNotNull(newFileEntry)) { long[] fileEntryIds = new long[0]; @@ -176,15 +166,18 @@ public class ProtocolloMessageListener extends BaseMessageListener { Company company = CompanyLocalServiceUtil.fetchCompany(companyId); StringBuilder sb = new StringBuilder(); - sb.append( - (String) company.getExpandoBridge().getAttribute( - Constants.COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_INIZIALE_LABEL, false)) - .append(StringPool.SLASH) - .append(protocollo) - .append(StringPool.SLASH) - .append((String) company.getExpandoBridge().getAttribute( - Constants.COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_SEGUENTE_LABEL, false)).append(" del ") - .append(sdf.format(dtProtocollo)); + + sb.append((String) company.getExpandoBridge().getAttribute( + Constants.COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_INIZIALE_LABEL, false)); + sb.append(StringPool.SLASH); + sb.append(protocollo); + sb.append(StringPool.SLASH); + sb.append((String) company.getExpandoBridge().getAttribute( + Constants.COMPANY_CUSTOM_FIELD_PROTOCOLLO_CODICE_SEGUENTE_LABEL, false)); + + sb.append(" del "); + sb.append(sdf.format(dtProtocollo)); + return sb.toString(); } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportMessageListener.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportMessageListener.java index a126a417..1ad1fa8e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportMessageListener.java @@ -29,9 +29,9 @@ import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.service.ServiceContext; public class ReportMessageListener extends BaseMessageListener { + private final static Log _log = LogFactoryUtil.getLog(ReportTaskMessageListener.class); - private static final Log _log = LogFactoryUtil.getLog(ReportTaskMessageListener.class); - + @SuppressWarnings("unchecked") @Override protected void doReceive(Message message) throws Exception { @@ -39,7 +39,6 @@ public class ReportMessageListener extends BaseMessageListener { long companyId = message.getLong(ReportConstants.COMPANY_ID); long userId = message.getLong(ReportConstants.USER_ID); Object dataSouce = message.get(ReportConstants.REPORT_DATASOURCE); - @SuppressWarnings("unchecked") Map taskContextMap = (Map) message .get(ReportConstants.PARAMATERS); if (taskContextMap == null) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportTaskMessageListener.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportTaskMessageListener.java index 7d0fcb12..1512433d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportTaskMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/messaging/ReportTaskMessageListener.java @@ -19,6 +19,8 @@ import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.messaging.BaseMessageListener; import com.liferay.portal.kernel.messaging.Message; import com.liferay.portal.kernel.messaging.MessageBusUtil; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskLocalServiceImpl.java index f5a8f1ae..ff8d32c2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskLocalServiceImpl.java @@ -40,13 +40,16 @@ public class ReportTaskLocalServiceImpl extends ReportTaskLocalServiceBaseImpl { * it.tref.liferay.portos.report.service.ReportTaskLocalServiceUtil} to access the report task local service. */ - @Override - public ReportTask addReportTask(Map taskContextMap, ServiceContext serviceContext) - throws PortalException, SystemException { + public ReportTask addReportTask( + Map taskContextMap, ServiceContext serviceContext) + throws PortalException, SystemException { User user = userLocalService.getUser(serviceContext.getUserId()); Date now = new Date(); - ReportTask reportTask = createReportTask(counterLocalService.increment(ReportTask.class.getName())); + + ReportTask reportTask = + reportTaskLocalService.createReportTask(counterLocalService.increment(ReportTask.class.getName())); + reportTask.setCompanyId(serviceContext.getCompanyId()); reportTask.setUserId(user.getUserId()); reportTask.setUserName(user.getFullName()); @@ -56,16 +59,20 @@ public class ReportTaskLocalServiceImpl extends ReportTaskLocalServiceBaseImpl { String taskContext = JSONFactoryUtil.looseSerializeDeep(taskContextMap); reportTask.setTaskContext(taskContext); } - return addReportTask(reportTask); + + return reportTaskLocalService.addReportTask(reportTask); } - @Override - public ReportTask markAsCompleted(long reportTaskId, Date completionDate) throws PortalException, SystemException { + public ReportTask markAsCompleted(long reportTaskId, Date completionDate) + throws PortalException, SystemException { + + ReportTask reportTask = + reportTaskLocalService.getReportTask(reportTaskId); - ReportTask reportTask = getReportTask(reportTaskId); reportTask.setModifiedDate(new Date()); reportTask.setCompleted(true); reportTask.setCompletionDate(completionDate); - return updateReportTask(reportTask); + + return reportTaskLocalService.updateReportTask(reportTask); } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskManagerServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskManagerServiceImpl.java index 4fb530c6..f0d88ea9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskManagerServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/service/impl/ReportTaskManagerServiceImpl.java @@ -143,8 +143,9 @@ public class ReportTaskManagerServiceImpl extends ReportTaskManagerServiceBaseIm serviceContext.setUserId(userId); serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW }); _log.info("addFileEntry userId=" + serviceContext.getUserId() + ", repositoryId=" - + folder.getRepositoryId() + ", folderId=" + folder.getFolderId() + ", sourceFileName=" - + sourceFileName + ", mimeType=" + mimeType + ", title=" + title); + + folder.getRepositoryId() + ", folderId=" + folder.getFolderId() + + ", sourceFileName=" + sourceFileName + ", mimeType=" + mimeType + ", title=" + + title); FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(), folder.getRepositoryId(), folder.getFolderId(), sourceFileName, mimeType, title, StringPool.BLANK, StringPool.BLANK, bytes, serviceContext); diff --git a/liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl b/liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl index 7ef3d67d..8ce2a875 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl +++ b/liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/templates/navigation.ftl @@ -19,14 +19,9 @@

- - <#if propsUtil.get("mwg.test.display")?has_content > - <#assign test_display = propsUtil.get("mwg.test.display") /> -

${test_display}

- <#else> - ${logo_description} - -
+ + ${logo_description} +

<#if user_name != "" > diff --git a/liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/templates/header.ftl b/liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/templates/header.ftl index 8d95c17c..d8b70d28 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/templates/header.ftl +++ b/liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/templates/header.ftl @@ -1,31 +1,32 @@
-

- <#assign logo_url = "${images_folder}/logo-rs.png" /> - - ${logo_description} -
-
Regione Siciliana
-
Dipartimento dei Beni Culturali
e dell'Identità Siciliana
-
-

-

- - <#if propsUtil.get("mwg.test.display")?has_content > - <#assign test_display = propsUtil.get("mwg.test.display") /> -

${test_display}

- <#else> - ${logo_description} - -
-

- +

+ <#assign logo_url = "${images_folder}/logo-rs.png" /> + + ${logo_description} + +
+
Regione Siciliana
+
Dipartimento dei Beni Culturali
e dell'identità Siciliana
+
+ +

+ +

+ + ${logo_description} + + +

+ +
\ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf index 011c8696..a0f7d78b 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf @@ -139,7 +139,6 @@ details. -
diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language.properties b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language.properties index dbbd2bff..39af8759 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language.properties +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language.properties @@ -10,5 +10,6 @@ error-portos-kaleo-required = {0} is required ## HOOK +x-assigned-the-task-to-x = Task assigned to {1} x-completed-the-task-x-y={0} completed the task {1} ({2}). x-sent-signal-x=System sent a signal {1}. \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language_it.properties b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language_it.properties index 83228c65..1f5d2523 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language_it.properties +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/content/Language_it.properties @@ -10,5 +10,6 @@ error-portos-kaleo-required = {0} campo obbligatorio ## HOOK +x-assigned-the-task-to-x = L'attività è stata assegnata a {1} x-completed-the-task-x-y={0} ha completato l'attività {1} ({2}). x-sent-signal-x=Il sistema ha inviato un segnale {1}.