diff --git a/.gitignore b/.gitignore index 108e24b5..71e83737 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/bin/ liferay-plugins-sdk-6.2/.metadata/ liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.gradle/ portos-versioning/.gradle/ +liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.gradle/ +liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.settings/ diff --git a/liferay-plugins-sdk-6.2/hooks/hms-taglib-hook/.project b/liferay-plugins-sdk-6.2/hooks/hms-taglib-hook/.project index 7b2a2201..12dca9e9 100644 --- a/liferay-plugins-sdk-6.2/hooks/hms-taglib-hook/.project +++ b/liferay-plugins-sdk-6.2/hooks/hms-taglib-hook/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931803975 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project index bdf6cb46..19708af4 100644 --- a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project @@ -34,4 +34,15 @@ org.apache.ivyde.eclipse.ivynature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804246 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/layouttpl/bootstrapt_1_column-layouttpl/.project b/liferay-plugins-sdk-6.2/layouttpl/bootstrapt_1_column-layouttpl/.project index b8145540..2600f60a 100644 --- a/liferay-plugins-sdk-6.2/layouttpl/bootstrapt_1_column-layouttpl/.project +++ b/liferay-plugins-sdk-6.2/layouttpl/bootstrapt_1_column-layouttpl/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931803957 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.project index 94b39ac8..900e7a4a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931803987 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-display.xml index 4e247248..f818ae94 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-display.xml @@ -2,7 +2,6 @@ - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-portlet.xml index 87c6ea06..8beac0d6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,32 +2,25 @@ - 1 /icon.png /css/main.css - - /js/main.js - + /js/main.js 1-portlet 2 /icon.png /css/main.css - - /js/main.js - + /js/main.js 2-portlet 3 /icon.png /css/main.css - - /js/main.js - + /js/main.js 3-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/portlet.xml index 8855464d..45618724 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Accesso Atti FE - - it.tref.liferay.portos.accesso.atti.portlet.AccessoAttiFEPortlet - + it.tref.liferay.portos.accesso.atti.portlet.AccessoAttiFEPortlet view-template /html/accesso_atti_fe/view.jsp @@ -39,9 +36,7 @@ 2 Accesso Atti BO - - it.tref.liferay.portos.accesso.atti.portlet.AccessoAttiBOPortlet - + it.tref.liferay.portos.accesso.atti.portlet.AccessoAttiBOPortlet view-template /html/accesso_atti_bo/view.jsp @@ -73,9 +68,7 @@ 3 Creazione Account Portos - - it.tref.liferay.portos.accesso.atti.portlet.CreazioneAccountPortosPortlet - + it.tref.liferay.portos.accesso.atti.portlet.CreazioneAccountPortosPortlet view-template /html/creazione_account/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/service.xml index 99a97895..13683f0d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/service.xml @@ -1,59 +1,50 @@ - + + 3F Consulting portos_atti - - - - + - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - + - + - - - - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/model/impl/RichiestaAccessoAttiImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/model/impl/RichiestaAccessoAttiImpl.java index 2ca0d89b..161bf9ff 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/model/impl/RichiestaAccessoAttiImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/model/impl/RichiestaAccessoAttiImpl.java @@ -15,22 +15,19 @@ package it.tref.liferay.portos.accesso.atti.model.impl; /** - * The extended model implementation for the RichiestaAccessoAtti service. Represents a row in the - * "portos_atti_RichiestaAccessoAtti" database table, with each column mapped to a property of this class. + * The extended model implementation for the RichiestaAccessoAtti service. Represents a row in the "portos_atti_RichiestaAccessoAtti" database table, with each column mapped to a property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun - * ServiceBuilder to copy their definitions into the - * {@link it.tref.liferay.portos.accesso.atti.model.RichiestaAccessoAtti} interface. + * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.accesso.atti.model.RichiestaAccessoAtti} interface. *

* * @author 3F Consulting */ -@SuppressWarnings("serial") public class RichiestaAccessoAttiImpl extends RichiestaAccessoAttiBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a richiesta accesso atti model - * instance should use the {@link it.tref.liferay.portos.accesso.atti.model.RichiestaAccessoAtti} interface instead. + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a richiesta accesso atti model instance should use the {@link it.tref.liferay.portos.accesso.atti.model.RichiestaAccessoAtti} interface instead. */ public RichiestaAccessoAttiImpl() { } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiLocalServiceImpl.java index 080da7c6..27bdb870 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiLocalServiceImpl.java @@ -37,173 +37,211 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil; * The implementation of the richiesta accesso atti 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.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiLocalService} - * interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiLocalService} interface. * *

- * This is a local service. Methods of this service will not have security checks based on the propagated JAAS - * credentials because this service can only be accessed from within the same VM. + * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. *

* * @author 3F Consulting * @see it.tref.liferay.portos.accesso.atti.service.base.RichiestaAccessoAttiLocalServiceBaseImpl * @see it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiLocalServiceUtil */ -public class RichiestaAccessoAttiLocalServiceImpl extends RichiestaAccessoAttiLocalServiceBaseImpl { +public class RichiestaAccessoAttiLocalServiceImpl +extends RichiestaAccessoAttiLocalServiceBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiLocalServiceUtil} to access the richiesta accesso - * atti local service. + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiLocalServiceUtil} to access the richiesta accesso atti local service. */ - @Override - public List findByGestita(boolean gestita, int start, int end) throws SystemException { + public List findByGestita(boolean gestita, int start, int end) throws SystemException{ return richiestaAccessoAttiPersistence.findByGestita(gestita, start, end); } - @Override - public List findCompletate(String numeroProgetto, String protocollo, String dataDal, - String dataAl, int start, int end) throws SystemException, ParseException { + public List findCompletate(String numeroProgetto, String protocollo, String dataDal, String dataAl, int start, int end) throws SystemException, ParseException{ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + DynamicQuery dq = richiestaAccessoAttiLocalService.dynamicQuery(); dq.add(RestrictionsFactoryUtil.eq("gestita", true)); - if (!numeroProgetto.equals("")) { + + if(!numeroProgetto.equals("")){ dq.add(RestrictionsFactoryUtil.eq("numeroProgetto", numeroProgetto)); } - if (!protocollo.equals("")) { + + if(!protocollo.equals("")){ + Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); disjunction.add(PropertyFactoryUtil.forName("protocolloEntrata").eq(protocollo)); disjunction.add(PropertyFactoryUtil.forName("protocolloUscita").eq(protocollo)); dq.add(disjunction); } - if (!dataDal.equals("") && !dataAl.equals("")) { + + if(!dataDal.equals("") && !dataAl.equals("")){ + Date dateDal = sdf.parse(dataDal); Calendar calDal = Calendar.getInstance(); calDal.setTime(dateDal); calDal.set(Calendar.HOUR_OF_DAY, 00); calDal.set(Calendar.MINUTE, 00); dateDal = calDal.getTime(); + Date dateAl = sdf.parse(dataAl); Calendar calAl = Calendar.getInstance(); calAl.setTime(dateAl); calAl.set(Calendar.HOUR_OF_DAY, 23); calAl.set(Calendar.MINUTE, 59); dateAl = calAl.getTime(); + + Property createDateProperty = PropertyFactoryUtil.forName("dtAccettazione"); dq.add(createDateProperty.between(dateDal, dateAl)); } - if (!dataDal.equals("") && dataAl.equals("")) { + + if(!dataDal.equals("") && dataAl.equals("")){ + Date dateDal = sdf.parse(dataDal); Calendar calDal = Calendar.getInstance(); calDal.setTime(dateDal); calDal.set(Calendar.HOUR_OF_DAY, 00); calDal.set(Calendar.MINUTE, 00); dateDal = calDal.getTime(); + Date now = new Date(); + Property createDateProperty = PropertyFactoryUtil.forName("dtAccettazione"); dq.add(createDateProperty.between(dateDal, now)); + } - - if (dataDal.equals("") && !dataAl.equals("")) { + + if(dataDal.equals("") && !dataAl.equals("")){ + Date now = new Date("01/01/2018"); + Date dateAl = sdf.parse(dataAl); Calendar calAl = Calendar.getInstance(); calAl.setTime(dateAl); calAl.set(Calendar.HOUR_OF_DAY, 23); calAl.set(Calendar.MINUTE, 59); dateAl = calAl.getTime(); + Property createDateProperty = PropertyFactoryUtil.forName("dtAccettazione"); dq.add(createDateProperty.between(now, dateAl)); + } - return richiestaAccessoAttiLocalService.dynamicQuery(dq, start, end); - } - @Override - public int countCompletate(String numeroProgetto, String protocollo, String dataDal, String dataAl) - throws SystemException, ParseException { + return richiestaAccessoAttiLocalService.dynamicQuery(dq, start, end); + } + + public int countCompletate(String numeroProgetto, String protocollo, String dataDal, String dataAl) throws SystemException, ParseException{ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + DynamicQuery dq = richiestaAccessoAttiLocalService.dynamicQuery(); dq.add(RestrictionsFactoryUtil.eq("gestita", true)); - if (!numeroProgetto.equals("")) { + + if(!numeroProgetto.equals("")){ dq.add(RestrictionsFactoryUtil.eq("numeroProgetto", numeroProgetto)); } - if (!protocollo.equals("")) { + + if(!protocollo.equals("")){ + Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); disjunction.add(PropertyFactoryUtil.forName("protocolloEntrata").eq(protocollo)); disjunction.add(PropertyFactoryUtil.forName("protocolloUscita").eq(protocollo)); dq.add(disjunction); } - if (!dataDal.equals("") && !dataAl.equals("")) { + + if(!dataDal.equals("") && !dataAl.equals("")){ + Date dateDal = sdf.parse(dataDal); Calendar calDal = Calendar.getInstance(); calDal.setTime(dateDal); calDal.set(Calendar.HOUR_OF_DAY, 00); calDal.set(Calendar.MINUTE, 00); dateDal = calDal.getTime(); + Date dateAl = sdf.parse(dataAl); Calendar calAl = Calendar.getInstance(); calAl.setTime(dateAl); calAl.set(Calendar.HOUR_OF_DAY, 23); calAl.set(Calendar.MINUTE, 59); dateAl = calAl.getTime(); + + Property createDateProperty = PropertyFactoryUtil.forName("dtAccettazione"); dq.add(createDateProperty.between(dateDal, dateAl)); } - if (!dataDal.equals("") && dataAl.equals("")) { + + if(!dataDal.equals("") && dataAl.equals("")){ + Date dateDal = sdf.parse(dataDal); Calendar calDal = Calendar.getInstance(); calDal.setTime(dateDal); calDal.set(Calendar.HOUR_OF_DAY, 00); calDal.set(Calendar.MINUTE, 00); dateDal = calDal.getTime(); + Date now = new Date(); + Property createDateProperty = PropertyFactoryUtil.forName("dtAccettazione"); dq.add(createDateProperty.between(dateDal, now)); + } - if (dataDal.equals("") && !dataAl.equals("")) { + + if(dataDal.equals("") && !dataAl.equals("")){ + Date now = new Date("01/01/2018"); + Date dateAl = sdf.parse(dataAl); Calendar calAl = Calendar.getInstance(); calAl.setTime(dateAl); calAl.set(Calendar.HOUR_OF_DAY, 23); calAl.set(Calendar.MINUTE, 59); dateAl = calAl.getTime(); + Property createDateProperty = PropertyFactoryUtil.forName("dtAccettazione"); dq.add(createDateProperty.between(now, dateAl)); + } + List lista = richiestaAccessoAttiLocalService.dynamicQuery(dq); + return lista.size(); } - @Override - public RichiestaAccessoAtti findByAccessToken(String accessToken) throws SystemException { + public RichiestaAccessoAtti findByAccessToken(String accessToken) throws SystemException{ DynamicQuery dq = richiestaAccessoAttiLocalService.dynamicQuery(); dq.add(RestrictionsFactoryUtil.eq("accessToken", accessToken)); + List lista = richiestaAccessoAttiLocalService.dynamicQuery(dq); - if (lista != null && !lista.isEmpty()) { + if(lista != null && !lista.isEmpty()){ return lista.get(0); } + return null; } - @Override - public List findRichiesteByGroup(long userId, int start, int end) throws SystemException { + public List findRichiesteByGroup(long userId, int start, int end) throws SystemException{ List listaLong = new ArrayList(); + List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(userId); - if (organizationList != null && !organizationList.isEmpty()) { + if(organizationList != null && !organizationList.isEmpty()){ for (Organization organization : organizationList) { listaLong.add(organization.getGroupId()); } } + listaLong.add(0L); + DynamicQuery dq = richiestaAccessoAttiLocalService.dynamicQuery(); dq.add(RestrictionsFactoryUtil.eq("gestita", false)); dq.add(RestrictionsFactoryUtil.in("groupId", listaLong)); + return richiestaAccessoAttiLocalService.dynamicQuery(dq, start, end); + } } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiServiceImpl.java index 96b4b287..1cf6862e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/impl/RichiestaAccessoAttiServiceImpl.java @@ -20,22 +20,21 @@ import it.tref.liferay.portos.accesso.atti.service.base.RichiestaAccessoAttiServ * The implementation of the richiesta accesso atti remote 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.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiService} interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiService} interface. * *

- * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. + * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. *

* * @author 3F Consulting * @see it.tref.liferay.portos.accesso.atti.service.base.RichiestaAccessoAttiServiceBaseImpl * @see it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiServiceUtil */ -public class RichiestaAccessoAttiServiceImpl extends RichiestaAccessoAttiServiceBaseImpl { +public class RichiestaAccessoAttiServiceImpl + extends RichiestaAccessoAttiServiceBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiServiceUtil} to access the richiesta accesso atti - * remote service. + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link it.tref.liferay.portos.accesso.atti.service.RichiestaAccessoAttiServiceUtil} to access the richiesta accesso atti remote service. */ } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/persistence/RichiestaAccessoAttiPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/persistence/RichiestaAccessoAttiPersistenceImpl.java index 5d8232f9..6765ce2f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/persistence/RichiestaAccessoAttiPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/service/persistence/RichiestaAccessoAttiPersistenceImpl.java @@ -43,7 +43,6 @@ import it.tref.liferay.portos.accesso.atti.NoSuchRichiestaAccessoAttiException; import it.tref.liferay.portos.accesso.atti.model.RichiestaAccessoAtti; import it.tref.liferay.portos.accesso.atti.model.impl.RichiestaAccessoAttiImpl; import it.tref.liferay.portos.accesso.atti.model.impl.RichiestaAccessoAttiModelImpl; -import it.tref.liferay.portos.accesso.atti.service.persistence.RichiestaAccessoAttiPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/AccessoAttiAccessTokenUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/AccessoAttiAccessTokenUtil.java index 9f1bf01c..e69c92d6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/AccessoAttiAccessTokenUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/AccessoAttiAccessTokenUtil.java @@ -8,24 +8,34 @@ import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.StringPool; public class AccessoAttiAccessTokenUtil { - + private static final Log _log = LogFactoryUtil.getLog(AccessoAttiAccessTokenUtil.class); - - public static String generateAccessToken(long richiestaAccessoAttiId, String numeroProgetto, long richiedenteUserId) { - + + public static String generateAccessToken(long richiestaAccessoAttiId, String numeroProgetto, long richiedenteUserId){ + StringBuffer sb = new StringBuffer(); + try { - String concatString = String.valueOf(richiestaAccessoAttiId) + StringPool.UNDERLINE + numeroProgetto - + StringPool.UNDERLINE + richiedenteUserId; + + String concatString = String.valueOf(richiestaAccessoAttiId) + StringPool.UNDERLINE + + numeroProgetto + StringPool.UNDERLINE + richiedenteUserId; + MessageDigest md = MessageDigest.getInstance("MD5"); + md.update(concatString.getBytes()); - byte byteData[] = md.digest(); - for (int i = 0; i < byteData.length; i++) { - sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1)); - } + + byte byteData[] = md.digest(); + + for (int i = 0; i < byteData.length; i++) { + sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1)); + } + } catch (NoSuchAlgorithmException e) { - _log.error(e, e); + _log.error(e,e); } + return sb.toString(); + } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/DocumentLibraryUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/DocumentLibraryUtil.java index f9e80da6..1412700f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/DocumentLibraryUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/accesso/atti/uti/DocumentLibraryUtil.java @@ -17,48 +17,62 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil; public class DocumentLibraryUtil { - + public static Log _log = LogFactoryUtil.getLog(DocumentLibraryUtil.class); public static final String RICHIESTA_ATTI_FOLDER_NAME = "RICHIESTA_ATTI"; public static final String PAGAMENTO_CODEC_FILENAME = "PAGAMENTO_"; public static final String DOCUMENTO_CODEC_FILENAME = "DOCUMENTO_"; - - public static long saveFileEntryAccessoAtti(long companyGroupId, long richiestaAccessoAttiId, - String originFileName, File file, boolean pagamento) { - + + public static long saveFileEntryAccessoAtti(long companyGroupId, long richiestaAccessoAttiId, String originFileName, + File file, boolean pagamento) { + long fileEntryId = 0L; + try { DLFolder folder = getRichiestaAttiFolder(companyGroupId); - if (folder != null) { - RichiestaAccessoAtti richiestaAccessoAtti = RichiestaAccessoAttiLocalServiceUtil - .fetchRichiestaAccessoAtti(richiestaAccessoAttiId); - if (richiestaAccessoAtti != null) { + if(folder != null){ + + RichiestaAccessoAtti richiestaAccessoAtti = + RichiestaAccessoAttiLocalServiceUtil.fetchRichiestaAccessoAtti(richiestaAccessoAttiId); + + if(richiestaAccessoAtti != null){ + ServiceContext serviceContext = new ServiceContext(); serviceContext.setCompanyId(richiestaAccessoAtti.getCompanyId()); serviceContext.setUserId(richiestaAccessoAtti.getUserId()); + String mineType = FileUtil.getExtension(originFileName); + String prefixedFileName = ""; - if (pagamento) { + if(pagamento){ prefixedFileName = PAGAMENTO_CODEC_FILENAME + richiestaAccessoAttiId + "." + mineType; } else { prefixedFileName = DOCUMENTO_CODEC_FILENAME + richiestaAccessoAttiId + "." + mineType; } - FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(richiestaAccessoAtti.getUserId(), - folder.getRepositoryId(), folder.getFolderId(), prefixedFileName, mineType, - prefixedFileName, "", "", file, serviceContext); + + FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry( + richiestaAccessoAtti.getUserId(), folder.getRepositoryId(), folder.getFolderId(), + prefixedFileName, mineType, prefixedFileName, "", "", file, serviceContext); + fileEntryId = fileEntry.getFileEntryId(); + } } + } catch (PortalException | SystemException e) { - _log.error(e, e); + _log.error(e,e); } + return fileEntryId; + } - - private static DLFolder getRichiestaAttiFolder(long companyGroupId) throws PortalException, SystemException { - + + private static DLFolder getRichiestaAttiFolder(long companyGroupId) throws PortalException, SystemException{ + DLFolder folder = DLFolderLocalServiceUtil.getFolder(companyGroupId, 0L, RICHIESTA_ATTI_FOLDER_NAME); + return folder; } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/action_button.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/action_button.jsp index 66343e7c..b6e680b7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/action_button.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/action_button.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@include file="init.jsp" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp index c10be4dd..0a37c540 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="init.jsp" %>
@@ -89,7 +88,7 @@ - + @@ -119,7 +118,7 @@
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/init.jsp index 07568df7..1cea714d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="../init.jsp" %> <%@page import="javax.portlet.PortletURL"%> <%@page import="java.util.ArrayList"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_completed_request.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_completed_request.jsp index 0f46630b..e30ed433 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_completed_request.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_completed_request.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.model.User"%> <%@page import="it.tref.liferay.portos.bo.model.Territorio"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_richieste.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_richieste.jsp index c19b360e..f58c558b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_richieste.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/show_richieste.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> <%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view.jsp index a6b6232a..e6acbac2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="init.jsp" %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp index 0da26304..07c2499a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portlet.documentlibrary.util.DLUtil"%> <%@page import="com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil"%> <%@page import="com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil"%> @@ -79,7 +78,7 @@ String docUrl = DLUtil.getPreviewURL(fileEntryDoc, fileEntryDoc.getFileVersion(), themeDisplay, StringPool.BLANK, false, true); %>
- Documento di identità: <%=fileEntryDoc.getTitle() %> + Documento di identit�: <%=fileEntryDoc.getTitle() %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/init.jsp index 5e1eafd9..69d433f3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/init.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="javax.portlet.PortletURL"%> <%@page import="com.liferay.portal.model.User"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp index d6ce6dcc..4d4959e0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="init.jsp" %> <% @@ -73,7 +72,7 @@ boolean isNoCNSUser = UserLocalServiceUtil.hasRoleUser(roleNoCNS.getRoleId(), th - + @@ -104,7 +103,7 @@ boolean isNoCNSUser = UserLocalServiceUtil.hasRoleUser(roleNoCNS.getRoleId(), th
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp index 8fdf5c93..d7e84048 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp @@ -1,10 +1,9 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="init.jsp" %>
-

La tua richiesta è stata acquisita con successo. Verrai contattato alla mail da te indicata non appena la tua richiesta verrà presa in gestione.

+

La tua richiesta � stata acquisita con successo. Verrai contattato alla mail da te indicata non appena la tua richiesta verr� presa in gestione.

diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp index ea877692..1f9a0000 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="init.jsp" %> <% @@ -10,7 +9,7 @@ boolean loggedUser = themeDisplay.isSignedIn();
- Per accedere a questa funzionalità bisogna essere loggati al portale. + Per accedere a questa funzionalit� bisogna essere loggati al portale.
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp index b6d6f3ec..b4e3d978 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.bo.util.SoggettiUtil"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> @@ -1400,7 +1399,7 @@ RichiestaAccessoAtti accettoAtti = RichiestaAccessoAttiLocalServiceUtil.getRichi

- Questo fascicolo non è disponibile sotto forma digitale. Potrà ritirare una copia cartacea presso uno degli Uffici del Settore Sismica. + Questo fascicolo non � disponibile sotto forma digitale. Potr� ritirare una copia cartacea presso uno degli Uffici del Settore Sismica.

diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp index 481185a6..522b9019 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp @@ -1,10 +1,9 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="../init.jsp" %>
-

La tua registrazione è andata a buon fine. Clicca qui per autenticarti al sistema.

+

La tua registrazione � andata a buon fine. Clicca qui per autenticarti al sistema.

diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp index b78222b5..bc6120f8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp @@ -1,8 +1,7 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="../init.jsp" %> - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/init.jsp index 11c883c0..f3db762d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-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-audit-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.project index 7b191d17..ed8b2e08 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.project @@ -5,6 +5,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.wst.jsdt.core.javascriptValidator @@ -32,5 +37,17 @@ org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + org.eclipse.buildship.core.gradleprojectnature + + + 1672931804000 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-display.xml index 1e0fdf2b..fe611ecc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-display.xml @@ -3,11 +3,11 @@ - + - + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-hook.xml index a7be6d90..4bc6119b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-hook.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-hook.xml @@ -1,7 +1,7 @@ - + portal.properties - content/Portal.properties + content/Portal.properties \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-portlet.xml index 91c1fe91..61eb1c71 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -4,17 +4,15 @@ 1 - /icon.png - - configuration - + /icon.png + configuration 6 /css/main.css - portos-audit-portlet + portos-audit-portlet 2 - /icon.png + /icon.png /css/main.css portos-audit-portlet true diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/service.xml index 26746469..42635d4f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/service.xml @@ -1,94 +1,81 @@ - + + Marco portos_AUDIT - - - - - - + + + - - - + + - - + - - - - + + + - - - - - + + + + - - - + + - - - + + - - + - - + - - - - - - + + + + + - - + - + - - + - - + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + \ No newline at end of file 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/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/init.jsp index 71379d79..f6d6d4c6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-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/portlet_2_0" prefix="portlet" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 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/.project b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.project index 43d3ec29..0526cdb6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804016 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.project index 14074ed1..5d02ff16 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804033 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-display.xml index c7391080..36126e25 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-display.xml @@ -2,7 +2,6 @@ - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-portlet.xml index fef1cebf..2e7165d6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,7 +2,6 @@ - 1 /icon.png @@ -16,21 +15,11 @@ /css/jquery-ui.css /css/main.css - - /js/jquery-ui.js - - - /js/perfect-scrollbar.js - - - /js/datepicker-it.js - - - /js/main.js - - - calendar-appointment-portlet - + /js/jquery-ui.js + /js/perfect-scrollbar.js + /js/datepicker-it.js + /js/main.js + calendar-appointment-portlet administrator diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/portlet.xml index 153f9034..8ef0284a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Calendar Appointment - - it.tref.portos.calendar.appointments.portlet.CalendarAppointmentPortlet - + it.tref.portos.calendar.appointments.portlet.CalendarAppointmentPortlet view-template /html/calendar_appointments/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service.xml index d66f0760..7d9bcae4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/service.xml @@ -1,107 +1,99 @@ - + + 3F Consulting portos_calendar_appointments - - - + - - - - - - + + + + + + - - - - + + + + - + - + - - + - - - - - - + + + + + + - - + + - - + - - - - - - + + + + + + - - - - - - + + + + + + - - + - - - - - - + + + + + + - - - - - + + + + + - - - + + - + - - + + - + - - DuplicateFunzionario DuplicateProfessionista DuplicatePrenotazione SlotNotAvailable - \ No newline at end of file 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 020f17e9..7600e88d 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 @@ -1,9 +1,13 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software - * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in - * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under the terms of the + * GNU Lesser General Public License as published by the Free Software Foundation; either version + * 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. */ package it.tref.portos.calendar.appointments.service.impl; @@ -42,12 +46,15 @@ import com.liferay.portal.service.UserLocalServiceUtil; /** * The implementation of the disponibilita remote 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.tref.portos.calendar.appointments.service.DisponibilitaService} interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun + * ServiceBuilder to copy their definitions into the + * {@link it.tref.portos.calendar.appointments.service.DisponibilitaService} interface. + * *

- * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. + * This is a remote service. Methods of this service are expected to have security checks based on + * the propagated JAAS credentials because this service can be accessed remotely. *

* * @author 3F Consulting @@ -56,109 +63,127 @@ import com.liferay.portal.service.UserLocalServiceUtil; */ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.portos.calendar.appointments.service.DisponibilitaServiceUtil} to access the disponibilita remote - * service. + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link + * it.tref.portos.calendar.appointments.service.DisponibilitaServiceUtil} to access the + * disponibilita remote service. */ - + 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 { - return disponibilitaLocalService.addDisponibilita(userId, funzionarioId, startDate, endDate, presidio, - serviceContext); + return disponibilitaLocalService.addDisponibilita(userId, funzionarioId, startDate, endDate, presidio, serviceContext); } - @Override public List addDisponibilitaGenerale(long presidio, long userId, Date dataInizioDisponibilita, - Date dataFineDisponibilita, String giornoSettimana, String oraInizioDisponibilita, - String oraFineDisponibilita, ServiceContext serviceContext) throws SystemException, PortalException { + Date dataFineDisponibilita, String giornoSettimana, String oraInizioDisponibilita, String oraFineDisponibilita, + ServiceContext serviceContext) throws SystemException, PortalException { // ciclo su tutti i funzionari e chiamo il service su ogniuno di essi List funzionari = new ArrayList(); - // List funzionari = funzionarioLocalService.findByPresidio(presidio); +// List funzionari = funzionarioLocalService.findByPresidio(presidio); List listDisponibilita = new ArrayList<>(funzionari.size()); long funzionarioId; for (Funzionario funzionario : funzionari) { funzionarioId = funzionario.getFunzionarioId(); - listDisponibilita.add(disponibilitaLocalService.addDisponibilita(userId, funzionarioId, - dataInizioDisponibilita, dataFineDisponibilita, presidio, serviceContext)); + listDisponibilita.add(disponibilitaLocalService.addDisponibilita(userId, funzionarioId, dataInizioDisponibilita, + dataFineDisponibilita, presidio, serviceContext)); } 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(); - + Organization org = OrganizationLocalServiceUtil.fetchOrganization(Long.parseLong(presidio)); - + SimpleDateFormat sfd = new SimpleDateFormat("dd/MM/yyyy"); Date dateVerifyTemp = sfd.parse(date); - + for (int i = 0; i < oreInizio.length; i++) { JSONObject jsonFiglio = JSONFactoryUtil.createJSONObject(); - + String oraInizio = oreInizio[i]; - + jsonFiglio.put("ora", oraInizio); - + Date dateVerify = formatDateTime(oraInizio, dateVerifyTemp); - - List lista = PrenotazioneLocalServiceUtil.findByDateHourFunzionario(dateVerify, - Long.parseLong(idFunzionario), org.getGroupId()); - - if (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); + + json.put("slot",array); return json.toString(); } - - @Override + + public String getDisponibilitaByDate(String presidio, String date) throws SystemException, ParseException { + // TODO permessi + Organization organization = OrganizationLocalServiceUtil.fetchOrganization(Long.valueOf(presidio)); + List userDefinitivo = new ArrayList(); + try { - if (organization != null) { + + 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 (!UserLocalServiceUtil.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); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); + JSONArray json = JSONFactoryUtil.createJSONArray(); for (User funzionario : userDefinitivo) { - List disponibilitaByFunzionario = disponibilitaLocalService - .findByFunzionarioStartAndPresidio(funzionario.getUserId(), startDate, organization.getGroupId()); + + List disponibilitaByFunzionario = + disponibilitaLocalService.findByFunzionarioStartAndPresidio(funzionario.getUserId(), startDate, organization.getGroupId()); if (disponibilitaByFunzionario.isEmpty()) { continue; } @@ -167,7 +192,7 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { jsonDisponibilita.put("idFunzionario", funzionario.getUserId()); JSONArray jsonOre = JSONFactoryUtil.createJSONArray(); for (Disponibilita d : disponibilitaByFunzionario) { - + JSONObject jsonSlot = JSONFactoryUtil.createJSONObject(); jsonSlot.put("inizio", sdf.format(d.getStartDate())); jsonSlot.put("fine", sdf.format(d.getEndDate())); @@ -181,7 +206,7 @@ public class DisponibilitaServiceImpl extends DisponibilitaServiceBaseImpl { return json.toString(); } - + private Date formatDateTime(String orario, Date day) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); Date data = sdf.parse(orario); 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 3dae128a..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"%> @@ -245,11 +244,11 @@ String dataFine = ParamUtil.getString(request, "dataFineRicerca","");
- - - - - + + + + + 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 93fcfaca..ac84ed62 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.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp index 329151a3..8056a9cf 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> <%@page import="it.tref.portos.calendar.appointments.service.PrenotazioneLocalServiceUtil"%> <%@page import="it.tref.portos.calendar.appointments.service.DisponibilitaLocalServiceUtil"%> @@ -44,7 +43,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- +
@@ -157,7 +156,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- +
@@ -263,7 +262,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- +
@@ -284,7 +283,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); className="it.tref.portos.calendar.appointments.model.Disponibilita" modelVar="disponibilita" > - + <% out.print(sdfGiorno.format(disponibilita.getStartDate()) + " dalle " + sdfOra.format(disponibilita.getStartDate()) + " alle " + sdfOra.format(disponibilita.getEndDate())); %> @@ -328,7 +327,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- + @@ -395,7 +394,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); out.print(funzionario.getFullName()); %> - + <% out.print(sdfGiorno.format(disponibilita.getStartDate()) + " dalle " + sdfOra.format(disponibilita.getStartDate()) + " alle " + sdfOra.format(disponibilita.getEndDate())); %> 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/.project b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/.project index 484c8979..50624e85 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804039 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/liferay-portlet.xml index d90e0741..b490ffd8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -5,14 +5,10 @@ 1 /icon.png - - configuration - + configuration 1.5 /css/main.css - - /js/main.js - + /js/main.js 1-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/portlet.xml index 6388b2b6..4d264ac4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-company-configuration-portlet/docroot/WEB-INF/portlet.xml @@ -1,12 +1,10 @@ - + 1 Company Configuration - - it.tref.liferay.portos.companyconfig.portlet.CompanyConfigurationPortlet - + it.tref.liferay.portos.companyconfig.portlet.CompanyConfigurationPortlet view-template /html/company_configuration/view.jsp 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 4866d541..7ab610cb 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,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.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 df8076e1..821789a6 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,4 +1,3 @@ -<%@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"%> 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-comunicazioni-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.project index 2a3de83b..28d50b7e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804049 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-display.xml index 21dfab52..a2648d0d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-display.xml @@ -2,7 +2,6 @@ - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-portlet.xml index 950a1514..5bfaf146 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,14 +2,11 @@ - 1 /icon.png /css/main.css - - /js/main.js - + /js/main.js 1-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/portlet.xml index fc7b26d9..7bc2de7c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 1 - - it.tref.portos.comunicazione.ComunicazioneMediata - + it.tref.portos.comunicazione.ComunicazioneMediata view-template /html/comunicazionemediata/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/common/submit_text_window.jsp b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/common/submit_text_window.jsp index d0b387c8..1dc5dd21 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/common/submit_text_window.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/common/submit_text_window.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-comunicazioni-portlet/docroot/html/comunicazionemediata/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/init.jsp index 505d90c5..ce630d4b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/init.jsp @@ -1,2 +1 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/init.jsp" %> \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/view.jsp index 212fff46..13ba98b7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/comunicazionemediata/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.Territorio"%> <%@page import="it.tref.liferay.portos.bo.shared.util.ActionKeys"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/init.jsp index 82b20551..7195cb85 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-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="java.text.MessageFormat"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/view.jsp index baf916d9..d9b0efec 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-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-cookies-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.project index cfa27f35..cfd7090b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804057 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + 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 f4efe922..7a11d3ba 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,9 +1,7 @@ - + portal.properties - - content/Language.properties - + content/Language.properties \ No newline at end of file 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 0deaecc7..ab7501ce 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,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-cookies-portlet/docroot/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/view.jsp index 8f7517bc..492629d1 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,4 +1,3 @@ -<%@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/.project b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.project index cb1c05a3..5672bcd5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804068 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml index 66de82b1..00892f95 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -5,15 +5,11 @@ 1 /icon.png - - configuration - + configuration 1.5 it.tref.liferay.portos.deployalert.control.DeployAlertControl /css/main.css - - /js/main.js - + /js/main.js notificator-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml index 11f54260..deb4c366 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml @@ -1,12 +1,10 @@ - + 1 Deploy Alert - - it.tref.liferay.portos.deployalert.portlet.NotificatorPortlet - + it.tref.liferay.portos.deployalert.portlet.NotificatorPortlet view-template /html/notificator/view.jsp 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 50d63c36..30ec5c4d 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,21 +1,15 @@ - + + Matteo DA - - - - - - - @@ -28,31 +22,17 @@ - - - - - - - - - - - - - - @@ -64,7 +44,7 @@ NotificationTipo - NotificationNomePlugin - NotificationNomeTemplate + NotificationNomePlugin + NotificationNomeTemplate \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/action/DeployAction.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/action/DeployAction.java index b7f251a3..22dd0302 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/action/DeployAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/action/DeployAction.java @@ -1,10 +1,5 @@ package it.tref.liferay.portos.deployalert.action; -import it.tref.liferay.portos.deployalert.constants.MailConstants; -import it.tref.liferay.portos.deployalert.util.DeployAlertUtil; - -import java.util.List; - import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.exception.PortalException; @@ -21,61 +16,78 @@ import com.liferay.portal.model.Company; import com.liferay.portal.service.ServiceContext; import com.liferay.portal.util.PortalUtil; -public class DeployAction extends SimpleAction { - - private final static Log _log = LogFactoryUtil.getLog(DeployAction.class); - - @Override - public void run(final String[] ids) throws ActionException { - - MessageBusUtil.registerMessageListener(DestinationNames.HOT_DEPLOY, new MessageListener() { - - @Override - public void receive(Message message) throws MessageListenerException { - - String evento = message.getString("command"); - String nomePlugin = message.getString("servletContextName"); - - if (evento.equals("undeploy") && nomePlugin.equals("portos-deploy-alert-portlet")) { - try { - NotificationLogLocalServiceUtil.addNotification(nomePlugin, evento); - } catch (PortalException | SystemException e) { - _log.error(e, e); - } - MessageBusUtil.unregisterMessageListener(DestinationNames.HOT_DEPLOY, this); - } else if (evento.equals("deploy") || evento.equals("undeploy")) { - try { - List notifications; - - NotificationLogLocalServiceUtil.addNotification(nomePlugin, evento); - - notifications = NotificationMailLocalServiceUtil.findNotifications( - PortalUtil.getDefaultCompanyId(), nomePlugin); - - for (int i = 0; i < notifications.size(); i++) { - - String templateName = notifications.get(i).getNomeTemplate(); - - if (templateName.equals(MailConstants.DEFAULT_TEMPLATE)) { - if (evento.equals("deploy")) { - templateName = MailConstants.DEFAULT_DEPLOY_TEMPLATE; - } else { - templateName = MailConstants.DEFAULT_UNDEPLOY_TEMPLATE; - } - } +import it.tref.liferay.portos.deployalert.constants.MailConstants; +import it.tref.liferay.portos.deployalert.model.NotificationMail; +import it.tref.liferay.portos.deployalert.service.NotificationLogLocalServiceUtil; +import it.tref.liferay.portos.deployalert.service.NotificationMailLocalServiceUtil; +import it.tref.liferay.portos.deployalert.util.DeployAlertUtil; +import it.tref.liferay.portos.mailmanager.shared.messaging.util.MailManagerUtil; - JSONObject parametri = DeployAlertUtil.getParametri(nomePlugin, evento); +import java.util.List; - ServiceContext serviceContext = DeployAlertUtil.getServiceContext(); - MailManagerUtil.sendMailByTemplateName(Company.class.toString(), - serviceContext.getCompanyId(), templateName, parametri, serviceContext); - } +public class DeployAction extends SimpleAction { - } catch (Exception e) { - _log.error(e, e); - } - } - } - }); - } + private final static Log _log = LogFactoryUtil.getLog(DeployAction.class); + + @Override + public void run(final String[] ids) throws ActionException { + /* + * ServiceContext serviceContext = DeployAlertUtil.getServiceContext(); try { + * PermissionThreadLocal + * .setPermissionChecker(PermissionCheckerFactoryUtil.create(UserLocalServiceUtil + * .getUser(serviceContext.getUserId()))); } catch (Exception e) { _log.error(e, e); } + * DeployAlertUtil.addDefaultDeployMailTemplate(serviceContext); + * DeployAlertUtil.addDefaultUndeployMailTemplate(serviceContext); + */ + + MessageBusUtil.registerMessageListener(DestinationNames.HOT_DEPLOY, new MessageListener() { + + @Override + public void receive(Message message) throws MessageListenerException { + + String evento = message.getString("command"); + String nomePlugin = message.getString("servletContextName"); + + if (evento.equals("undeploy") && nomePlugin.equals("portos-deploy-alert-portlet")) { + try { + NotificationLogLocalServiceUtil.addNotification(nomePlugin, evento); + } catch (PortalException | SystemException e) { + _log.error(e, e); + } + MessageBusUtil.unregisterMessageListener(DestinationNames.HOT_DEPLOY, this); + } else if (evento.equals("deploy") || evento.equals("undeploy")) { + try { + List notifications; + + NotificationLogLocalServiceUtil.addNotification(nomePlugin, evento); + + notifications = + NotificationMailLocalServiceUtil.findNotifications(PortalUtil.getDefaultCompanyId(), nomePlugin); + + for (int i = 0; i < notifications.size(); i++) { + + String templateName = notifications.get(i).getNomeTemplate(); + + if (templateName.equals(MailConstants.DEFAULT_TEMPLATE)) { + if (evento.equals("deploy")) { + templateName = MailConstants.DEFAULT_DEPLOY_TEMPLATE; + } else { + templateName = MailConstants.DEFAULT_UNDEPLOY_TEMPLATE; + } + } + + JSONObject parametri = DeployAlertUtil.getParametri(nomePlugin, evento); + + ServiceContext serviceContext = DeployAlertUtil.getServiceContext(); + MailManagerUtil.sendMailByTemplateName(Company.class.toString(), serviceContext.getCompanyId(), + templateName, parametri, serviceContext); + } + + } catch (Exception e) { + _log.error(e, e); + } + } + } + }); + } } 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 78a471b1..c9c20815 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,7 +45,6 @@ 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 9297ba1f..2940148c 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,7 +45,6 @@ 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/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/html/init.jsp index 0ae60c99..bb88947c 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,4 +1,3 @@ -<%@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 e2cef758..425e8af6 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,4 +1,3 @@ -<%@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 dd526767..ea913f23 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,4 +1,3 @@ -<%@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 eb713391..78964c30 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,4 +1,3 @@ -<%@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-fe-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.project index e1e8384b..b6daa15f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804074 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml index a2f2f563..2e2e0c7f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -1,13 +1,11 @@ - + + 1 /icon.png - - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - + com.liferay.portal.kernel.portlet.DefaultConfigurationAction /css/main.css?v=4 /js/main.js?v=4 1-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/portlet.xml index 7842760e..c6ec6b16 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Fascicolo Fe - - it.tref.liferay.portos.fe.portlet.FascicoloFePortlet - + it.tref.liferay.portos.fe.portlet.FascicoloFePortlet view-template /html/fascicolofe/view.jsp @@ -51,14 +48,14 @@ 0 text/html - view + view - content.Language + content.Language Ricerca Pratiche Ricerca Pratiche - + administrator @@ -83,14 +80,14 @@ 0 text/html - view + view - content.Language + content.Language Soggetti Pratica Soggetti Pratica - + administrator @@ -115,14 +112,14 @@ 0 text/html - view + view - content.Language + content.Language Allegati Pratica Allegati Pratica - + administrator @@ -136,21 +133,21 @@ user - - 5 - Parere Geologo - it.tref.liferay.portos.fe.portlet.ParereGeologoPortlet - - view-template - /html/pareregeologo/view.jsp - - - text/html - - content.Language - - Parere Geologo - Parere Geologo - - + + 5 + Parere Geologo + it.tref.liferay.portos.fe.portlet.ParereGeologoPortlet + + view-template + /html/pareregeologo/view.jsp + + + text/html + + content.Language + + Parere Geologo + Parere Geologo + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp index 008d6b0f..75fa3aaa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp @@ -1,10 +1,13 @@ +<%@page import="it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="java.util.Map"%> <%@page import="it.tref.liferay.portos.bo.shared.util.SessionUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> +<%@page import="it.tref.liferay.portos.bo.service.SoggettoServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.util.SoggettiUtil"%> +<%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%> <%@page import="it.tref.liferay.portos.bo.model.Soggetto"%> <%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> <%@page import="java.util.regex.Pattern"%> @@ -14,7 +17,6 @@ <%@page import="it.tref.liferay.portos.bo.model.Provincia"%> <%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.ComuneLocalService"%> -<%@page import="it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.Territorio"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp index abadf244..08630528 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp @@ -166,17 +166,12 @@ List tipologiaSoggetti = Arrays.asList(TipoSoggettoUtil.COMMITTENTE, Tip - Intervento in zona <%= Constants.ZONA_1.equalsIgnoreCase(territorio.getZona()) ? "1" : "2" %>
- Valore di AG: <%= dettPratica.getAg() %>
- - Tipo di intervento: - - <%= LanguageUtil.get(pageContext, "tc-adeguamento-sismico") %> - - e - - - - <%= LanguageUtil.get(pageContext, "tc-miglioramento-sismico") %> - - + + - Tipo di intervento: <%= LanguageUtil.get(pageContext, "tc-adeguamento-sismico") %>
+
+ + - Tipo di intervento: <%= LanguageUtil.get(pageContext, "tc-miglioramento-sismico") %>
+
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori_calcolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori_calcolo.jsp index dcbd6899..281f0b81 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori_calcolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori_calcolo.jsp @@ -13,8 +13,8 @@ <%@page import="java.text.NumberFormat"%> <%@ include file="/html/fascicolofe/init.jsp" %> <% -long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); -long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId"); +long intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0L); +long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId", 0L); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); FineLavori fineLavori = FineLavoriServiceUtil.getFineLavori(fineLavoriId); if (fineLavori == null) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp index 708a8be5..c9ec73d4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp @@ -1,6 +1,8 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> <%@page import="com.liferay.portal.kernel.util.HttpUtil"%> +<%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> +<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> <%@page import="com.liferay.portal.model.User"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> @@ -17,11 +19,15 @@ <%@page import="it.tref.liferay.portos.bo.shared.util.FirmeUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.bean.FirmeDetail"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> <%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%> <%@page import="it.tref.liferay.portos.bo.util.SoggettiUtil"%> <%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%> +<%@page import="java.text.DateFormat"%> +<%@page import="java.util.ArrayList"%> <%@page import="java.util.HashMap"%> <%@page import="java.util.Map"%> <%@include file="/html/soggettipratica/init.jsp"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.project index 65a765ba..85e082a1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804086 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + 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 967a6059..944195a7 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-firma-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-portlet.xml index c1abcb16..a50e6232 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,19 +2,14 @@ - firma /icon.png - - com.liferay.portal.kernel.portlet.DefaultConfigurationAction - + com.liferay.portal.kernel.portlet.DefaultConfigurationAction true /css/main.css - - /js/main.js - - firma-portlet + /js/main.js + firma-portlet administrator diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/portlet.xml index f39aaca8..1f22154d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/portlet.xml @@ -1,10 +1,6 @@ - - + firma Firma diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/action/StartUpAction.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/action/StartUpAction.java index cf4b194e..806f1700 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/action/StartUpAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/action/StartUpAction.java @@ -33,23 +33,28 @@ public class StartUpAction extends SimpleAction { for (String id : companyIds) { try { long companyId = GetterUtil.getLong(id); + String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE }; String[] guestActions = { ActionKeys.VIEW }; + // Organization custom fields addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url_pdf_extractor", ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions); - addExpandoColumnIfNotExists(companyId, Company.class.getName(), "url-bo-gestione-pratica-firma", - ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions); + addExpandoColumnIfNotExists(companyId, Company.class.getName(), + "url-bo-gestione-pratica-firma", ExpandoColumnConstants.STRING, true, false, + defaultActions, guestActions); } catch (Exception e) { _log.error("Errore nella procedura automatizzata di configurazione", e); } } } - private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, int type, - boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) throws SystemException { + private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, + int type, boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) + throws SystemException { long classNameId = PortalUtil.getClassNameId(className); + ExpandoTable expandoTable = null; try { expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, @@ -61,41 +66,62 @@ public class StartUpAction extends SimpleAction { } catch (PortalException e1) { } } - ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); + + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil + .getColumn(expandoTable.getTableId(), name); + if (expandoColumn == null) { + try { - expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type); + expandoColumn = ExpandoColumnLocalServiceUtil + .addColumn(expandoTable.getTableId(), name, type); + } catch (PortalException e) { } } + try { + if (indexed) { + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); } + if (hidden) { + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); } + Role roleGuest = RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST); Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER); Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER); - ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), - roleGuest.getRoleId(), guestActions); - ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), - rolePowerUser.getRoleId(), defaultActions); - ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), - ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), - roleUser.getRoleId(), defaultActions); + + ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, + ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, + String.valueOf(expandoColumn.getColumnId()), roleGuest.getRoleId(), guestActions); + ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, + ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, + String.valueOf(expandoColumn.getColumnId()), rolePowerUser.getRoleId(), defaultActions); + ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, + ExpandoColumn.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, + String.valueOf(expandoColumn.getColumnId()), roleUser.getRoleId(), defaultActions); } catch (PortalException e) { } + return expandoColumn; } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/portlet/FirmaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/portlet/FirmaPortlet.java index d740bf6d..39a39e12 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/portlet/FirmaPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/portlet/FirmaPortlet.java @@ -2,6 +2,9 @@ package it.tref.liferay.portos.firma.portlet; import com.liferay.util.bridges.mvc.MVCPortlet; +/** + * Portlet implementation class FirmaPortlet + */ public class FirmaPortlet extends MVCPortlet { public static void main(String[] args) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java index f947ce3b..af4c8de1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java @@ -1,5 +1,19 @@ package it.tref.liferay.portos.firma.servlet; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONDeserializer; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONSerializer; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.StreamUtil; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.service.ServiceContextFactory; + +import it.tref.firma.shared.Risposta; import it.tref.liferay.portos.firma.util.FirmaGetUtil; import it.tref.liferay.portos.firma.util.FirmaPostUtil; @@ -13,18 +27,9 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONDeserializer; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONSerializer; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.servlet.ServletResponseUtil; -import com.liferay.portal.kernel.util.StreamUtil; -import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; +/** + * Servlet implementation class FirmaServlet + */ public class FirmaServlet extends HttpServlet { @@ -44,10 +49,17 @@ public class FirmaServlet extends HttpServlet { private static final Log _log = LogFactoryUtil.getLog(FirmaServlet.class); + /** + * @see HttpServlet#HttpServlet() + */ public FirmaServlet() { super(); } + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse + * response) + */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { @@ -57,16 +69,20 @@ public class FirmaServlet extends HttpServlet { FirmaGetUtil firmaGetUtil = new FirmaGetUtil(); String metodo = pathArray[0]; Risposta risposta = new Risposta<>(); + switch (metodo) { case GET_CONFIGURATION: risposta = firmaGetUtil.getConfiguration(); break; + case GET_TYPE: risposta = firmaGetUtil.getType(); break; + case GET_TYPE_VERBALE: risposta = firmaGetUtil.getTypeVerbale(); break; + case LOGIN: if (pathArray.length == 2) { String codiceFiscale = pathArray[1]; @@ -78,32 +94,44 @@ public class FirmaServlet extends HttpServlet { risposta = firmaGetUtil.loginNomeCognome(nome, cognome); } break; + case VERSION: risposta = firmaGetUtil.version(); break; + case GET_STILE: risposta = firmaGetUtil.getStile(); break; + } JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); jsonSerializer.exclude("*.class"); String jsonResponse = jsonSerializer.serializeDeep(risposta); + response.setContentType("application/json; charset=UTF-8"); ServletResponseUtil.write(response, jsonResponse); + } + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse + * response) + */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String pathInfo = request.getPathInfo().substring(1); String[] pathArray = StringUtil.split(pathInfo, "/"); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); StreamUtil.transfer(request.getInputStream(), outputStream); String token = new String(outputStream.toByteArray(), StandardCharsets.UTF_8); + FirmaPostUtil firmaPostUtil = new FirmaPostUtil(); String metodo = pathArray[0]; Risposta risposta = new Risposta<>(); + switch (metodo) { case GET_FILE: if (pathArray.length == 3) { @@ -112,15 +140,18 @@ public class FirmaServlet extends HttpServlet { risposta = firmaPostUtil.getFile(token, tipo, id); } break; + case GET_FILE_LIST: risposta = firmaPostUtil.getFileList(token); break; + case OPEN_PRATICA: if (pathArray.length == 2) { String idFile = pathArray[1]; risposta = firmaPostUtil.openPratica(token, idFile); } break; + case RIFIUTA: if (pathArray.length == 5) { String idFile = pathArray[1]; @@ -130,6 +161,7 @@ public class FirmaServlet extends HttpServlet { risposta = firmaPostUtil.rifiuta(token, idFile, messaggio, cambiaFase, assegna); } break; + case SET_FILE: if (pathArray.length == 3) { String tipo = pathArray[1]; @@ -144,14 +176,17 @@ public class FirmaServlet extends HttpServlet { } catch (PortalException | SystemException e) { _log.error(e.getMessage()); } + risposta = firmaPostUtil.setFile(map.get("token"), map.get("file"), tipo, idFile, serviceContext); } break; } + JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); jsonSerializer.exclude("*.class"); String jsonResponse = jsonSerializer.serialize(risposta); + response.setContentType("application/json; charset=UTF-8"); ServletResponseUtil.write(response, jsonResponse); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaGetUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaGetUtil.java index f53a33f9..596e07ff 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaGetUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaGetUtil.java @@ -1,26 +1,27 @@ package it.tref.liferay.portos.firma.util; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; + import it.tref.firma.shared.Risposta; import it.tref.firma.shared.RispostaCostanti; import it.tref.firma.shared.Stile; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; -import java.util.Arrays; +import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; - @SuppressWarnings("serial") public class FirmaGetUtil { - private static final Map configurazione = new HashMap(54) { + private static final Map configurazione = new HashMap() { { put("MESSAGGIO_FIRMA_ERRORE_RECUPERO_FILE", "Errore durante il recupero del file"); put("MESSAGGIO_FIRMA_FILE_OK", "File caricato e salvato correttamente"); put("MESSAGGIO_EFFETTUARE_LOGIN", "Effettuare il login per continuare"); put("ERRORE_TOKEN_SCADUTO", "Effettuare il login, sessione scaduta"); - put("MESSAGGIO_RIFIUTO_ERRORE", "Si è verificato un errore durante il tentativo di rifiuto del file"); + put("MESSAGGIO_RIFIUTO_ERRORE", + "Si è verificato un errore durante il tentativo di rifiuto del file"); put("RIFIUTA", "true"); put("APRI_PRATICA_DISABILITATO_PER_DOCUMENTO", "v"); put("MESSAGGIO_FIRMA_ATTESA", "Attesa"); @@ -74,14 +75,16 @@ public class FirmaGetUtil { put("RIFIUTA_DISABILITATO_PER_DOCUMENTO", "v"); put("MESSAGGIO_FIRMA_COPLETATA", "Procedura di firma completata con successo"); put("MESSAGGIO_RIFIUTO_COPLETATA", "Procedura di rifiuto completata con successo"); - put("MESSAGGIO_FIRMA_ERRORE_BLOCCANTE", "Attenzione errore imprevisto durante la procedura di firma"); - put("MESSAGGIO_RIFIUTO_ERRORE_BLOCCANTE", "Attenzione errore imprevisto durante la procedura di rifiuto"); + put("MESSAGGIO_FIRMA_ERRORE_BLOCCANTE", + "Attenzione errore imprevisto durante la procedura di firma"); + put("MESSAGGIO_RIFIUTO_ERRORE_BLOCCANTE", + "Attenzione errore imprevisto durante la procedura di rifiuto"); put("MESSAGGIO_FIRMA_IN_CORSO", "Firma dei file in corso..."); put("SELEZIONA_DOCUMENTO_SENZA_VISUALIZZAZIONE", "Documento senza visualizzazione"); } }; - private static final Map mappa = new HashMap(9) { + private static final Map mappa = new HashMap() { { put(StatoPraticaConstants.CONFORME, "CONFORMITÀ"); put(StatoPraticaConstants.AUTORIZZATA, "AUTORIZZAZIONE"); @@ -98,14 +101,24 @@ public class FirmaGetUtil { private static final Stile stile = new Stile() { { setLogo("iVBORw0KGgoAAAANSUhEUgAAAUoAAAAyCAIAAAC1TQVKAAAi8UlEQVR42u2dCVxNW/vHd1zh4qrc6+W9RaFzqtOkIoRSlMgYIrpSyCxDyCVuKFFJA5EhJYmEyJWZUNKkaNag8Qwls2T4/87ZOvY9nXMq1y33/Z/nsz7ns/c+a6+99t7ru57nWXvtZxPW+lK+Qzp4t/2xJdOGth1CDh36JBGJtIhU6apWaqmyGHSWukqVCr1ajUw0XqJTfmkCy1WqNA6SCq1Smcai06rU6FWqdI5q/e6qvPSlBOqCQPncfVkMVQ6NzupLY6rQn65e0QInTuzZLPUirGOphlyJdLcWS/HtZCIkeEukpaRCncFUUuYoKnN6K7N60dgKyp9TL0oS2KKgzKlPVQrKrN68pIjduYmXhyyH1qAEmpACFXjH7Y064F86W5H2dIVjS+Ad6EV8KJeq8elU2kNOgrdE/ieFrU4H2GwlGpOhwqHToUI5NBrvV2iifVlAZl7+KmUkWhVvgaP8eWN9UZQFmrAtWFZjcPQHsZH667BAeO8WxPtTFfGhuE2Va5fSXyR4S+R/UFjqNE4vGlNN9dX1S3UF+XWP8+sKHn9JjylbyAX+lvqFdwX577i/nxN133eUJFgyL70jS3hSXPuk+OW5M0x1LXaflsUb6X1OG/aqriWdJXhL5H9N4C3DNubQVeoKC5u148ePH9+9e1ddXV1YWJienp6SkpKampqZmVlaWvrixYv3798jQ7MKfHM/gampxeml/KyF8f7EId6l/MC0lin5sUmIFkp3y5eWK5TgLZHvXqrVuP4wjOS6woImUg16Hz58FBYWtmzpUsNhwwbq6fXX0tbR1sZvfy2twfr6ZqamLi6bzp8/X1RcXFv7rul4sxmawLumpfHmEf72unSFqWxJ+0b4zJCW3auguHzMmD19lQG5BG+JfPd403h4FzYKNofDiY4+ZzvbdtBAfVU63XqG9e+/b/D09PT399+7N3DPnj2+vr4e2z1Wrlw1zmJcP6U+xkZG69atS0pKevXqVeN4JwFvrarerYI3Ept4fal9ma6cKMKfSHdLk5bdpK4ZdepUUVFR1MmTkTTVJxK8JfKv0N5F4vAGn5cuXbKxsVFTUZliOSVwb2B6ekZNTc3b2toPHz7wzXB0ATDLX79+w2azb8XF/bF580gTEz0d3dWrVmdlZ9fV1X3HeFcRH5nEi/COZWrCdXKqtKyLKuNIcPDr16+xP07eZ/Hi/PYSvCXyL8YbxJaVlW/atEmDwZg0ceKZM2eALpBuSuFwzgsKCn18dg/WHzR86LDjx4+LUeNvWx1vLuElUjUBnUp7CertuPZyLoaGMefPk2xDcAkO+PrekO1B5imW7pYsLZshLfdEgrdEvkfjvEAo2w8epM+0ngm/2tt7V0VFRXMHzCBQ2unp6UuXLtVQY2zZsoXJYgnNVsvDm92rVfHmPioraFO1qUvJL1/YvtJeduMcu7t37uJMYJxUV1eTdkhebm64hhbJc1I72Tlt2m9s27FIgrdEviO86Z/xbqC9QXJi4v0x5mOMjUbAMq+trf3qo6CoqurqAP8ALXUNBweHsrIyoXhzvge8kepy2rKX/FTSmcv2xR+7rbW3z87OBtiZmZknT55cu3YtuiucEuzzAFvbHJ7GDvyhc982bY1VVC50kG0i3tD/8+bNI3jSpUsXHR0dFxeXrKysrzgZGEWamppTp05FJf+Ji1VYWLht27ZBgwahnqht9+7dcSkaPSg1A2TYsGE4x7dv3/7TtZVIo8Y5Wm9qaupos9GTJ026f/9+E61x8YI7GxYWBkNgwYIFbDZHuPZW+A7w5j4qS/uh8jeZ6x1k182fn5OdjfN//Pixm5vblClTGGpqDx8+xAVCh3ciOPhBO9l86W5O/5UfOGCAOoPh3a5TYfPx5ouamlppael3hXdVVRXAplYSeONqSPD+9+JdWlo2Y8aMkSYmYPsrDHJRAiJCQ0N1tft7eOx48+bN94o3nHA2kR7efsPMqVDUH3iSnJx85MiRgZqay5cvf/bsGVnKnbi4+B69LrfrOqpfPyNDw2FDh1p1lU1rJ9t0vPv06cNkMrEKrx7dB+A5c+YMVtlstqenJ7gyMzM7fPgwf9ACDhKygRMDA4NJkyaBmd27dwsAgwKxrwFPvLy8UBQfNiMjIx8fH/xOmzYtPj6eLFPUsUhJSkpCrbZu3SqwXeCgqJirqyu2oBCo+pcvXzYFbzSI8PDwZcuWGRsbI8P+/fvJZiGqtqLyS6QRvCm+N67thg0btDW1rl69+k30NlVwOzw8PDQZ6mfPnqUW3mp4f2ATBalEYSpRW1HPNofISpBa62gYf/cumiBqibZ74sSJuQYGszvLnD9/nl/v+4mJYVo6f0rLjNLWBkvq6uoWv3RP/Sq8Ibdu3QJIAAy+/cKFC6kKMyAgAL0suoDp06cLKPxdu3ZRgXn37p2AUYCiUCCZh7odsD19+lTUsfhXCqYKbHKUCccBhQvFG9vt7e2pNgh6wKbg3bBW165d4xfesLai8ktEJN4KymzaF7xxZy9evAj8fHf7Uu/mNxRoi7n2c4cPHVZQUCDoe7c83rWVxJqlHaZM1A7eY3rljFrSNaWTh2lrVlpev34duuLJkyfhYWEb5s3z+qXnvXYyK3UHwJ7hl5KRkeE5wji5nawtjT5x4sT+WlpLu8o+qp/uUizdLVda7mJ3+RM9FG60l30sFm+y20N7RfcB0xcGsLe3N27A8+fPoaUHDBiADLm5uSBt/fr1WMa1w74bN27EDaMCk5+fj33h/7x48QKM2draYhWZyTzm5ua4+th9zZo1KAroijoWdWjU39+f9LrBGNRpXl6eAN4oH4XY2dlVV1ejPmBYoFai8Cb7LBwaV+P27dtk78YvvGFtReWXSBO1N4vFmjplqtU0q8rKSoEBcPxVU1PTXFu9YX5suXv3rp6Ozvbt2/k9SKvh/Z5FXD0ttchhYmJi4tUrsRf/PHfpUmxxcRF0RVxc3JIFEyLW/vdRT1lyLupGq+kAnl8Klt2mzyiQllvfRXachcVvAwZGSnfN4eFdJN0tqusvWxcuPLx//xJ7++2yv2RLyzXqe8MQ5XA4qElDnxz1yc7OFsAbihflUIFJSEhA/mPHjpFHQevHKgoUsKUjIiKwHZlFHUvgepWUlMDcwuFQAZAMTU4tEJ5LQ9Ka6HvDMoIGPnnyJOx/FB4UFNTQ8ufXVlR+iYjBG9r7HQ9vgBcZeUpdjRETEyOAZXZ2zoTx43fs2NH0eaZoeEVFRcHBwdA6AsMo0IuurlsGDRiYlZXdyngjvaskzhztsmLZrIAAvzt37qByaEAHDx5c42iaHidVm9+maluX0u7dEtvJbl60GArqTb1AVW6ysgL5nj90Gqav70NXdW7b8Va7rpekZQLke2/ftBm68cb16ztGjUrnMS8ebzTWtLQ0/NUQORIMOLRQaNTtqKQADELxhsUhAExUVBS2o5cVdSxRFw5OCvKcOnWKWiDpn38F3riA6KTQoUA/r1y5UhTe/NqKyi8R4Xir/mVoDdbctKlTrWdYow0L5Lx8+bIqnW5vZ9eUGaboGp7W1KDPNR89up+ikpGhYUhICNQStct4kJ4+QFcPth55B0nfm9VaQ2sgPC+JOH6grcvaoX/++WdqauqWP5ziYzvCM+e9VdaWtfSn2B+7mtNo8H4nT548bdo0LMydO9emV2+oZbcucv169TLt0Mnyxy7LpTuvdHCIPHkSpk5mZqaLqdmDenNdjHF+9OhRtGAoJSyTRjhsG9JIRk7+Y8nw8HD8haZvbGy8Z88emNMCMJDG+fz580njfPbs2VTjvCEwYo5FCvJXVVXhX9LqhmeOHWNjY6kFkhY+HAGofZTQdOMcnghKO336NPZCH4GawBEQg7eo/BIRob3pVLxTUlL1dPUOHw4WUN3vP3xAW1JW6jNYX58/EiTmARhuxAIHB3QH8LHPno1etmyZlrrGTOuZV69e5bt1WFi8aLHVtGlkV/KW90pJK4+cf+QQZY8Ij009F9gPv3K6/Ztyoo7JTbUVxNWAtvYMutXUqePGjVNRUdHT0zMwMFBUVNSTl3ft0MWiq6y8vLxKz56BHX7a0/6noH37yCa+z8/vTOcmDa3BzkcJY8eOhW+JS4OWTdWo8KV5s38/wiLlP52aMGECdBcwpsIAJ2rRokXUfZcuXcofWmsIjKhj8a9UeXk5KknNMGjQINRZYAAc/chXDK3BViK9er7gL/QmomorKr+E5EbwLizAPd2/P4hBV8nJyeErYdI3xk1xdnbuq6ikokx7lJkppkDcjoCAPZoM9dFmZlBFuPIoBPf6/PmYCeMnaDAY3t7epOlHOgLoMu4nJbU+3q9KieIHRH4SUZRGpN+Wclwov9OVcfxgn5OH+54K0QwOaGdh1l1bWxuoqKurjx49Gmxv3Lixf//+aIIqffuq0Gijhg934znYme1kF5iMLC4uxhkGeXllUl4sE4M3Vp2cnNB2SQ8Tu6N8cIIDrVq1Kjo6mnzSvmXLFhqNBhOd38phLQvAgIsOo4h8MObr60t2n6KAEXUs6nNvWN1LlizB7uAT/Ush7/UjgQJLS0vJQszMzFDJJj4YQ+cC9YvVWbNmQScfOnRo1KhRqLCYzkhofgnJjeKNK/+bzW/z5s7DranvuCuio8+h4YFPi7FjgWI/JSX+k4hnz5+XlZXxM5OC7mDZ0qXGRsYwS6k6AMuwEGGlL1q4iG/eox8ZamAAu4DbdJMSWK1lnL9jEnf+lLKeIjfGTG/S2B5Oy3qbjNA1MBiiqalhbj56pIkJlCqUNmgcPnw48O7bt6+cnJyWlhaAR1OTkZFRlpf3UlDMrh9UOyTbPSYmBk0z0Ns7Xlr2W01KTUlJAdUHDhwggbly5QpWYS1L2rFEGsUbWgS2N7wwcko1uN28efOSxUtAY1FRESxteNEgHK0LNALXsLBjo0xGXr585a941y1fvtxirAWngcWEnnechQXUAP+9DA6natLEiehQoJbqn3v3a2m8YZCnxxETzOUsLMYaGRlBw0D/rFphO22inOkow1kzp4aGhvr5+f36668whoG3qakptAocbzAPM1VBQaFfv34456NeXsmdu5MYX+rUbdeOHejqwkJDg3sqfCu88/LyYJMLTCBLTk6WtGOJCJUqNRpL4fPIOfStjpb2jh07ampqnj59CkMdSGsyGOnpGQkJ92h9+5mZjVZXVVu/fn0tIK6rc3V17afUB/mpo+LYzsN7rHC8x1osWrSYr71hLzg4ONjNsaupeQbjnMXQZLU83nlJhLNjW10djfHjx8P7hXk5bIhybGS7fbuIc8ekvNwnpaamrl27tmvXrpMmTfL09MQqejuYIvHx8Y6OjjDUsQsuCnSp/3BDckbqrU4/+7m741rk5+d7DzZ4/I3wRrd648aNZcuW4YiwGtatWwd9LmnEEhElHFUu3kw67d3j/Dt37mppaA7WHzRr5szpVlZaDHV1NTUAvHq107p1zgP1Bty4edNhPpfG58+fA9GpllOgz7GFap/XvX/vuNxxDG8+ggi8vxjnaK6lpTDwywDCGx7elfItiDf0dnUBsX8Xoa3xH3V1VS1NTSWlXiZGvQJ2tHlZwvXGk69JWU7Uh3cHnOAkQ7c7OzsD6cTERHi8K1asgLepqqoqKysLcx3Lq2xsEjt+xtvffTs5oLVx/vykevtc8saYRFoUb572ZtFobx89uHT5ysIFC9B6V61ctXLFCuiGu3fjZ8+erUqjI8EDhfXu7e090pi7ACZ1tLWB96CB+nDRSe+aHCuB9h47ZgyLxRZqnM+fNw+mAezWWtgA9cJ95nI/gdnCQ2vA+2kBER9L7HYnfLd3DPZvs8+buHuRANvsXOJYEN1muta0adNGjBgB1a2oqDhw4ECcP5xwLy8vWOm6uro2NjYaGhowkuGKW1tbr12x4mT3X4Hxza7/ORUWRo5jnzp58krHz++BS/CWSEsKG3j3UmbTucY5+CTfaOYLqDt7Nhr+NtIc2zlva2tPnYqCPs/MzEpNTdNQYwBvrN5LTHzx4oWHx47ff/995cqVcODHmI9p+PwMpjjwZqiowmM3G2U62tTMzNTU3Mz8N5vfkJk0zlvB9/7A4T70RqpjcsfYaiuJnMQ2m5wtwsPD7O3tYWwMHToUfgj0NoPBuHjxYmRk5O3bt2GNx8bGRkREYOO8efNmzpwJ+FevWuXdU/6xtNxN2R6xZ8+STktGRoa3KqNQgrdEWsv35uEN7VpeXi7wlKGkpAR6GwwHBQWBfxjwQD0uLi429hJAHTxoML2fckhISEbGQzW6yvBhw6xnzJg1c9bSJUtZDcI2AG8nJyewAGrm2tvb2dnZzraFCzB+3HgmiwW8Oa3+xth7FpF0rf1qR8u0tDS4tXPnzt22bRv4RO8FZxsAu7u7Z2ZmhoaGXrp0KS8vz8XFZdiwYbdu3YIxk5CQgNVp5uY+fZVjOv8ctGsX+VAR13SLvf3jBrPWJCKRf1qq6/Gu4w6tZY01H3PwwEHqU0800Q2/b1Cl069eu4btubm5sMZXrXJavtxRXVXNbfsOED5p4qRly5ZrMtRv3Lj5nCfAoeGrZtj9JU/wL/kL/3zG9OlI/KG11gzn8J5NJF9vv2GdXX5+Pt/TqK2tJS8HDAwbm1l6errwsYH9mjVr0FeZmpqGh4eTYwnkc2k4Hmeiopx1dFeMG0e+MYOignx8ktpL8JZIy+P9ZdZaZSUT6LrzRnypeSoqKrKzs8npj2jkFmMteDGPtYcOGVJaWoZ2Dn2uokwbOsSgsrEJbYK2Q3W15eTJ8+fN5z4Ya91pLfDDn6R3cN1oS32LjYQWkKelpQb47zjk3/ewv9S4sUPhkMP20NLSgivOf/eb2iNGRUUZqDG8PD3RjaGEY6GhJ3ooNMSbGq3F2NjYzc2NP6PoH4158D8ZUOGfOCnqbJx/40nx3xgjjfOpU6aiyYmZVf7q9WvrGdZwuWl9+61e7YSO4MyZM6RzDmXW3BdI8/LyDQYP8fPz4w+tMVve9yZt8txEmb2+jmCb1NU4MfRkWE1MTNzuvtnHXT/jTgf458+KiJ1/dFdSUgLhk8f393HX3hPgVVxcLNAj4lLCRd/h4UG+enXzxo0AhsYT0Xg3jNbybRsrTgrdtry8PPm6WwvgLXDE/w94/xOn/DdPqkqVO7TGqR9aCwzcBwUO6kTlR54NGzZwR9QUlYKCDmA1PT1duU9f4B0REdGsd0WROTr6HPa9dy/xE29SKrNVnntDb+ckSru5LiS5ApmxsbG+vrsdHObPmDbCz6NnZjz3ORm/Izgd0r1z5849e/Z0mN2ZlUM8vNPed8fkY2HBT54U8y35T7x34sgZueQAhrOx8cO/vhBK4s2flArriHzfG9a+wH0ll9HOdu7caWBgMH/+fFz0T6JDl5D5LS0t0Tdt3boVphf53hh/kjaOKFC4kZHRrl27ULitre3ly5cDAwPJUDAhISH8nktoUBdRYVUEjghPTGgMGYF2TK3zpxYMWSPqSgrgLT6sTcNTFlN/oZFtGlas0ZA4os70s/b+6xtjSUlJOlrauKdiQIXh2U+JO33twoULyEaa67r9dZo7wwKXdPmy5VMsp5BvBPAmpWqyevVrhXAOntsm5ubmkudcXV0Nk3vd2pV2dnMmTxzuvKJb5l2ptxVfVP2lU1I///yzjIwMQ1U+OqxNHZN4W04kXvnloL/JvoDtaWlpgJk/L48UrG5duSpRWlYM3pBHjx7BSt+8ebPA61YNQ5QMGDCA/96F+FAnKDAzM7NRvAkRgt3BG2nOCA3qIiqsisARcVWFxpARwJta55YMWSPqSlLxbjSsTcNTFppfTGQbURUTExJH1JkK4s1737umhvtCqI2NTcP3+flyLzFRuU8fHW3tBw8e8JruG19fv/Xr1wuEf2hUHj58OEBXD/eFrAxvUqomuxXwriACfFZTo7ejUwQ86ClhnMfFxTmvXXTisNLzYq6eR/4b0VKajF9kZWX09PTsbPTDg9oUpnIjOqGcwoQfLlgruFlaBrhvDw8NvXH9Oux2NMe8vDwnK6vkxvAuLCzs3r27o6OjQIQGfugSEmmYT7iLd+7cER/qBF3A1atXcVc+8kSUcc4vnMPhoDSYBqDr3r17uCvnzp1DmcHBwdhFVFAXMWFVqEcUFUNGAG9qnVsyZI2oK0nFu9GwNgKnLCq/mMg2DSvWaEgc8Re2WpVOxZv3FlekCo0eE3NBlALPy89nqKoaDjcsKirieyh1dc1zDXDKuBRwBDIePvz82Ox+K71SUsciTh3p7b/bJf5uHJoOqKZqFdzvmpqa06cjPVzNk69JV2ZJvSkjLp4gls3/6T/dZfooyS+Z1/VyVBt2LneW2ycO8Tq+XfFomUft5c516xnE0PA3NNo2duy64YYRXbjfHhSPN3n/VqxYIRRvvoUGAPgRF5sS6kS87y2QGRoG5ZC2cU5ODpZ9fX0/CYswQQZ1ERVWReCIomLIiHEyWzJkjagrScW70bA2AqcsKn+jkW2oFWs0JI74C/slznl9MKbKSubkSZOhw0V9b4DN5syYPgNHRLP/arqSkpIH6ult2bKFHzvgs3HeKiPnsL1LMtpk3+t0KkTN3XXOwQN+0dGnoUvJHh23jZw9fuzY0Y3rJgZ604MD9KLDfnCw7Tx48KDQkEM73RzWOtLcNkjdPEfUlhGvznUo05fjfwUhW1ruobTwWWsCeMOwR8OCVynUOOffe/jGZEiDJoY6aRbeKIG0jfkqF/bVJ9EBZES9udkUvKlR65qC9z8XskbUlRSPt8CQW6N4k/kbjWxDrVijIXHEX1iBcA5kJWNiYjQZ6oGBgUJHwnEgWE+VTOZXB0iGcbHAwWGEoRGU5ZdJL7wHY6xWGTn/8gEDFlcJ5ye3jT2lcOzAcI+tNocOBuI+QUugVaErAlp+fn7o5gO9+1yIkBpv3tV2tpWZmRmDwfjvf3vq67Y7e5SofSL1IqxjmYZco18poeINw3vdunUkt0IJhHWHCqDHcXFxIY3zJoY6IW/qzp07wSqplr8Cb1FBXcTgTT2iqBgyYvBuyZA1oq4kFe9Gw9oInLKo/I1GthGFt9AdxV9YoXHO0ZKdnZ2hXW/cuPENg5zzR9T8/fy1NbWOH4+gjvZ/9r2/kzjn5Ig6K0cq937by1Fd3DcP9/XZBqsYLYmccH9kj2r1Y+L2BWK3e3vlfr/S6XSA2qNHj9EmHWOOE++KpGq8OpXKN463QAc/aNAg6hivqNEvAwMD9JFNDHVCChnsidQh2Le5eIsK6iImSgT1iGh8QmPIiMG7JUPWiLqSVLwbDWsjcMqAUGj+RiPbiMJb6I6izlQM3p94oYGmWFqONBmZkpLyDQnHcSMjT+loa8N1EogD0ZqhFMWnD2yu9f44uU2gN2O3jwfYAIH7fdRfl3EnugHyVYu76vRnKMj/2qtXr27duk0ZR+QkEu+L2lRt6FLStUl4k9NaPDw8Cuu/w9wQb1h9yIObCiVPmj1NDHVS73RVwqtHIUJHzhvF+5OIoC5i8KYekRytbBhDRvwD3hYLWSPqSgo8GBMf1qbhKYvKLz6yjSi8he4o6kxFGed8QwNgjzYzgx8OP/mbfMyAnAMzWF/fbo5dWXk5VmFpov7k0+IPz57dCQo6umDB68f5X1E4Wiz8jqZH3SL2enUnR8Kbnl6XQlf3vHAhBnivWWlVlc9X8sTlKMJrC2Fh+sME87ZOS4gHt7gD6XW5bVgrupb89Be8jzd/Uqrkqz1UkYSsaeasNeFfCAVyCQn3TEeZjjQxgVla+/c+aQDrCfhBb8+xtS0qKiovL4dWMDI0NBg8ZN3atWfPngXkkZGRWBZ4ZtxEycnJsZ4xA+5JU/H297J5WtA8vJEqsoilCy2h1pYtsWbn/UXD11YSrFwCKh2qHqsfyW+VpfzAnClTUv8Z8Lh2MqcjIiR4/x2RhKxpDt502MNiPgCcmpo2cfwEuMp+fn7MrxpOe//hQ15evtNqJ02GOiyXktJS6G3f3b6D9PXv37//8OHDgwcPwrb6wM2Why3gnPxi371799IfPADtWM3KzEROVAAZsBHGFPoLLKckJ5NzgTgcDhwo0m9F+dnZ2dgdNiY5OojM2VncLRkZGaSdRYSF+Bc9aDbe0MlHAuQPHAgK9KaB5MZ3gWF/o12FuSxJ+FWZ/9zjPYaR4P13prtKQtY0Q3sr0KgfIWp4MUtKSjb8vgFwWk6eHBMTw59q2TjY79/DWYDSNjE2Hqint39/EPn+BZBzdXXV0e6flJSELfx3y0OOhNjOnv38+fPbcXEmI4wXL15MfjgBzdvdzc189Gj8O3fuXC0Nzd27d2/bunX+vHkoBBm4nxB/8GCAnl5qaioKh6UGo2D58uVmpqZ79+7lRkzhveWFArEdPQvyEwkJ8fev9mmufc6btdZm9nSlwrQ2Td2FTbw6275MR65QuluI+diiwkJJs5NICxrnIrU3VX9cuHDByspKja4yY/r04OAjWVlZ4JB8KkzNSY7Yk0/vd+7cOXbMGA0GA10tVqmP2aCKZ1rPBJw2s2bt37ePxWLx8a6pqQGT2F5aUlpZWVnO89KB9/Chw4qLuJ8GWr1qNUhGlw2dvGfPHhwCWp2PNxZQ7Pnz51HnEp6gSszKysLCQuwOtsE8VgnsExSwiD+ZvOkJLndRGtGsfuEjk3gR3jFXRXa/mzsqLWl2Emk541zY0JpQNQ7TNyoqarqV1QBdPXBuO9v2jz/+8PHxgWl97tx5+M8hISHeXt7r16+fNnWaslIfALlo4aKbt241fGkSyAFUmMoHDhyANnZ0dIQRztfeT4qLwbC9nZ2npyesdO4UNzc3uOVkB+Ht7Q3dTmJy+fLlUSYjy8rK+HjHnI+BS0/9SPbLly/R0cAzRwLbyF9RUUFwP3R2J+70UYMm2dh/O9UWSoVvHJjYfMtcIhL5erwZNFZvelV/nbonxU10fJ49ew6HHFjOnGE9dIjBAF1deOZI/bW4v3o6utgIqiMiTuTk5AgdJ4N3DQihPsmICSAZ1MHm5+ONv8AkzFhY4A4ODugdgPd6Z2cq3uRDgYZ4x8fHYyEhIQE9CIqqrq6GCwA/n/zOWURExGe8P/HCx1y5fOH4QWNOXpc65j/I9tty4s6ffU5HhX7dsKFEJPJ1wlSjs/rQOfqD60pLmrUjaYQzmazsnJzk5JSEhHuQ1LQ0KFsQ1dBopwpInv3bb9CxcJt37doFGv18fcEeiTf+3e7ujoX9+/fD93ZxcQHJTccbWt3JyQk+9r7AfVDXmzZtevToEemKc+MgWlh8wZschXv06GHwQc+z4RMy47sXpHC/VSIqMbO/fAOc/2WypwVcc11o4uQRJRlE5t0uJ45Ynzt3SmKWS6SFhQXfW4nG1BvwJjGhrrzsPTWVlYpJdQIL5dxUJyybsI0lz3Ozbx05tGvqRKS7YaEv8vNqiwoveXoGTrZ8lpWFDgKuvr+/f2RkJDQw+ak5+AXkbJyLFy/CXX/Lm+oHqoOCgjgcDlQ9PHZyNh60PawD7H769Gly6A6ef0BAQGxs7P3795Ef5RPUqwClWlxcnJR0P/bimeizYcLTmdCT4btC9lneuUh7VcqNpnojmhZ+cPrJY1uuXw6+dT3s1rWjf57bE3F0y/FQVzJFhu+IPhNy6+a1kpISgXgPEpFICwhbVQXGOVtRmTlsaLXJiGpjSjIyFJOq6n+r6pc5SIafV9lGw6kZ2PV5hCa2sWGVoSFz4EC2IncYv4VmrQl1PMj5jKIExgM6htiL5w/6mYUGzbp06QIsDXga1Ay1fxVs/CZTgiQika8xzlVV2ErK7N40Di+Bc3ZvZe6vIu+73yISi5eY9Qvs+uWKXv0EtlAXRCZFGkuRVqnEnWDDVGo9vJsoIDYlJSUrM1PyFFoi37lw+qty6HS2Kp2jQquii0l0XuIvf/mL8znRq1Tof/lXhf55LxWBfT+vcviFKPMSuYsK/emqFS1w4v8HAP08pG3KN4QAAAAASUVORK5CYII="); - setListNumrodlfProperty(Arrays.asList("nimrodlf.p1=#CE0006", "nimrodlf.p2=#D80010", "nimrodlf.p3=#E2001A", - "nimrodlf.s1=#D6D6D6", "nimrodlf.s2=#E0E0E0", "nimrodlf.s3=#EAEAEA", "nimrodlf.w=#FFFFFF", - "nimrodlf.b=#000000", "nimrodlf.menuOpacity=195", "nimrodlf.frameOpacity=180")); + setListNumrodlfProperty(new ArrayList() { + { + add("nimrodlf.p1=#CE0006"); + add("nimrodlf.p2=#D80010"); + add("nimrodlf.p3=#E2001A"); + add("nimrodlf.s1=#D6D6D6"); + add("nimrodlf.s2=#E0E0E0"); + add("nimrodlf.s3=#EAEAEA"); + add("nimrodlf.w=#FFFFFF"); + add("nimrodlf.b=#000000"); + add("nimrodlf.menuOpacity=195"); + add("nimrodlf.frameOpacity=180"); + } + }); } }; public Risposta> getConfiguration() { - Risposta> risposta = new Risposta<>(); risposta.setRisposta(RispostaCostanti.OK); risposta.setObj(configurazione); @@ -113,7 +126,6 @@ public class FirmaGetUtil { } public Risposta> getType() { - Risposta> risposta = new Risposta<>(); risposta.setRisposta(RispostaCostanti.OK); risposta.setObj(mappa); @@ -121,7 +133,6 @@ public class FirmaGetUtil { } public Risposta> getTypeVerbale() { - Risposta> risposta = new Risposta<>(); Map mappa = new HashMap<>(); risposta.setRisposta(RispostaCostanti.OK); @@ -130,15 +141,16 @@ public class FirmaGetUtil { } public Risposta loginCodiceFiscale(String codiceFiscale) { - javax.portlet.PortletPreferences jxPortletPreferences = FirmaUtil.getPortletPreferences(); String codiceFiscaleTest = jxPortletPreferences.getValue("codiceFiscaleTest", StringPool.BLANK); + Risposta risposta = new Risposta<>(); if (codiceFiscale.equals(codiceFiscaleTest)) { String tokenTest = jxPortletPreferences.getValue("tokenTest", StringPool.BLANK); risposta.setObj(tokenTest); risposta.setRisposta(RispostaCostanti.OK); } else { + // TODO da migliorare per sicurezza e poi modificare a giro risposta.setObj(codiceFiscale); risposta.setRisposta(RispostaCostanti.OK); } @@ -146,7 +158,6 @@ public class FirmaGetUtil { } public Risposta loginNomeCognome(String nome, String cognome) { - javax.portlet.PortletPreferences jxPortletPreferences = FirmaUtil.getPortletPreferences(); String nomeTest = jxPortletPreferences.getValue("nomeTest", StringPool.BLANK); String cognomeTest = jxPortletPreferences.getValue("cognomeTest", StringPool.BLANK); @@ -155,12 +166,13 @@ public class FirmaGetUtil { String tokenTest = jxPortletPreferences.getValue("tokenTest", StringPool.BLANK); risposta.setObj(tokenTest); risposta.setRisposta(RispostaCostanti.OK); + } else { + // TODO } return risposta; } public Risposta version() { - javax.portlet.PortletPreferences jxPortletPreferences = FirmaUtil.getPortletPreferences(); String versione = jxPortletPreferences.getValue("versione", StringPool.BLANK); Risposta risposta = new Risposta<>(); @@ -172,10 +184,9 @@ public class FirmaGetUtil { } public Risposta getStile() { - Risposta risposta = new Risposta<>(); risposta.setRisposta(RispostaCostanti.OK); risposta.setObj(stile); return risposta; } -} +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaPostUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaPostUtil.java index f9e3c3d6..fb99e891 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaPostUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaPostUtil.java @@ -1,23 +1,5 @@ package it.tref.liferay.portos.firma.util; -import it.tref.firma.shared.RestFile; -import it.tref.firma.shared.Risposta; -import it.tref.firma.shared.RispostaCostanti; -import it.tref.liferay.portos.bo.model.Avviso; -import it.tref.liferay.portos.bo.model.IntPratica; -import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; -import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Locale; - -import org.apache.commons.io.IOUtils; - import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.language.LanguageUtil; @@ -38,6 +20,24 @@ import com.liferay.portal.util.PortalUtil; import com.liferay.portlet.documentlibrary.model.DLFileEntry; import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; +import it.tref.firma.shared.RestFile; +import it.tref.firma.shared.Risposta; +import it.tref.firma.shared.RispostaCostanti; +import it.tref.liferay.portos.bo.model.Avviso; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Locale; + +import org.apache.commons.io.IOUtils; + public class FirmaPostUtil { private static final Log _log = LogFactoryUtil.getLog(FirmaPostUtil.class); @@ -45,59 +45,76 @@ public class FirmaPostUtil { public Risposta> getFileList(String token) { /** - * Verificare che il token sia il codice fiscale altrimenti c'è un metodo che estrae il cod fisc dal token - * userCodiceFiscalePrimaFirma = al cod fisc di Avviso...tipoAvviso = S && fileEntryIdInvio = 0 && - * fileEntryIdBase != 0 && !rifiutato (aggiungere campo al service e anche campo dtRifiuto) con il - * fileEntryIdBase prendo il file e uso per riempire lista di ritorno - * - * NEL RITORNO "tipoDocumento" è documenttype con intPraticaId faccio fetch su tabella intPratica e prendo campo - * tipopratica + * Verificare che il token sia il codice fiscale altrimenti c e un + * metodo che estre il cod fisc dal token userCodiceFiscalePrimaFirma = + * al cod fisc di Avviso...tipoAvviso = S && fileEntryIdInvio = 0 && + * fileEntryIdBase != 0 && !rifiutato ( aggiungere campo al service e + * anche campo dtRifiuto) con il fileEntryIdBase prendo il file e uso + * per riempire lista di ritorno + * + * NEL RITORNO "tipoDocumento" è documenttype con intPraticaId faccio + * fetch su tabella intPratica e prendo campo tipopratica + * */ long[] companyIds = PortalUtil.getCompanyIds(); Risposta> risposta = new Risposta>(); for (long companyId : companyIds) { + Company company = null; try { company = CompanyLocalServiceUtil.getCompany(companyId); } catch (Exception e) { _log.error(e, e); } - String urlPdfExtractor = (String) company.getExpandoBridge().getAttribute("url_pdf_extractor", false); + String urlPdfExtractor = (String) company.getExpandoBridge().getAttribute("url_pdf_extractor", + false); if (Validator.isNotNull(urlPdfExtractor)) { byte[] fileArray = Base64.decode(token); + List listaCodiciFiscali = FirmaUtil.getCodiceFiscale(fileArray, urlPdfExtractor); String cf = listaCodiciFiscali.get(0); + List listaFile = new ArrayList(); + try { List listaAvvisi = AvvisoLocalServiceUtil.getListaAvvisiPerApplet(cf); if (Validator.isNotNull(listaAvvisi) && listaAvvisi.size() > 0) { + for (Avviso avviso : listaAvvisi) { + if (Validator.isNotNull(avviso.getFileEntryIdBase())) { DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso .getFileEntryIdBase()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso .getIntPraticaId()); if (Validator.isNotNull(fileEntry)) { + RestFile restFile = new RestFile(); restFile.setIdFile(GetterUtil.getInteger(avviso.getAvvisoId())); restFile.setDataInvio(new Date()); + String tipoDocumento = avviso.translateTipoDocumento(); + restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY restFile.setNomeFile(LanguageUtil.get(Locale.ITALIAN, tipoDocumento) + StringPool.SPACE + StringPool.DASH + StringPool.SPACE + intPratica.getTitle(Locale.ITALIAN, true)); - restFile.setFile(StringPool.BLANK); + restFile.setFile(""); + Group group = GroupLocalServiceUtil.getGroup(avviso.getGroupId()); - Organization organization = OrganizationLocalServiceUtil.getOrganization(group - .getOrganizationId()); + Organization organization = OrganizationLocalServiceUtil + .getOrganization(group.getOrganizationId()); restFile.setTipoPratica(organization.getName()); + listaFile.add(restFile); } } } } + risposta.setObj(listaFile); risposta.setRisposta(RispostaCostanti.OK); + } catch (Exception e) { _log.error(e.getMessage(), e); risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); @@ -109,90 +126,125 @@ public class FirmaPostUtil { public Risposta getFile(String token, String tipo, String id) { - /** - * verra passato l avviso id facciamo query per riprendere file entry e ritorniamo quel file con il contenuto + /* + * verra passato l avviso id facciamo query per riprendere file entry e + * ritorniamo quel file con il contenuto */ + Risposta risposta = new Risposta(); + try { + Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(id)); if (Validator.isNotNull(avviso)) { + if (Validator.isNotNull(avviso.getFileEntryIdBase())) { - DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso.getFileEntryIdBase()); + DLFileEntry fileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(avviso + .getFileEntryIdBase()); if (Validator.isNotNull(fileEntry)) { + RestFile restFile = new RestFile(); restFile.setIdFile(GetterUtil.getInteger(avviso.getAvvisoId())); restFile.setDataInvio(new Date()); restFile.setDocumentiType(avviso.getTipoDocumento()); // TO-VERIFY - restFile.setNomeFile(fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension()); + restFile.setNomeFile(fileEntry.getTitle() + StringPool.PERIOD + + fileEntry.getExtension()); restFile.setTipoPratica(StringPool.BLANK); + // Inserisco il contenuto del file in Base64 InputStream fileInputStream = DLFileEntryLocalServiceUtil.getFileAsStream( fileEntry.getFileEntryId(), fileEntry.getVersion()); ByteArrayOutputStream bao = new ByteArrayOutputStream(); IOUtils.copy(fileInputStream, bao); restFile.setFile(Base64.encode(bao.toByteArray())); + risposta.setRisposta(RispostaCostanti.OK); risposta.setObj(restFile); + } } } + } catch (SystemException | PortalException | IOException e) { _log.error(e.getMessage(), e); risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); } + return risposta; } public Risposta openPratica(String token, String idFile) { /** - * mi arriva l'avviso id e mi recupero l'intpraticaid bisogna ritornare ad una pagina privata di bo con la view - * sistemata per gestire direttamente la pratica portos-bo-portlet fascicolo portlet ..... intpraticaid + * mi arriva l'avviso id e mi recupero l intpraticaid bisogna ritornare + * ad una pagina privata di bo con la view sistemata per gestire + * direttamente la pratica portos-bo-portlet fascicolo portlet ..... + * intpraticaid */ Risposta risposta = new Risposta(); + try { + Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile)); if (Validator.isNotNull(avviso)) { + // Prendo la url della pagina da ritornare settata nel expando // custom field della company // di riferimento e ci aggiungo nella url l attributo relativo // all id della intPratica Company company = CompanyLocalServiceUtil.fetchCompany(avviso.getCompanyId()); if (Validator.isNotNull(company)) { + String urlToBack = GetterUtil.getString(company.getExpandoBridge().getAttribute( "url-bo-gestione-pratica-firma", false)); - urlToBack = urlToBack + "&_1_WAR_portosboportlet_intPraticaId=" + avviso.getIntPraticaId(); + + urlToBack = urlToBack + "&_1_WAR_portosboportlet_intPraticaId=" + + avviso.getIntPraticaId(); risposta.setObj(urlToBack); risposta.setRisposta(RispostaCostanti.OK); } + } + } catch (SystemException e) { _log.error(e.getMessage(), e); risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); } + return risposta; + } - public Risposta rifiuta(String token, String idFile, String messaggio, String cambiaFase, String assegna) { + public Risposta rifiuta(String token, String idFile, String messaggio, String cambiaFase, + String assegna) { /** - * mi arriva l'avviso id lo recupero e setto rifiutato e dtRifiuto e aggiorno + * mi arriva l'avviso id lo recupero e setto rifiutato e dtRifiuto e + * aggiorno + * + * */ Risposta risposta = new Risposta(); + try { + Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile)); if (Validator.isNotNull(avviso)) { avviso.setRifiutato(true); avviso.setDtRifiuto(new Date()); avviso.setCommentoRifiuto(Validator.isNotNull(messaggio) ? messaggio : StringPool.BLANK); + AvvisoLocalServiceUtil.updateAvviso(avviso); risposta.setObj(true); risposta.setRisposta(RispostaCostanti.OK); + } + } catch (SystemException e) { _log.error(e.getMessage(), e); risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); } + return risposta; } @@ -200,19 +252,27 @@ public class FirmaPostUtil { ServiceContext serviceContext) { /** - * Mi arriverà l avviso id e il contenuto e creerò un file entry e aggiornerò l'avviso con il fileEntryIdInvio - * per la creazione del fileentry devo vedere SchedulerGeneraDocumento per creare il filename e la folder + * Mi arriverà l avviso id e il contenuto e creero un file entry e + * aggiornero l avviso con il fileEntryIdInvio + * + * per la creazione del fileentry devo vedere SchedulerGeneraDocumento + * per creare il filename e la folder + * */ Risposta risposta = new Risposta(); + try { Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(GetterUtil.getLong(idFile)); if (Validator.isNotNull(avviso)) { + // CREO IL FILE serviceContext.setCompanyId(avviso.getCompanyId()); serviceContext.setScopeGroupId(avviso.getGroupId()); serviceContext.setUserId(avviso.getUserId()); - avviso = AvvisoLocalServiceUtil.addFileFirmato(avviso.getAvvisoId(), avviso.getClassPk(), fileToSave, - serviceContext); + + avviso = AvvisoLocalServiceUtil.addFileFirmato(avviso.getAvvisoId(), avviso.getClassPk(), + fileToSave, serviceContext); + risposta.setObj(true); risposta.setRisposta(RispostaCostanti.OK); } @@ -221,6 +281,7 @@ public class FirmaPostUtil { risposta.setObj(false); risposta.setRisposta(RispostaCostanti.ERRORE_APPLICAZIONE); } + return risposta; } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaUtil.java index bf9b3966..73b4db92 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/FirmaUtil.java @@ -39,11 +39,11 @@ public class FirmaUtil { } catch (SystemException e) { _log.error(e.getMessage()); } + return jxPortletPreferences; } public static List getCodiceFiscale(byte[] fileArray, String urlPdfExtractor) { - List listaCodiciFiscali = null; HttpClient client = null; try { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-jbpm-log-task-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-jbpm-log-task-portlet/.project index ddd2cf09..f3401f58 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-jbpm-log-task-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-jbpm-log-task-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804115 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.project index ec7efd4d..ca9dcbd4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804122 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-display.xml index a32d3be7..348c8921 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/liferay-display.xml @@ -2,7 +2,6 @@ - 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 85e5b7bd..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,7 +2,6 @@ - 1 diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/portlet.xml index 7c458b9b..399003b8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Kaleo Controller Portlet - - com.liferay.util.bridges.mvc.MVCPortlet - + com.liferay.util.bridges.mvc.MVCPortlet 0 text/html 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 42f28a77..932d6932 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,325 +1,233 @@ - + + 3FC portos_kaleo_controller - - - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + - - + - - - + - - - - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + - - + - - - + - + - + - - - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + - - - + - + - + - - - + - - - + - - - + - - - - - - - + + + + + - - - - - - - - - + + + + + + + - - + - - - - - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + - - + - - - + + - - - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + - - + - - + - - - - - - - + - - - + - - - - - - - + + + + + - - - - - - + + + + - - + - - - - \ No newline at end of file + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.properties b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.properties index 12ee760b..e69de29b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.properties @@ -1,13 +0,0 @@ -IX_4052E28=kaleoinstance.ClassPK - -IX_DD3686D9=kaleoinstancetoken.ClassPK - -IX_391060DE=kaleolog.CompanyId -IX_169323D4=kaleolog.KaleoDefinitionId -IX_56A01716=kaleolog.KaleoInstanceId - -IX_5D4AA65B=kaleotaskassignmentinstance.CompanyId -IX_38229C51=kaleotaskassignmentinstance.KaleoDefinitionId -IX_C9BD8AD3=kaleotaskassignmentinstance.KaleoInstanceId - -IX_3E673D5E=kaleotaskinstancetoken.ClassPK \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.sql b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.sql index a32f8ad8..8b137891 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/indexes.sql @@ -1,13 +1 @@ -create index IX_4052E28 on kaleoinstance (classPK); -create index IX_DD3686D9 on kaleoinstancetoken (classPK); - -create index IX_391060DE on kaleolog (companyId); -create index IX_169323D4 on kaleolog (kaleoDefinitionId); -create index IX_56A01716 on kaleolog (kaleoInstanceId); - -create index IX_5D4AA65B on kaleotaskassignmentinstance (companyId); -create index IX_38229C51 on kaleotaskassignmentinstance (kaleoDefinitionId); -create index IX_C9BD8AD3 on kaleotaskassignmentinstance (kaleoInstanceId); - -create index IX_3E673D5E on kaleotaskinstancetoken (classPK); \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/tables.sql index 63d5adb3..8b137891 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/tables.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/sql/tables.sql @@ -1,143 +1 @@ -create table kaleoinstance ( - kaleoInstanceId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoDefinitionName VARCHAR(200) null, - kaleoDefinitionVersion INTEGER, - rootKaleoInstanceTokenId LONG, - className VARCHAR(200) null, - classPK LONG, - completed BOOLEAN, - completionDate DATE null, - workflowContext TEXT null -); -create table kaleoinstancetoken ( - kaleoInstanceTokenId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoInstanceId LONG, - parentKaleoInstanceTokenId LONG, - currentKaleoNodeId LONG, - currentKaleoNodeName VARCHAR(200) null, - className VARCHAR(200) null, - classPK LONG, - completed BOOLEAN, - completionDate DATE null -); - -create table kaleolog ( - kaleoLogId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoClassName VARCHAR(200) null, - kaleoClassPK LONG, - kaleoDefinitionId LONG, - kaleoInstanceId LONG, - kaleoInstanceTokenId LONG, - kaleoTaskInstanceTokenId LONG, - kaleoNodeName VARCHAR(200) null, - terminalKaleoNode BOOLEAN, - kaleoActionId LONG, - kaleoActionName VARCHAR(200) null, - kaleoActionDescription STRING null, - previousKaleoNodeId LONG, - previousKaleoNodeName VARCHAR(200) null, - previousAssigneeClassName VARCHAR(200) null, - previousAssigneeClassPK LONG, - currentAssigneeClassName VARCHAR(200) null, - currentAssigneeClassPK LONG, - type_ VARCHAR(75) null, - comment_ TEXT null, - startDate DATE null, - endDate DATE null, - duration LONG, - workflowContext TEXT null -); - -create table kaleonode ( - kaleoNodeId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - name VARCHAR(200) null, - metadata STRING null, - description STRING null, - type_ VARCHAR(75) null, - initial_ BOOLEAN, - terminal BOOLEAN -); - -create table kaleotask ( - kaleoTaskId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoNodeId LONG, - name VARCHAR(200) null, - description STRING null -); - -create table kaleotaskassignmentinstance ( - kaleoTaskAssignmentInstanceId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoInstanceId LONG, - kaleoInstanceTokenId LONG, - kaleoTaskInstanceTokenId LONG, - kaleoTaskId LONG, - kaleoTaskName VARCHAR(200) null, - assigneeClassName VARCHAR(200) null, - assigneeClassPK LONG, - completed BOOLEAN, - completionDate DATE null -); - -create table kaleotaskinstancetoken ( - kaleoTaskInstanceTokenId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoInstanceId LONG, - kaleoInstanceTokenId LONG, - kaleoTaskId LONG, - kaleoTaskName VARCHAR(200) null, - className VARCHAR(200) null, - classPK LONG, - completionUserId LONG, - completed BOOLEAN, - completionDate DATE null, - dueDate DATE null, - workflowContext TEXT null -); \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml index ad3265cc..6e71ac33 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -6,47 +6,33 @@ - - 200 - + - - 200 - + - - 200 - + - - - + - - 200 - + - - 200 - - - 200 - + + @@ -56,73 +42,45 @@ - - 200 - + - - 200 - + - - 200 - + - - 200 - - - - + + - - 200 - - - 200 - + + - - 200 - + - - - + - - - + - - 200 - + - - 200 - - - - - - - + + + @@ -132,28 +90,20 @@ - - 200 - + - - 200 - - - - + + - - 200 - + @@ -161,12 +111,8 @@ - - 200 - - - 200 - + + @@ -176,28 +122,20 @@ - - 200 - + - - 200 - - - 200 - + + - - - + \ No newline at end of file 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/KaleoInstanceModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceModelImpl.java index 8ec08320..8c473e7c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceModelImpl.java @@ -76,9 +76,9 @@ public class KaleoInstanceModelImpl extends BaseModelImpl { "classPK", Types.BIGINT }, { "completed", Types.BOOLEAN }, { "completionDate", Types.TIMESTAMP }, - { "workflowContext", Types.CLOB } + { "workflowContext", Types.VARCHAR } }; - public static final String TABLE_SQL_CREATE = "create table kaleoinstance (kaleoInstanceId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(200) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,kaleoDefinitionName VARCHAR(200) null,kaleoDefinitionVersion INTEGER,rootKaleoInstanceTokenId LONG,className VARCHAR(200) null,classPK LONG,completed BOOLEAN,completionDate DATE null,workflowContext TEXT null)"; + public static final String TABLE_SQL_CREATE = "create table kaleoinstance (kaleoInstanceId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,kaleoDefinitionName VARCHAR(75) null,kaleoDefinitionVersion INTEGER,rootKaleoInstanceTokenId LONG,className VARCHAR(75) null,classPK LONG,completed BOOLEAN,completionDate DATE null,workflowContext VARCHAR(75) null)"; public static final String TABLE_SQL_DROP = "drop table kaleoinstance"; public static final String ORDER_BY_JPQL = " ORDER BY kaleoInstance.kaleoInstanceId ASC"; public static final String ORDER_BY_SQL = " ORDER BY kaleoinstance.kaleoInstanceId ASC"; 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/KaleoInstanceTokenModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenModelImpl.java index 694cd240..d3aed695 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoInstanceTokenModelImpl.java @@ -78,7 +78,7 @@ public class KaleoInstanceTokenModelImpl extends BaseModelImpl { "currentAssigneeClassName", Types.VARCHAR }, { "currentAssigneeClassPK", Types.BIGINT }, { "type_", Types.VARCHAR }, - { "comment_", Types.CLOB }, + { "comment_", Types.VARCHAR }, { "startDate", Types.TIMESTAMP }, { "endDate", Types.TIMESTAMP }, { "duration", Types.BIGINT }, - { "workflowContext", Types.CLOB } + { "workflowContext", Types.VARCHAR } }; - public static final String TABLE_SQL_CREATE = "create table kaleolog (kaleoLogId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(200) null,createDate DATE null,modifiedDate DATE null,kaleoClassName VARCHAR(200) null,kaleoClassPK LONG,kaleoDefinitionId LONG,kaleoInstanceId LONG,kaleoInstanceTokenId LONG,kaleoTaskInstanceTokenId LONG,kaleoNodeName VARCHAR(200) null,terminalKaleoNode BOOLEAN,kaleoActionId LONG,kaleoActionName VARCHAR(200) null,kaleoActionDescription STRING null,previousKaleoNodeId LONG,previousKaleoNodeName VARCHAR(200) null,previousAssigneeClassName VARCHAR(200) null,previousAssigneeClassPK LONG,currentAssigneeClassName VARCHAR(200) null,currentAssigneeClassPK LONG,type_ VARCHAR(75) null,comment_ TEXT null,startDate DATE null,endDate DATE null,duration LONG,workflowContext TEXT null)"; + public static final String TABLE_SQL_CREATE = "create table kaleolog (kaleoLogId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,kaleoClassName VARCHAR(75) null,kaleoClassPK LONG,kaleoDefinitionId LONG,kaleoInstanceId LONG,kaleoInstanceTokenId LONG,kaleoTaskInstanceTokenId LONG,kaleoNodeName VARCHAR(75) null,terminalKaleoNode BOOLEAN,kaleoActionId LONG,kaleoActionName VARCHAR(75) null,kaleoActionDescription VARCHAR(75) null,previousKaleoNodeId LONG,previousKaleoNodeName VARCHAR(75) null,previousAssigneeClassName VARCHAR(75) null,previousAssigneeClassPK LONG,currentAssigneeClassName VARCHAR(75) null,currentAssigneeClassPK LONG,type_ VARCHAR(75) null,comment_ VARCHAR(75) null,startDate DATE null,endDate DATE null,duration LONG,workflowContext VARCHAR(75) null)"; public static final String TABLE_SQL_DROP = "drop table kaleolog"; public static final String ORDER_BY_JPQL = " ORDER BY kaleoLog.kaleoLogId ASC"; public static final String ORDER_BY_SQL = " ORDER BY kaleolog.kaleoLogId ASC"; 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/KaleoNodeModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeModelImpl.java index 43ed4d78..db886f80 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoNodeModelImpl.java @@ -76,7 +76,7 @@ public class KaleoNodeModelImpl extends BaseModelImpl { "initial_", Types.BOOLEAN }, { "terminal", Types.BOOLEAN } }; - public static final String TABLE_SQL_CREATE = "create table kaleonode (kaleoNodeId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(200) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,name VARCHAR(200) null,metadata STRING null,description STRING null,type_ VARCHAR(75) null,initial_ BOOLEAN,terminal BOOLEAN)"; + public static final String TABLE_SQL_CREATE = "create table kaleonode (kaleoNodeId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,name VARCHAR(75) null,metadata VARCHAR(75) null,description VARCHAR(75) null,type_ VARCHAR(75) null,initial_ BOOLEAN,terminal BOOLEAN)"; public static final String TABLE_SQL_DROP = "drop table kaleonode"; public static final String ORDER_BY_JPQL = " ORDER BY kaleoNode.kaleoNodeId ASC"; public static final String ORDER_BY_SQL = " ORDER BY kaleonode.kaleoNodeId ASC"; 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/KaleoTaskAssignmentInstanceModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceModelImpl.java index 782f9dae..2445a932 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/model/impl/KaleoTaskAssignmentInstanceModelImpl.java @@ -79,7 +79,7 @@ public class KaleoTaskAssignmentInstanceModelImpl extends BaseModelImpl { "name", Types.VARCHAR }, { "description", Types.VARCHAR } }; - public static final String TABLE_SQL_CREATE = "create table kaleotask (kaleoTaskId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(200) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,kaleoNodeId LONG,name VARCHAR(200) null,description STRING null)"; + public static final String TABLE_SQL_CREATE = "create table kaleotask (kaleoTaskId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,kaleoNodeId LONG,name VARCHAR(75) null,description VARCHAR(75) null)"; public static final String TABLE_SQL_DROP = "drop table kaleotask"; public static final String ORDER_BY_JPQL = " ORDER BY kaleoTask.kaleoTaskId ASC"; public static final String ORDER_BY_SQL = " ORDER BY kaleotask.kaleoTaskId ASC"; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/scheduler/SchedulerKaleoController.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/scheduler/SchedulerKaleoController.java index b4e11705..cdbad433 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/scheduler/SchedulerKaleoController.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/scheduler/SchedulerKaleoController.java @@ -275,6 +275,8 @@ public class SchedulerKaleoController implements MessageListener { private void patchTaskEsitiForWF(List lista){ + _log.info("start patchTaskEsitiForWF"); + for (Object[] objs : lista) { long kaleotaskinstancetokenid = Long.parseLong(String.valueOf(objs[0])); long kaleoinstancetokenid = Long.parseLong(String.valueOf(objs[1])); 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 f93fd729..2d6fdbbb 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,7 +42,6 @@ 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 2dd77050..10fe5da0 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,7 +42,6 @@ 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 817c5f9d..0e5be2f3 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,7 +43,6 @@ 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 9f907a69..3994fd81 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,7 +41,6 @@ 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 09958d33..8c9cebdb 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,7 +42,6 @@ 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 de6890dc..edcca85d 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,7 +42,6 @@ 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 618d8192..db1afa49 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,7 +40,6 @@ 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/.project b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/.project index 59a67b56..af3ed5c3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804133 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + 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/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/portlet.xml index 4d2e9298..8d2b2939 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Workflow Form - - it.tref.liferay.portos.kaleo.portlet.WorkflowFormAdminPortlet - + it.tref.liferay.portos.kaleo.portlet.WorkflowFormAdminPortlet view-template /html/workflow_form_admin/view.jsp 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..3fcf70c9 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,132 +1,94 @@ - + + portos_Kaleo - - - - + - - - + - - - - - - - - - - - - - - + + + + + + + + + - - + - - - + - - - + + - - - + + - - - - + + + - - - - - + - - - + - - - - - - - - - - - - + + + + + + + + + - - + - - - + - - - - + + + - - + - - - - - - - - - - + + + + + - + - - + - - - - + + + - - FormDefinitionLinkName FormDefinitionLinkDefinitionName diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLink.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLink.java index 62274c69..376961f4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLink.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLink.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkClp.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkClp.java index 9d467176..72350ae6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkClp.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkModel.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkModel.java index 92cb5294..2490f680 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkModel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkSoap.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkSoap.java index 213024f7..07e8ee93 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkSoap.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkWrapper.java index 2a31e408..c92b402f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormDefinitionLinkWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLog.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLog.java index 3e261bbd..7c75db1c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLog.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLog.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogClp.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogClp.java index 3c07adc4..fcc67e64 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogClp.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogModel.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogModel.java index 9c79e63b..da3863d7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogModel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogSoap.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogSoap.java index c7b04cab..bf77e76f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogSoap.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogWrapper.java index 50346647..6715b5b0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormLogWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLink.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLink.java index 9060de3e..c9e131f7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLink.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLink.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkClp.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkClp.java index 99430cbf..5bf0918d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkClp.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkModel.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkModel.java index fbb732c3..38a43aea 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkModel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkSoap.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkSoap.java index 7cf3623c..423f3295 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkSoap.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkWrapper.java index 5db1bde1..67db3613 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/model/FormTemplateLinkWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/ClpSerializer.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/ClpSerializer.java index 8d92154d..ee409f53 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/ClpSerializer.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/ClpSerializer.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalService.java index 904804bb..a0e1501f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceClp.java index 210bb86b..b517e8b1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceClp.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceUtil.java index c40c50f1..7a6ab258 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceWrapper.java index 339ff6f6..92154ab5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormDefinitionLinkLocalServiceWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalService.java index 734cc378..d8b7064b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceClp.java index c5d897aa..54b962af 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceClp.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceUtil.java index c3a40c89..93422dd8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceWrapper.java index 5441cc67..6a4b54d6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormLogLocalServiceWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalService.java index 323b1911..d72b7cc9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceClp.java index 8c62ed94..d55a77ca 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceClp.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceUtil.java index 317daefd..f726baa4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceWrapper.java index 145549b8..bbdbb617 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/FormTemplateLinkLocalServiceWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/messaging/ClpMessageListener.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/messaging/ClpMessageListener.java index e2d5f75f..628eaaae 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/messaging/ClpMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/messaging/ClpMessageListener.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkActionableDynamicQuery.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkActionableDynamicQuery.java index 775cbfd2..248bb126 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkActionableDynamicQuery.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkActionableDynamicQuery.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkPersistence.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkPersistence.java index cccd395f..3e5d962a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkPersistence.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkPersistence.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkUtil.java index a321230f..38bbcf03 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormDefinitionLinkUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogActionableDynamicQuery.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogActionableDynamicQuery.java index 6f35d01a..94bc9758 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogActionableDynamicQuery.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogActionableDynamicQuery.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogPersistence.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogPersistence.java index 80bea699..6cabc147 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogPersistence.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogPersistence.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogUtil.java index affb95a7..e1e9b666 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormLogUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkActionableDynamicQuery.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkActionableDynamicQuery.java index bb1f18c7..79438f2c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkActionableDynamicQuery.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkActionableDynamicQuery.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkPersistence.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkPersistence.java index 360a4e0e..4e650273 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkPersistence.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkPersistence.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkUtil.java index 5f234bcc..adbbf685 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/service/persistence/FormTemplateLinkUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/sql/tables.sql index f4535679..2ad542cc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/sql/tables.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-portlet/docroot/WEB-INF/sql/tables.sql @@ -3,11 +3,11 @@ create table portos_Kaleo_FormDefinitionLink ( groupId LONG, companyId LONG, userId LONG, - userName VARCHAR(200) null, + userName VARCHAR(75) null, createDate DATE null, modifiedDate DATE null, - name VARCHAR(200) null, - definitionName VARCHAR(200) null, + name VARCHAR(75) null, + definitionName VARCHAR(75) null, definitionVersion INTEGER, ddmStructureId LONG ); @@ -17,12 +17,12 @@ create table portos_Kaleo_FormLog ( groupId LONG, companyId LONG, userId LONG, - userName VARCHAR(200) null, + userName VARCHAR(75) null, createDate DATE null, modifiedDate DATE null, workflowInstanceId LONG, workflowTaskId LONG, - transitionName VARCHAR(200) null, + transitionName VARCHAR(75) null, formParameters TEXT null ); @@ -31,5 +31,5 @@ create table portos_Kaleo_FormTemplateLink ( formDefinitionLinkId LONG, ddmTemplateId LONG, kaleoNodeId LONG, - transitionName VARCHAR(200) null + transitionName VARCHAR(75) null ); \ No newline at end of file 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/.project b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.project index a38c8f45..6b7dc96b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804150 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-display.xml index 1326f7d7..7df371ed 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/liferay-display.xml @@ -1,5 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file 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..7a11d3ba 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,9 +1,7 @@ - + portal.properties - - content/Language.properties - + content/Language.properties \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/portlet.xml index 34c9fc5e..f2627030 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/portlet.xml @@ -1,5 +1,3 @@ - - - \ No newline at end of file + \ No newline at end of file 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/.project b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.project index 88f25f07..5e1175a4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804165 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-display.xml index a054daf8..0c5a02b0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-display.xml @@ -3,7 +3,7 @@ - + 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/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-portlet.xml index 4dea06c9..c6feb9ca 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -5,7 +5,6 @@ 1 /icon.png - it.tref.liferay.portos.mailmanager.messaging.SendMailMessageListener @@ -15,14 +14,10 @@ - configuration - 1.5 - /css/main.css /js/main.js - mail-manager-portlet true @@ -32,9 +27,7 @@ site_administration.configuration 1.6 /css/main.css - - /js/main.js - + /js/main.js email-templates-portlet true @@ -44,9 +37,7 @@ configuration 1.6 /css/main.css - - /js/main.js - + /js/main.js email-templates-company-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/portlet.xml index 3283eafb..c5fb60e3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/portlet.xml @@ -36,9 +36,7 @@ 2 Email Templates - - it.tref.liferay.portos.mailmanager.portlet.EmailTemplatesPortlet - + it.tref.liferay.portos.mailmanager.portlet.EmailTemplatesPortlet view-template /html/email_templates/view.jsp @@ -70,9 +68,7 @@ 3 Email Templates Company - - it.tref.liferay.portos.mailmanager.portlet.EmailTemplatesPortlet - + it.tref.liferay.portos.mailmanager.portlet.EmailTemplatesPortlet view-template /html/email_templates/view.jsp 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 ac025c86..b75cef0b 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,196 +1,139 @@ - + + portos_Mail - - - - - + - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - + - - - + + - - - - + + + - - - - + + + - - - - + + + - - - - - + + + + - - - - - + + - - - + - - - - + + - - + - - + - - - - - + + - - - + - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - + - - - + - - - + + - - - - + + + - - - + + - - RequiredEmailFrom RequiredEmailTo diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/hook/listener/DLFileEntryListener.java b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/hook/listener/DLFileEntryListener.java index e2996dc5..cb48abaa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/hook/listener/DLFileEntryListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/mailmanager/hook/listener/DLFileEntryListener.java @@ -1,11 +1,26 @@ package it.tref.liferay.portos.mailmanager.hook.listener; +import it.tref.liferay.portos.mailmanager.model.EmailAttachment; +import it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalServiceUtil; + import com.liferay.portal.ModelListenerException; +import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.model.BaseModelListener; import com.liferay.portlet.documentlibrary.model.DLFileEntry; public class DLFileEntryListener extends BaseModelListener { @Override - public void onBeforeRemove(DLFileEntry model) throws ModelListenerException {} + public void onBeforeRemove(DLFileEntry model) throws ModelListenerException { + + try { + EmailAttachment emailAttachment = EmailAttachmentLocalServiceUtil + .fetchByFileEntryId(model.getFileEntryId()); + if (emailAttachment != null) { + throw new ModelListenerException(); + } + } catch (SystemException e) { + throw new ModelListenerException(e); + } + } } 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 7f750744..c6594938 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 @@ -370,6 +370,8 @@ public class MailEngine { if (smtpAuth && Validator.isNotNull(user) && Validator.isNotNull(password)) { String protocol = GetterUtil.getString(session.getProperty("mail.transport.protocol"), Account.PROTOCOL_SMTP); + _log.info("Protocol: " + protocol + ", connect(" + smtpHost + ", " + smtpPort + ", " + user + ", " + + password + ")"); Transport transport = session.getTransport(protocol); transport.connect(smtpHost, smtpPort, user, password); Address[] addresses = null; 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 196e668b..c83e1081 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 @@ -1,16 +1,9 @@ package it.tref.liferay.portos.mailmanager.util; -import it.tref.liferay.portos.mailmanager.model.Email; -import it.tref.liferay.portos.mailmanager.model.EmailTemplate; -import it.tref.liferay.portos.mailmanager.service.EmailLocalServiceUtil; -import it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalServiceUtil; -import it.tref.liferay.portos.mailmanager.shared.util.MailManagerConstants; -import it.tref.liferay.portos.mailmanager.shared.util.MailUtil; - -import java.util.List; - import com.liferay.mail.model.FileAttachment; 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.mail.MailMessage; import com.liferay.portal.kernel.mail.SMTPAccount; import com.liferay.portal.kernel.util.StringPool; @@ -20,43 +13,50 @@ import com.liferay.portal.model.Company; import com.liferay.portal.service.CompanyLocalServiceUtil; import com.liferay.portal.service.ServiceContext; +import it.tref.liferay.portos.mailmanager.model.Email; +import it.tref.liferay.portos.mailmanager.model.EmailTemplate; +import it.tref.liferay.portos.mailmanager.service.EmailLocalServiceUtil; +import it.tref.liferay.portos.mailmanager.service.EmailTemplateLocalServiceUtil; +import it.tref.liferay.portos.mailmanager.shared.util.MailManagerConstants; +import it.tref.liferay.portos.mailmanager.shared.util.MailUtil; + +import java.util.List; + public class MailManagerUtil { public static Email addEmailByTemplate(String className, long classPK, long emailTemplateId, JSONObject templateParamJSON, List fileAttachments, ServiceContext serviceContext) throws Exception { - - return addEmailByTemplate(className, classPK, emailTemplateId, templateParamJSON, fileAttachments, false, - serviceContext); + return addEmailByTemplate(className, classPK, emailTemplateId, templateParamJSON, fileAttachments, + false, serviceContext); } public static Email addEmailByTemplate(String className, long classPK, long emailTemplateId, JSONObject templateParamJSON, ServiceContext serviceContext) throws Exception { - - return addEmailByTemplate(className, classPK, emailTemplateId, templateParamJSON, null, false, serviceContext); + return addEmailByTemplate(className, classPK, emailTemplateId, templateParamJSON, null, false, + serviceContext); } public static Email addEmailByTemplate(String className, long classPK, long emailTemplateId, JSONObject templateParamJSON, List fileAttachments, boolean sendSync, ServiceContext serviceContext) throws Exception { - EmailTemplate emailTemplate = EmailTemplateLocalServiceUtil.getEmailTemplate(emailTemplateId); - return addEmailByTemplate(className, classPK, emailTemplate, templateParamJSON, fileAttachments, sendSync, - serviceContext); + return addEmailByTemplate(className, classPK, emailTemplate, templateParamJSON, fileAttachments, + sendSync, serviceContext); } public static Email addEmailByTemplate(String className, long classPK, String emailTemplateName, JSONObject templateParamJSON, List fileAttachments, ServiceContext serviceContext) throws Exception { - return addEmailByTemplate(className, classPK, emailTemplateName, templateParamJSON, fileAttachments, false, - serviceContext); + return addEmailByTemplate(className, classPK, emailTemplateName, templateParamJSON, fileAttachments, + false, serviceContext); } public static Email addEmailByTemplate(String className, long classPK, String emailTemplateName, JSONObject templateParamJSON, ServiceContext serviceContext) throws Exception { - - return addEmailByTemplate(className, classPK, emailTemplateName, templateParamJSON, null, false, serviceContext); + return addEmailByTemplate(className, classPK, emailTemplateName, templateParamJSON, null, false, + serviceContext); } public static Email addEmailByTemplate(String className, long classPK, String emailTemplateName, @@ -65,13 +65,15 @@ public class MailManagerUtil { EmailTemplate emailTemplate = EmailTemplateLocalServiceUtil.fetchByC_GroupId_Name( serviceContext.getCompanyId(), serviceContext.getScopeGroupId(), emailTemplateName); + if (Validator.isNull(emailTemplate)) { Company company = CompanyLocalServiceUtil.getCompany(serviceContext.getCompanyId()); emailTemplate = EmailTemplateLocalServiceUtil.findByC_GroupId_Name(serviceContext.getCompanyId(), company.getGroupId(), emailTemplateName); } - return addEmailByTemplate(className, classPK, emailTemplate, templateParamJSON, fileAttachments, sendSync, - serviceContext); + + return addEmailByTemplate(className, classPK, emailTemplate, templateParamJSON, fileAttachments, + sendSync, serviceContext); } public static Email addEmailByTemplate(String className, long classPK, EmailTemplate emailTemplate, @@ -82,6 +84,7 @@ public class MailManagerUtil { templateParamJSON.getJSONObject(MailManagerConstants.TEMPLATE_PARAMETER_VARIABLES_KEY)); String body = VelocityUtil.evaluate(emailTemplate.getBody(), templateParamJSON.getJSONObject(MailManagerConstants.TEMPLATE_PARAMETER_VARIABLES_KEY)); + String to = templateParamJSON.getString(MailManagerConstants.TEMPLATE_PARAMETER_TO_KEY); if (Validator.isNull(to)) { to = emailTemplate.getTo(); @@ -94,15 +97,16 @@ public class MailManagerUtil { if (Validator.isNull(ccn)) { ccn = emailTemplate.getCcn(); } + return EmailLocalServiceUtil.addEmail(className, classPK, emailTemplate.getFrom(), StringUtil.split(to, StringPool.COMMA), StringUtil.split(cc, StringPool.COMMA), StringUtil.split(ccn, StringPool.COMMA), subject, body, true, fileAttachments, sendSync, emailTemplate.getTemplateName(), serviceContext); - } - public static Email addEmail(String className, long classPK, MailMessage mailMessage, ServiceContext serviceContext) - throws Exception { + } + public static Email addEmail(String className, long classPK, MailMessage mailMessage, + ServiceContext serviceContext) throws Exception { return addEmail(className, classPK, mailMessage, false, serviceContext); } @@ -114,28 +118,37 @@ public class MailManagerUtil { String[] cc = MailUtil.fromInternetAddresses(mailMessage.getCC()); String[] bcc = MailUtil.fromInternetAddresses(mailMessage.getBCC()); String[] bulkAddresses = MailUtil.fromInternetAddresses(mailMessage.getBulkAddresses()); + String subject = mailMessage.getSubject(); String body = mailMessage.getBody(); + boolean htmlFormat = mailMessage.getHTMLFormat(); String[] replyTo = MailUtil.fromInternetAddresses(mailMessage.getReplyTo()); String messageId = mailMessage.getMessageId(); String inReplyTo = mailMessage.getInReplyTo(); + List fileAttachments = mailMessage.getFileAttachments(); + SMTPAccount smtpAccount = mailMessage.getSMTPAccount(); + String smtpHost = null; int smtpPort = 0; boolean smtpSecure = false; String smtpUsername = null; String smtpPassword = null; + if (smtpAccount != null) { + smtpHost = smtpAccount.getHost(); smtpPort = smtpAccount.getPort(); smtpSecure = smtpAccount.isSecure(); smtpUsername = smtpAccount.getUser(); smtpPassword = smtpAccount.getPassword(); } - return EmailLocalServiceUtil.addEmail(className, classPK, from, to, cc, bcc, bulkAddresses, subject, body, - htmlFormat, replyTo, messageId, inReplyTo, smtpHost, smtpPort, smtpSecure, smtpUsername, smtpPassword, - fileAttachments, sendSync, null, serviceContext); + + return EmailLocalServiceUtil.addEmail(className, classPK, from, to, cc, bcc, bulkAddresses, subject, + body, htmlFormat, replyTo, messageId, inReplyTo, smtpHost, smtpPort, smtpSecure, + smtpUsername, smtpPassword, fileAttachments, sendSync, null, serviceContext); } + } 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 fdafd350..51c865d9 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,5 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + <%@page import="com.liferay.portal.util.PortalUtil"%> <%@page import="com.liferay.portlet.PortletURLUtil"%> <%@page import="javax.portlet.PortletURL"%> @@ -10,23 +11,36 @@ <%@page import="java.util.List"%> <%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> + <%@page import="com.liferay.portal.kernel.util.StringPool"%> -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@taglib uri="http://liferay.com/tld/aui" prefix="aui" %> -<%@taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> -<%@taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %> -<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> -<%@taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> -<%@taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> -<%@taglib uri="http://liferay.com/tld/ddm" prefix="liferay-ddm" %> + +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> + +<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> +<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> +<%@ taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %> +<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> +<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> +<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> +<%@ taglib uri="http://liferay.com/tld/ddm" prefix="liferay-ddm" %> + <%@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"%> + + <% PortletMode portletMode = liferayPortletRequest.getPortletMode(); WindowState windowState = liferayPortletRequest.getWindowState(); + PortletURL currentURLObj = PortletURLUtil.getCurrent(liferayPortletRequest, liferayPortletResponse); + String currentURL = currentURLObj.toString(); -%> + +%> \ No newline at end of file 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 639e1b2f..89ef8581 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,11 +1,17 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/html/mail_manager/init.jsp"%> +<%@include file="/html/mail_manager/init.jsp" %> + <% -final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.mail-manager-portlet.docroot.html.mail_manager.edit.jsp"; -long emailId = ParamUtil.getLong(request, "emailId"); -Email email = EmailLocalServiceUtil.getEmail(emailId); -List emailAttachments = EmailAttachmentLocalServiceUtil.findByEmailId(emailId); + final String EDITOR_WYSIWYG_IMPL_KEY = "editor.wysiwyg.mail-manager-portlet.docroot.html.mail_manager.edit.jsp"; + + long emailId = ParamUtil.getLong(request, "emailId"); + + Email email = EmailLocalServiceUtil.getEmail(emailId); + + List emailAttachments = EmailAttachmentLocalServiceUtil.findByEmailId(emailId); + %> + @@ -14,49 +20,76 @@ List emailAttachments = EmailAttachmentLocalServiceUtil.findByE + - + + + - - - - + + + + + + + + + + - + + + function initEditor() { return "<%= UnicodeFormatter.toString(email.getBody()) %>"; } +
    - <% - for(EmailAttachment attachment : emailAttachments){ - %> -
  • <%= attachment.getFileEntry().getDescription() %> - <% - } - %> + <% for(EmailAttachment attachment : emailAttachments){ %> +
  • <%=attachment.getFileEntry().getDescription() %> + <% } %>
+ - + +
+ + -Liferay.provide( window, 'save', function() { - var A = new AUI(); - var body = window.editor.getHTML(); - document.fm.body.value = body; - submitForm(document.fm); -}); + + Liferay.provide( + window, + 'save', + function() { + var A = new AUI(); + + var body = window.editor.getHTML(); + + document.fm.body.value = body; + + submitForm(document.fm); + + } + ); + \ No newline at end of file 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 dda35504..43de79f2 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,29 +1,53 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/mail_manager/init.jsp" %> + <% SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); + String redirect = searchContainer.getIteratorURL().toString(); + ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); + Email entry = (Email) row.getObject(); %> - + + + + + - + + + - + + + + + + + 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 46334425..08210e78 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,26 +1,34 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/mail_manager/init.jsp" %> - - <% - String cssClass = ParamUtil.getString(request, "cssClass"); - String buttonValue = ParamUtil.getString(request, "buttonValue","email-history-popup-btn"); - long classNameId = ParamUtil.getLong(request, "classNameId"); - long classPK = ParamUtil.getLong(request, "classPK"); - String templateName = ParamUtil.getString(request, "templateName"); + + + + <% + String cssClass = ParamUtil.getString(request, "cssClass"); + String buttonValue = ParamUtil.getString(request, "buttonValue","email-history-popup-btn"); + + long classNameId = ParamUtil.getLong(request, "classNameId"); + long classPK = ParamUtil.getLong(request, "classPK"); + String templateName = ParamUtil.getString(request, "templateName"); %> - + + + - - + + - - + + - - + + - - + + + + \ No newline at end of file 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 08f67ce2..e1014604 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,5 +1,6 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/init.jsp" %> + <%@page import="com.liferay.portal.kernel.util.TextFormatter"%> <%@page import="com.liferay.portal.kernel.repository.model.FileVersion"%> <%@page import="com.liferay.portal.kernel.util.StringBundler"%> @@ -11,6 +12,7 @@ <%@page import="com.liferay.portal.kernel.util.UnicodeFormatter"%> <%@page import="it.tref.liferay.portos.mailmanager.model.Email"%> <%@page import="it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalServiceUtil"%> + <%@page import="it.tref.liferay.portos.mailmanager.RequiredEmailToException"%> <%@page import="it.tref.liferay.portos.mailmanager.RequiredEmailBodyException"%> <%@page import="it.tref.liferay.portos.mailmanager.RequiredEmailSubjectException"%> @@ -20,10 +22,11 @@ <%@page import="it.tref.liferay.portos.mailmanager.EmailFromException"%> <%@page import="it.tref.liferay.portos.mailmanager.RequiredEmailFromException"%> <%@page import="com.sun.xml.internal.ws.api.message.Attachment"%> + <%@page import="com.liferay.portal.kernel.dao.search.SearchContainer"%> <%@page import="com.liferay.portal.kernel.util.WebKeys"%> <%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> <%@page import="it.tref.liferay.portos.mailmanager.shared.util.PortletKeys"%> <%@page import="it.tref.liferay.portos.mailmanager.permission.ActionKeys"%> -<%@page import="it.tref.liferay.portos.mailmanager.permission.EmailPermission"%> +<%@page import="it.tref.liferay.portos.mailmanager.permission.EmailPermission"%> \ No newline at end of file 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 ce666fda..5a3f7523 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,115 +1,165 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/html/mail_manager/init.jsp"%> +<%@include file="/html/mail_manager/init.jsp" %> + <% -long classNameId = ParamUtil.getLong(request, "classNameId"); -long classPK = ParamUtil.getLong(request, "classPK"); -String templateName = ParamUtil.getString(request, "templateName"); -long companyId = company.getCompanyId(); + long classNameId = ParamUtil.getLong(request, "classNameId"); + long classPK = ParamUtil.getLong(request, "classPK"); + String templateName = ParamUtil.getString(request, "templateName"); + + long companyId = company.getCompanyId(); + %> - - <% - List results = null; - int count = 0; - if (Validator.isNotNull(classNameId) && Validator.isNotNull(classPK)) { - results = EmailLocalServiceUtil.findByC_G_C_C(companyId, scopeGroupId, classNameId, classPK, - searchContainer.getStart(), searchContainer.getEnd()); - count = EmailLocalServiceUtil.countByC_G_C_C(companyId, scopeGroupId, classNameId, classPK); - } else if (Validator.isNotNull(templateName)) { - results = EmailLocalServiceUtil.findByC_G_T(companyId, scopeGroupId, templateName, searchContainer.getStart(), - searchContainer.getEnd()); - count = EmailLocalServiceUtil.countByC_G_T(companyId, scopeGroupId, templateName); - } else { - results = EmailLocalServiceUtil.findByCompany(companyId, searchContainer.getStart(), searchContainer.getEnd()); - count = EmailLocalServiceUtil.countByCompany(companyId); - } - searchContainer.setResults(results); - searchContainer.setTotal(count); + + + + <% + List results = null; + int count = 0; + + if(Validator.isNotNull(classNameId) && Validator.isNotNull(classPK)){ + results = EmailLocalServiceUtil.findByC_G_C_C(companyId, scopeGroupId, classNameId, classPK, searchContainer.getStart(), searchContainer.getEnd()); + count = EmailLocalServiceUtil.countByC_G_C_C(companyId, scopeGroupId, classNameId, classPK); + }else if(Validator.isNotNull(templateName)){ + results = EmailLocalServiceUtil.findByC_G_T(companyId, scopeGroupId, templateName, searchContainer.getStart(), searchContainer.getEnd()); + count = EmailLocalServiceUtil.countByC_G_T(companyId, scopeGroupId, templateName); + }else{ + results = EmailLocalServiceUtil.findByCompany(companyId, searchContainer.getStart(), searchContainer.getEnd()); + count = EmailLocalServiceUtil.countByCompany(companyId); + } + + searchContainer.setResults(results); + searchContainer.setTotal(count); %> - + + + + + <% String[] to = email.getToArray(); %> - + + <%= to.length %> + + + A.one('#toCount<%= email.getEmailId() %>').on('click', function(event) { - var modal = new A.Modal({ - modal: true, - centered: true, - visible: true, - bodyContent: '<%= getContent(to) %>', - headerContent: '
', - render: '#modal', - width: 300, - }).render(); + + var modal = new A.Modal( + { + modal: true, + centered: true, + visible: true, + + bodyContent: '<%= getContent(to) %>', + headerContent: '
', + render: '#modal', + width: 300 + } + ).render(); }); +
+
+ + <% String[] cc = email.getCcArray(); %> - + + <%= cc.length %> + + + A.one('#ccCount<%= email.getEmailId() %>').on('click', function(event) { - var modal = new A.Modal({ - modal: true, - centered: true, - visible: true, - bodyContent: '<%= getContent(cc) %>', - headerContent: '
', - render: '#modal', - width: 300, - }).render(); + + var modal = new A.Modal( + { + modal: true, + centered: true, + visible: true, + bodyContent: '<%= getContent(cc) %>', + headerContent: '
', + render: '#modal', + width: 300 + } + ).render(); }); +
+
+ + <% String[] bcc = email.getBccArray(); %> - + + <%= bcc.length %> + + + A.one('#bccCount<%= email.getEmailId() %>').on('click', function(event) { - var modal = new A.Modal({ - modal: true, - centered: true, - visible: true, - bodyContent: '<%= getContent(bcc) %>', - headerContent: '
', - render: '#modal', - width: 300, - }).render(); + + var modal = new A.Modal( + { + modal: true, + centered: true, + visible: true, + bodyContent: '<%= getContent(bcc) %>', + headerContent: '
', + render: '#modal', + width: 300 + } + ).render(); }); +
+
+ <%= StringUtil.shorten(email.getSubject(), 50) %> + - <%= StringUtil.shorten(HtmlUtil.extractText(email.getBody()), 50)%> + <%= StringUtil.shorten(HtmlUtil.extractText(email.getBody()), 50) %> + + @@ -117,31 +167,45 @@ long companyId = company.getCompanyId(); + - + + + + + <% List emailAttachments = email.getEmailAttachments(); %> +
- + <%= emailAttachments.size() %>
+ +
- <% - for (EmailAttachment emailAttachment : emailAttachments) { + + <% for (EmailAttachment emailAttachment : emailAttachments) { FileEntry fileEntry = emailAttachment.getFileEntry(); FileVersion fileVersion = fileEntry.getFileVersion(); %> + <%= fileEntry.getTitle() %> @@ -153,46 +217,72 @@ long companyId = company.getCompanyId(); <%= TextFormatter.formatStorageSize(fileVersion.getSize(), locale) %> - + - <% - } - %> + <% } %> +
+ + A.one('#attachmentCount<%= email.getEmailId() %>').on('click', function(event) { + var attachments = A.one('#attachments<%= email.getEmailId() %>'); attachments.show(); - var modal = new A.Modal({ - modal: true, - centered: true, - visible: true, - bodyContent: attachments, - headerContent: '
', - render: '#modal', - width: 550, - }).render(); + + var modal = new A.Modal( + { + modal: true, + centered: true, + visible: true, + bodyContent: attachments, + headerContent: '
', + render: '#modal', + width: 550 + } + ).render(); }); +
+
+
+ + +
- + + +
+
+ <%! + private String getContent(String[] addresses) { - StringBundler sb = new StringBundler(); - for (String address : addresses) { - sb.append("
") - .append(address) - .append("
"); - } - return sb.toString(); + + StringBundler sb = new StringBundler(); + + for (String address : addresses) { + sb.append("
"); + sb.append("
"); + sb.append(address); + sb.append("
"); + sb.append("
"); + } + + return sb.toString(); } + %> \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.project index 79065197..c297efeb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804180 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-display.xml index d92a3f40..fe611ecc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-display.xml @@ -3,11 +3,11 @@ - + - + \ No newline at end of file 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/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-portlet.xml index a2b6e397..d078a870 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,7 +2,6 @@ - 1 /icon.png @@ -10,31 +9,23 @@ it.tref.liferay.portos.maintenance.messaging.MaintenanceScheduleMessageListener - 0 0/1 * 1/1 * ? * - + 0 0/1 * 1/1 * ? * + - - configuration - + configuration 1.5 /css/main.css - - /js/main.js - - - 1-admin-maintenance-portlet - + /js/main.js + 1-admin-maintenance-portlet - 2 + 2 /icon.png it.tref.liferay.portos.maintenance.control.MantenanceControlPanelEntry - false - /css/main.css - - /js/main.js - + false + /css/main.css + /js/main.js 2-admin-maintenance-portlet true true diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/portlet.xml index c858bf3f..1181a36d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Admin Maintenance - - it.tref.liferay.portos.maintenance.portlet.AdminMaintenancePortlet - + it.tref.liferay.portos.maintenance.portlet.AdminMaintenancePortlet view-template /html/admin_maintenance/view.jsp @@ -39,9 +36,7 @@ 2 Maintenance Poller - - it.tref.liferay.portos.maintenance.portlet.MaintenancePollerPortlet - + it.tref.liferay.portos.maintenance.portlet.MaintenancePollerPortlet view-template /html/poller_maintenance/view.jsp 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..b84d5657 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,64 +1,48 @@ - + + portos_maintenance - - - + - - - + - - - - - - - + + + + + - - - - - - - + + + + + + - - - + + - - + - - - + - - - + + - - + - - + - - RequiredMaintenanceType RequiredMaintenanceReason diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenancePreServletControl.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenancePreServletControl.java index 36b22ef4..7644804c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenancePreServletControl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenancePreServletControl.java @@ -1,16 +1,5 @@ package it.tref.liferay.portos.maintenance.action; -import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; -import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; -import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceStatus; -import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceType; - -import java.util.List; - -import javax.portlet.WindowState; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import com.liferay.portal.kernel.events.Action; import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.log.Log; @@ -25,56 +14,84 @@ import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.util.PortalUtil; import com.liferay.portal.util.PortletKeys; +import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; +import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; +import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceStatus; +import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceType; + +import java.util.List; + +import javax.portlet.WindowState; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + public class MaintenancePreServletControl extends Action { - private static final Log _log = LogFactoryUtil.getLog(MaintenancePreServletControl.class); - private static final String[] allowedPortlets = new String[] { PortletKeys.LOGIN }; - private static String loginUrlRedirect = null; - - @Override - public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { - - try { - ServiceContext serviceContext = ServiceContextFactory.getInstance(request); - List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil - .findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); - if (!maintenanceSchedules.isEmpty()) { - MaintenanceType maintenanceType = MaintenanceType.parse(maintenanceSchedules.get(0).getType()); - if (maintenanceType == MaintenanceType.FULL) { - response.sendRedirect("/html/portal/maintenance.jsp"); - throw new ActionException("Maintenance mode active"); - } else if (maintenanceType == MaintenanceType.USER) { - User user = UserLocalServiceUtil.fetchUser(serviceContext.getUserId()); - // Se request per portlet non consentite (LOGIN) - if (!ArrayUtil.contains(allowedPortlets, ParamUtil.getString(request, "p_p_id"))) { - if (user.isDefaultUser()) {// Se non loggato - response.sendRedirect(getLoginUrlRedirect(request)); - throw new ActionException("Maintenance mode active"); - } else if (!PortalUtil.isCompanyAdmin(user)) {// Se non admin - response.sendRedirect("/html/portal/maintenance.jsp"); - throw new ActionException("Maintenance mode active"); - } - } else { - if (!user.isDefaultUser() && !PortalUtil.isCompanyAdmin(user)) {// Se loggato non admin - response.sendRedirect("/html/portal/maintenance.jsp"); - throw new ActionException("Maintenance mode active"); - } - } - } - } - } catch (Exception e) { - _log.error(e); - } - } - - private String getLoginUrlRedirect(HttpServletRequest request) { - - if (loginUrlRedirect == null) { - loginUrlRedirect = PortalUtil.getPortalURL(request); - loginUrlRedirect = HttpUtil.addParameter(loginUrlRedirect, "p_p_id", PortletKeys.LOGIN); - loginUrlRedirect = HttpUtil.addParameter(loginUrlRedirect, "p_p_state", WindowState.MAXIMIZED.toString()); - loginUrlRedirect = HttpUtil.addParameter(loginUrlRedirect, "p_p_lifecycle", "0"); - } - return loginUrlRedirect; - } + private static final Log _log = LogFactoryUtil.getLog(MaintenancePreServletControl.class); + + private static final String[] allowedPortlets = new String[] {PortletKeys.LOGIN}; + + private static String loginUrlRedirect = null; + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { + + // _log.info("INZIO MaintenancePreServletControl --------------->"); + + try { + + ServiceContext serviceContext = ServiceContextFactory.getInstance(request); + + List maintenanceSchedules = + MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); + + if (!maintenanceSchedules.isEmpty()) { + + MaintenanceType maintenanceType = MaintenanceType.parse(maintenanceSchedules.get(0).getType()); + + if (maintenanceType == MaintenanceType.FULL) { + + response.sendRedirect("/html/portal/maintenance.jsp"); + throw new ActionException("Maintenance mode active"); + + } else if (maintenanceType == MaintenanceType.USER) { + + User user = UserLocalServiceUtil.fetchUser(serviceContext.getUserId()); + + // Se request per portlet non consentite (LOGIN) + if (!ArrayUtil.contains(allowedPortlets, ParamUtil.getString(request, "p_p_id"))) { + if (user.isDefaultUser()) {// Se non loggato + response.sendRedirect(getLoginUrlRedirect(request)); + throw new ActionException("Maintenance mode active"); + } else if (!PortalUtil.isCompanyAdmin(user)) {// Se non admin + response.sendRedirect("/html/portal/maintenance.jsp"); + throw new ActionException("Maintenance mode active"); + } + } else { + if (!user.isDefaultUser() && !PortalUtil.isCompanyAdmin(user)) {// Se loggato non admin + response.sendRedirect("/html/portal/maintenance.jsp"); + throw new ActionException("Maintenance mode active"); + } + } + } + + } + + } catch (Exception e) { + _log.error(e); + } + + } + + private String getLoginUrlRedirect(HttpServletRequest request) { + + if (loginUrlRedirect == null) { + loginUrlRedirect = PortalUtil.getPortalURL(request); + loginUrlRedirect = HttpUtil.addParameter(loginUrlRedirect, "p_p_id", PortletKeys.LOGIN); + loginUrlRedirect = HttpUtil.addParameter(loginUrlRedirect, "p_p_state", WindowState.MAXIMIZED.toString()); + loginUrlRedirect = HttpUtil.addParameter(loginUrlRedirect, "p_p_lifecycle", "0"); + } + + return loginUrlRedirect; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenanceStartAction.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenanceStartAction.java index a667f47f..62aebb4e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenanceStartAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/action/MaintenanceStartAction.java @@ -1,5 +1,10 @@ package it.tref.liferay.portos.maintenance.action; +import com.liferay.portal.kernel.events.ActionException; +import com.liferay.portal.kernel.events.SimpleAction; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; + import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceOnReboot; @@ -7,28 +12,27 @@ import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceS import java.util.List; -import com.liferay.portal.kernel.events.ActionException; -import com.liferay.portal.kernel.events.SimpleAction; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; - public class MaintenanceStartAction extends SimpleAction { - private static final Log _log = LogFactoryUtil.getLog(MaintenanceStartAction.class); - - @Override - public void run(String[] ids) throws ActionException { - - try { - List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil - .findByCompleted_Onreboot(Boolean.FALSE, MaintenanceOnReboot.TERMINATE.getCode()); - for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { - MaintenanceScheduleLocalServiceUtil.updateStatus( - maintenanceSchedule.getMaintenanceScheduleId(), - MaintenanceStatus.FORCE_ENDED.getCode(), "Ended for server reboot."); - } - } catch (Exception e) { - _log.error("Error updating maintenance settings after reboot.", e); - } - } + private static final Log _log = LogFactoryUtil.getLog(MaintenanceStartAction.class); + + @Override + public void run(String[] ids) throws ActionException { + + try { + + List maintenanceSchedules = + MaintenanceScheduleLocalServiceUtil.findByCompleted_Onreboot(Boolean.FALSE, + MaintenanceOnReboot.TERMINATE.getCode()); + + for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { + MaintenanceScheduleLocalServiceUtil.updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), + MaintenanceStatus.FORCE_ENDED.getCode(), "Ended for server reboot."); + } + + } catch (Exception e) { + _log.error("Error updating maintenance settings after reboot.", e); + } + + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/control/MantenanceControlPanelEntry.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/control/MantenanceControlPanelEntry.java index 92bab6cb..2ebb0ed0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/control/MantenanceControlPanelEntry.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/control/MantenanceControlPanelEntry.java @@ -8,14 +8,17 @@ import com.liferay.portlet.BaseControlPanelEntry; public class MantenanceControlPanelEntry extends BaseControlPanelEntry { - @Override - public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) - throws Exception { - - long companyId = PortalUtil.getDefaultCompanyId(); - if (companyId == permissionChecker.getCompanyId()) { - return true; - } - return false; - } + public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) + throws Exception { + + long companyId = PortalUtil.getDefaultCompanyId(); + + if (companyId == permissionChecker.getCompanyId()) { + return true; + } + + return false; + + } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/messaging/MaintenanceScheduleMessageListener.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/messaging/MaintenanceScheduleMessageListener.java index cdec371c..e188e589 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/messaging/MaintenanceScheduleMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/messaging/MaintenanceScheduleMessageListener.java @@ -1,14 +1,5 @@ package it.tref.liferay.portos.maintenance.messaging; -import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; -import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; -import it.tref.liferay.portos.maintenance.service.persistence.MaintenanceScheduleActionableDynamicQuery; -import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceStatus; -import it.tref.liferay.portos.maintenance.util.MaintenanceDateUtil; - -import java.text.SimpleDateFormat; -import java.util.Date; - import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; @@ -22,71 +13,97 @@ import com.liferay.portal.kernel.messaging.MessageListenerException; import com.liferay.portal.kernel.util.DateUtil; import com.liferay.portal.kernel.util.Validator; +import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; +import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; +import it.tref.liferay.portos.maintenance.service.persistence.MaintenanceScheduleActionableDynamicQuery; +import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceStatus; +import it.tref.liferay.portos.maintenance.util.MaintenanceDateUtil; + +import java.text.SimpleDateFormat; +import java.util.Date; + public class MaintenanceScheduleMessageListener implements MessageListener { - private static final Log _log = LogFactoryUtil.getLog(MaintenanceScheduleMessageListener.class); - - @Override - public void receive(Message message) throws MessageListenerException { - - if (_log.isDebugEnabled()) { - _log.debug("Inizio metodo receive. Begin: " + new SimpleDateFormat("hh:mm:ss").format(new Date())); - } - try { - ActionableDynamicQuery actionableDynamicQuery = new MaintenanceScheduleActionableDynamicQuery() { - - @Override - protected void addCriteria(DynamicQuery dynamicQuery) { - dynamicQuery.add(PropertyFactoryUtil.forName("completed").eq(false)); - } - - @Override - protected void performAction(Object obj) throws PortalException, SystemException { - - MaintenanceSchedule maintenanceSchedule = (MaintenanceSchedule) obj; - try { - MaintenanceStatus status = MaintenanceStatus.parse(maintenanceSchedule.getStatus()); - if (status == MaintenanceStatus.NEW) { - if (!MaintenanceScheduleLocalServiceUtil.findByStatus( - MaintenanceStatus.IN_PROGRESS.getCode()).isEmpty()) { - throw new SystemException("Concurrent maintenance scheduled."); - } - if (Validator.isNotNull(maintenanceSchedule.getAfter()) - && maintenanceSchedule.getAfter() > 0l) { - Date maintenanceStartDate = MaintenanceDateUtil - .getStartDate(maintenanceSchedule); - if (DateUtil.newDate().after(maintenanceStartDate)) { - MaintenanceScheduleLocalServiceUtil.updateStatus( - maintenanceSchedule.getMaintenanceScheduleId(), - MaintenanceStatus.IN_PROGRESS.getCode()); - } - } else { - MaintenanceScheduleLocalServiceUtil.updateStatus( - maintenanceSchedule.getMaintenanceScheduleId(), - MaintenanceStatus.IN_PROGRESS.getCode()); - } - } else if (status == MaintenanceStatus.IN_PROGRESS) { - if (Validator.isNotNull(maintenanceSchedule.getEnd()) - && DateUtil.newDate().after(maintenanceSchedule.getEnd())) { - MaintenanceScheduleLocalServiceUtil.updateStatus( - maintenanceSchedule.getMaintenanceScheduleId(), - MaintenanceStatus.ENDED.getCode()); - } - } - } catch (Exception e) { - _log.error("MaintenaceMode error", e); - MaintenanceScheduleLocalServiceUtil.updateStatus( - maintenanceSchedule.getMaintenanceScheduleId(), - MaintenanceStatus.ERROR.getCode(), e.getMessage()); - } - } - }; - long count = actionableDynamicQuery.performCount(); - if (count > 0) { - actionableDynamicQuery.performActions(); - } - } catch (Exception e) { - _log.error(e, e); - } - } + private static final Log _log = LogFactoryUtil.getLog(MaintenanceScheduleMessageListener.class); + + @Override + public void receive(Message message) throws MessageListenerException { + + if (_log.isDebugEnabled()) { + _log.debug("Inizio metodo receive. Begin: " + new SimpleDateFormat("hh:mm:ss").format(new Date())); + } + + try { + + + ActionableDynamicQuery actionableDynamicQuery = new MaintenanceScheduleActionableDynamicQuery() { + + @Override + protected void addCriteria(DynamicQuery dynamicQuery) { + dynamicQuery.add(PropertyFactoryUtil.forName("completed").eq(false)); + } + + @Override + protected void performAction(Object obj) throws PortalException, SystemException { + + MaintenanceSchedule maintenanceSchedule = (MaintenanceSchedule) obj; + try { + + MaintenanceStatus status = MaintenanceStatus.parse(maintenanceSchedule.getStatus()); + + if (status == MaintenanceStatus.NEW) { + + if (!MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()).isEmpty()) { + throw new SystemException("Concurrent maintenance scheduled."); + } + + if (Validator.isNotNull(maintenanceSchedule.getAfter()) && maintenanceSchedule.getAfter() > 0l) { + + Date maintenanceStartDate = MaintenanceDateUtil.getStartDate(maintenanceSchedule); + + if (DateUtil.newDate().after(maintenanceStartDate)) { + MaintenanceScheduleLocalServiceUtil.updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), + MaintenanceStatus.IN_PROGRESS.getCode()); + } + + } else { + + MaintenanceScheduleLocalServiceUtil.updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), + MaintenanceStatus.IN_PROGRESS.getCode()); + } + + } else if (status == MaintenanceStatus.IN_PROGRESS) { + + + if (Validator.isNotNull(maintenanceSchedule.getEnd()) + && DateUtil.newDate().after(maintenanceSchedule.getEnd())) { + + MaintenanceScheduleLocalServiceUtil.updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), + MaintenanceStatus.ENDED.getCode()); + } + + } + + + } catch (Exception e) { + _log.error("MaintenaceMode error", e); + + MaintenanceScheduleLocalServiceUtil.updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), + MaintenanceStatus.ERROR.getCode(), e.getMessage()); + } + } + }; + + long count = actionableDynamicQuery.performCount(); + + if (count > 0) { + actionableDynamicQuery.performActions(); + } + + } catch (Exception e) { + _log.error(e, e); + } + } + + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/model/impl/MaintenanceScheduleImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/model/impl/MaintenanceScheduleImpl.java index acab11db..7ae747aa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/model/impl/MaintenanceScheduleImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/model/impl/MaintenanceScheduleImpl.java @@ -15,23 +15,19 @@ package it.tref.liferay.portos.maintenance.model.impl; /** - * The extended model implementation for the MaintenanceSchedule service. Represents a row in the - * "portos_maintenance_MaintenanceSchedule" database table, with each column mapped to a property of this - * class. + * The extended model implementation for the MaintenanceSchedule service. Represents a row in the "portos_maintenance_MaintenanceSchedule" database table, with each column mapped to a property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun - * ServiceBuilder to copy their definitions into the - * {@link it.tref.liferay.portos.maintenance.model.MaintenanceSchedule} interface. + * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.maintenance.model.MaintenanceSchedule} interface. *

* * @author */ -@SuppressWarnings("serial") public class MaintenanceScheduleImpl extends MaintenanceScheduleBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a maintenance schedule model - * instance should use the {@link it.tref.liferay.portos.maintenance.model.MaintenanceSchedule} interface instead. + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a maintenance schedule model instance should use the {@link it.tref.liferay.portos.maintenance.model.MaintenanceSchedule} interface instead. */ public MaintenanceScheduleImpl() { } 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 8d4498d0..18d61763 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 @@ -1,14 +1,5 @@ package it.tref.liferay.portos.maintenance.portlet; -import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; -import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleServiceUtil; - -import java.util.Calendar; - -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletSession; - import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.log.Log; @@ -26,76 +17,105 @@ import com.liferay.portal.service.ServiceContextFactory; import com.liferay.portal.util.PortalUtil; import com.liferay.util.bridges.mvc.MVCPortlet; +import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; +import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleServiceUtil; + +import java.util.Calendar; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletSession; + /** * Portlet implementation class AdminMaintenancePortlet */ public class AdminMaintenancePortlet extends MVCPortlet { - private final static Log _log = LogFactoryUtil.getLog(AdminMaintenancePortlet.class); - - public void maintain(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { - - PortletSession portletSession = actionRequest.getPortletSession(); - String message = ParamUtil.getString(actionRequest, "message"); - String className = LanguageUtil - .get(LocaleUtil.getDefault(), - "the-sign-in-process-is-temporarily-disabled-because-the-portal-is-undergoing-a-routine-maintenance-upgrade"); - if (Validator.isNotNull(message)) { - className = message; - } - Class clazz = ClassResolverUtil.resolve("com.liferay.portal.util.MaintenanceUtil", - PortalClassLoaderUtil.getClassLoader()); - ReflectionUtil.getDeclaredMethod(clazz, "maintain", String.class, String.class).invoke(null, - portletSession.getId(), className); - _log.info("Maintenance session id: " + portletSession.getId()); - } - - public void deleteMaintenanceSchedule(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { - - _log.info("deleteMaintenanceSchedule - Inizio metodo"); - ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); - long maintenanceScheduleId = ParamUtil.getLong(actionRequest, "maintenanceScheduleId"); - MaintenanceScheduleServiceUtil.deleteMaintenanceSchedule(maintenanceScheduleId, serviceContext); - } - - public void editMaintenanceSchedule(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { - - _log.info("editMaintenanceSchedule - Inizio metodo"); - String cmd = ParamUtil.getString(actionRequest, Constants.CMD); - ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); - long maintenanceScheduleId = ParamUtil.getLong(actionRequest, "maintenanceScheduleId"); - String type = ParamUtil.getString(actionRequest, "type"); - String reason = ParamUtil.getString(actionRequest, "reason"); - String portalMessage = ParamUtil.getString(actionRequest, "portalMessage"); - long after = ParamUtil.getLong(actionRequest, "after"); - String onreboot = ParamUtil.getString(actionRequest, "onreboot"); - String status = ParamUtil.getString(actionRequest, "status"); - String statusMessage = ParamUtil.getString(actionRequest, "statusMessage"); - Calendar calendarEnd = Calendar.getInstance(); - calendarEnd.set(ParamUtil.getInteger(actionRequest, "endYear"), - ParamUtil.getInteger(actionRequest, "endMonth") + 1, ParamUtil.getInteger(actionRequest, "endDay"), - ParamUtil.getInteger(actionRequest, "endHour"), ParamUtil.getInteger(actionRequest, "endMinute")); - MaintenanceSchedule maintenanceSchedule = null; - try { - if (cmd.equals(Constants.ADD)) { - maintenanceSchedule = MaintenanceScheduleServiceUtil.addMaintenanceSchedule(type, reason, - portalMessage, after, calendarEnd.getTime(), onreboot, serviceContext); - } else if (cmd.equals(Constants.UPDATE)) { - maintenanceSchedule = MaintenanceScheduleServiceUtil.updateMaintenanceSchedule(maintenanceScheduleId, - type, reason, portalMessage, after, calendarEnd.getTime(), onreboot, status, statusMessage, - serviceContext); - } - } catch (PortalException e) { - _log.error(e); - SessionErrors.add(actionRequest, e.getClass()); - } - if (SessionErrors.isEmpty(actionRequest)) { - actionResponse.setRenderParameter("maintenanceScheduleId", - String.valueOf(maintenanceSchedule.getMaintenanceScheduleId())); - actionResponse.setRenderParameter("mvcPath", "/html/admin_maintenance/edit.jsp"); - } else { - actionResponse.setRenderParameter("mvcPath", "/html/admin_maintenance/edit.jsp"); - PortalUtil.copyRequestParameters(actionRequest, actionResponse); - } - } + private final static Log _log = LogFactoryUtil.getLog(AdminMaintenancePortlet.class); + + public void maintain(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { + + PortletSession portletSession = actionRequest.getPortletSession(); + + String message = ParamUtil.getString(actionRequest, "message"); + + String className = + LanguageUtil + .get(LocaleUtil.getDefault(), + "the-sign-in-process-is-temporarily-disabled-because-the-portal-is-undergoing-a-routine-maintenance-upgrade"); + + if (Validator.isNotNull(message)) { + className = message; + } + + Class clazz = + ClassResolverUtil.resolve("com.liferay.portal.util.MaintenanceUtil", PortalClassLoaderUtil.getClassLoader()); + ReflectionUtil.getDeclaredMethod(clazz, "maintain", String.class, String.class).invoke(null, + portletSession.getId(), className); + + _log.info("Maintenance session id: " + portletSession.getId()); + + + } + + public void deleteMaintenanceSchedule(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { + _log.info("deleteMaintenanceSchedule - Inizio metodo"); + + ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); + long maintenanceScheduleId = ParamUtil.getLong(actionRequest, "maintenanceScheduleId"); + + MaintenanceScheduleServiceUtil.deleteMaintenanceSchedule(maintenanceScheduleId, serviceContext); + + } + + public void editMaintenanceSchedule(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { + _log.info("editMaintenanceSchedule - Inizio metodo"); + + String cmd = ParamUtil.getString(actionRequest, Constants.CMD); + + ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); + + long maintenanceScheduleId = ParamUtil.getLong(actionRequest, "maintenanceScheduleId"); + String type = ParamUtil.getString(actionRequest, "type"); + String reason = ParamUtil.getString(actionRequest, "reason"); + String portalMessage = ParamUtil.getString(actionRequest, "portalMessage"); + long after = ParamUtil.getLong(actionRequest, "after"); + String onreboot = ParamUtil.getString(actionRequest, "onreboot"); + String status = ParamUtil.getString(actionRequest, "status"); + String statusMessage = ParamUtil.getString(actionRequest, "statusMessage"); + + Calendar calendarEnd = Calendar.getInstance(); + calendarEnd.set(ParamUtil.getInteger(actionRequest, "endYear"), + ParamUtil.getInteger(actionRequest, "endMonth") + 1, ParamUtil.getInteger(actionRequest, "endDay"), + ParamUtil.getInteger(actionRequest, "endHour"), ParamUtil.getInteger(actionRequest, "endMinute")); + + MaintenanceSchedule maintenanceSchedule = null; + + try { + + if (cmd.equals(Constants.ADD)) { + maintenanceSchedule = + MaintenanceScheduleServiceUtil.addMaintenanceSchedule(type, reason, portalMessage, after, + calendarEnd.getTime(), onreboot, serviceContext); + } else if (cmd.equals(Constants.UPDATE)) { + maintenanceSchedule = + MaintenanceScheduleServiceUtil.updateMaintenanceSchedule(maintenanceScheduleId, type, reason, + portalMessage, after, calendarEnd.getTime(), onreboot, status, statusMessage, serviceContext); + } + + } catch (PortalException e) { + _log.error(e); + SessionErrors.add(actionRequest, e.getClass()); + } + + if (SessionErrors.isEmpty(actionRequest)) { + actionResponse.setRenderParameter("maintenanceScheduleId", + String.valueOf(maintenanceSchedule.getMaintenanceScheduleId())); + actionResponse.setRenderParameter("mvcPath", "/html/admin_maintenance/edit.jsp"); + } else { + actionResponse.setRenderParameter("mvcPath", "/html/admin_maintenance/edit.jsp"); + PortalUtil.copyRequestParameters(actionRequest, actionResponse); + } + + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/MaintenancePollerPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/MaintenancePollerPortlet.java index d5749804..de74995a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/MaintenancePollerPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/portlet/MaintenancePollerPortlet.java @@ -1,5 +1,12 @@ package it.tref.liferay.portos.maintenance.portlet; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.util.DateUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.util.bridges.mvc.MVCPortlet; + import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; import it.tref.liferay.portos.maintenance.util.DateTimeUtil; @@ -15,46 +22,56 @@ import javax.portlet.PortletException; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.GetterUtil; -import com.liferay.util.bridges.mvc.MVCPortlet; - +/** + * Portlet implementation class MaintenancePollerPortlet + */ public class MaintenancePollerPortlet extends MVCPortlet { - private static final long ONE_HOUR = 3600000;// ms - - @Override - public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, - PortletException { - - String resourceID = GetterUtil.getString(resourceRequest.getResourceID()); - if ("maintenancePoller".equals(resourceID)) { - try { - JSONObject responseData = JSONFactoryUtil.createJSONObject(); - responseData.put("maintenanceExpected", false); - List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil - .findByStatus(MaintenanceStatus.NEW.getCode()); - for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { - Date maintenanceStartDate = DateTimeUtil.scaleToNextMinute(MaintenanceDateUtil - .getStartDate(maintenanceSchedule)); - long timeDiff = maintenanceStartDate.getTime() - DateUtil.newDate().getTime(); - if (timeDiff < ONE_HOUR) { - responseData.put("maintenanceExpected", true); - responseData.put("startFrom", timeDiff); - responseData.put("maintenanceScheduleId", maintenanceSchedule.getMaintenanceScheduleId()); - break; - } - } - PrintWriter out = resourceResponse.getWriter(); - out.println(responseData.toString()); - out.flush(); - } catch (SystemException e) { - e.printStackTrace(); - } - } - super.serveResource(resourceRequest, resourceResponse); - } + + private static final long ONE_HOUR = 3600000;// ms + + @Override + public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, + PortletException { + + String resourceID = GetterUtil.getString(resourceRequest.getResourceID()); + + if ("maintenancePoller".equals(resourceID)) { + + try { + + JSONObject responseData = JSONFactoryUtil.createJSONObject(); + responseData.put("maintenanceExpected", false); + + + List maintenanceSchedules = + MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus.NEW.getCode()); + + for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { + + Date maintenanceStartDate = + DateTimeUtil.scaleToNextMinute(MaintenanceDateUtil.getStartDate(maintenanceSchedule)); + + long timeDiff = maintenanceStartDate.getTime() - DateUtil.newDate().getTime(); + + if (timeDiff < ONE_HOUR) { + responseData.put("maintenanceExpected", true); + responseData.put("startFrom", timeDiff); + responseData.put("maintenanceScheduleId", maintenanceSchedule.getMaintenanceScheduleId()); + break; + } + } + + PrintWriter out = resourceResponse.getWriter(); + out.println(responseData.toString()); + out.flush(); + + } catch (SystemException e) { + e.printStackTrace(); + } + + } + + super.serveResource(resourceRequest, resourceResponse); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleLocalServiceImpl.java index f2919692..25b32f70 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleLocalServiceImpl.java @@ -12,6 +12,14 @@ package it.tref.liferay.portos.maintenance.service.impl; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.DateUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.User; +import com.liferay.portal.service.ServiceContext; + import it.tref.liferay.portos.maintenance.MaintenanceOnRebootException; import it.tref.liferay.portos.maintenance.MaintenanceStatusException; import it.tref.liferay.portos.maintenance.MaintenanceTypeException; @@ -29,25 +37,17 @@ import it.tref.liferay.portos.maintenance.util.MaintenanceConstants.MaintenanceT import java.util.Date; import java.util.List; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.StringPool; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.model.User; -import com.liferay.portal.service.ServiceContext; - /** * The implementation of the maintenance schedule 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.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalService} - * interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun + * ServiceBuilder to copy their definitions into the + * {@link it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalService} interface. * *

- * This is a local service. Methods of this service will not have security checks based on the propagated JAAS - * credentials because this service can only be accessed from within the same VM. + * This is a local service. Methods of this service will not have security checks based on the + * propagated JAAS credentials because this service can only be accessed from within the same VM. *

* * @author @@ -55,146 +55,166 @@ import com.liferay.portal.service.ServiceContext; * @see it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil */ public class MaintenanceScheduleLocalServiceImpl extends MaintenanceScheduleLocalServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil} to access the maintenance - * schedule local service. - */ - - @Override - public MaintenanceSchedule addMaintenanceSchedule(String type, String reason, String portalMessage, long after, - Date end, String onreboot, ServiceContext serviceContext) throws SystemException, PortalException { - - MaintenanceSchedule maintenanceSchedule = MaintenanceScheduleUtil.create(counterLocalService - .increment(MaintenanceSchedule.class.getName())); - validate(type, reason, after, end, onreboot); - maintenanceSchedule.setCompanyId(serviceContext.getCompanyId()); - maintenanceSchedule.setUserId(serviceContext.getUserId()); - User user = userLocalService.fetchUser(serviceContext.getUserId()); - maintenanceSchedule.setUserName(Validator.isNotNull(user) ? user.getScreenName() : StringPool.BLANK); - maintenanceSchedule.setCreateDate(DateUtil.newDate()); - maintenanceSchedule.setModifiedDate(DateUtil.newDate()); - maintenanceSchedule.setType(type); - maintenanceSchedule.setReason(reason); - maintenanceSchedule.setPortalMessage(portalMessage != null ? portalMessage : StringPool.BLANK); - maintenanceSchedule.setAfter(after); - maintenanceSchedule.setEnd(end != null ? DateTimeUtil.scaleToNextMinute(end) : null); - maintenanceSchedule.setOnreboot(onreboot); - maintenanceSchedule.setStatus(MaintenanceStatus.NEW.getCode()); - maintenanceSchedule.setCompleted(Boolean.FALSE); - return addMaintenanceSchedule(maintenanceSchedule); - } - - @Override - public MaintenanceSchedule updateMaintenanceSchedule(long maintenanceScheduleId, String type, String reason, - String portalMessage, long after, Date end, String onreboot, String status, String statusMessage, - ServiceContext serviceContext) throws SystemException, PortalException { - - MaintenanceSchedule maintenanceSchedule = getMaintenanceSchedule(maintenanceScheduleId); - validate(type, reason, after, end, onreboot); - if (Validator.isNotNull(status)) { - maintenanceSchedule = updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), status, statusMessage); - } - maintenanceSchedule.setModifiedDate(DateUtil.newDate()); - maintenanceSchedule.setType(type); - maintenanceSchedule.setReason(reason); - maintenanceSchedule.setPortalMessage(portalMessage != null ? portalMessage : StringPool.BLANK); - maintenanceSchedule.setAfter(after); - maintenanceSchedule.setEnd(end != null ? DateTimeUtil.scaleToNextMinute(end) : null); - maintenanceSchedule.setOnreboot(onreboot); - return updateMaintenanceSchedule(maintenanceSchedule); - } - - @Override - public MaintenanceSchedule updateStatus(long maintenanceScheduleId, String status) throws PortalException, - SystemException { - - return updateStatus(maintenanceScheduleId, status, null); - } - - @Override - public MaintenanceSchedule updateStatus(long maintenanceScheduleId, String status, String statusMessage) - throws PortalException, SystemException { - - MaintenanceStatus maintenanceStatus = null; - try { - maintenanceStatus = MaintenanceStatus.parse(status); - } catch (IllegalArgumentException e) { - throw new MaintenanceStatusException(status); - } - MaintenanceSchedule maintenanceSchedule = getMaintenanceSchedule(maintenanceScheduleId); - maintenanceSchedule.setStatus(maintenanceStatus.getCode()); - maintenanceSchedule.setStatusMessage(statusMessage); - if (maintenanceStatus == MaintenanceStatus.ENDED || maintenanceStatus == MaintenanceStatus.FORCE_ENDED - || maintenanceStatus == MaintenanceStatus.ERROR) { - maintenanceSchedule.setCompleted(Boolean.TRUE); - } else { - maintenanceSchedule.setCompleted(Boolean.FALSE); - } - return updateMaintenanceSchedule(maintenanceSchedule); - } - - @Override - public List findByStatus(String status) throws SystemException { - return maintenanceSchedulePersistence.findByStatus(status); - } - - private void validate(String type, String reason, long after, Date end, String onreboot) throws PortalException { - if (Validator.isNull(type)) { - throw new RequiredMaintenanceTypeException(); - } - try { - MaintenanceType.parse(type); - } catch (IllegalArgumentException e) { - throw new MaintenanceTypeException(type); - } - if (Validator.isNull(onreboot)) { - throw new RequiredMaintenanceOnRebootException(); - } - try { - MaintenanceOnReboot.parse(onreboot); - } catch (IllegalArgumentException e) { - throw new MaintenanceOnRebootException(onreboot); - } - if (Validator.isNull(reason)) { - throw new RequiredMaintenanceReasonException(); - } - } - - @Override - public List findByC_Completed(long companyId, boolean completed) throws SystemException { - return maintenanceSchedulePersistence.findByC_Completed(companyId, completed); - } - - @Override - public List findByCompleted_Onreboot(boolean completed, String onreboot) - throws SystemException { - - return maintenanceSchedulePersistence.findByCompleted_Onreboot(completed, onreboot); - } - - @Override - public List findByCompany(long companyId) throws SystemException { - return maintenanceSchedulePersistence.findByCompany(companyId); - } - - @Override - public List findByCompany(long companyId, int start, int end) throws SystemException { - return maintenanceSchedulePersistence.findByCompany(companyId, start, end); - } - - @Override - public int countByCompany(long companyId) throws SystemException { - return maintenanceSchedulePersistence.countByCompany(companyId); - } - - @Override - public List findAll() throws SystemException { - return maintenanceSchedulePersistence.findAll(); - } - - @Override - public int countAll() throws SystemException { - return maintenanceSchedulePersistence.countAll(); - } + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link + * it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil} to access the + * maintenance schedule local service. + */ + + @Override + public MaintenanceSchedule addMaintenanceSchedule(String type, String reason, String portalMessage, long after, + Date end, String onreboot, ServiceContext serviceContext) throws SystemException, PortalException { + + MaintenanceSchedule maintenanceSchedule = + MaintenanceScheduleUtil.create(counterLocalService.increment(MaintenanceSchedule.class.getName())); + + validate(type, reason, after, end, onreboot); + + maintenanceSchedule.setCompanyId(serviceContext.getCompanyId()); + maintenanceSchedule.setUserId(serviceContext.getUserId()); + User user = userLocalService.fetchUser(serviceContext.getUserId()); + maintenanceSchedule.setUserName(Validator.isNotNull(user) ? user.getScreenName() : StringPool.BLANK); + maintenanceSchedule.setCreateDate(DateUtil.newDate()); + maintenanceSchedule.setModifiedDate(DateUtil.newDate()); + + maintenanceSchedule.setType(type); + maintenanceSchedule.setReason(reason); + maintenanceSchedule.setPortalMessage(portalMessage != null ? portalMessage : StringPool.BLANK); + maintenanceSchedule.setAfter(after); + maintenanceSchedule.setEnd(end != null ? DateTimeUtil.scaleToNextMinute(end) : null); + maintenanceSchedule.setOnreboot(onreboot); + + maintenanceSchedule.setStatus(MaintenanceStatus.NEW.getCode()); + maintenanceSchedule.setCompleted(Boolean.FALSE); + + return addMaintenanceSchedule(maintenanceSchedule); + } + + @Override + public MaintenanceSchedule updateMaintenanceSchedule(long maintenanceScheduleId, String type, String reason, + String portalMessage, long after, Date end, String onreboot, String status, String statusMessage, + ServiceContext serviceContext) throws SystemException, PortalException { + + MaintenanceSchedule maintenanceSchedule = getMaintenanceSchedule(maintenanceScheduleId); + + validate(type, reason, after, end, onreboot); + + if (Validator.isNotNull(status)) { + maintenanceSchedule = updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), status, statusMessage); + } + + maintenanceSchedule.setModifiedDate(DateUtil.newDate()); + + maintenanceSchedule.setType(type); + maintenanceSchedule.setReason(reason); + maintenanceSchedule.setPortalMessage(portalMessage != null ? portalMessage : StringPool.BLANK); + maintenanceSchedule.setAfter(after); + maintenanceSchedule.setEnd(end != null ? DateTimeUtil.scaleToNextMinute(end) : null); + maintenanceSchedule.setOnreboot(onreboot); + + return updateMaintenanceSchedule(maintenanceSchedule); + } + + + @Override + public MaintenanceSchedule updateStatus(long maintenanceScheduleId, String status) throws PortalException, + SystemException { + + return updateStatus(maintenanceScheduleId, status, null); + } + + @Override + public MaintenanceSchedule updateStatus(long maintenanceScheduleId, String status, String statusMessage) + throws PortalException, SystemException { + + MaintenanceStatus maintenanceStatus = null; + try { + maintenanceStatus = MaintenanceStatus.parse(status); + } catch (IllegalArgumentException e) { + throw new MaintenanceStatusException(status); + } + + MaintenanceSchedule maintenanceSchedule = getMaintenanceSchedule(maintenanceScheduleId); + maintenanceSchedule.setStatus(maintenanceStatus.getCode()); + maintenanceSchedule.setStatusMessage(statusMessage); + + if (maintenanceStatus == MaintenanceStatus.ENDED || maintenanceStatus == MaintenanceStatus.FORCE_ENDED + || maintenanceStatus == MaintenanceStatus.ERROR) { + maintenanceSchedule.setCompleted(Boolean.TRUE); + } else { + maintenanceSchedule.setCompleted(Boolean.FALSE); + } + + return updateMaintenanceSchedule(maintenanceSchedule); + } + + @Override + public List findByStatus(String status) throws SystemException { + return maintenanceSchedulePersistence.findByStatus(status); + } + + private void validate(String type, String reason, long after, Date end, String onreboot) throws PortalException { + + if (Validator.isNull(type)) { + throw new RequiredMaintenanceTypeException(); + } + + try { + MaintenanceType.parse(type); + } catch (IllegalArgumentException e) { + throw new MaintenanceTypeException(type); + } + + if (Validator.isNull(onreboot)) { + throw new RequiredMaintenanceOnRebootException(); + } + + try { + MaintenanceOnReboot.parse(onreboot); + } catch (IllegalArgumentException e) { + throw new MaintenanceOnRebootException(onreboot); + } + + if (Validator.isNull(reason)) { + throw new RequiredMaintenanceReasonException(); + } + + } + + @Override + public List findByC_Completed(long companyId, boolean completed) throws SystemException { + return maintenanceSchedulePersistence.findByC_Completed(companyId, completed); + } + + @Override + public List findByCompleted_Onreboot(boolean completed, String onreboot) throws SystemException { + return maintenanceSchedulePersistence.findByCompleted_Onreboot(completed, onreboot); + } + + @Override + public List findByCompany(long companyId) throws SystemException { + return maintenanceSchedulePersistence.findByCompany(companyId); + } + + @Override + public List findByCompany(long companyId, int start, int end) throws SystemException { + return maintenanceSchedulePersistence.findByCompany(companyId, start, end); + } + + @Override + public int countByCompany(long companyId) throws SystemException { + return maintenanceSchedulePersistence.countByCompany(companyId); + } + + @Override + public List findAll() throws SystemException { + return maintenanceSchedulePersistence.findAll(); + } + + @Override + public int countAll() throws SystemException { + return maintenanceSchedulePersistence.countAll(); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleServiceImpl.java index cdeda63f..15482be3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/service/impl/MaintenanceScheduleServiceImpl.java @@ -12,25 +12,26 @@ package it.tref.liferay.portos.maintenance.service.impl; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.util.PortalUtil; + import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; import it.tref.liferay.portos.maintenance.service.base.MaintenanceScheduleServiceBaseImpl; import java.util.Date; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.util.PortalUtil; - /** * The implementation of the maintenance schedule remote 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.tref.liferay.portos.maintenance.service.MaintenanceScheduleService} interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun + * ServiceBuilder to copy their definitions into the + * {@link it.tref.liferay.portos.maintenance.service.MaintenanceScheduleService} interface. * *

- * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. + * This is a remote service. Methods of this service are expected to have security checks based on + * the propagated JAAS credentials because this service can be accessed remotely. *

* * @author @@ -38,42 +39,45 @@ import com.liferay.portal.util.PortalUtil; * @see it.tref.liferay.portos.maintenance.service.MaintenanceScheduleServiceUtil */ public class MaintenanceScheduleServiceImpl extends MaintenanceScheduleServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.maintenance.service.MaintenanceScheduleServiceUtil} to access the maintenance schedule - * remote service. - */ + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link + * it.tref.liferay.portos.maintenance.service.MaintenanceScheduleServiceUtil} to access the + * maintenance schedule remote service. + */ + + public MaintenanceSchedule addMaintenanceSchedule(String type, String reason, String portalMessage, long after, + Date end, String onreboot, ServiceContext serviceContext) throws Exception { + + if (!PortalUtil.isCompanyAdmin(getUser())) { + throw new PortalException("Access denied!"); + } + + return maintenanceScheduleLocalService.addMaintenanceSchedule(type, reason, portalMessage, after, end, onreboot, + serviceContext); + } + + public MaintenanceSchedule updateMaintenanceSchedule(long maintenanceScheduleId, String type, String reason, + String portalMessage, long after, Date end, String onreboot, String status, String statusMessage, + ServiceContext serviceContext) throws Exception { - @Override - public MaintenanceSchedule addMaintenanceSchedule(String type, String reason, String portalMessage, long after, - Date end, String onreboot, ServiceContext serviceContext) throws Exception { + if (!PortalUtil.isCompanyAdmin(getUser())) { + throw new PortalException("Access denied!"); + } - if (!PortalUtil.isCompanyAdmin(getUser())) { - throw new PortalException("Access denied!"); - } - return maintenanceScheduleLocalService.addMaintenanceSchedule(type, reason, portalMessage, after, end, - onreboot, serviceContext); - } + return maintenanceScheduleLocalService.updateMaintenanceSchedule(maintenanceScheduleId, type, reason, + portalMessage, after, end, onreboot, status, statusMessage, serviceContext); + } - @Override - public MaintenanceSchedule updateMaintenanceSchedule(long maintenanceScheduleId, String type, String reason, - String portalMessage, long after, Date end, String onreboot, String status, String statusMessage, - ServiceContext serviceContext) throws Exception { + public MaintenanceSchedule deleteMaintenanceSchedule(long maintenanceScheduleId, ServiceContext serviceContext) + throws Exception { - if (!PortalUtil.isCompanyAdmin(getUser())) { - throw new PortalException("Access denied!"); - } - return maintenanceScheduleLocalService.updateMaintenanceSchedule(maintenanceScheduleId, type, reason, - portalMessage, after, end, onreboot, status, statusMessage, serviceContext); - } + if (!PortalUtil.isCompanyAdmin(getUser())) { + throw new PortalException("Access denied!"); + } - @Override - public MaintenanceSchedule deleteMaintenanceSchedule(long maintenanceScheduleId, ServiceContext serviceContext) - throws Exception { + return maintenanceScheduleLocalService.deleteMaintenanceSchedule(maintenanceScheduleId); + } - if (!PortalUtil.isCompanyAdmin(getUser())) { - throw new PortalException("Access denied!"); - } - return maintenanceScheduleLocalService.deleteMaintenanceSchedule(maintenanceScheduleId); - } } 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/WEB-INF/src/it/tref/liferay/portos/maintenance/servlet/MaintenanceServlet.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/servlet/MaintenanceServlet.java index 7bdc802b..4cf8de49 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/servlet/MaintenanceServlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/servlet/MaintenanceServlet.java @@ -1,5 +1,16 @@ package it.tref.liferay.portos.maintenance.servlet; +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.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.DateUtil; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.service.ServiceContextFactory; + import it.tref.liferay.portos.maintenance.model.MaintenanceSchedule; import it.tref.liferay.portos.maintenance.service.MaintenanceScheduleLocalServiceUtil; import it.tref.liferay.portos.maintenance.util.DateTimeUtil; @@ -25,188 +36,212 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.net.util.SubnetUtils; import org.apache.commons.net.util.SubnetUtils.SubnetInfo; -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.servlet.ServletResponseUtil; -import com.liferay.portal.kernel.util.DateUtil; -import com.liferay.portal.kernel.util.PropsUtil; -import com.liferay.portal.kernel.util.Validator; -import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; - public class MaintenanceServlet extends HttpServlet { - private static final long serialVersionUID = 4568712977896061068L; - - private static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; - - private static final String START_PATH = "/start"; - private static final String STOP_PATH = "/stop"; - - private static final String FORCE_PARAM = "force"; - private static final String FORCED_MESSAGE = "Forced maintenance mode..."; - - private static final String END_PARAM = "end"; - private static final String TYPE_PARAM = "type"; - private static final String AFTER_PARAM = "after"; - private static final String REASON_PARAM = "reason"; - private static final String MESSAGE_PARAM = "message"; - private static final String ONREBOOT_PARAM = "onreboot"; - - private static final String STOP_AFTER_PARAM = "stopAfter"; - - private static final Object ALLOW_ALL_IP_ADDRESS = "ALL"; - private static final String[] allowedIpAddresses = PropsUtil.getArray("maintenance-allowed-ip-addresses"); - - private static final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss"); - - private static final Log _log = LogFactoryUtil.getLog(MaintenanceServlet.class); - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, - IOException { - - JSONObject jsonResponse = JSONFactoryUtil.createJSONObject(); - response.setContentType(CONTENT_TYPE_APPLICATION_JSON); - try { - ServiceContext serviceContext = ServiceContextFactory.getInstance(request); - String pathInfo = request.getPathInfo(); - Map params = request.getParameterMap(); - checkIpAddress(request); - if (START_PATH.equals(pathInfo)) { - MaintenanceSchedule maintenanceSchedule = startMaintenance(params, serviceContext); - if (Validator.isNotNull(maintenanceSchedule)) { - jsonResponse.put("id", maintenanceSchedule.getMaintenanceScheduleId()); - jsonResponse.put("reason", maintenanceSchedule.getReason()); - jsonResponse.put("startDate", MaintenanceDateUtil.getStartDate(maintenanceSchedule)); - } - } else if (STOP_PATH.equals(pathInfo)) { - MaintenanceSchedule maintenanceSchedule = stopMaintenance(params); - if (Validator.isNotNull(maintenanceSchedule)) { - jsonResponse.put("id", maintenanceSchedule.getMaintenanceScheduleId()); - jsonResponse.put("endDate", sdf.format(maintenanceSchedule.getEnd())); - } - } else { - throw new UnsupportedOperationException(); - } - jsonResponse.put("success", "true"); - response.setStatus(HttpServletResponse.SC_OK); - ServletResponseUtil.write(response, jsonResponse.toString()); - } catch (IllegalAccessException e) { - sendErrorResponse(response, HttpServletResponse.SC_FORBIDDEN, e.getMessage()); - } catch (UnsupportedOperationException e) { - sendErrorResponse(response, HttpServletResponse.SC_NOT_FOUND, e.getMessage()); - ServletResponseUtil.write(response, jsonResponse.toString()); - } catch (ParseException | IllegalArgumentException e) { - sendErrorResponse(response, HttpServletResponse.SC_BAD_REQUEST, e.getMessage()); - } catch (Exception e) { - _log.error(e); - sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage()); - } - } - - private MaintenanceSchedule stopMaintenance(Map params) throws IllegalAccessException, - IllegalArgumentException, InvocationTargetException, Exception { - - MaintenanceSchedule result = null; - boolean force = params.get(FORCE_PARAM) != null && params.get(FORCE_PARAM).length > 0 ? Boolean - .valueOf(params.get(FORCE_PARAM)[0]) : false; - if (force) { - PortalMaintenanceUtil.stopMaintenaceMode(); - List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil - .findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); - for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { - MaintenanceScheduleLocalServiceUtil.updateStatus( - maintenanceSchedule.getMaintenanceScheduleId(), - MaintenanceStatus.FORCE_ENDED.getCode(), - "Stop forced at " + sdf.format(DateUtil.newDate())); - } - return null; - } - int stopAfter = params.get(STOP_AFTER_PARAM) != null && params.get(STOP_AFTER_PARAM).length > 0 ? Integer - .valueOf(params.get(STOP_AFTER_PARAM)[0]) : 0; - List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil - .findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); - if (!maintenanceSchedules.isEmpty()) { - if (maintenanceSchedules.size() > 1) { - _log.warn("Multiple maintenance in progress..."); - } - Date end = DateUtil.newDate(); - if (stopAfter > 0) { - Calendar calendar = Calendar.getInstance(); - calendar.add(Calendar.MINUTE, stopAfter); - end = calendar.getTime(); - } - for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { - maintenanceSchedule.setEnd(DateTimeUtil.scaleToNextMinute(end)); - result = MaintenanceScheduleLocalServiceUtil.updateMaintenanceSchedule(maintenanceSchedule); - } - } - return result; - } - - private MaintenanceSchedule startMaintenance(Map params, ServiceContext serviceContext) - throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, Exception { - - boolean force = params.get(FORCE_PARAM) != null && params.get(FORCE_PARAM).length > 0 ? Boolean - .valueOf(params.get(FORCE_PARAM)[0]) : false; - if (force) { - PortalMaintenanceUtil.startMaintenaceMode(UUID.randomUUID().toString(), FORCED_MESSAGE); - return null; - } - Date end = null; - String[] endParam = params.get(END_PARAM); - if (endParam != null && endParam.length > 0) { - end = sdf.parse(endParam[0]); - } - String type = params.get(TYPE_PARAM) != null && params.get(TYPE_PARAM).length > 0 ? params - .get(TYPE_PARAM)[0] : null; - String reason = params.get(REASON_PARAM) != null && params.get(REASON_PARAM).length > 0 ? params - .get(REASON_PARAM)[0] : null; - long after = params.get(AFTER_PARAM) != null && params.get(AFTER_PARAM).length > 0 ? Long - .valueOf(params.get(AFTER_PARAM)[0]) : 0l; - String onreboot = params.get(ONREBOOT_PARAM) != null && params.get(ONREBOOT_PARAM).length > 0 ? params - .get(ONREBOOT_PARAM)[0] : null; - String message = params.get(MESSAGE_PARAM) != null && params.get(MESSAGE_PARAM).length > 0 ? params - .get(MESSAGE_PARAM)[0] : null; - return MaintenanceScheduleLocalServiceUtil.addMaintenanceSchedule(type, reason, message, after, end, - onreboot, serviceContext); - } - - private void checkIpAddress(HttpServletRequest request) throws IllegalAccessException { - - String clientIpAddress = request.getHeader("X-FORWARDED-FOR"); - if (Validator.isNull(clientIpAddress)) { - clientIpAddress = request.getRemoteAddr(); - } - boolean found = false; - for (String ipAddress : allowedIpAddresses) { - if (ipAddress.contains("/")) { - SubnetUtils subnetUtils = new SubnetUtils(ipAddress); - SubnetInfo subnetInfo = subnetUtils.getInfo(); - if (subnetInfo.isInRange(clientIpAddress)) { - found = true; - break; - } - } else if (ipAddress.equals(clientIpAddress) || ipAddress.equals(ALLOW_ALL_IP_ADDRESS)) { - found = true; - break; - } - } - if (!found) { - throw new IllegalAccessException("Your IP address '" + clientIpAddress + "' is not authorized"); - } - } - - private void sendErrorResponse(HttpServletResponse response, int scInternalServerError, String message) - throws IOException { - - JSONObject jsonResponse = JSONFactoryUtil.createJSONObject(); - response.setStatus(scInternalServerError); - jsonResponse.put("success", false); - jsonResponse.put("message", message); - ServletResponseUtil.write(response, jsonResponse.toString()); - } + private static final long serialVersionUID = 4568712977896061068L; + + private static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; + + private static final String START_PATH = "/start"; + private static final String STOP_PATH = "/stop"; + + private static final String FORCE_PARAM = "force"; + private static final String FORCED_MESSAGE = "Forced maintenance mode..."; + + private static final String END_PARAM = "end"; + private static final String TYPE_PARAM = "type"; + private static final String AFTER_PARAM = "after"; + private static final String REASON_PARAM = "reason"; + private static final String MESSAGE_PARAM = "message"; + private static final String ONREBOOT_PARAM = "onreboot"; + + private static final String STOP_AFTER_PARAM = "stopAfter"; + + private static final Object ALLOW_ALL_IP_ADDRESS = "ALL"; + private static final String[] allowedIpAddresses = PropsUtil.getArray("maintenance-allowed-ip-addresses"); + + private static final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss"); + + private static final Log _log = LogFactoryUtil.getLog(MaintenanceServlet.class); + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + JSONObject jsonResponse = JSONFactoryUtil.createJSONObject(); + + response.setContentType(CONTENT_TYPE_APPLICATION_JSON); + + try { + + ServiceContext serviceContext = ServiceContextFactory.getInstance(request); + String pathInfo = request.getPathInfo(); + Map params = request.getParameterMap(); + + checkIpAddress(request); + + if (START_PATH.equals(pathInfo)) { + MaintenanceSchedule maintenanceSchedule = startMaintenance(params, serviceContext); + if (Validator.isNotNull(maintenanceSchedule)) { + jsonResponse.put("id", maintenanceSchedule.getMaintenanceScheduleId()); + jsonResponse.put("reason", maintenanceSchedule.getReason()); + jsonResponse.put("startDate", MaintenanceDateUtil.getStartDate(maintenanceSchedule)); + } + } else if (STOP_PATH.equals(pathInfo)) { + MaintenanceSchedule maintenanceSchedule = stopMaintenance(params); + if (Validator.isNotNull(maintenanceSchedule)) { + jsonResponse.put("id", maintenanceSchedule.getMaintenanceScheduleId()); + jsonResponse.put("endDate", sdf.format(maintenanceSchedule.getEnd())); + } + } else { + throw new UnsupportedOperationException(); + } + + jsonResponse.put("success", "true"); + response.setStatus(HttpServletResponse.SC_OK); + ServletResponseUtil.write(response, jsonResponse.toString()); + + } catch (IllegalAccessException e) { + sendErrorResponse(response, HttpServletResponse.SC_FORBIDDEN, e.getMessage()); + } catch (UnsupportedOperationException e) { + sendErrorResponse(response, HttpServletResponse.SC_NOT_FOUND, e.getMessage()); + ServletResponseUtil.write(response, jsonResponse.toString()); + } catch (ParseException | IllegalArgumentException e) { + sendErrorResponse(response, HttpServletResponse.SC_BAD_REQUEST, e.getMessage()); + } catch (Exception e) { + _log.error(e); + sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage()); + } + + } + + + + private MaintenanceSchedule stopMaintenance(Map params) throws IllegalAccessException, + IllegalArgumentException, InvocationTargetException, Exception { + + MaintenanceSchedule result = null; + + + boolean force = + params.get(FORCE_PARAM) != null && params.get(FORCE_PARAM).length > 0 ? Boolean + .valueOf(params.get(FORCE_PARAM)[0]) : false; + + if (force) { + PortalMaintenanceUtil.stopMaintenaceMode(); + List maintenanceSchedules = + MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); + for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { + MaintenanceScheduleLocalServiceUtil.updateStatus(maintenanceSchedule.getMaintenanceScheduleId(), + MaintenanceStatus.FORCE_ENDED.getCode(), "Stop forced at " + sdf.format(DateUtil.newDate())); + } + return null; + } + + int stopAfter = + params.get(STOP_AFTER_PARAM) != null && params.get(STOP_AFTER_PARAM).length > 0 ? Integer.valueOf(params + .get(STOP_AFTER_PARAM)[0]) : 0; + + List maintenanceSchedules = + MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); + + if (!maintenanceSchedules.isEmpty()) { + + if (maintenanceSchedules.size() > 1) { + _log.warn("Multiple maintenance in progress..."); + } + + Date end = DateUtil.newDate(); + + if (stopAfter > 0) { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.MINUTE, stopAfter); + end = calendar.getTime(); + } + + for (MaintenanceSchedule maintenanceSchedule : maintenanceSchedules) { + maintenanceSchedule.setEnd(DateTimeUtil.scaleToNextMinute(end)); + result = MaintenanceScheduleLocalServiceUtil.updateMaintenanceSchedule(maintenanceSchedule); + } + + } + + return result; + + } + + private MaintenanceSchedule startMaintenance(Map params, ServiceContext serviceContext) + throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, Exception { + + boolean force = + params.get(FORCE_PARAM) != null && params.get(FORCE_PARAM).length > 0 ? Boolean + .valueOf(params.get(FORCE_PARAM)[0]) : false; + + if (force) { + PortalMaintenanceUtil.startMaintenaceMode(UUID.randomUUID().toString(), FORCED_MESSAGE); + return null; + } + + Date end = null; + String[] endParam = params.get(END_PARAM); + if (endParam != null && endParam.length > 0) { + end = sdf.parse(endParam[0]); + } + + String type = + params.get(TYPE_PARAM) != null && params.get(TYPE_PARAM).length > 0 ? params.get(TYPE_PARAM)[0] : null; + String reason = + params.get(REASON_PARAM) != null && params.get(REASON_PARAM).length > 0 ? params.get(REASON_PARAM)[0] : null; + long after = + params.get(AFTER_PARAM) != null && params.get(AFTER_PARAM).length > 0 ? Long + .valueOf(params.get(AFTER_PARAM)[0]) : 0l; + String onreboot = + params.get(ONREBOOT_PARAM) != null && params.get(ONREBOOT_PARAM).length > 0 ? params.get(ONREBOOT_PARAM)[0] + : null; + String message = + params.get(MESSAGE_PARAM) != null && params.get(MESSAGE_PARAM).length > 0 ? params.get(MESSAGE_PARAM)[0] : null; + + return MaintenanceScheduleLocalServiceUtil.addMaintenanceSchedule(type, reason, message, after, end, onreboot, + serviceContext); + + } + + private void checkIpAddress(HttpServletRequest request) throws IllegalAccessException { + + String clientIpAddress = request.getHeader("X-FORWARDED-FOR"); + if (Validator.isNull(clientIpAddress)) { + clientIpAddress = request.getRemoteAddr(); + } + + boolean found = false; + for (String ipAddress : allowedIpAddresses) { + + if (ipAddress.contains("/")) { + SubnetUtils subnetUtils = new SubnetUtils(ipAddress); + SubnetInfo subnetInfo = subnetUtils.getInfo(); + if (subnetInfo.isInRange(clientIpAddress)) { + found = true; + break; + } + } else if (ipAddress.equals(clientIpAddress) || ipAddress.equals(ALLOW_ALL_IP_ADDRESS)) { + found = true; + break; + } + } + + if (!found) { + throw new IllegalAccessException("Your IP address '" + clientIpAddress + "' is not authorized"); + } + + } + + + private void sendErrorResponse(HttpServletResponse response, int scInternalServerError, String message) + throws IOException { + JSONObject jsonResponse = JSONFactoryUtil.createJSONObject(); + response.setStatus(scInternalServerError); + jsonResponse.put("success", false); + jsonResponse.put("message", message); + ServletResponseUtil.write(response, jsonResponse.toString()); + } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/DateTimeUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/DateTimeUtil.java index 390a3613..9424eda6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/DateTimeUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/DateTimeUtil.java @@ -5,36 +5,37 @@ import java.util.Date; public class DateTimeUtil { - /** - * This method remove seconds and milliseconds to the input date. - * - * @param input - * @return the input with seconds and milliseconds equal to 0 - */ - public static Date removeSeconds(Date input) { - Calendar calendar = Calendar.getInstance(); - calendar.setTime(input); - calendar.set(Calendar.SECOND, 0); - calendar.set(Calendar.MILLISECOND, 0); - return calendar.getTime(); - } + /** + * This method remove seconds and milliseconds to the input date. + * + * @param input + * @return the input with seconds and milliseconds equal to 0 + */ + public static Date removeSeconds(Date input) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(input); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTime(); + } + + /** + * This method add a minute , remove seconds and milliseconds to the input date. If seconds and + * milliseconds are equal to 0, return the input. + * + * @param input + * @return the date scaled or the input if doesn't require scaling. + */ + public static Date scaleToNextMinute(Date input) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(input); + if (calendar.get(Calendar.SECOND) != 0 || calendar.get(Calendar.MILLISECOND) != 0) { + calendar.add(Calendar.MINUTE, 1); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + return calendar.getTime(); + } + return input; + } - /** - * This method add a minute , remove seconds and milliseconds to the input - * date. If seconds and milliseconds are equal to 0, return the input. - * - * @param input - * @return the date scaled or the input if doesn't require scaling. - */ - public static Date scaleToNextMinute(Date input) { - Calendar calendar = Calendar.getInstance(); - calendar.setTime(input); - if (calendar.get(Calendar.SECOND) != 0 || calendar.get(Calendar.MILLISECOND) != 0) { - calendar.add(Calendar.MINUTE, 1); - calendar.set(Calendar.SECOND, 0); - calendar.set(Calendar.MILLISECOND, 0); - return calendar.getTime(); - } - return input; - } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceConstants.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceConstants.java index b346ed44..014d9ace 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceConstants.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceConstants.java @@ -1,123 +1,130 @@ package it.tref.liferay.portos.maintenance.util; + public class MaintenanceConstants { - public enum MaintenanceType { + public enum MaintenanceType { + + FULL("full", "Full mode"), USER("user", "Only user mode"); + + MaintenanceType(String code, String description) { + this.setCode(code); + this.setDescription(description); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } - FULL("full", "Full mode"), USER("user", "Only user mode"); + private String code; + private String description; - MaintenanceType(String code, String description) { - this.setCode(code); - this.setDescription(description); - } + public static MaintenanceType parse(String code) { - public String getDescription() { - return description; - } + for (MaintenanceType maintenanceType : values()) { + if (maintenanceType.code.equals(code)) { + return maintenanceType; + } + } - public void setDescription(String description) { - this.description = description; - } + throw new IllegalArgumentException("Invalid MaintenanceType code: " + code); + } - public String getCode() { - return code; - } + } - public void setCode(String code) { - this.code = code; - } + public enum MaintenanceOnReboot { - private String code; - private String description; + CONTINUE("continue", "Continue"), TERMINATE("terminate", "Terminate"); - public static MaintenanceType parse(String code) { + MaintenanceOnReboot(String code, String description) { + this.setCode(code); + this.setDescription(description); + } - for (MaintenanceType maintenanceType : values()) { - if (maintenanceType.code.equals(code)) { - return maintenanceType; - } - } - throw new IllegalArgumentException("Invalid MaintenanceType code: " + code); - } - } + public String getDescription() { + return description; + } - public enum MaintenanceOnReboot { + public void setDescription(String description) { + this.description = description; + } - CONTINUE("continue", "Continue"), TERMINATE("terminate", "Terminate"); + public String getCode() { + return code; + } - MaintenanceOnReboot(String code, String description) { - this.setCode(code); - this.setDescription(description); - } + public void setCode(String code) { + this.code = code; + } - public String getDescription() { - return description; - } + private String code; + private String description; - public void setDescription(String description) { - this.description = description; - } + public static MaintenanceOnReboot parse(String code) { - public String getCode() { - return code; - } + for (MaintenanceOnReboot maintenanceOnReboot : values()) { + if (maintenanceOnReboot.code.equals(code)) { + return maintenanceOnReboot; + } + } - public void setCode(String code) { - this.code = code; - } + throw new IllegalArgumentException("Invalid MaintenanceOnReboot code: " + code); + } - private String code; - private String description; + } - public static MaintenanceOnReboot parse(String code) { + public enum MaintenanceStatus { - for (MaintenanceOnReboot maintenanceOnReboot : values()) { - if (maintenanceOnReboot.code.equals(code)) { - return maintenanceOnReboot; - } - } - throw new IllegalArgumentException("Invalid MaintenanceOnReboot code: " + code); - } + NEW("N", "New"), IN_PROGRESS("P", "In Progress"), ENDED("E", "Ended"), FORCE_ENDED("FE", "Force Ended"), ERROR( + "ER", "Error"); - } + MaintenanceStatus(String code, String description) { + this.setCode(code); + this.setDescription(description); + } - public enum MaintenanceStatus { + public String getDescription() { + return description; + } - NEW("N", "New"), IN_PROGRESS("P", "In Progress"), ENDED("E", "Ended"), FORCE_ENDED("FE", - "Force Ended"), ERROR("ER", "Error"); + public void setDescription(String description) { + this.description = description; + } - MaintenanceStatus(String code, String description) { - this.setCode(code); - this.setDescription(description); - } + public String getCode() { + return code; + } - public String getDescription() { - return description; - } + public void setCode(String code) { + this.code = code; + } - public void setDescription(String description) { - this.description = description; - } + private String code; + private String description; - public String getCode() { - return code; - } + public static MaintenanceStatus parse(String code) { - public void setCode(String code) { - this.code = code; - } + for (MaintenanceStatus maintenanceStatus : values()) { + if (maintenanceStatus.code.equals(code)) { + return maintenanceStatus; + } + } - private String code; - private String description; + throw new IllegalArgumentException("Invalid MaintenanceStatus code: " + code); + } - public static MaintenanceStatus parse(String code) { + } - for (MaintenanceStatus maintenanceStatus : values()) { - if (maintenanceStatus.code.equals(code)) { - return maintenanceStatus; - } - } - throw new IllegalArgumentException("Invalid MaintenanceStatus code: " + code); - } - } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceDateUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceDateUtil.java index 725b69b1..d36bc30b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceDateUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/MaintenanceDateUtil.java @@ -7,17 +7,20 @@ import java.util.Date; public class MaintenanceDateUtil { - public static Date getStartDate(Date createDate, int after) { - - Calendar calendar = Calendar.getInstance(); - calendar.setTime(createDate); - if (after > 0) { - calendar.add(Calendar.MINUTE, after); - } - return calendar.getTime(); - } - - public static Date getStartDate(MaintenanceSchedule maintenanceSchedule) { - return getStartDate(maintenanceSchedule.getCreateDate(), (int) maintenanceSchedule.getAfter()); - } + public static Date getStartDate(Date createDate, int after) { + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(createDate); + + if (after > 0) { + calendar.add(Calendar.MINUTE, after); + } + + return calendar.getTime(); + } + + public static Date getStartDate(MaintenanceSchedule maintenanceSchedule) { + return getStartDate(maintenanceSchedule.getCreateDate(), (int) maintenanceSchedule.getAfter()); + } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/PortalMaintenanceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/PortalMaintenanceUtil.java index 1e0a29f8..5d543ea0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/PortalMaintenanceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/maintenance/util/PortalMaintenanceUtil.java @@ -1,7 +1,5 @@ package it.tref.liferay.portos.maintenance.util; -import java.lang.reflect.InvocationTargetException; - import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.util.ClassResolverUtil; import com.liferay.portal.kernel.util.LocaleUtil; @@ -9,29 +7,35 @@ import com.liferay.portal.kernel.util.PortalClassLoaderUtil; import com.liferay.portal.kernel.util.ReflectionUtil; import com.liferay.portal.kernel.util.Validator; +import java.lang.reflect.InvocationTargetException; + public class PortalMaintenanceUtil { - public static void startMaintenaceMode(String sessionId, String classNameParam) - throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, Exception { - - String className = LanguageUtil - .get(LocaleUtil.getDefault(), - "the-sign-in-process-is-temporarily-disabled-because-the-portal-is-undergoing-a-routine-maintenance-upgrade"); - if (Validator.isNotNull(classNameParam)) { - className = classNameParam; - } - Class clazz = ClassResolverUtil.resolve("com.liferay.portal.util.MaintenanceUtil", - PortalClassLoaderUtil.getClassLoader()); - ReflectionUtil.getDeclaredMethod(clazz, "maintain", String.class, String.class).invoke(null, - sessionId, className); - } - - public static void stopMaintenaceMode() throws IllegalAccessException, IllegalArgumentException, - InvocationTargetException, Exception { - - Class clazz = ClassResolverUtil.resolve("com.liferay.portal.util.MaintenanceUtil", - PortalClassLoaderUtil.getClassLoader()); - ReflectionUtil.getDeclaredMethod(clazz, "cancel", new Class[0]).invoke(null, new Object[0]); - - } + public static void startMaintenaceMode(String sessionId, String classNameParam) throws IllegalAccessException, + IllegalArgumentException, InvocationTargetException, Exception { + + String className = + LanguageUtil + .get(LocaleUtil.getDefault(), + "the-sign-in-process-is-temporarily-disabled-because-the-portal-is-undergoing-a-routine-maintenance-upgrade"); + + if (Validator.isNotNull(classNameParam)) { + className = classNameParam; + } + + Class clazz = + ClassResolverUtil.resolve("com.liferay.portal.util.MaintenanceUtil", PortalClassLoaderUtil.getClassLoader()); + ReflectionUtil.getDeclaredMethod(clazz, "maintain", String.class, String.class).invoke(null, sessionId, className); + } + + public static void stopMaintenaceMode() throws IllegalAccessException, IllegalArgumentException, + InvocationTargetException, Exception { + + Class clazz = + ClassResolverUtil.resolve("com.liferay.portal.util.MaintenanceUtil", PortalClassLoaderUtil.getClassLoader()); + ReflectionUtil.getDeclaredMethod(clazz, "cancel", new Class[0]).invoke(null, new Object[0]); + + + } + } 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 0a81415e..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,75 +1,75 @@ -<%@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"%> + <% -long maintenanceScheduleId = ParamUtil.getLong(request,"maintenanceScheduleId"); -MaintenanceSchedule maintenanceSchedule = null; -if (Validator.isNotNull(maintenanceScheduleId)) { - maintenanceSchedule = MaintenanceScheduleLocalServiceUtil.getMaintenanceSchedule(maintenanceScheduleId); -} + long maintenanceScheduleId = ParamUtil.getLong(request,"maintenanceScheduleId"); + + MaintenanceSchedule maintenanceSchedule = null; + if(Validator.isNotNull(maintenanceScheduleId)){ + maintenanceSchedule = MaintenanceScheduleLocalServiceUtil.getMaintenanceSchedule(maintenanceScheduleId); + } %> - - - - - - + + + + + + + + + + - - + + + + + - - <% - for (MaintenanceType maintenanceType : MaintenanceType.values()) { - %> - <%= maintenanceType.getDescription() %> - <% - } - %> + + + <% for(MaintenanceType maintenanceType : MaintenanceType.values()){ %> + <%=maintenanceType.getDescription() %> + <%} %> - + + + + + - - <% - for (MaintenanceOnReboot maintenanceOnReboot : MaintenanceOnReboot.values()) { - %> - - <%= maintenanceOnReboot.getDescription() %> - - <% - } - %> + + + <% for(MaintenanceOnReboot maintenanceOnReboot : MaintenanceOnReboot.values()){ %> + <%=maintenanceOnReboot.getDescription() %> + <%} %> - - <% - for (MaintenanceStatus maintenanceStatus : MaintenanceStatus.values()) { - %> - - <%= maintenanceStatus.getDescription() %> - - <% - } - %> + + + <% for(MaintenanceStatus maintenanceStatus : MaintenanceStatus.values()){ %> + <%=maintenanceStatus.getDescription() %> + <%} %> + + - - + + + + + + + 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 70869955..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,18 +1,27 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/admin_maintenance/init.jsp" %> + <% -List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus - .IN_PROGRESS.getCode()); -boolean isMaintenanceMode = !maintenanceSchedules.isEmpty(); + boolean isMaintenanceMode = false; + List maintenanceSchedules = MaintenanceScheduleLocalServiceUtil.findByStatus(MaintenanceStatus.IN_PROGRESS.getCode()); + if(!maintenanceSchedules.isEmpty()){ + isMaintenanceMode = true; + } %> + + + console.log("weeeeeeeeeeeee"); - new Liferay.Notice({ - closeText: false, - toggleText: false, - content: Liferay.Language.get('warning-the-portal-is-in-maintenance-mode-only-admin'), - noticeClass: 'popup-alert-notice', - }).show(); + new Liferay.Notice( + { + closeText: false, + toggleText: false, + content: Liferay.Language.get('warning-the-portal-is-in-maintenance-mode-only-admin'), + noticeClass: 'popup-alert-notice' + } + ).show(); + + 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 785eec74..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,24 +1,37 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/html/admin_maintenance/init.jsp"%> + <% SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); + String redirect = searchContainer.getIteratorURL().toString(); + ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); + MaintenanceSchedule entry = (MaintenanceSchedule) row.getObject(); %> - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 6a2c946d..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,13 +1,20 @@ -<%@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 70c73b83..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,44 +1,69 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/admin_maintenance/init.jsp" %> + <% -PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); + PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); %> - - <% request.setAttribute("liferay-ui:search:searchContainer", searchContainer); %> - - - - - - - - - - - - - <%= MaintenanceOnReboot.parse(maintenanceSchedule.getOnreboot()).getDescription() %> - - - <%=MaintenanceStatus.parse(maintenanceSchedule.getStatus()).getDescription()%> - - - - - - - - - - - - - - + + <% request.setAttribute("liferay-ui:search:searchContainer", searchContainer); %> + + + + + + + + + + + + + + + + + + + + + + + + + <%= MaintenanceOnReboot.parse(maintenanceSchedule.getOnreboot()).getDescription() %> + + + <%=MaintenanceStatus.parse(maintenanceSchedule.getStatus()).getDescription()%> + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file 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 e1e2e836..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,11 +1,14 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + <%@page import="java.text.SimpleDateFormat"%> <%@page import="com.liferay.portlet.PortletURLUtil"%> <%@page import="javax.portlet.PortletURL"%> <%@page import="javax.portlet.PortletMode"%> <%@page import="javax.portlet.WindowState"%> + <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> + <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> <%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> <%@ taglib uri="http://liferay.com/tld/security" prefix="liferay-security" %> @@ -13,13 +16,20 @@ <%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> <%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> <%@ taglib uri="http://liferay.com/tld/ddm" prefix="liferay-ddm" %> + <%@ page contentType="text/html; charset=UTF-8" %> + + <% PortletMode portletMode = liferayPortletRequest.getPortletMode(); WindowState windowState = liferayPortletRequest.getWindowState(); + PortletURL currentURLObj = PortletURLUtil.getCurrent(liferayPortletRequest, liferayPortletResponse); + String currentURL = currentURLObj.toString(); + SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); + %> 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 7f058349..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,2 +1,7 @@ -<%@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 066bd440..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,45 +1,52 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/poller_maintenance/init.jsp" %> - + + + -var maintenanceAlert = null; -var maintenanceScheduleId = 0; -function controllaManutenzione() { - A.io.request('<%= maintenancePollerURL %>', { - dataType:'json', - on: { - success: function() { - var response = this.get('responseData'); - if (response.maintenanceExpected) { - if (maintenanceScheduleId === 0) { - maintenanceScheduleId = response.maintenanceScheduleId; - maintenanceAlert = new Liferay.MaintenanceAlert({ - remainingTime: response.startFrom, - onExpired: function(){ - A.clearInterval(mainProcess); - } - }); - } else if (maintenanceScheduleId !== response.maintenanceScheduleId) { + var maintenanceAlert = null; + var maintenanceScheduleId = 0; + + function controllaManutenzione() { + + A.io.request('<%= maintenancePollerURL %>', { + dataType:'json', + on: { + success: function() { + + var response = this.get('responseData'); + + if(response.maintenanceExpected){ + + if(maintenanceScheduleId === 0){ + maintenanceScheduleId = response.maintenanceScheduleId; + maintenanceAlert = new Liferay.MaintenanceAlert({ + remainingTime: response.startFrom, + onExpired: function(){ + A.clearInterval(mainProcess); + } + }); + }else if(maintenanceScheduleId !== response.maintenanceScheduleId){ + maintenanceAlert.cancel(); + maintenanceAlert = null; + maintenanceScheduleId = response.maintenanceScheduleId; + maintenanceAlert = new Liferay.MaintenanceAlert({ + remainingTime: response.startFrom, + onExpired: function(){ + A.clearInterval(mainProcess); + } + }); + } + + }else if(maintenanceAlert){ maintenanceAlert.cancel(); maintenanceAlert = null; - maintenanceScheduleId = response.maintenanceScheduleId; - maintenanceAlert = new Liferay.MaintenanceAlert({ - remainingTime: response.startFrom, - onExpired: function(){ - A.clearInterval(mainProcess); - } - }); } - } else if (maintenanceAlert) { - maintenanceAlert.cancel(); - maintenanceAlert = null; } } - } - }); -} - -controllaManutenzione(); -var mainProcess = A.setInterval(controllaManutenzione, 10 * 1000); - + }); + } + + controllaManutenzione(); + var mainProcess = A.setInterval(controllaManutenzione, 10 * 1000); + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.project index b4246e62..234d78ae 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804185 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + 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..7a11d3ba 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,9 +1,7 @@ - + portal.properties - - content/Language.properties - + content/Language.properties \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-portlet.xml index 4b836084..926ab307 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,7 +2,6 @@ - 1 false @@ -11,7 +10,7 @@ notification-portlet true true - true + true administrator diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/portlet.xml index 6b093dde..4d579ead 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - 1 Notification - - it.tref.liferay.portos.notification.portlet.NotificationPortlet - + it.tref.liferay.portos.notification.portlet.NotificationPortlet view-template /html/notification/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/portlet/NotificationPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/portlet/NotificationPortlet.java index 48789d84..c21d90ff 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/portlet/NotificationPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/portlet/NotificationPortlet.java @@ -55,7 +55,7 @@ public class NotificationPortlet extends MVCPortlet { ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest); long companyId = serviceContext.getCompanyId(); -// long groupId = serviceContext.getScopeGroupId(); + long groupId = serviceContext.getScopeGroupId(); long userId = serviceContext.getUserId(); int count = 0; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/html/init.jsp index 62f983fd..17ee0431 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-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-notification-portlet/docroot/html/notification/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/html/notification/view.jsp index 6931693b..58c1d33f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/html/notification/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/html/notification/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.model.Role"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> <%@page import="com.liferay.portal.service.RoleLocalServiceUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.project index 7d7b8912..11ff2103 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804218 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-display.xml index 248527cf..a32ed037 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-display.xml @@ -2,7 +2,6 @@ - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-portlet.xml index b4b537da..2aeb3f48 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -2,7 +2,6 @@ - reports /icon.png diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/portlet.xml index 7d277b57..01445690 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/portlet.xml @@ -1,13 +1,10 @@ - reports Reports - - it.tref.portos.report.engine.portlet.ReportsPortlet - + it.tref.portos.report.engine.portlet.ReportsPortlet view-template /html/reports/view.jsp 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 7a3e83f1..22bdd178 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,110 +1,83 @@ - + + 3F Consulting portos_report - - - + - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + - - + - - - + - + - + - + - + - - - - - + - - - + - - - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + - - + - - - + - + - - - \ No newline at end of file +
\ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/sql/tables.sql index bac9d7f0..e69de29b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/sql/tables.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/sql/tables.sql @@ -1,38 +0,0 @@ -create table kaleoinstance ( - kaleoInstanceId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoDefinitionName VARCHAR(200) null, - kaleoDefinitionVersion INTEGER, - rootKaleoInstanceTokenId LONG, - className VARCHAR(200) null, - classPK LONG, - completed BOOLEAN, - completionDate DATE null, - workflowContext VARCHAR(200) null -); - -create table kaleotaskassignmentinstance ( - kaleoTaskAssignmentInstanceId LONG not null primary key, - groupId LONG, - companyId LONG, - userId LONG, - userName VARCHAR(200) null, - createDate DATE null, - modifiedDate DATE null, - kaleoDefinitionId LONG, - kaleoInstanceId LONG, - kaleoInstanceTokenId LONG, - kaleoTaskInstanceTokenId LONG, - kaleoTaskId LONG, - kaleoTaskName VARCHAR(200) null, - assigneeClassName VARCHAR(200) null, - assigneeClassPK LONG, - completed BOOLEAN, - completionDate DATE null -); \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml index 9b6ff6f0..96b82a76 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -6,35 +6,25 @@ - - 200 - + - - 200 - + - - 200 - + - - 200 - + - - 200 - + @@ -42,12 +32,8 @@ - - 200 - - - 200 - + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoInstanceModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoInstanceModelImpl.java index af208a56..d31bb8f6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoInstanceModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoInstanceModelImpl.java @@ -78,7 +78,7 @@ public class KaleoInstanceModelImpl extends BaseModelImpl { "completionDate", Types.TIMESTAMP }, { "workflowContext", Types.VARCHAR } }; - public static final String TABLE_SQL_CREATE = "create table kaleoinstance (kaleoInstanceId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(200) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,kaleoDefinitionName VARCHAR(200) null,kaleoDefinitionVersion INTEGER,rootKaleoInstanceTokenId LONG,className VARCHAR(200) null,classPK LONG,completed BOOLEAN,completionDate DATE null,workflowContext VARCHAR(200) null)"; + public static final String TABLE_SQL_CREATE = "create table kaleoinstance (kaleoInstanceId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,kaleoDefinitionId LONG,kaleoDefinitionName VARCHAR(75) null,kaleoDefinitionVersion INTEGER,rootKaleoInstanceTokenId LONG,className VARCHAR(75) null,classPK LONG,completed BOOLEAN,completionDate DATE null,workflowContext VARCHAR(75) null)"; public static final String TABLE_SQL_DROP = "drop table kaleoinstance"; public static final String ORDER_BY_JPQL = " ORDER BY kaleoInstance.kaleoInstanceId ASC"; public static final String ORDER_BY_SQL = " ORDER BY kaleoinstance.kaleoInstanceId ASC"; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceModelImpl.java index dd704fc4..2fa60e6c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/model/impl/KaleoTaskAssignmentInstanceModelImpl.java @@ -79,7 +79,7 @@ public class KaleoTaskAssignmentInstanceModelImpl extends BaseModelImpl>> 32)); return result; } - @Override public boolean equals(Object obj) { - if (this == obj) return true; if (obj == null) @@ -120,14 +92,13 @@ public class ReportTempisticheBean { return false; return true; } - public String getStatoPratica() { - return statoPratica; } - public void setStatoPratica(String statoPratica) { - this.statoPratica = statoPratica; } + + + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/reportsBody.jsp b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/reportsBody.jsp index be3567b3..f4740f74 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/reportsBody.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/reportsBody.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/reports/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/view.jsp index 7fc2bce9..e49d231d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/html/reports/view.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/html/reports/init.jsp" %> <% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/.project b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/.project index 2bcf3cc7..afc38bd6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/.project @@ -34,4 +34,15 @@ org.eclipse.wst.jsdt.core.jsNature org.apache.ivyde.eclipse.ivynature + + + 1672931804231 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/liferay-display.xml index 7b63619e..ce812348 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/liferay-display.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file 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 6fc1fc53..5ae00f1d 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,29 +1,28 @@ - + Walter Tommasi portos_rep - - - - - - - - - + + + + + + + + + - + - + - - - + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.project b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.project index 36877ecb..341537af 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.project +++ b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1672931804005 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/.project b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/.project index 88dabc9e..dbb6f40b 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/.project +++ b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1672931804022 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.project b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.project index 1b9b333c..fdc388e3 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.project +++ b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1672931804103 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/shared/portos-kaleo-shared/.project b/liferay-plugins-sdk-6.2/shared/portos-kaleo-shared/.project index c1c33c24..014a0593 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-kaleo-shared/.project +++ b/liferay-plugins-sdk-6.2/shared/portos-kaleo-shared/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1672931804138 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.project b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.project index cc884b36..84faa446 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.project +++ b/liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.project @@ -5,6 +5,11 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.jdt.core.javabuilder @@ -13,5 +18,17 @@ org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + 1672931804171 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/shared/portos-report-shared/.project b/liferay-plugins-sdk-6.2/shared/portos-report-shared/.project index 6fb6a40f..83b25a5b 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-report-shared/.project +++ b/liferay-plugins-sdk-6.2/shared/portos-report-shared/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1672931804235 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/.project b/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/.project index 20b8d19a..9f4604b4 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/.project +++ b/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/.project @@ -38,4 +38,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804192 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/themes/portos-private-theme/.project b/liferay-plugins-sdk-6.2/themes/portos-private-theme/.project index 5c3583f6..4e4ef258 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-private-theme/.project +++ b/liferay-plugins-sdk-6.2/themes/portos-private-theme/.project @@ -38,4 +38,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804202 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/themes/portos-public-theme/.project b/liferay-plugins-sdk-6.2/themes/portos-public-theme/.project index aed0ce88..4eaa319a 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-public-theme/.project +++ b/liferay-plugins-sdk-6.2/themes/portos-public-theme/.project @@ -38,4 +38,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804209 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/.project b/liferay-plugins-sdk-6.2/webs/elasticray-web/.project index 4e8351de..ac6b7c0e 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/.project +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931803966 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.project b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.project index 32a08cf6..97f0af8f 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.project +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804144 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/liferay-plugins-sdk-6.2/webs/resources-importer-web/.project b/liferay-plugins-sdk-6.2/webs/resources-importer-web/.project index d0fffb37..2a99fe1e 100644 --- a/liferay-plugins-sdk-6.2/webs/resources-importer-web/.project +++ b/liferay-plugins-sdk-6.2/webs/resources-importer-web/.project @@ -33,4 +33,15 @@ org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + + + 1672931804240 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + +