diff --git a/liferay-plugins-sdk-6.2/build.portos.properties.save b/liferay-plugins-sdk-6.2/build.portos.properties.save deleted file mode 100644 index f0db2994..00000000 --- a/liferay-plugins-sdk-6.2/build.portos.properties.save +++ /dev/null @@ -1,7 +0,0 @@ -app.server.tomcat.lib.global.dir = /home/portos/bin/liferay-paesaggistica/tomcat-7.0.62/lib/ext -app.server.tomcat.deploy.dir = /home/portos/bin/liferay-paesaggistica/tomcat-7.0.62/webapps -app.server.parent.dir = /home/portos/bin/liferay-paesaggistica -app.server.tomcat.dir = /home/portos/bin/liferay-paesaggistica/tomcat-7.0.62 -app.server.type = tomcat -app.server.tomcat.portal.dir = /home/portos/bin/liferay-paesaggistica/tomcat-7.0.62/webapps/ROOT -javac.encoding = UTF-8 diff --git a/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/.classpath b/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/.classpath index b1d20cc4..991a105e 100644 --- a/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/.classpath +++ b/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/src/it/tref/liferay/portlet/p7mpreview/P7mPreview.java b/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/src/it/tref/liferay/portlet/p7mpreview/P7mPreview.java index 39ed7ce9..1c8861f4 100644 --- a/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/src/it/tref/liferay/portlet/p7mpreview/P7mPreview.java +++ b/liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/src/it/tref/liferay/portlet/p7mpreview/P7mPreview.java @@ -8,53 +8,39 @@ import com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor; import java.util.List; -public class P7mPreview extends DLPreviewableProcessor{ +public class P7mPreview extends DLPreviewableProcessor { @Override public void afterPropertiesSet() throws Exception { - // TODO Auto-generated method stub - } @Override public boolean isSupported(String mimeType) { - // TODO Auto-generated method stub return false; } @Override - protected void doExportGeneratedFiles( - PortletDataContext portletDataContext, FileEntry fileEntry, + protected void doExportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement) throws Exception { - // TODO Auto-generated method stub - } @Override - protected void doImportGeneratedFiles( - PortletDataContext portletDataContext, FileEntry fileEntry, - FileEntry importedFileEntry, Element fileEntryElement) - throws Exception { - // TODO Auto-generated method stub - + protected void doImportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, + FileEntry importedFileEntry, Element fileEntryElement) throws Exception { } @Override protected List getFileVersionIds() { - // TODO Auto-generated method stub return null; } @Override protected String getPreviewType(FileVersion fileVersion) { - // TODO Auto-generated method stub return null; } @Override protected String getThumbnailType(FileVersion fileVersion) { - // TODO Auto-generated method stub return null; } - } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.classpath index 1a538b03..9975372f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.classpath index 1a538b03..9975372f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDatabase.java b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDatabase.java index 48b07151..663fc1fc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDatabase.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDatabase.java @@ -8,23 +8,21 @@ import com.liferay.portal.kernel.audit.AuditMessageProcessor; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; - public class ProcessorRouterAuditDatabase implements AuditMessageProcessor { - private static Log _log = LogFactoryUtil.getLog(ProcessorRouterAuditDatabase.class); - + private static Log _log = LogFactoryUtil.getLog(ProcessorRouterAuditDatabase.class); - @Override - public void process(AuditMessage auditMessage) throws AuditException { - try { - doProcess(auditMessage); - } catch (Exception e) { - _log.fatal("Unable to process audit message " + auditMessage, e); - } - } + @Override + public void process(AuditMessage auditMessage) throws AuditException { + try { + doProcess(auditMessage); + } catch (Exception e) { + _log.fatal("Unable to process audit message " + auditMessage, e); + } + } - protected void doProcess(AuditMessage auditMessage) throws Exception { - AuditEventLocalServiceUtil.addAuditEvent(auditMessage); - } + protected void doProcess(AuditMessage auditMessage) throws Exception { + AuditEventLocalServiceUtil.addAuditEvent(auditMessage); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDefault.java b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDefault.java index e140b41f..54940f43 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDefault.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/ProcessorRouterAuditDefault.java @@ -14,66 +14,65 @@ import java.util.concurrent.CopyOnWriteArrayList; public class ProcessorRouterAuditDefault implements AuditRouter { - private Map> _auditMessageProcessors = - new ConcurrentHashMap>(); - private List _globalAuditMessageProcessors = new CopyOnWriteArrayList(); + private Map> _auditMessageProcessors = new ConcurrentHashMap>(); + private List _globalAuditMessageProcessors = new CopyOnWriteArrayList(); - @Override - public boolean isDeployed() { - int auditMessageProcessorsCount = 0; + @Override + public boolean isDeployed() { + int auditMessageProcessorsCount = 0; - if (_auditMessageProcessors != null) { - auditMessageProcessorsCount = _auditMessageProcessors.size(); - } + if (_auditMessageProcessors != null) { + auditMessageProcessorsCount = _auditMessageProcessors.size(); + } - if ((auditMessageProcessorsCount > 0) || !_globalAuditMessageProcessors.isEmpty()) { + if ((auditMessageProcessorsCount > 0) || !_globalAuditMessageProcessors.isEmpty()) { - return true; - } else { - return false; - } - } + return true; + } else { + return false; + } + } - @Override - public void route(AuditMessage auditMessage) throws AuditException { + @Override + public void route(AuditMessage auditMessage) throws AuditException { - for (AuditMessageProcessor globalAuditMessageProcessor : _globalAuditMessageProcessors) { + for (AuditMessageProcessor globalAuditMessageProcessor : _globalAuditMessageProcessors) { - globalAuditMessageProcessor.process(auditMessage); - } + globalAuditMessageProcessor.process(auditMessage); + } - String eventType = auditMessage.getEventType(); + String eventType = auditMessage.getEventType(); - Set auditMessageProcessors = _auditMessageProcessors.get(eventType); + Set auditMessageProcessors = _auditMessageProcessors.get(eventType); - if (auditMessageProcessors != null) { - for (AuditMessageProcessor auditMessageProcessor : auditMessageProcessors) { - auditMessageProcessor.process(auditMessage); - } - } - } + if (auditMessageProcessors != null) { + for (AuditMessageProcessor auditMessageProcessor : auditMessageProcessors) { + auditMessageProcessor.process(auditMessage); + } + } + } - public void setAuditMessageProcessors(Map> auditMessageProcessors) { + public void setAuditMessageProcessors(Map> auditMessageProcessors) { - for (Map.Entry> entry : auditMessageProcessors.entrySet()) { + for (Map.Entry> entry : auditMessageProcessors.entrySet()) { - String eventType = entry.getKey(); + String eventType = entry.getKey(); - Set auditMessageProcessorsSet = _auditMessageProcessors.get(eventType); + Set auditMessageProcessorsSet = _auditMessageProcessors.get(eventType); - if (auditMessageProcessorsSet == null) { - auditMessageProcessorsSet = new HashSet(); + if (auditMessageProcessorsSet == null) { + auditMessageProcessorsSet = new HashSet(); - _auditMessageProcessors.put(eventType, auditMessageProcessorsSet); - } + _auditMessageProcessors.put(eventType, auditMessageProcessorsSet); + } - auditMessageProcessorsSet.addAll(entry.getValue()); - } - } + auditMessageProcessorsSet.addAll(entry.getValue()); + } + } - public void setGlobalAuditMessageProcessors(List globalAuditMessageProcessors) { + public void setGlobalAuditMessageProcessors(List globalAuditMessageProcessors) { - _globalAuditMessageProcessors.addAll(globalAuditMessageProcessors); - } + _globalAuditMessageProcessors.addAll(globalAuditMessageProcessors); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/impl/AuditEventLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/impl/AuditEventLocalServiceImpl.java index bd85e681..239bcf7a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/impl/AuditEventLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/service/impl/AuditEventLocalServiceImpl.java @@ -33,13 +33,15 @@ import com.liferay.portal.kernel.util.StringPool; * The implementation of the audit event 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.audit.service.AuditEventLocalService} 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.audit.service.AuditEventLocalService} + * 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 ViVieb srl @@ -48,233 +50,243 @@ import com.liferay.portal.kernel.util.StringPool; */ public class AuditEventLocalServiceImpl extends AuditEventLocalServiceBaseImpl { - @Override - public AuditEvent addAuditEvent(AuditMessage auditMessage) throws SystemException { - - AuditEvent auditEvent = auditEventPersistence.create(counterLocalService.increment(AuditEvent.class.getName())); - - auditEvent.setCompanyId(auditMessage.getCompanyId()); - auditEvent.setUserId(auditMessage.getUserId()); - auditEvent.setUserName(auditMessage.getUserName()); - auditEvent.setCreateDate(auditMessage.getTimestamp()); - auditEvent.setEventType(auditMessage.getEventType()); - auditEvent.setClassName(auditMessage.getClassName()); - auditEvent.setClassPK(auditMessage.getClassPK()); - auditEvent.setMessage(auditMessage.getMessage()); - auditEvent.setClientHost(auditMessage.getClientHost()); - auditEvent.setClientIP(auditMessage.getClientIP()); - auditEvent.setServerName(auditMessage.getServerName()); - auditEvent.setServerPort(auditMessage.getServerPort()); - auditEvent.setSessionID(auditMessage.getSessionID()); - auditEvent.setServerPort(auditMessage.getServerPort()); - estreazioneAdditionalInfo(auditEvent, auditMessage); - - - return auditEventPersistence.update(auditEvent); - } - - private void estreazioneAdditionalInfo(AuditEvent auditEvent, AuditMessage auditMessage) { - - - auditEvent.setAuditEventTable(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_AUDIT_EVENT_TABLE, - StringPool.BLANK)); - auditEvent.setEventCategory(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_EVENT_CATEGORY, - StringPool.BLANK)); - auditEvent - .setEventAction(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_EVENT_ACTION, StringPool.BLANK)); - auditEvent.setEnteCodice(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_ENTE_CODICE, StringPool.BLANK)); - auditEvent.setEnteGroupId(auditMessage.getAdditionalInfo().getLong(AuditKey.FIELD_ENTE_GROUP_ID, 0l)); - auditEvent.setDiff(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_DIFF, StringPool.BLANK)); - - auditEvent.setParentClassPK(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_PARENT_CLASS_PK, "0l")); - auditEvent.setParentClassName(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_PARENT_CLASS_NAME, - StringPool.BLANK)); - auditEvent.setRelatedClassPK(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_RELATED_CLASS_PK, "0l")); - auditEvent.setRelatedClassName(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_RELATED_CLASS_NAME, - StringPool.BLANK)); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_AUDIT_EVENT_TABLE); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_EVENT_CATEGORY); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_EVENT_ACTION); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_ENTE_CODICE); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_ENTE_GROUP_ID); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_DIFF); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_PARENT_CLASS_NAME); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_PARENT_CLASS_PK); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_RELATED_CLASS_NAME); - auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_RELATED_CLASS_PK); - auditEvent.setAdditionalInfo(String.valueOf(auditMessage.getAdditionalInfo())); - } - - @Override - public int countByCompanyId(long companyId) throws SystemException { - - return auditEventPersistence.countByCompanyId(companyId); - } - - @Override - public List findByCompanyId(long companyId, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - - return auditEventPersistence.findByCompanyId(companyId, start, end, orderByComparator); - } - - public List findByC_ClassNameId(long companyId, long classNameId, int start, int end) - throws SystemException { - return auditEventPersistence.findByC_ClassNameId(companyId, classNameId, start, end); - } - - public int countByC_ClassNameId(long companyId, long classNameId) throws SystemException { - return auditEventPersistence.countByC_ClassNameId(companyId, classNameId); - } - - public List findByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK, int start, - int end) throws SystemException { - return auditEventPersistence.findByC_ClassNameId_ClassPK(companyId, classNameId, classPK, start, end); - } - - public List findByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK, int start, - int end, OrderByComparator orderByComparator) throws SystemException { - return auditEventPersistence.findByC_ClassNameId_ClassPK(companyId, classNameId, classPK, start, end, - orderByComparator); - } - - public int countByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK) throws SystemException { - return auditEventPersistence.countByC_ClassNameId_ClassPK(companyId, classNameId, classPK); - } - - public List findAllClassPkByClassName(long companyId, long classNameId, int start, int end) - throws SystemException { - DynamicQuery dynamicQuery = dynamicQueryClassPkByClassName(companyId, classNameId); - return auditEventLocalService.dynamicQuery(dynamicQuery, start, end); - } - - public int countClassPkByClassName(long companyId, long classNameId) throws SystemException { - DynamicQuery dynamicQuery = dynamicQueryClassPkByClassName(companyId, classNameId); - - return (int) auditEventLocalService.dynamicQueryCount(dynamicQuery); - } - - private DynamicQuery dynamicQueryClassPkByClassName(long companyId, long classNameId) { - DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); - dynamicQuery.setProjection(ProjectionFactoryUtil.property("classPK")); - dynamicQuery.setProjection(ProjectionFactoryUtil.groupProperty("classPK")); - dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); - return dynamicQuery; - } - - public List findByC_ClassNameId_AuditEventTable(long companyId, long classNameId, String auditEventTable, - int start, int end) throws SystemException { - return auditEventPersistence.findByC_ClassNameId_AuditEventTable(companyId, classNameId, auditEventTable, start, - end); - } - - public int countByC_ClassNameId_AuditEventTable(long companyId, long classNameId, String auditEventTable) - throws SystemException { - return auditEventPersistence.countByC_ClassNameId_AuditEventTable(companyId, classNameId, auditEventTable); - } - - public List findByC_ClassNameId_ClassPK_AuditEventTable(long companyId, long classNameId, String classPK, - String auditEventTable, int start, int end) throws SystemException { - return auditEventPersistence.findByC_ClassNameId_ClassPK_AuditEventTable(companyId, classNameId, classPK, - auditEventTable, start, end); - } - - public int countByC_ClassNameId_ClassPK_AuditEventTable(long companyId, long classNameId, String classPK, - String auditEventTable) throws SystemException { - return auditEventPersistence.countByC_ClassNameId_ClassPK_AuditEventTable(companyId, classNameId, classPK, - auditEventTable); - } - - /* - * public List findByC_ParentClassNameId_ParentClassPK(long companyId, long - * parentClassNameId, String parentClassPK, int start, int end) throws SystemException { return - * auditEventPersistence.findByC_ParentClassNameId_ParentClassPK(companyId, parentClassNameId, - * parentClassPK, start, end); } - * - * public int countByC_ParentClassNameId_ParentClassPK(long companyId, long parentClassNameId, - * String parentClassPK) throws SystemException { return - * auditEventPersistence.countByC_ParentClassNameId_ParentClassPK(companyId, parentClassNameId, - * parentClassPK); } - */ - - public List findByC_Parent_Related_ClassNameId(long companyId, long parentClassNameId, - String parentClassPK, long relatedClassNameId, String relatedClassPK, long classNameId, int start, int end) - throws SystemException { - DynamicQuery dynamicQuery = - createC_Parent_Related_ClassNameId(companyId, parentClassNameId, parentClassPK, relatedClassNameId, - relatedClassPK, classNameId); - dynamicQuery.addOrder(OrderFactoryUtil.desc("createDate")); - return auditEventLocalService.dynamicQuery(dynamicQuery, start, end); - } - - public int countByC_Parent_Related_ClassNameId(long companyId, long parentClassNameId, String parentClassPK, - long relatedClassNameId, String relatedClassPK, long classNameId) throws SystemException { - - return (int) auditEventPersistence.countWithDynamicQuery(createC_Parent_Related_ClassNameId(companyId, - parentClassNameId, parentClassPK, relatedClassNameId, relatedClassPK, classNameId)); - } - - private DynamicQuery createC_Parent_Related_ClassNameId(long companyId, long parentClassNameId, String parentClassPK, - long relatedClassNameId, String relatedClassPK, long classNameId) { - DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); - dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); - Disjunction dis = RestrictionsFactoryUtil.disjunction(); - Conjunction parent = RestrictionsFactoryUtil.conjunction(); - Conjunction related = RestrictionsFactoryUtil.conjunction(); - - parent.add(RestrictionsFactoryUtil.eq("parentClassNameId", parentClassNameId)); - parent.add(RestrictionsFactoryUtil.eq("parentClassPK", parentClassPK)); - - related.add(RestrictionsFactoryUtil.eq("relatedClassNameId", relatedClassNameId)); - related.add(RestrictionsFactoryUtil.eq("relatedClassPK", relatedClassPK)); - - dis.add(parent); - dis.add(related); - dynamicQuery.add(dis); - dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); - return dynamicQuery; - } - - public List findEventClassNameByC_Parent_and_Related(long companyId, long parentClassNameId, - String parentClassPK, long relatedClassNameId, String relatedClassPK) throws SystemException { - DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); - dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); - Disjunction dis = RestrictionsFactoryUtil.disjunction(); - Conjunction parent = RestrictionsFactoryUtil.conjunction(); - Conjunction related = RestrictionsFactoryUtil.conjunction(); - - parent.add(RestrictionsFactoryUtil.eq("parentClassNameId", parentClassNameId)); - parent.add(RestrictionsFactoryUtil.eq("parentClassPK", parentClassPK)); - - related.add(RestrictionsFactoryUtil.eq("relatedClassNameId", relatedClassNameId)); - related.add(RestrictionsFactoryUtil.eq("relatedClassPK", relatedClassPK)); - - dis.add(parent); - dis.add(related); - dynamicQuery.add(dis); - - dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("classNameId"))); - - return auditEventPersistence.findWithDynamicQuery(dynamicQuery); - } - - public List findEventTableNameByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK) - throws SystemException { - DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); - dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); - dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); - dynamicQuery.add(RestrictionsFactoryUtil.eq("classPK", classPK)); - dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("auditEventTable"))); - - return auditEventPersistence.findWithDynamicQuery(dynamicQuery); - } - - public List findEventTableNameByC_ClassNameId(long companyId, long classNameId) throws SystemException { - DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); - dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); - dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); - dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("auditEventTable"))); - - return auditEventPersistence.findWithDynamicQuery(dynamicQuery); - } + @Override + public AuditEvent addAuditEvent(AuditMessage auditMessage) throws SystemException { + + AuditEvent auditEvent = auditEventPersistence.create(counterLocalService.increment(AuditEvent.class + .getName())); + + auditEvent.setCompanyId(auditMessage.getCompanyId()); + auditEvent.setUserId(auditMessage.getUserId()); + auditEvent.setUserName(auditMessage.getUserName()); + auditEvent.setCreateDate(auditMessage.getTimestamp()); + auditEvent.setEventType(auditMessage.getEventType()); + auditEvent.setClassName(auditMessage.getClassName()); + auditEvent.setClassPK(auditMessage.getClassPK()); + auditEvent.setMessage(auditMessage.getMessage()); + auditEvent.setClientHost(auditMessage.getClientHost()); + auditEvent.setClientIP(auditMessage.getClientIP()); + auditEvent.setServerName(auditMessage.getServerName()); + auditEvent.setServerPort(auditMessage.getServerPort()); + auditEvent.setSessionID(auditMessage.getSessionID()); + auditEvent.setServerPort(auditMessage.getServerPort()); + estreazioneAdditionalInfo(auditEvent, auditMessage); + + return auditEventPersistence.update(auditEvent); + } + + private void estreazioneAdditionalInfo(AuditEvent auditEvent, AuditMessage auditMessage) { + + auditEvent.setAuditEventTable(auditMessage.getAdditionalInfo().getString( + AuditKey.FIELD_AUDIT_EVENT_TABLE, StringPool.BLANK)); + auditEvent.setEventCategory(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_EVENT_CATEGORY, + StringPool.BLANK)); + auditEvent.setEventAction(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_EVENT_ACTION, + StringPool.BLANK)); + auditEvent.setEnteCodice(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_ENTE_CODICE, + StringPool.BLANK)); + auditEvent.setEnteGroupId(auditMessage.getAdditionalInfo().getLong(AuditKey.FIELD_ENTE_GROUP_ID, 0l)); + auditEvent.setDiff(auditMessage.getAdditionalInfo().getString(AuditKey.FIELD_DIFF, StringPool.BLANK)); + + auditEvent.setParentClassPK(auditMessage.getAdditionalInfo().getString( + AuditKey.FIELD_PARENT_CLASS_PK, "0l")); + auditEvent.setParentClassName(auditMessage.getAdditionalInfo().getString( + AuditKey.FIELD_PARENT_CLASS_NAME, StringPool.BLANK)); + auditEvent.setRelatedClassPK(auditMessage.getAdditionalInfo().getString( + AuditKey.FIELD_RELATED_CLASS_PK, "0l")); + auditEvent.setRelatedClassName(auditMessage.getAdditionalInfo().getString( + AuditKey.FIELD_RELATED_CLASS_NAME, StringPool.BLANK)); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_AUDIT_EVENT_TABLE); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_EVENT_CATEGORY); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_EVENT_ACTION); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_ENTE_CODICE); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_ENTE_GROUP_ID); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_DIFF); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_PARENT_CLASS_NAME); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_PARENT_CLASS_PK); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_RELATED_CLASS_NAME); + auditMessage.getAdditionalInfo().remove(AuditKey.FIELD_RELATED_CLASS_PK); + auditEvent.setAdditionalInfo(String.valueOf(auditMessage.getAdditionalInfo())); + } + + @Override + public int countByCompanyId(long companyId) throws SystemException { + + return auditEventPersistence.countByCompanyId(companyId); + } + + @Override + public List findByCompanyId(long companyId, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + + return auditEventPersistence.findByCompanyId(companyId, start, end, orderByComparator); + } + + public List findByC_ClassNameId(long companyId, long classNameId, int start, int end) + throws SystemException { + return auditEventPersistence.findByC_ClassNameId(companyId, classNameId, start, end); + } + + public int countByC_ClassNameId(long companyId, long classNameId) throws SystemException { + return auditEventPersistence.countByC_ClassNameId(companyId, classNameId); + } + + public List findByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK, + int start, int end) throws SystemException { + return auditEventPersistence.findByC_ClassNameId_ClassPK(companyId, classNameId, classPK, start, end); + } + + public List findByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK, + int start, int end, OrderByComparator orderByComparator) throws SystemException { + return auditEventPersistence.findByC_ClassNameId_ClassPK(companyId, classNameId, classPK, start, end, + orderByComparator); + } + + public int countByC_ClassNameId_ClassPK(long companyId, long classNameId, String classPK) + throws SystemException { + return auditEventPersistence.countByC_ClassNameId_ClassPK(companyId, classNameId, classPK); + } + + public List findAllClassPkByClassName(long companyId, long classNameId, int start, int end) + throws SystemException { + DynamicQuery dynamicQuery = dynamicQueryClassPkByClassName(companyId, classNameId); + return auditEventLocalService.dynamicQuery(dynamicQuery, start, end); + } + + public int countClassPkByClassName(long companyId, long classNameId) throws SystemException { + DynamicQuery dynamicQuery = dynamicQueryClassPkByClassName(companyId, classNameId); + + return (int) auditEventLocalService.dynamicQueryCount(dynamicQuery); + } + + private DynamicQuery dynamicQueryClassPkByClassName(long companyId, long classNameId) { + DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); + dynamicQuery.setProjection(ProjectionFactoryUtil.property("classPK")); + dynamicQuery.setProjection(ProjectionFactoryUtil.groupProperty("classPK")); + dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); + return dynamicQuery; + } + + public List findByC_ClassNameId_AuditEventTable(long companyId, long classNameId, + String auditEventTable, int start, int end) throws SystemException { + return auditEventPersistence.findByC_ClassNameId_AuditEventTable(companyId, classNameId, + auditEventTable, start, end); + } + + public int countByC_ClassNameId_AuditEventTable(long companyId, long classNameId, String auditEventTable) + throws SystemException { + return auditEventPersistence.countByC_ClassNameId_AuditEventTable(companyId, classNameId, + auditEventTable); + } + + public List findByC_ClassNameId_ClassPK_AuditEventTable(long companyId, long classNameId, + String classPK, String auditEventTable, int start, int end) throws SystemException { + return auditEventPersistence.findByC_ClassNameId_ClassPK_AuditEventTable(companyId, classNameId, + classPK, auditEventTable, start, end); + } + + public int countByC_ClassNameId_ClassPK_AuditEventTable(long companyId, long classNameId, String classPK, + String auditEventTable) throws SystemException { + return auditEventPersistence.countByC_ClassNameId_ClassPK_AuditEventTable(companyId, classNameId, + classPK, auditEventTable); + } + + /* + * public List findByC_ParentClassNameId_ParentClassPK(long + * companyId, long parentClassNameId, String parentClassPK, int start, int + * end) throws SystemException { return + * auditEventPersistence.findByC_ParentClassNameId_ParentClassPK(companyId, + * parentClassNameId, parentClassPK, start, end); } + * + * public int countByC_ParentClassNameId_ParentClassPK(long companyId, long + * parentClassNameId, String parentClassPK) throws SystemException { return + * auditEventPersistence.countByC_ParentClassNameId_ParentClassPK(companyId, + * parentClassNameId, parentClassPK); } + */ + + public List findByC_Parent_Related_ClassNameId(long companyId, long parentClassNameId, + String parentClassPK, long relatedClassNameId, String relatedClassPK, long classNameId, + int start, int end) throws SystemException { + DynamicQuery dynamicQuery = createC_Parent_Related_ClassNameId(companyId, parentClassNameId, + parentClassPK, relatedClassNameId, relatedClassPK, classNameId); + dynamicQuery.addOrder(OrderFactoryUtil.desc("createDate")); + return auditEventLocalService.dynamicQuery(dynamicQuery, start, end); + } + + public int countByC_Parent_Related_ClassNameId(long companyId, long parentClassNameId, + String parentClassPK, long relatedClassNameId, String relatedClassPK, long classNameId) + throws SystemException { + + return (int) auditEventPersistence + .countWithDynamicQuery(createC_Parent_Related_ClassNameId(companyId, parentClassNameId, + parentClassPK, relatedClassNameId, relatedClassPK, classNameId)); + } + + private DynamicQuery createC_Parent_Related_ClassNameId(long companyId, long parentClassNameId, + String parentClassPK, long relatedClassNameId, String relatedClassPK, long classNameId) { + DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); + Disjunction dis = RestrictionsFactoryUtil.disjunction(); + Conjunction parent = RestrictionsFactoryUtil.conjunction(); + Conjunction related = RestrictionsFactoryUtil.conjunction(); + + parent.add(RestrictionsFactoryUtil.eq("parentClassNameId", parentClassNameId)); + parent.add(RestrictionsFactoryUtil.eq("parentClassPK", parentClassPK)); + + related.add(RestrictionsFactoryUtil.eq("relatedClassNameId", relatedClassNameId)); + related.add(RestrictionsFactoryUtil.eq("relatedClassPK", relatedClassPK)); + + dis.add(parent); + dis.add(related); + dynamicQuery.add(dis); + dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); + return dynamicQuery; + } + + public List findEventClassNameByC_Parent_and_Related(long companyId, long parentClassNameId, + String parentClassPK, long relatedClassNameId, String relatedClassPK) throws SystemException { + DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); + Disjunction dis = RestrictionsFactoryUtil.disjunction(); + Conjunction parent = RestrictionsFactoryUtil.conjunction(); + Conjunction related = RestrictionsFactoryUtil.conjunction(); + + parent.add(RestrictionsFactoryUtil.eq("parentClassNameId", parentClassNameId)); + parent.add(RestrictionsFactoryUtil.eq("parentClassPK", parentClassPK)); + + related.add(RestrictionsFactoryUtil.eq("relatedClassNameId", relatedClassNameId)); + related.add(RestrictionsFactoryUtil.eq("relatedClassPK", relatedClassPK)); + + dis.add(parent); + dis.add(related); + dynamicQuery.add(dis); + + dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil + .property("classNameId"))); + + return auditEventPersistence.findWithDynamicQuery(dynamicQuery); + } + + public List findEventTableNameByC_ClassNameId_ClassPK(long companyId, long classNameId, + String classPK) throws SystemException { + DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); + dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); + dynamicQuery.add(RestrictionsFactoryUtil.eq("classPK", classPK)); + dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil + .property("auditEventTable"))); + + return auditEventPersistence.findWithDynamicQuery(dynamicQuery); + } + + public List findEventTableNameByC_ClassNameId(long companyId, long classNameId) + throws SystemException { + DynamicQuery dynamicQuery = auditEventLocalService.dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.eq("companyId", companyId)); + dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId)); + dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil + .property("auditEventTable"))); + + return auditEventPersistence.findWithDynamicQuery(dynamicQuery); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/util/EventUtils.java b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/util/EventUtils.java index 874ea859..ffdca16a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/util/EventUtils.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/audit/util/EventUtils.java @@ -14,14 +14,13 @@ import com.liferay.portal.util.PortalUtil; public class EventUtils { - public static String getVisualName(String className, String classPK, long companyId, Locale locale) - throws SystemException { - OrderByComparator orderByComparator = - OrderByComparatorFactoryUtil.create(AuditEventImpl.TABLE_NAME, "createDate", false); - List event = - AuditEventLocalServiceUtil.findByC_ClassNameId_ClassPK(companyId, PortalUtil.getClassNameId(className), - classPK, 0, 1, orderByComparator); - return event.get(0).getVisualName(locale); - } + public static String getVisualName(String className, String classPK, long companyId, Locale locale) + throws SystemException { + OrderByComparator orderByComparator = OrderByComparatorFactoryUtil.create(AuditEventImpl.TABLE_NAME, + "createDate", false); + List event = AuditEventLocalServiceUtil.findByC_ClassNameId_ClassPK(companyId, + PortalUtil.getClassNameId(className), classPK, 0, 1, orderByComparator); + return event.get(0).getVisualName(locale); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/service.properties index 6f96bc90..82b8c24f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_AUDIT - build.number=16 - build.date=1569596657517 + build.number=17 + build.date=1606300425089 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/SoggettiUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/SoggettiUtil.java index c19068ab..109fe0a0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/SoggettiUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/SoggettiUtil.java @@ -80,16 +80,6 @@ public class SoggettiUtil { return false; } - // TODO Capire se serve ancora - // public static boolean canCheckSoggettoPrincipale(long dettPraticaId, String tipologiaSoggetto) - // throws SystemException, - // PortalException { - // - // return - // SoggettoLocalServiceUtil.countSoggettiPrincipaliValidTmpByDettPratica_TipologiaSoggetto(dettPraticaId, - // new String[] {tipologiaSoggetto}) == 0; - // } - public static boolean isSoggettoPrincipale(long soggettoId, long dettPraticaId) throws PortalException, SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/geosisma/servlet/GeosismaRequestServlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/geosisma/servlet/GeosismaRequestServlet.java index b1148aa4..f8930e5e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/geosisma/servlet/GeosismaRequestServlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/geosisma/servlet/GeosismaRequestServlet.java @@ -26,7 +26,6 @@ public class GeosismaRequestServlet extends HttpServlet { */ public GeosismaRequestServlet() { super(); - // TODO Auto-generated constructor stub } /** diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java index 9a7549a8..eee4601e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java @@ -77,8 +77,8 @@ public class CollaudoImpl extends CollaudoBaseImpl { sb.append(intPratica.getNumeroProgetto()); // TODO da decidere che data, per adesso si mette quella di - // creazione il numero protocollo - // sbagliato dovrebbe essere il primo + // creazione il numero protocollo sbagliato dovrebbe essere il + // primo sb.append(" del "); sb.append(FastDateFormatFactoryUtil.getDate(locale).format(intPratica.getDtPratica())); sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java index 5be767e3..f9611d99 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java @@ -90,8 +90,8 @@ public class DettPraticaImpl extends DettPraticaBaseImpl { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); // TODO da decidere che data, per adesso si mette quella di - // creazione il numero protocollo - // sbagliato dovrebbe essere il primo + // creazione il numero protocollo sbagliato dovrebbe essere il + // primo sb.append(" del "); sb.append(sdf.format(intPratica.getDtPratica())); } else { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java index 578164d4..bc4f817c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java @@ -28,85 +28,88 @@ import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; /** - * The extended model implementation for the FineLavori service. Represents a row in the - * "portos_bo_FineLavori" database table, with each column mapped to a property of this - * class. + * The extended model implementation for the FineLavori service. Represents a + * row in the "portos_bo_FineLavori" 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.bo.model.FineLavori} interface. + * Helper methods and all application logic should be put in this class. + * Whenever methods are added, rerun ServiceBuilder to copy their definitions + * into the {@link it.tref.liferay.portos.bo.model.FineLavori} interface. *

* * @author Davide Barbagallo, 3F Consulting */ public class FineLavoriImpl extends FineLavoriBaseImpl { - /* - * NOTE FOR DEVELOPERS: - * - * Never reference this class directly. All methods that expect a fine lavori model instance - * should use the {@link it.tref.liferay.portos.bo.model.FineLavori} interface instead. - */ - - private static final Log _log = LogFactoryUtil.getLog(FineLavoriImpl.class); - - public FineLavoriImpl() {} - - public String getTitle(Locale locale) { - - StringBuilder sb = new StringBuilder(); - - try { - - IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(getIntPraticaId()); - // sb.append("Progetto "); - if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { - sb.append("Deposito "); - } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { - sb.append("Autorizzazione "); - } - sb.append("n. "); - - if (Validator.isNotNull(getProtocollo())) { - sb.append(intPratica.getNumeroProgetto()); - - // TODO da decidere che data, per adesso si mette quella di creazione il numero protocollo - // sbagliato dovrebbe essere il primo - sb.append(" del "); - sb.append(FastDateFormatFactoryUtil.getDate(locale).format(intPratica.getDtPratica())); - sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); - sb.append(" id "); - sb.append(intPratica.getIntPraticaId()); - - } else { - if (Validator.isNotNull(intPratica.getNumeroProgetto())) { - sb.append(intPratica.getNumeroProgetto()); - sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); - } - sb.append(getFineLavoriId()); - sb.append(" (Temporaneo) "); - sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); - sb.append(" id "); - sb.append(intPratica.getIntPraticaId()); - } - - } catch (PortalException e) { - _log.error(e, e); - } catch (SystemException e) { - _log.error(e, e); - } - - return sb.toString(); - - } - - public String getTitle() { - - return getTitle(LocaleUtil.getSiteDefault()); - } - - public String getFullDescription() { - - return getTitle(); - } + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a fine + * lavori model instance should use the {@link + * it.tref.liferay.portos.bo.model.FineLavori} interface instead. + */ + + private static final Log _log = LogFactoryUtil.getLog(FineLavoriImpl.class); + + public FineLavoriImpl() { + } + + public String getTitle(Locale locale) { + + StringBuilder sb = new StringBuilder(); + + try { + + IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(getIntPraticaId()); + // sb.append("Progetto "); + if (AzioniPraticheUtil.isDeposito(intPratica.getIntPraticaId())) { + sb.append("Deposito "); + } else if (AzioniPraticheUtil.isAutorizzazione(intPratica.getIntPraticaId())) { + sb.append("Autorizzazione "); + } + sb.append("n. "); + + if (Validator.isNotNull(getProtocollo())) { + sb.append(intPratica.getNumeroProgetto()); + + // TODO da decidere che data, per adesso si mette quella di + // creazione il numero protocollo sbagliato dovrebbe essere il + // primo + sb.append(" del "); + sb.append(FastDateFormatFactoryUtil.getDate(locale).format(intPratica.getDtPratica())); + sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); + sb.append(" id "); + sb.append(intPratica.getIntPraticaId()); + + } else { + if (Validator.isNotNull(intPratica.getNumeroProgetto())) { + sb.append(intPratica.getNumeroProgetto()); + sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); + } + sb.append(getFineLavoriId()); + sb.append(" (Temporaneo) "); + sb.append(StringPool.SPACE + StringPool.DASH + StringPool.SPACE); + sb.append(" id "); + sb.append(intPratica.getIntPraticaId()); + } + + } catch (PortalException e) { + _log.error(e, e); + } catch (SystemException e) { + _log.error(e, e); + } + + return sb.toString(); + + } + + public String getTitle() { + + return getTitle(LocaleUtil.getSiteDefault()); + } + + public String getFullDescription() { + + return getTitle(); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java index e59a31b9..3b4726e7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java @@ -54,8 +54,6 @@ public class KaleoInstanceTokenModelListener extends BaseModelListener { - private static final Log _log = LogFactoryUtil.getLog(KaleoLogModelListener.class); - - @Override - public void onAfterCreate(KaleoLog model) throws ModelListenerException { - - try { - - long kaleoInstanceTokenId = model.getKaleoInstanceTokenId(); - KaleoInstanceToken instanceToken = - KaleoInstanceTokenLocalServiceUtil.fetchKaleoInstanceToken(kaleoInstanceTokenId); - - if (Validator.isNotNull(instanceToken)) { - if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) { - - Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); - indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK()); - - if (_log.isDebugEnabled()) { - _log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : " + instanceToken.getClassPK()); - } - } - } - - - } catch (SearchException e) { - _log.error(e, e); - } catch (SystemException e) { - _log.error(e, e); - } - - super.onAfterUpdate(model); - } - - @Override - public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { - - // TODO Auto-generated method stub - super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); - } - - @Override - public void onAfterRemove(KaleoLog model) throws ModelListenerException { - - try { - - long kaleoInstanceTokenId = model.getKaleoInstanceTokenId(); - KaleoInstanceToken instanceToken = - KaleoInstanceTokenLocalServiceUtil.fetchKaleoInstanceToken(kaleoInstanceTokenId); - - if (Validator.isNotNull(instanceToken)) { - if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) { - - Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); - indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK()); - - if (_log.isDebugEnabled()) { - _log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : " + instanceToken.getClassPK()); - } - } - } - - - } catch (SearchException e) { - _log.error(e, e); - } catch (SystemException e) { - _log.error(e, e); - } - - - super.onAfterRemove(model); - } - - @Override - public void onAfterRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { - - // TODO Auto-generated method stub - super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); - } - - @Override - public void onAfterUpdate(KaleoLog model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onAfterUpdate(model); - } - - @Override - public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); - } - - @Override - public void onBeforeCreate(KaleoLog model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeCreate(model); - } - - @Override - public void onBeforeRemove(KaleoLog model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeRemove(model); - } - - @Override - public void onBeforeRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK); - } - - @Override - public void onBeforeUpdate(KaleoLog model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeUpdate(model); - } + private static final Log _log = LogFactoryUtil.getLog(KaleoLogModelListener.class); + + @Override + public void onAfterCreate(KaleoLog model) throws ModelListenerException { + + try { + + long kaleoInstanceTokenId = model.getKaleoInstanceTokenId(); + KaleoInstanceToken instanceToken = KaleoInstanceTokenLocalServiceUtil + .fetchKaleoInstanceToken(kaleoInstanceTokenId); + + if (Validator.isNotNull(instanceToken)) { + if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) { + + Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); + indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK()); + + if (_log.isDebugEnabled()) { + _log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : " + + instanceToken.getClassPK()); + } + } + } + + } catch (SearchException e) { + _log.error(e, e); + } catch (SystemException e) { + _log.error(e, e); + } + + super.onAfterUpdate(model); + } + + @Override + public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) + throws ModelListenerException { + super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); + } + + @Override + public void onAfterRemove(KaleoLog model) throws ModelListenerException { + + try { + + long kaleoInstanceTokenId = model.getKaleoInstanceTokenId(); + KaleoInstanceToken instanceToken = KaleoInstanceTokenLocalServiceUtil + .fetchKaleoInstanceToken(kaleoInstanceTokenId); + + if (Validator.isNotNull(instanceToken)) { + if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) { + + Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); + indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK()); + + if (_log.isDebugEnabled()) { + _log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : " + + instanceToken.getClassPK()); + } + } + } + + } catch (SearchException e) { + _log.error(e, e); + } catch (SystemException e) { + _log.error(e, e); + } + + super.onAfterRemove(model); + } + + @Override + public void onAfterRemoveAssociation(Object classPK, String associationClassName, + Object associationClassPK) throws ModelListenerException { + super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); + } + + @Override + public void onAfterUpdate(KaleoLog model) throws ModelListenerException { + super.onAfterUpdate(model); + } + + @Override + public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) + throws ModelListenerException { + super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); + } + + @Override + public void onBeforeCreate(KaleoLog model) throws ModelListenerException { + super.onBeforeCreate(model); + } + + @Override + public void onBeforeRemove(KaleoLog model) throws ModelListenerException { + super.onBeforeRemove(model); + } + + @Override + public void onBeforeRemoveAssociation(Object classPK, String associationClassName, + Object associationClassPK) throws ModelListenerException { + super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK); + } + + @Override + public void onBeforeUpdate(KaleoLog model) throws ModelListenerException { + super.onBeforeUpdate(model); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoTaskInstanceTokenModelListener.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoTaskInstanceTokenModelListener.java index a0a44cc4..f20f86c2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoTaskInstanceTokenModelListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoTaskInstanceTokenModelListener.java @@ -13,110 +13,96 @@ import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken; public class KaleoTaskInstanceTokenModelListener extends BaseModelListener { - private static final Log _log = LogFactoryUtil.getLog(KaleoTaskInstanceTokenModelListener.class); + private static final Log _log = LogFactoryUtil.getLog(KaleoTaskInstanceTokenModelListener.class); - @Override - public void onAfterUpdate(KaleoTaskInstanceToken model) throws ModelListenerException { + @Override + public void onAfterUpdate(KaleoTaskInstanceToken model) throws ModelListenerException { - try { + try { - if (model.getClassName().equals(ControlloPratica.class.getName())) { + if (model.getClassName().equals(ControlloPratica.class.getName())) { - Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); - indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); + Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); + indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); - if (_log.isDebugEnabled()) { - _log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : " + model.getClassPK()); - } - } + if (_log.isDebugEnabled()) { + _log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : " + + model.getClassPK()); + } + } - } catch (SearchException e) { - _log.error(e, e); - } + } catch (SearchException e) { + _log.error(e, e); + } - super.onAfterUpdate(model); - } + super.onAfterUpdate(model); + } - @Override - public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { + @Override + public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) + throws ModelListenerException { + super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); + } - // TODO Auto-generated method stub - super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); - } + @Override + public void onAfterCreate(KaleoTaskInstanceToken model) throws ModelListenerException { + super.onAfterCreate(model); + } - @Override - public void onAfterCreate(KaleoTaskInstanceToken model) throws ModelListenerException { + @Override + public void onAfterRemove(KaleoTaskInstanceToken model) throws ModelListenerException { - // TODO Auto-generated method stub - super.onAfterCreate(model); - } + try { - @Override - public void onAfterRemove(KaleoTaskInstanceToken model) throws ModelListenerException { + if (model.getClassName().equals(ControlloPratica.class.getName())) { - try { + Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); + indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); - if (model.getClassName().equals(ControlloPratica.class.getName())) { + if (_log.isDebugEnabled()) { + _log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : " + + model.getClassPK()); + } + } - Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); - indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); + } catch (SearchException e) { + _log.error(e, e); + } - if (_log.isDebugEnabled()) { - _log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : " + model.getClassPK()); - } - } + super.onAfterRemove(model); + } - } catch (SearchException e) { - _log.error(e, e); - } + @Override + public void onAfterRemoveAssociation(Object classPK, String associationClassName, + Object associationClassPK) throws ModelListenerException { + super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); + } - super.onAfterRemove(model); - } + @Override + public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) + throws ModelListenerException { + super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); + } - @Override - public void onAfterRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { + @Override + public void onBeforeCreate(KaleoTaskInstanceToken model) throws ModelListenerException { + super.onBeforeCreate(model); + } - // TODO Auto-generated method stub - super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); - } + @Override + public void onBeforeRemove(KaleoTaskInstanceToken model) throws ModelListenerException { + super.onBeforeRemove(model); + } - @Override - public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { + @Override + public void onBeforeRemoveAssociation(Object classPK, String associationClassName, + Object associationClassPK) throws ModelListenerException { + super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK); + } - // TODO Auto-generated method stub - super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); - } - - @Override - public void onBeforeCreate(KaleoTaskInstanceToken model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeCreate(model); - } - - @Override - public void onBeforeRemove(KaleoTaskInstanceToken model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeRemove(model); - } - - @Override - public void onBeforeRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) - throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK); - } - - @Override - public void onBeforeUpdate(KaleoTaskInstanceToken model) throws ModelListenerException { - - // TODO Auto-generated method stub - super.onBeforeUpdate(model); - } + @Override + public void onBeforeUpdate(KaleoTaskInstanceToken model) throws ModelListenerException { + super.onBeforeUpdate(model); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java index e8f960fe..bbc83909 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java @@ -202,21 +202,21 @@ public class ParereGeologoLocalServiceClpInvoker { _methodParameterTypes213 = new String[] { "long" }; - _methodName215 = "findNotParereByGeologoId"; + _methodName214 = "findNotParereByGeologoId"; - _methodParameterTypes215 = new String[] { "long", "int", "int" }; + _methodParameterTypes214 = new String[] { "long", "int", "int" }; - _methodName216 = "findWithParereByGeologoId"; + _methodName215 = "findWithParereByGeologoId"; - _methodParameterTypes216 = new String[] { "long", "int", "int" }; + _methodParameterTypes215 = new String[] { "long", "int", "int" }; - _methodName217 = "countFindNotParereByGeologoId"; + _methodName216 = "countFindNotParereByGeologoId"; - _methodParameterTypes217 = new String[] { "long" }; + _methodParameterTypes216 = new String[] { "long" }; - _methodName218 = "countFindWithParereByGeologoId"; + _methodName217 = "countFindWithParereByGeologoId"; - _methodParameterTypes218 = new String[] { "long" }; + _methodParameterTypes217 = new String[] { "long" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -436,27 +436,27 @@ public class ParereGeologoLocalServiceClpInvoker { return ParereGeologoLocalServiceUtil.countByGeologoId(((Long)arguments[0]).longValue()); } - if (_methodName215.equals(name) && - Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { + if (_methodName214.equals(name) && + Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { return ParereGeologoLocalServiceUtil.findNotParereByGeologoId(((Long)arguments[0]).longValue(), ((Integer)arguments[1]).intValue(), ((Integer)arguments[2]).intValue()); } - if (_methodName216.equals(name) && - Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { + if (_methodName215.equals(name) && + Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { return ParereGeologoLocalServiceUtil.findWithParereByGeologoId(((Long)arguments[0]).longValue(), ((Integer)arguments[1]).intValue(), ((Integer)arguments[2]).intValue()); } - if (_methodName217.equals(name) && - Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { + if (_methodName216.equals(name) && + Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { return ParereGeologoLocalServiceUtil.countFindNotParereByGeologoId(((Long)arguments[0]).longValue()); } - if (_methodName218.equals(name) && - Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { + if (_methodName217.equals(name) && + Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { return ParereGeologoLocalServiceUtil.countFindWithParereByGeologoId(((Long)arguments[0]).longValue()); } @@ -537,12 +537,12 @@ public class ParereGeologoLocalServiceClpInvoker { private String[] _methodParameterTypes212; private String _methodName213; private String[] _methodParameterTypes213; + private String _methodName214; + private String[] _methodParameterTypes214; private String _methodName215; private String[] _methodParameterTypes215; private String _methodName216; private String[] _methodParameterTypes216; private String _methodName217; private String[] _methodParameterTypes217; - private String _methodName218; - private String[] _methodParameterTypes218; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java index 0c3e1da2..5c1f19ba 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java @@ -390,7 +390,6 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl { String codiceBelfiore, String denominazione, boolean provincia) throws PortalException, SystemException { if (codiceBelfiore != null && !codiceBelfiore.startsWith("Z")) { - if (Validator.isNull(codiceProvincia)) throw new CodiceProvinciaException(); if (Validator.isNull(codiceComune)) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java index 57436a23..58bbbf07 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java @@ -44,13 +44,15 @@ import com.liferay.portal.service.ServiceContext; * The implementation of the comunicazione 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.bo.service.ComunicazioneLocalService} interface. + * All custom service methods should be put in this class. Whenever methods are + * added, rerun ServiceBuilder to copy their definitions into the + * {@link it.tref.liferay.portos.bo.service.ComunicazioneLocalService} + * 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 Davide Barbagallo, 3F Consulting @@ -58,191 +60,156 @@ import com.liferay.portal.service.ServiceContext; * @see it.tref.liferay.portos.bo.service.ComunicazioneLocalServiceUtil */ public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: - * - * Never reference this interface directly. Always use {@link - * it.tref.liferay.portos.bo.service.ComunicazioneLocalServiceUtil} to access the comunicazione - * local service. - */ - - public Comunicazione addComunicazione(long userId, long intPraticaId, String domanda, ServiceContext serviceContext) - throws SystemException, PortalException { - Comunicazione comunicazione = - comunicazionePersistence.create(counterLocalService.increment(Comunicazione.class.getName())); - - User user = userPersistence.findByPrimaryKey(userId); - - Date now = new Date(); - - comunicazione.setCompanyId(serviceContext.getCompanyId()); - comunicazione.setUserId(user.getUserId()); - comunicazione.setUserName(user.getFullName()); - comunicazione.setCreateDate(serviceContext.getCreateDate(now)); - comunicazione.setModifiedDate(serviceContext.getModifiedDate(now)); - comunicazione.setGroupId(serviceContext.getScopeGroupId()); - - comunicazione.setIntPraticaId(intPraticaId); - comunicazione.setDomanda(domanda); - - comunicazione = comunicazionePersistence.update(comunicazione); - - // Send notification mail for new Comunicazione Mediata - this.invioAddMailNotifica(comunicazione.getComunicazioneId(), serviceContext); - - return comunicazione; - } - - public Comunicazione updateComunicazione(long comunicazioneId, String risposta) throws SystemException, - PortalException { - Comunicazione comunicazione = comunicazionePersistence.fetchByPrimaryKey(comunicazioneId); - - Date now = new Date(); - comunicazione.setDtRisposta(now); - comunicazione.setRisposta(risposta); - - comunicazione = comunicazionePersistence.update(comunicazione); - - // resourceLocalService.updateModelResources(comunicazione, serviceContext); - IntPratica intPratica = intPraticaLocalService.getIntPratica(comunicazione.getIntPraticaId()); - if (WorkflowUtil.isWorkflowDisattivabile(intPratica.getIntPraticaId()) - && Validator.isNotNull(intPratica.getStatusByUserId())) { - - this.invioUpdateMailNotifica(comunicazione.getComunicazioneId(), intPratica.getStatusByUserId(), now); - } - - return comunicazione; - } - - public List findByIntPratica(long intPraticaId) throws SystemException { - return comunicazionePersistence.findByIntPratica(intPraticaId); - } - - public List findByIntPratica(long intPraticaId, int start, int end, OrderByComparator orderByComparator) - throws SystemException { - return comunicazionePersistence.findByIntPratica(intPraticaId, start, end, orderByComparator); - } - - public int countByIntPratica(long intPraticaId) throws SystemException { - return comunicazionePersistence.countByIntPratica(intPraticaId); - } - - public int countNotAnsweredByIntPratica(long intPraticaId) throws SystemException { - DynamicQuery dynamicQuery = dynamicQuery(); - dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); - - dynamicQuery.add(RestrictionsFactoryUtil.isNull("dtRisposta")); - - return (int) comunicazionePersistence.countWithDynamicQuery(dynamicQuery); - } - - // private void invioMailNotifica(long comunicazioneId, ServiceContext serviceContext) throws - // PortalException, - // SystemException { - // - // Comunicazione comunicazione = comunicazioneLocalService.getComunicazione(comunicazioneId); - // - // IntPratica intPratica = intPraticaLocalService.getIntPratica(comunicazione.getIntPraticaId()); - // - // User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId()); - // List titolari = - // soggettoLocalService.getValidByIntPratica_CodiceFiscale(intPratica.getIntPraticaId(), - // titolaredigitaleUser.getScreenName()); - // String eMail = StringPool.BLANK; - // String title = StringPool.BLANK; - // if (!titolari.isEmpty()) { - // Soggetto titolareDigitale = titolari.get(0); - // eMail = titolareDigitale.getEmail(); - // title = titolareDigitale.getDescrizioneCompleta(); - // } - // - // String[] to = {eMail}; - // String[] cc = new String[0]; - // String[] ccn = new String[0]; - // - // String queryString = "_" + PortletKeys.FASCICOLOFE + "_toolbarItem=view-comunicazioni"; - // String url = - // FascicoloURLUtil.getFascicoloFEViewURL(intPratica.getCompanyId(), intPratica.getIntPraticaId(), - // "/html/fascicolofe/view_fascicolo.jsp", queryString); - // - // JSONObject templateVariables = JSONFactoryUtil.createJSONObject(); - // templateVariables.put("receiver", title); - // templateVariables.put("praticaNum", intPratica.getNumeroProgetto()); - // templateVariables.put("link", url); - // - // MailManagerUtil.sendMailByTemplatName(Comunicazione.class.getName(), comunicazioneId, - // "NUOVA-COMUNICAZIONE", to, - // cc, ccn, templateVariables, null, serviceContext); - // } - - private void invioAddMailNotifica(long comunicazioneId, ServiceContext serviceContext) throws PortalException, - SystemException { - - Comunicazione comunicazione = comunicazioneLocalService.getComunicazione(comunicazioneId); - - IntPratica intPratica = intPraticaLocalService.getIntPratica(comunicazione.getIntPraticaId()); - - User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId()); - List titolari = - soggettoLocalService.getValidByIntPratica_CodiceFiscale(intPratica.getIntPraticaId(), - titolaredigitaleUser.getScreenName()); - String eMail = StringPool.BLANK; - String receiver = StringPool.BLANK; - if (!titolari.isEmpty()) { - Soggetto titolareDigitale = titolari.get(0); - eMail = titolareDigitale.getEmail(); - receiver = titolareDigitale.getDescrizioneCompleta(); - } - - String[] to = {eMail}; - String[] cc = new String[0]; - String[] ccn = new String[0]; - - String queryString = "_" + PortletKeys.FASCICOLOFE + "_toolbarItem=view-comunicazioni"; - String url = - FascicoloURLUtil.getFascicoloFEViewURL(intPratica.getCompanyId(), intPratica.getIntPraticaId(), - "/html/fascicolofe/view_fascicolo.jsp", queryString); - - JSONObject templateVariable = JSONFactoryUtil.createJSONObject(); - templateVariable.put("receiver", receiver); - templateVariable.put("link", url); - - MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, Comunicazione.class.getName(), to, - cc, ccn, "INVIO-RICHIESTA-ASSEVERAZIONE", templateVariable, null, serviceContext); - } - - private void invioUpdateMailNotifica(long comunicazioneId, long tecnicoIstruttoreId, Date date) - throws PortalException, SystemException { - - Comunicazione comunicazione = comunicazioneLocalService.getComunicazione(comunicazioneId); - - User tecnicoIstruttore = userLocalService.getUser(tecnicoIstruttoreId); - - String[] to = {tecnicoIstruttore.getEmailAddress()}; - String[] cc = new String[0]; - String[] ccn = new String[0]; - - String tipoPratica = StringPool.BLANK; - long intPraticaId = comunicazione.getIntPraticaId(); - if (AzioniPraticheUtil.isDeposito(intPraticaId)) { - tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-01"); - } else if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { - tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-02"); - } - - JSONObject templateVariables = JSONFactoryUtil.createJSONObject(); - templateVariables.put("receiver", tecnicoIstruttore.getFullName()); - templateVariables.put("tipoPratica", tipoPratica); - templateVariables.put("tipoOggetto", LanguageUtil.get(LocaleUtil.ITALIAN, "label.comunicazione.mediata")); - templateVariables.put("dataInvio", FastDateFormatFactoryUtil.getSimpleDateFormat("dd/MM/yyyy HH:mm").format(date)); - - ServiceContext serviceContext = new ServiceContext(); - serviceContext.setScopeGroupId(comunicazione.getGroupId()); - serviceContext.setCompanyId(comunicazione.getCompanyId()); - serviceContext.setUserId(comunicazione.getUserId()); - - MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, Comunicazione.class.getName(), to, - cc, ccn, "NOTIFICA-BO", templateVariables, null, serviceContext); - } + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link + * it.tref.liferay.portos.bo.service.ComunicazioneLocalServiceUtil} to + * access the comunicazione local service. + */ + + public Comunicazione addComunicazione(long userId, long intPraticaId, String domanda, + ServiceContext serviceContext) throws SystemException, PortalException { + Comunicazione comunicazione = comunicazionePersistence.create(counterLocalService + .increment(Comunicazione.class.getName())); + + User user = userPersistence.findByPrimaryKey(userId); + + Date now = new Date(); + + comunicazione.setCompanyId(serviceContext.getCompanyId()); + comunicazione.setUserId(user.getUserId()); + comunicazione.setUserName(user.getFullName()); + comunicazione.setCreateDate(serviceContext.getCreateDate(now)); + comunicazione.setModifiedDate(serviceContext.getModifiedDate(now)); + comunicazione.setGroupId(serviceContext.getScopeGroupId()); + + comunicazione.setIntPraticaId(intPraticaId); + comunicazione.setDomanda(domanda); + + comunicazione = comunicazionePersistence.update(comunicazione); + + // Send notification mail for new Comunicazione Mediata + this.invioAddMailNotifica(comunicazione.getComunicazioneId(), serviceContext); + + return comunicazione; + } + + public Comunicazione updateComunicazione(long comunicazioneId, String risposta) throws SystemException, + PortalException { + Comunicazione comunicazione = comunicazionePersistence.fetchByPrimaryKey(comunicazioneId); + + Date now = new Date(); + comunicazione.setDtRisposta(now); + comunicazione.setRisposta(risposta); + + comunicazione = comunicazionePersistence.update(comunicazione); + + // resourceLocalService.updateModelResources(comunicazione, + // serviceContext); + IntPratica intPratica = intPraticaLocalService.getIntPratica(comunicazione.getIntPraticaId()); + if (WorkflowUtil.isWorkflowDisattivabile(intPratica.getIntPraticaId()) + && Validator.isNotNull(intPratica.getStatusByUserId())) { + + this.invioUpdateMailNotifica(comunicazione.getComunicazioneId(), intPratica.getStatusByUserId(), + now); + } + + return comunicazione; + } + + public List findByIntPratica(long intPraticaId) throws SystemException { + return comunicazionePersistence.findByIntPratica(intPraticaId); + } + + public List findByIntPratica(long intPraticaId, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return comunicazionePersistence.findByIntPratica(intPraticaId, start, end, orderByComparator); + } + + public int countByIntPratica(long intPraticaId) throws SystemException { + return comunicazionePersistence.countByIntPratica(intPraticaId); + } + + public int countNotAnsweredByIntPratica(long intPraticaId) throws SystemException { + DynamicQuery dynamicQuery = dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); + + dynamicQuery.add(RestrictionsFactoryUtil.isNull("dtRisposta")); + + return (int) comunicazionePersistence.countWithDynamicQuery(dynamicQuery); + } + + private void invioAddMailNotifica(long comunicazioneId, ServiceContext serviceContext) + throws PortalException, SystemException { + + Comunicazione comunicazione = comunicazioneLocalService.getComunicazione(comunicazioneId); + + IntPratica intPratica = intPraticaLocalService.getIntPratica(comunicazione.getIntPraticaId()); + + User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId()); + List titolari = soggettoLocalService.getValidByIntPratica_CodiceFiscale( + intPratica.getIntPraticaId(), titolaredigitaleUser.getScreenName()); + String eMail = StringPool.BLANK; + String receiver = StringPool.BLANK; + if (!titolari.isEmpty()) { + Soggetto titolareDigitale = titolari.get(0); + eMail = titolareDigitale.getEmail(); + receiver = titolareDigitale.getDescrizioneCompleta(); + } + + String[] to = { eMail }; + String[] cc = new String[0]; + String[] ccn = new String[0]; + + String queryString = "_" + PortletKeys.FASCICOLOFE + "_toolbarItem=view-comunicazioni"; + String url = FascicoloURLUtil.getFascicoloFEViewURL(intPratica.getCompanyId(), + intPratica.getIntPraticaId(), "/html/fascicolofe/view_fascicolo.jsp", queryString); + + JSONObject templateVariable = JSONFactoryUtil.createJSONObject(); + templateVariable.put("receiver", receiver); + templateVariable.put("link", url); + + MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, + Comunicazione.class.getName(), to, cc, ccn, "INVIO-RICHIESTA-ASSEVERAZIONE", + templateVariable, null, serviceContext); + } + + private void invioUpdateMailNotifica(long comunicazioneId, long tecnicoIstruttoreId, Date date) + throws PortalException, SystemException { + + Comunicazione comunicazione = comunicazioneLocalService.getComunicazione(comunicazioneId); + + User tecnicoIstruttore = userLocalService.getUser(tecnicoIstruttoreId); + + String[] to = { tecnicoIstruttore.getEmailAddress() }; + String[] cc = new String[0]; + String[] ccn = new String[0]; + + String tipoPratica = StringPool.BLANK; + long intPraticaId = comunicazione.getIntPraticaId(); + if (AzioniPraticheUtil.isDeposito(intPraticaId)) { + tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-01"); + } else if (AzioniPraticheUtil.isAutorizzazione(intPraticaId)) { + tipoPratica = LanguageUtil.get(LocaleUtil.ITALIAN, "tipo-pratica-02"); + } + + JSONObject templateVariables = JSONFactoryUtil.createJSONObject(); + templateVariables.put("receiver", tecnicoIstruttore.getFullName()); + templateVariables.put("tipoPratica", tipoPratica); + templateVariables.put("tipoOggetto", + LanguageUtil.get(LocaleUtil.ITALIAN, "label.comunicazione.mediata")); + templateVariables.put("dataInvio", FastDateFormatFactoryUtil.getSimpleDateFormat("dd/MM/yyyy HH:mm") + .format(date)); + + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setScopeGroupId(comunicazione.getGroupId()); + serviceContext.setCompanyId(comunicazione.getCompanyId()); + serviceContext.setUserId(comunicazione.getUserId()); + + MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, + Comunicazione.class.getName(), to, cc, ccn, "NOTIFICA-BO", templateVariables, null, + serviceContext); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java index de59a8b8..41ddc3e6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java @@ -635,13 +635,6 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi return result; } - /* - * TODO Controllare bene il processo. Ci deve essere un modo per capire se - * sono pratiche da importare o nuove. A mio parere (scuti) dovrebbe essere: - * if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE - * .equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { return - * "portos1_integrazioni"; } else { return "portos1_esito"; } - */ public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException { @@ -652,7 +645,6 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi .getDettPraticaId()); if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { - // return "portos1_esito"; return "portos1_integrazioni"; } else { return "assegnazione"; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java index b211e1c8..ccc0dcfd 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java @@ -87,8 +87,6 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl { Date now = new Date(); - validate(tipologia, codiceFiscale); - Delega delega = delegaPersistence.create(counterLocalService.increment(Delega.class.getName())); delega.setCompanyId(serviceContext.getCompanyId()); @@ -132,9 +130,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl { @Override public Delega deleteDelega(Delega delega) throws SystemException { - - // TODO cancellare il file quando ci sar� - + // TODO cancellare il file quando ci sarà return super.deleteDelega(delega); } @@ -145,11 +141,6 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl { return deleteDelega(delega); } - private void validate(String tipologia, String codiceFiscale) throws PortalException, SystemException { - // TODO Write your own validation code - - } - public List findByIntPratica(long intPraticaId, int start, int end, OrderByComparator orderByComparator) throws SystemException { return delegaPersistence.findByIntPratica(intPraticaId, start, end, orderByComparator); @@ -360,7 +351,8 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl { DLFolder folderTemplate = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay() .getCompanyGroupId(), 0L, "Template"); FileEntry fileEntryIdTemplate = DLAppLocalServiceUtil.getFileEntry(serviceContext - .getThemeDisplay().getCompanyGroupId(), folderTemplate.getFolderId(), "Modello Asseverazione"); + .getThemeDisplay().getCompanyGroupId(), folderTemplate.getFolderId(), + "Modello Asseverazione"); DLFolder folderAllegati = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay() .getCompanyGroupId(), 0L, "Allegati"); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java index 9da8ccc3..86438818 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java @@ -752,58 +752,6 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl Date now = new Date(); - validate(userId, dettPraticaId, intPraticaId, integrazione, protocollo, tipoIntegrazione, completa, - gestita, codicePagamentoOneri, causalePagamentoOneri, mezzoPagamentoOneri, importoBolli, - importoSpeseIstruttoria, dataEffettuazione, statusTask, workflowForzato, - soggettoSostituitoId, oldDettPraticaId, destinazione, ag, descLongIntervento, via, localita, - estremiCatastali, estremiPratCom, variataDa, varianteNumero, varianteSostanziale, - operaConforme, collaudoStatico, codiceFiscaleDelegatoCommittente, - codiceFiscaleDelegatoFineLavori, codiceFiscaleDelegatoCollaudo, codiceRuoloDelegato, - lavoriInEconomiaCommittente, inizioLavoriContestualeOpera, dataInizioLavoriOpera, - dataInizioEsecuzioneOpera, dataFineEsecuzioneOpera, metratura, lavoriPubblici, - pagamentoIdOneri, lavoriPubbliciPercentuale, numeroCivico, dcParticelle, dcFoglio, - dcAllegato, dePiani, deAltezza, deInterrati, deSuperficie, deCostruzione, deRistrutturazione, - deUso, dePubblica, dePrivata, deUtilizzazione, dePosizioneEdificio, deInfStradalePonte, - deInfStradaleStrada, deInfStradaleAltro, deInfIdraulicaLong, deInfIdraulicaTrasv, - deInfIdraulicaAltro, deInfOperaAccStradale, deInfOperaAccIdraulica, deInfOperaAccAltro, - deInfAltraInfrastruttura, deInfAltro, deInfAltroDesc, dccFondazioni, - dccStruttureEleMuraturePietrame, dccStruttureEleMuratureLaterizio, - dccStruttureEleMuratureMisto, dccStruttureEleMuratureStoriche, dccStruttureEleAcciaio, - dccStruttureEleCA, dccStruttureEleLegno, dccStruttureEleMistoCA, dccStruttureEleMistoAcciaio, - dccStruttureEleMistoMuratura, dccStruttureEleMistoLegno, dccStruttureElePrefabbricato, - dccStruttureEleAltro, dccStruttureEleAltroDescrizione, dccOrizzontamentiCAAcciaio, - dccOrizzontamentiLegno, dccOrizzontamentiLegnoCA, dccOrizzontamentiLamieraGrecata, - dccOrizzontamentiVolte, dccOrizzontamentiAltro, dccOrizzontamentiAltroDescrizione, - dccCopertura, dccCoperturaCAAcciaio, dccCoperturaLegno, dccCoperturaLegnoCA, - dccCoperturaLamieraGrecata, dccCoperturaPannelli, dccCoperturaPVCTelonati, - dccCoperturaLeggere, dccCoperturaAltro, dccCoperturaAltroDesrizione, - dccElemNonStrutLaterizio, dccElemNonStrutCartongesso, dccElemNonStrutCalcestruzzo, - dccElemNonStrutLegno, dccElemNonStrutAltro, dccElemNonStrutAltroDescrizione, - dccOpereDiRinforzoInsCatene, dccOpereDiRinforzoInsCordoli, dccOpereDiRinforzoIniArmate, - dccOpereDiRinforzoPlaccaggi, dccOpereDiRinforzoIrrSolai, dccOpereDiRinforzoRinforziFRP, - dccOpereDiRinforzoTelaiECerchiature, dccOpereDiRinforzoInsRompitratta, - dccOpereDiRinforzoAltro, dccOpereDiRinforzoAltroDescrizione, geoClasseIndagine, - geoCategoriaSottosuolo, geoCategoriaTopografica, geoConsolidamento, geoPericolositaGeologica, - geoRischioGeomorfologicoPai, geoPericolositaIdraulicaPai, geoRischioIdraulicoPai, - geoPericolositaSismica, geoPericolositaIdraulica, geoPericolositaGeomorfica, - geoFattibilitaGeologica, geoFattibilitaSismica, geoFattibilitaIdraulica, geoOperaRilevante, - geoOpereDiSostegno, geoOpereInSotterranea, geoPresenzaPrescrizioni, geoNotePrescrizioni, - geoNoteIndagini, geoEvidenzeGeomorfiche, geoEvidenzeGeologiche, geoDtRelazione, - pagInterventiRestauroManufatti, pagAltriCasiCulturali, pagLottizzazioni, - pagGrandiStrutture, pagCondotte, pagPalificazioni, pagImpiantiEolici, - pagNuoveRealizzazioni, pagImmobiliPreesistenti, pagManifestiPubblicitari, - pagPareriDiMassima, pagAltriCasiPaesaggistici, pagVariantiPareriResi, - pagRilascioAttestazioni, pagConsultazioniArchivio, note, noteUfficio, - localizzazioneGeografica, tcNuovaCostruzione, tcAdeguamentoSismico, tcMiglioramentoSismico, - tcRiparazioneInterventoLocale, tcInCA, tcInOpera, tcPrefabbricato, tcInAcciaio, tcMista, - tcInMuratura, tcInMuraturaOrdinaria, tcInMuraturaArmata, tcInMuraturaMista, tcInLegno, - tcAltro, tcAltroDescrizione, tcConDispositivi, normLavoriInProprio, normEsenteBollo, - normEsenteSpese, normDpr01Dep, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, - normDm03, normDm2018, normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, - normDm04, normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, - clRischioPostInt, intervFinPub, intervFinPubDesc, sanatoriaEdilizia47, sanatoriaEdilizia724, - sanatoriaEdilizia326, normLavoriNoDirettore, serviceContext, bozza); - DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId); dettPratica.setModifiedDate(serviceContext.getModifiedDate(now)); @@ -1583,9 +1531,6 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl boolean sanatoriaEdilizia47, boolean sanatoriaEdilizia724, boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore, ServiceContext serviceContext, boolean bozza) { - - // TODO Auto-generated method stub - } @Indexable(type = IndexableType.REINDEX) @@ -1957,91 +1902,11 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl String geoPresenzaPrescrizioni, String geoNotePrescrizioni, String geoNoteIndagini, String geoEvidenzeGeomorfiche, String geoEvidenzeGeologiche, Date geoDtRelazione, ServiceContext serviceContext, boolean bozza) { - - // TODO Auto-generated method stub - } private void validate(long userId, long dettPraticaId, long intPraticaId, String codiceFiscaleDelegatoCommittente, String codiceFiscaleDelegatoFineLavori, String codiceFiscaleDelegatoCollaudo, ServiceContext serviceContext) { - - // TODO Auto-generated method stub - - } - - private void validate(long userId, long dettPraticaId, long intPraticaId, long integrazione, - String protocollo, String tipoIntegrazione, boolean completa, boolean gestita, - String codicePagamento, String causalePagamento, String mezzoPagamento, String importoBolli, - String importoSpeseIstruttoria, Date dataEffettuazione, int statusTask, boolean workflowForzato, - long soggettoSostituitoId, long oldDettPraticaId, String destinazione, String ag, - String descLongIntervento, String via, String localita, String estremiCatastali, - String estremiPratCom, long variataDa, long varianteNumero, boolean varianteSostanziale, - boolean operaConforme, boolean collaudoStatico, String codiceFiscaleDelegatoCommittente, - String codiceFiscaleDelegatoFineLavori, String codiceFiscaleDelegatoCollaudo, - String codiceRuoloDelegato, boolean lavoriInEconomiaCommittente, - boolean inizioLavoriContestualeOpera, Date dataInizioLavoriOpera, Date dataInizioEsecuzioneOpera, - Date dataFineEsecuzioneOpera, String metratura, boolean lavoriPubblici, long pagamentoId, - int lavoriPubbliciPercentuale, String numeroCivico, String dcParticelle, String dcFoglio, - String dcAllegato, String dePiani, String deAltezza, String deInterrati, String deSuperficie, - String deCostruzione, String deRistrutturazione, String deUso, String dePubblica, - String dePrivata, String deUtilizzazione, String dePosizioneEdificio, boolean deInfStradalePonte, - boolean deInfStradaleStrada, boolean deInfStradaleAltro, boolean deInfIdraulicaLong, - boolean deInfIdraulicaTrasv, boolean deInfIdraulicaAltro, boolean deInfOperaAccStradale, - boolean deInfOperaAccIdraulica, boolean deInfOperaAccAltro, boolean deInfAltraInfrastruttura, - boolean deInfAltro, String deInfAltroDesc, String dccFondazioni, - boolean dccStruttureEleMuraturePietrame, boolean dccStruttureEleMuratureLaterizio, - boolean dccStruttureEleMuratureMisto, boolean dccStruttureEleMuratureStoriche, - String dccStruttureEleAcciaio, String dccStruttureEleCA, String dccStruttureEleLegno, - boolean dccStruttureEleMistoCA, boolean dccStruttureEleMistoAcciaio, - boolean dccStruttureEleMistoMuratura, boolean dccStruttureEleMistoLegno, - boolean dccStruttureElePrefabbricato, boolean dccStruttureEleAltro, - String dccStruttureEleAltroDescrizione, boolean dccOrizzontamentiCAAcciaio, - boolean dccOrizzontamentiLegno, boolean dccOrizzontamentiLegnoCA, - boolean dccOrizzontamentiLamieraGrecata, boolean dccOrizzontamentiVolte, - boolean dccOrizzontamentiAltro, String dccOrizzontamentiAltroDescrizione, String dccCopertura, - boolean dccCoperturaCAAcciaio, boolean dccCoperturaLegno, boolean dccCoperturaLegnoCA, - boolean dccCoperturaLamieraGrecata, boolean dccCoperturaPannelli, - boolean dccCoperturaPVCTelonati, boolean dccCoperturaLeggere, boolean dccCoperturaAltro, - String dccCoperturaAltroDesrizione, boolean dccElemNonStrutLaterizio, - boolean dccElemNonStrutCartongesso, boolean dccElemNonStrutCalcestruzzo, - boolean dccElemNonStrutLegno, boolean dccElemNonStrutAltro, - String dccElemNonStrutAltroDescrizione, boolean dccOpereDiRinforzoInsCatene, - boolean dccOpereDiRinforzoInsCordoli, boolean dccOpereDiRinforzoIniArmate, - boolean dccOpereDiRinforzoPlaccaggi, boolean dccOpereDiRinforzoIrrSolai, - boolean dccOpereDiRinforzoRinforziFRP, boolean dccOpereDiRinforzoTelaiECerchiature, - boolean dccOpereDiRinforzoInsRompitratta, boolean dccOpereDiRinforzoAltro, - String dccOpereDiRinforzoAltroDescrizione, String geoClasseIndagine, - String geoCategoriaSottosuolo, String geoCategoriaTopografica, String geoConsolidamento, - String geoPericolositaGeologica, String geoRischioGeomorfologicoPai, - String geoPericolositaIdraulicaPai, String geoRischioIdraulicoPai, String geoPericolositaSismica, - String geoPericolositaIdraulica, String geoPericolositaGeomorfica, - String geoFattibilitaGeologica, String geoFattibilitaSismica, String geoFattibilitaIdraulica, - String geoOperaRilevante, String geoOpereDiSostegno, String geoOpereInSotterranea, - String geoPresenzaPrescrizioni, String geoNotePrescrizioni, String geoNoteIndagini, - String geoEvidenzeGeomorfiche, String geoEvidenzeGeologiche, Date geoDtRelazione, - Double pagInterventiRestauroManufatti, Double pagAltriCasiCulturali, Double pagLottizzazioni, - Double pagGrandiStrutture, Double pagCondotte, Double pagPalificazioni, Double pagImpiantiEolici, - Double pagNuoveRealizzazioni, Double pagImmobiliPreesistenti, Double pagManifestiPubblicitari, - Double pagPareriDiMassima, Double pagAltriCasiPaesaggistici, Double pagVariantiPareriResi, - Double pagRilascioAttestazioni, Double pagConsultazioniArchivio, String note, String noteUfficio, - String localizzazioneGeografica, boolean tcNuovaCostruzione, boolean tcAdeguamentoSismico, - boolean tcMiglioramentoSismico, boolean tcRiparazioneInterventoLocale, boolean tcInCA, - boolean tcInOpera, boolean tcPrefabbricato, boolean tcInAcciaio, boolean tcMista, - boolean tcInMuratura, boolean tcInMuraturaOrdinaria, boolean tcInMuraturaArmata, - boolean tcInMuraturaMista, boolean tcInLegno, boolean tcAltro, String tcAltroDescrizione, - boolean tcConDispositivi, boolean normLavoriInProprio, boolean normEsenteBollo, - boolean normEsenteSpese, boolean normDpr01Dep, boolean normDpr02Dep, boolean normDpr01Aut, - boolean normDpr02Aut, boolean normDm01, boolean normDm02, boolean normDm03, boolean normDm2018, - boolean normDprg01, boolean normDprg02, boolean normAnr, boolean normArt3com3, - boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01, - boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt, - String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc, boolean sanatoriaEdilizia47, - boolean sanatoriaEdilizia724, boolean sanatoriaEdilizia326, boolean normLavoriNoDirettore, - ServiceContext serviceContext, boolean bozza) { - - // TODO Auto-generated method stub - } @Indexable(type = IndexableType.REINDEX) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java index aa1aebcc..e301b59d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java @@ -34,8 +34,6 @@ import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.repository.model.FileEntry; import com.liferay.portal.kernel.repository.model.Folder; import com.liferay.portal.kernel.util.MimeTypesUtil; @@ -109,10 +107,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl { Date now = new Date(); - validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, - fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, - dettPraticaIdRimozione, dtDataRimozione); - DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class .getName())); @@ -232,10 +226,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl { Date now = new Date(); - validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, - fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, - dettPraticaIdRimozione, dtDataRimozione); - DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class .getName())); @@ -381,15 +371,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl { docPraticaLocalService.updateDocPratica(docPratica); } - private void validate(long groupId, long docPraticaId, String className, long classPk, long intPraticaId, - byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, - String tipologia, String sha256, boolean aggiornato, String jsonFirmatari, - long dettPraticaIdRimozione, Date dtDataRimozione) throws PortalException, SystemException { - - // TODO Write your own validation code - - } - public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato) throws SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java index 91d568eb..86da772a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java @@ -30,26 +30,32 @@ import com.liferay.portal.kernel.exception.SystemException; * The implementation of the history workflow action 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.bo.service.HistoryWorkflowActionLocalService} interface. + * All custom service methods should be put in this class. Whenever methods are + * added, rerun ServiceBuilder to copy their definitions into the + * {@link it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalService} + * 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 Davide Barbagallo, 3F Consulting * @see it.tref.liferay.portos.bo.service.base.HistoryWorkflowActionLocalServiceBaseImpl * @see it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil */ -public class HistoryWorkflowActionLocalServiceImpl - extends HistoryWorkflowActionLocalServiceBaseImpl { +public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowActionLocalServiceBaseImpl { /* * NOTE FOR DEVELOPERS: - * - * Never reference this interface directly. Always use {@link it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil} to access the history workflow action local service. + * + * Never reference this interface directly. Always use {@link + * it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil} + * to access the history workflow action local service. */ - - public List findByIntPratica(long intPraticaId, int sort) throws SystemException{ - + + public List findByIntPratica(long intPraticaId, int sort) throws SystemException { + DynamicQuery query = DynamicQueryFactoryUtil.forClass(HistoryWorkflowAction.class); query.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); if (sort == 0) @@ -57,15 +63,11 @@ public class HistoryWorkflowActionLocalServiceImpl else query.addOrder(OrderFactoryUtil.desc("createDate")); return HistoryWorkflowActionLocalServiceUtil.dynamicQuery(query); - -// return historyWorkflowActionPersistence.findByIntPratica(intPraticaId); } @Override - public List findByIntPratica(long intPraticaId) - throws SystemException { - // TODO Auto-generated method stub + public List findByIntPratica(long intPraticaId) throws SystemException { return historyWorkflowActionPersistence.findByIntPratica(intPraticaId); } - + } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java index b33a1c3b..f37cba12 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java @@ -217,9 +217,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); - validate(serviceContext.getScopeGroupId(), 0L, tipoPratica, territorioId, dtSorteggio, statoPratica, - numeroProgetto, validata, esitoControllo, dtPratica); - IntPratica intPratica = intPraticaPersistence.create(counterLocalService.increment(IntPratica.class .getName())); @@ -960,12 +957,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { return intPraticaLocalService.updateIntPratica(intPratica); } - private void validate(long scopeGroupId, long l, String tipoPratica, long territorioId, Date dtSorteggio, - String statoPratica, String numeroProgetto, boolean validata, int esitoControllo, Date dtPratica) { - - // TODO Auto-generated method stub - } - public IntPratica updateIntPraticaSorteggio(long intPraticaId, Date dtSorteggio) throws SystemException { // TODO vedere se va cambiato lo stato return updateIntPraticaSorteggio(intPraticaId, dtSorteggio, null); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java index 9d6a5e8d..426a1a0c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java @@ -65,8 +65,6 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId, ServiceContext serviceContext) throws SystemException, PortalException { - validateParereGeologo(geologoUserId, intPraticaId, dettPraticaId); - long parereGeologoId = counterLocalService.increment(ParereGeologo.class.getName()); ParereGeologo parereGeologo = parereGeologoPersistence.create(parereGeologoId); @@ -87,12 +85,6 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase return parereGeologoPersistence.update(parereGeologo); } - private void validateParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId) { - - // TODO - - } - public ParereGeologo updateParereGeologo(long parereGeologoId, String parere, byte[] content, String fileName, ServiceContext serviceContext) throws PortalException, SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java index f1c445ce..1904192e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java @@ -87,17 +87,6 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl { Date now = new Date(); - validate(serviceContext.getScopeGroupId(), 0L, dettPraticaId, intPraticaId, nome, cognome, - codiceFiscale, codiceFiscaleDelegato, dataNascita, provinciaNascita, comuneNascita, - comuneDomicilio, comuneDomicilioEstero, provinciaDomicilio, viaDomicilio, - numeroCivicoDomicilio, capDomicilio, domicilioExtra, comune, comuneEstero, provincia, via, - numeroCivico, cap, denominazione, sedeLegale, legaleRap, dataNascitaRap, provinciaNascitaRap, - comuneNascitaRap, viaRap, numeroCivicoRap, capRap, provinciaRap, comuneRap, comuneRapEstero, - albo, alboDescr, regAlbo, provAlbo, numIscrAlbo, telefono, fax, email, tipologiaSoggetto, - tipoAltroSoggetto, aggiuntivo, rimosso, ambitoAttivita, ambitoProfessione, - intPraticaIdRimozione, dettPraticaIdRimozione, dtDataRimozione, soggettoSostituitoId, - oldSoggettoId); - Soggetto soggetto = soggettoPersistence .create(counterLocalService.increment(Soggetto.class.getName())); @@ -319,32 +308,6 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl { Date now = new Date(); - validate(serviceContext.getScopeGroupId(), 0L, dettPraticaId, intPraticaId, - soggettoToClone.getNome(), soggettoToClone.getCognome(), soggettoToClone.getCodiceFiscale(), - soggettoToClone.getCodiceFiscaleDelegato(), soggettoToClone.getDataNascita(), - soggettoToClone.getProvinciaNascita(), soggettoToClone.getComuneNascita(), - soggettoToClone.getComuneDomicilio(), soggettoToClone.getComuneDomicilioEstero(), - soggettoToClone.getProvinciaDomicilio(), soggettoToClone.getViaDomicilio(), - soggettoToClone.getNumeroCivicoDomicilio(), soggettoToClone.getCapDomicilio(), - soggettoToClone.getDomicilioExtra(), soggettoToClone.getComune(), - soggettoToClone.getComuneEstero(), soggettoToClone.getProvincia(), soggettoToClone.getVia(), - soggettoToClone.getNumeroCivico(), soggettoToClone.getCap(), - soggettoToClone.getDenominazione(), soggettoToClone.getSedeLegale(), - soggettoToClone.getLegaleRap(), soggettoToClone.getDataNascitaRap(), - soggettoToClone.getProvinciaNascitaRap(), soggettoToClone.getComuneNascitaRap(), - soggettoToClone.getViaRap(), soggettoToClone.getNumeroCivicoRap(), - soggettoToClone.getCapRap(), soggettoToClone.getProvinciaRap(), - soggettoToClone.getComuneRap(), soggettoToClone.getComuneRapEstero(), - soggettoToClone.getAlbo(), soggettoToClone.getAlboDescr(), soggettoToClone.getRegAlbo(), - soggettoToClone.getProvinciaAlbo(), soggettoToClone.getNumIscrAlbo(), - soggettoToClone.getTelefono(), soggettoToClone.getFax(), soggettoToClone.getEmail(), - soggettoToClone.getTipologiaSoggetto(), soggettoToClone.getTipoAltroSoggetto(), - soggettoToClone.getAggiuntivo(), soggettoToClone.getRimosso(), - soggettoToClone.getAmbitoAttivita(), soggettoToClone.getAmbitoProfessione(), - soggettoToClone.getIntPraticaIdRimozione(), soggettoToClone.getDettPraticaIdRimozione(), - soggettoToClone.getDtDataRimozione(), soggettoToClone.getSoggettoSostituitoId(), - soggettoToClone.getOldSoggettoId()); - Soggetto soggetto = soggettoPersistence .create(counterLocalService.increment(Soggetto.class.getName())); @@ -467,17 +430,6 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl { Date now = new Date(); - validate(serviceContext.getScopeGroupId(), soggettoId, dettPraticaId, intPraticaId, nome, cognome, - codiceFiscale, codiceFiscaleDelegato, dataNascita, provinciaNascita, comuneNascita, - comuneDomicilio, comuneDomicilioEstero, provinciaDomicilio, viaDomicilio, - numeroCivicoDomicilio, capDomicilio, domicilioExtra, comune, comuneEstero, provincia, via, - numeroCivico, cap, denominazione, sedeLegale, legaleRap, dataNascitaRap, provinciaNascitaRap, - comuneNascitaRap, viaRap, numeroCivicoRap, capRap, provinciaRap, comuneRap, comuneRapEstero, - albo, alboDescr, regAlbo, provAlbo, numIscrAlbo, telefono, fax, email, tipologiaSoggetto, - tipoAltroSoggetto, aggiuntivo, rimosso, ambitoAttivita, ambitoProfessione, - intPraticaIdRimozione, dettPraticaIdRimozione, dtDataRimozione, soggettoSostituitoId, - oldSoggettoId); - Soggetto soggetto = soggettoPersistence.fetchByPrimaryKey(soggettoId); soggetto.setCompanyId(serviceContext.getCompanyId()); @@ -580,25 +532,6 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl { } - private void validate(long groupId, long soggettoId, long dettPraticaId, long intPraticaId, String nome, - String cognome, String codiceFiscale, String codiceFiscaleDelegato, Date dataNascita, - String provinciaNascita, String comuneNascita, String comuneDomicilio, - String comuneDomicilioEstero, String provinciaDomicilio, String viaDomicilio, - String numeroCivicoDomicilio, String capDomicilio, String domicilioExtra, String comune, - String comuneEstero, String provincia, String via, String numeroCivico, String cap, - String denominazione, String sedeLegale, String legaleRap, Date dataNascitaRap, - String provinciaNascitaRap, String comuneNascitaRap, String viaRap, String numeroCivicoRap, - String capRap, String provinciaRap, String comuneRap, String comuneRapEstero, String albo, - String alboDescr, String regAlbo, String provAlbo, String numIscrAlbo, String telefono, - String fax, String email, String tipologiaSoggetto, String tipoAltroSoggetto, boolean aggiuntivo, - boolean rimosso, String ambitoAttivita, String ambitoProfessione, long intPraticaIdRimozione, - long dettPraticaIdRimozione, Date dtDataRimozione, long soggettoSostituitoId, long oldSoggettoId) - throws PortalException, SystemException { - - // TODO Write your own validation code - - } - public Soggetto fetchByOldSoggettId(long oldSoggettoId) throws SystemException { return soggettoPersistence.fetchByoldSoggettoId(oldSoggettoId); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java index 17d23cf8..0a91ee76 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java @@ -299,7 +299,7 @@ public class SorteggioLocalServiceImpl extends SorteggioLocalServiceBaseImpl { public Sorteggio findByIntPratica(long intPraticaId) throws SystemException { - // XXX verificare se torna uno o piu + // XXX verificare se torna uno o più List sorteggis = sorteggioPersistence.findByIntPraticaId(intPraticaId); return sorteggis != null && !sorteggis.isEmpty() ? sorteggis.get(0) : null; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 98672d99..2fbf743a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=2739 - build.date=1606226972645 + build.number=2740 + build.date=1606231924945 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf index 59b651c0..c745443e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf @@ -163,7 +163,7 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP <%= intPratica.getTitle(locale, true) %> <%= Validator.isNull(intPratica.getTipoProcedura()) ? "" : - "
Procedura " + intPratica.getTipoProcedura() + "" %> + "
" + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) + "" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.classpath index 250e6e62..d4becd03 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java index aca0c92a..1e10302f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/service/impl/DisponibilitaLocalServiceImpl.java @@ -255,8 +255,8 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase } //Bug 32935 else{ - for (Iterator iterator = results.iterator(); iterator.hasNext();) { - Disponibilita disponibilita = (Disponibilita) iterator.next(); + for (Iterator iterator = results.iterator(); iterator.hasNext();) { + Disponibilita disponibilita = iterator.next(); disponibilita.setDisponibile(true); disponibilitaLocalService.updateDisponibilita(disponibilita); } @@ -307,8 +307,8 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase } //Bug 32935 else{ - for (Iterator iterator = results.iterator(); iterator.hasNext();) { - Disponibilita disponibilita = (Disponibilita) iterator.next(); + for (Iterator iterator = results.iterator(); iterator.hasNext();) { + Disponibilita disponibilita = iterator.next(); disponibilita.setDisponibile(true); disponibilitaLocalService.updateDisponibilita(disponibilita); } @@ -397,7 +397,6 @@ public class DisponibilitaLocalServiceImpl extends DisponibilitaLocalServiceBase public List findByFunzionarioStartDate(long funzionarioId, Date date, int startRow, int endRow) throws SystemException { Date start = DateUtils.truncate(date, Calendar.DAY_OF_MONTH); - Date end = DateUtils.addHours(start, 22); DynamicQuery dynamicQuery = dynamicQuery(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java index 7788df18..37cc5b1e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/it/tref/portos/calendar/appointments/util/CalendarUtil.java @@ -5,7 +5,6 @@ import it.tref.portos.calendar.appointments.model.Prenotazione; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; -import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.regex.Matcher; @@ -14,8 +13,6 @@ import java.util.regex.Pattern; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; -import org.apache.log4j.net.TelnetAppender; - import com.liferay.mail.service.MailServiceUtil; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.mail.MailMessage; @@ -27,174 +24,178 @@ import com.liferay.util.portlet.PortletProps; public class CalendarUtil { - public static void inviaEmailRichiestaAppuntamento(long userIdProfessionista, long userIdFunzionario, Date startDate, String telefono, String emailFeUser) throws SystemException, AddressException{ - + public static void inviaEmailRichiestaAppuntamento(long userIdProfessionista, long userIdFunzionario, + Date startDate, String telefono, String emailFeUser) throws SystemException, AddressException { + User professionista = UserLocalServiceUtil.fetchUser(userIdProfessionista); User boUser = UserLocalServiceUtil.fetchUser(userIdFunzionario); - + InternetAddress fromAddress = new InternetAddress("portos@regione.toscana.it"); - InternetAddress toAddress = isAllowedEmailAddress(professionista.getEmailAddress()) ? new InternetAddress(professionista.getEmailAddress()) : null; - InternetAddress bccAddress = isAllowedEmailAddress(boUser.getEmailAddress()) ? new InternetAddress(boUser.getEmailAddress()) : null; - InternetAddress toAddressToFeUser = isAllowedEmailAddress(emailFeUser) ? new InternetAddress(emailFeUser) : null; - + InternetAddress toAddress = isAllowedEmailAddress(professionista.getEmailAddress()) ? new InternetAddress( + professionista.getEmailAddress()) : null; + InternetAddress bccAddress = isAllowedEmailAddress(boUser.getEmailAddress()) ? new InternetAddress( + boUser.getEmailAddress()) : null; + InternetAddress toAddressToFeUser = isAllowedEmailAddress(emailFeUser) ? new InternetAddress( + emailFeUser) : null; + MailMessage mailMessage = new MailMessage(); - - //Product Backlog Item 32934 + + // Product Backlog Item 32934 List toAddresses = new ArrayList(); - if(toAddress != null) + if (toAddress != null) toAddresses.add(toAddress); - - if(toAddressToFeUser != null) + + if (toAddressToFeUser != null) toAddresses.add(toAddressToFeUser); - - mailMessage.setTo(toAddresses.toArray(new InternetAddress[0])); - - mailMessage.setFrom(fromAddress); - - if(bccAddress != null) + + mailMessage.setTo(toAddresses.toArray(new InternetAddress[0])); + + mailMessage.setFrom(fromAddress); + + if (bccAddress != null) mailMessage.setBCC(bccAddress); - + mailMessage.setSubject("Notifica Richiesta Appuntamento Portos"); - mailMessage.setBody(creaCorpoMailRichiestaAppuntamento(professionista, boUser, startDate, telefono, emailFeUser)); + mailMessage.setBody(creaCorpoMailRichiestaAppuntamento(professionista, boUser, startDate, telefono, + emailFeUser)); mailMessage.setHTMLFormat(true); - - - + /* * Invio email */ MailServiceUtil.sendEmail(mailMessage); - + } - - public static void inviaEmailAnnullamentoAppuntamento(Prenotazione prenotazione) throws SystemException, AddressException{ - + + public static void inviaEmailAnnullamentoAppuntamento(Prenotazione prenotazione) throws SystemException, + AddressException { + User professionista = UserLocalServiceUtil.fetchUser(prenotazione.getProfessionistaId()); User boUser = UserLocalServiceUtil.fetchUser(prenotazione.getFunzionarioId()); - + InternetAddress fromAddress = new InternetAddress("portos@regione.toscana.it"); - InternetAddress toAddress = isAllowedEmailAddress(professionista.getEmailAddress()) ? new InternetAddress(professionista.getEmailAddress()) : null; - InternetAddress bccAddress = isAllowedEmailAddress(boUser.getEmailAddress()) ? new InternetAddress(boUser.getEmailAddress()) : null; - InternetAddress toAddressToFeUser = isAllowedEmailAddress(prenotazione.getEmail()) ? new InternetAddress(prenotazione.getEmail()) : null; - + InternetAddress toAddress = isAllowedEmailAddress(professionista.getEmailAddress()) ? new InternetAddress( + professionista.getEmailAddress()) : null; + InternetAddress bccAddress = isAllowedEmailAddress(boUser.getEmailAddress()) ? new InternetAddress( + boUser.getEmailAddress()) : null; + InternetAddress toAddressToFeUser = isAllowedEmailAddress(prenotazione.getEmail()) ? new InternetAddress( + prenotazione.getEmail()) : null; + MailMessage mailMessage = new MailMessage(); - - //Product Backlog Item 32934 + + // Product Backlog Item 32934 List toAddresses = new ArrayList(); - if(toAddress != null) + if (toAddress != null) toAddresses.add(toAddress); - - if(toAddressToFeUser != null) + + if (toAddressToFeUser != null) toAddresses.add(toAddressToFeUser); - - mailMessage.setTo(toAddresses.toArray(new InternetAddress[0])); - - mailMessage.setFrom(fromAddress); - - if(bccAddress != null) + + mailMessage.setTo(toAddresses.toArray(new InternetAddress[0])); + + mailMessage.setFrom(fromAddress); + + if (bccAddress != null) mailMessage.setBCC(bccAddress); - + mailMessage.setSubject("Notifica Annullamento Appuntamento Portos"); - mailMessage.setBody(creaCorpoMailAnnullamento(professionista, boUser, prenotazione.getStartDate())); + mailMessage.setBody(creaCorpoMailAnnullamento(professionista, boUser, prenotazione.getStartDate())); mailMessage.setHTMLFormat(true); - + /* * Invio email */ MailServiceUtil.sendEmail(mailMessage); - + } - - - public static void inviaEmailReminderAppuntamenti(List lista, User userBo, Date tomorrow) throws SystemException, AddressException{ - - InternetAddress toAddress = isAllowedEmailAddress(userBo.getEmailAddress()) ? new InternetAddress(userBo.getEmailAddress()) : null; + + public static void inviaEmailReminderAppuntamenti(List lista, User userBo, Date tomorrow) + throws SystemException, AddressException { + + InternetAddress toAddress = isAllowedEmailAddress(userBo.getEmailAddress()) ? new InternetAddress( + userBo.getEmailAddress()) : null; InternetAddress fromAddress = new InternetAddress("portos@regione.toscana.it"); - + MailMessage mailMessage = new MailMessage(); - mailMessage.setTo(toAddress); - mailMessage.setFrom(fromAddress); + mailMessage.setTo(toAddress); + mailMessage.setFrom(fromAddress); mailMessage.setSubject("Reminder appuntamenti Portos di domani"); - mailMessage.setBody(creaCorpoMailReminder(lista,userBo, tomorrow)); + mailMessage.setBody(creaCorpoMailReminder(lista, userBo, tomorrow)); mailMessage.setHTMLFormat(true); - + /* * Invio email */ MailServiceUtil.sendEmail(mailMessage); - + } - - - private static String creaCorpoMailReminder(List lista , User boUser, Date tomorrow) throws SystemException{ - + + private static String creaCorpoMailReminder(List lista, User boUser, Date tomorrow) + throws SystemException { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); SimpleDateFormat sdfOra = new SimpleDateFormat("HH:mm"); - + StringBuilder sb = new StringBuilder(); - + /* * Gestione header */ - sb.append("Appuntamenti del " - + sdf.format(tomorrow) - + ""); - + sb.append("Appuntamenti del " + sdf.format(tomorrow) + ""); + sb.append("
"); sb.append("Gentile " + boUser.getFullName() + " ,"); sb.append("
"); - + sb.append("
"); sb.append("
"); - + sb.append("
"); sb.append("nella seguente email le ricordiamo i suoi appuntamenti per domani."); sb.append("
"); - + sb.append("
"); sb.append("
"); - + for (Prenotazione prenotazione : lista) { User professionistaUser = UserLocalServiceUtil.fetchUser(prenotazione.getProfessionistaId()); - + sb.append("
"); - sb.append("Ore " +sdfOra.format(prenotazione.getStartDate())); + sb.append("Ore " + sdfOra.format(prenotazione.getStartDate())); sb.append(" : appuntamento con " + professionistaUser.getFullName() + ". Motivo: "); sb.append(HtmlUtil.escape(prenotazione.getDescLong())); sb.append("
"); - + sb.append("
"); - + } - - + sb.append(""); - + return sb.toString(); } - - - private static String creaCorpoMailRichiestaAppuntamento(User professionista, User boUser, Date dataAppuntamento, String telefono, String mail){ - + + private static String creaCorpoMailRichiestaAppuntamento(User professionista, User boUser, + Date dataAppuntamento, String telefono, String mail) { + SimpleDateFormat sdfGiorno = new SimpleDateFormat("d MMMMM yyyy"); SimpleDateFormat sdfOra = new SimpleDateFormat("HH:mm"); - - + StringBuilder sb = new StringBuilder(); - + /* * Gestione header */ sb.append("Notifica Richiesta Appuntamento Portos"); - + sb.append("
"); sb.append("Gentile " + professionista.getFullName() + " ,"); sb.append("
"); - + sb.append("
"); sb.append("
"); - + sb.append("
"); sb.append("con la presente mail la informiamo che il suo appuntamento del "); sb.append(sdfGiorno.format(dataAppuntamento)); @@ -202,74 +203,75 @@ public class CalendarUtil { sb.append(" con " + boUser.getFullName()); sb.append(" è stato stato prenotato con successo."); sb.append("
"); - - //Product Backlog Item 32934 + + // Product Backlog Item 32934 sb.append("
Di seguito i recapiti che ha specificato:
"); sb.append("
Telefono: ").append(telefono).append("
"); sb.append("
Email: ").append(mail).append("
"); - + sb.append(""); - + return sb.toString(); } - - private static String creaCorpoMailAnnullamento(User professionista, User boUser, Date dataAppuntamento){ - + + private static String creaCorpoMailAnnullamento(User professionista, User boUser, Date dataAppuntamento) { + SimpleDateFormat sdfGiorno = new SimpleDateFormat("d MMMMM yyyy"); SimpleDateFormat sdfOra = new SimpleDateFormat("HH:mm"); - - + StringBuilder sb = new StringBuilder(); - + /* * Gestione header */ sb.append("Notifica Annullamento Appuntamento Portos"); - + sb.append("
"); sb.append("Gentile " + professionista.getFullName() + " ,"); sb.append("
"); - + sb.append("
"); sb.append("
"); - + sb.append("
"); sb.append("con la presente mail la informiamo che il suo appuntamento del "); sb.append(sdfGiorno.format(dataAppuntamento)); sb.append(" delle ore " + sdfOra.format(dataAppuntamento)); sb.append(" è stato annullato per sopraggiunti impedimenti del tecnico istruttore."); sb.append("
"); - + sb.append(""); - + return sb.toString(); } - - //Bug 32935 - public static int calculateTimeSlots(Date start, Date end, int slotInterval){ + + // Bug 32935 + public static int calculateTimeSlots(Date start, Date end, int slotInterval) { Long count = null; count = (((end.getTime() - start.getTime()) / 1000L) / 60L) / slotInterval + 1; return count.intValue(); } - - private static boolean isAllowedEmailAddress(String emailAddress){ - final String[] NOT_ALLOWED_EMAIL_DOMAINS = PortletProps.getArray(PortletPropsKeys.EMAIL_DOMAINS_NOT_ALLOWED); - final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile(PortletProps.get(PortletPropsKeys.EMAIL_VALIDATOR_REGEXP), Pattern.CASE_INSENSITIVE); - + + private static boolean isAllowedEmailAddress(String emailAddress) { + final String[] NOT_ALLOWED_EMAIL_DOMAINS = PortletProps + .getArray(PortletPropsKeys.EMAIL_DOMAINS_NOT_ALLOWED); + final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile( + PortletProps.get(PortletPropsKeys.EMAIL_VALIDATOR_REGEXP), Pattern.CASE_INSENSITIVE); + boolean isAllowed = true; - - if(Validator.isNotNull(emailAddress)){ + + if (Validator.isNotNull(emailAddress)) { Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(emailAddress); isAllowed = matcher.find(); - + String emailDomain = emailAddress.substring(emailAddress.indexOf("@") + 1); - if(isAllowed && Arrays.asList(NOT_ALLOWED_EMAIL_DOMAINS).contains(emailDomain)){ + if (isAllowed && Arrays.asList(NOT_ALLOWED_EMAIL_DOMAINS).contains(emailDomain)) { isAllowed = false; } - }else{ + } else { isAllowed = false; } - + return isAllowed; } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.classpath index 1a538b03..9975372f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java index aadb7eae..a4e40322 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java @@ -22,34 +22,35 @@ import javax.portlet.ActionResponse; */ public class ComunicazioneMediata extends MVCPortlet { - private static Log _log = LogFactoryUtil.getLog(ComunicazioneMediata.class); - - public void addComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) { - - long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId"); - String domanda = ParamUtil.getString(actionRequest, "domanda"); - - try { - ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); - IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); - if (Validator.isNotNull(intPratica)) { - ComunicazioneServiceUtil.addComunicazione(serviceContext.getUserId(), intPratica.getIntPraticaId(), domanda, - serviceContext); - } - } catch (PortalException | SystemException e) { - _log.error(e, e); - } - } - - public void updateComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException { - long comunicazioneId = ParamUtil.getLong(actionRequest, "comunicazioneId"); - String risposta = ParamUtil.getString(actionRequest, "risposta"); - try { - ComunicazioneServiceUtil.updateComunicazione(comunicazioneId, risposta); - - } catch (SystemException e) { - _log.error(e, e); - } - } + private static Log _log = LogFactoryUtil.getLog(ComunicazioneMediata.class); + + public void addComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) { + + long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId"); + String domanda = ParamUtil.getString(actionRequest, "domanda"); + + try { + ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + if (Validator.isNotNull(intPratica)) { + ComunicazioneServiceUtil.addComunicazione(serviceContext.getUserId(), + intPratica.getIntPraticaId(), domanda, serviceContext); + } + } catch (PortalException | SystemException e) { + _log.error(e, e); + } + } + + public void updateComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) + throws PortalException { + long comunicazioneId = ParamUtil.getLong(actionRequest, "comunicazioneId"); + String risposta = ParamUtil.getString(actionRequest, "risposta"); + try { + ComunicazioneServiceUtil.updateComunicazione(comunicazioneId, risposta); + + } catch (SystemException e) { + _log.error(e, e); + } + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.classpath index 1a538b03..9975372f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/cookies/action/StartUpAction.java b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/cookies/action/StartUpAction.java index 2e08553e..85888e40 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/cookies/action/StartUpAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-cookies-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/cookies/action/StartUpAction.java @@ -1,6 +1,5 @@ package it.tref.liferay.portos.cookies.action; - import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.exception.PortalException; @@ -26,97 +25,100 @@ import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; public class StartUpAction extends SimpleAction { - private final static Log _log = LogFactoryUtil.getLog(StartUpAction.class); + private final static Log _log = LogFactoryUtil.getLog(StartUpAction.class); - @Override - public void run(String[] companyIds) throws ActionException { + @Override + public void run(String[] companyIds) throws ActionException { - for (String id : companyIds) { - try { - long companyId = GetterUtil.getLong(id); + for (String id : companyIds) { + try { + long companyId = GetterUtil.getLong(id); - String[] defaultActions = {ActionKeys.VIEW, ActionKeys.UPDATE}; - String[] guestActions = {ActionKeys.VIEW}; + String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE }; + String[] guestActions = { ActionKeys.VIEW }; - // Organization custom fields - addExpandoColumnIfNotExists(companyId, Group.class.getName(), "cookiesJournalarticleId", - ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions); - } catch (Exception e) { - _log.error("Errore nella procedura automatizzata di configurazione", e); - } - } - } + // Organization custom fields + addExpandoColumnIfNotExists(companyId, Group.class.getName(), "cookiesJournalarticleId", + 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); + long classNameId = PortalUtil.getClassNameId(className); - ExpandoTable expandoTable = null; - try { - expandoTable = - ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); - } catch (PortalException e) { - try { - expandoTable = - ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); - } catch (PortalException e1) { - } - } + ExpandoTable expandoTable = null; + try { + expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, + ExpandoTableConstants.DEFAULT_TABLE_NAME); + } catch (PortalException e) { + try { + expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, + ExpandoTableConstants.DEFAULT_TABLE_NAME); + } catch (PortalException e1) { + } + } - ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil + .getColumn(expandoTable.getTableId(), name); - if (expandoColumn == null) { + if (expandoColumn == null) { - try { - expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type); + try { + expandoColumn = ExpandoColumnLocalServiceUtil + .addColumn(expandoTable.getTableId(), name, type); - } catch (PortalException e) { - } - } + } catch (PortalException e) { + } + } - try { + try { - if (indexed) { + if (indexed) { - UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); - typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, - String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); + typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, + String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); - expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); - expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); - } + expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); + } - if (hidden) { + if (hidden) { - UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); - typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); + typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); - expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); - expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); - } + 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); + 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); - } catch (PortalException e) { - } + 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; - } + return expandoColumn; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.classpath index 1a538b03..26409659 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.classpath @@ -1,7 +1,7 @@ - + @@ -18,5 +18,6 @@ + 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..60d50a01 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 @@ -32,5 +32,6 @@ org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + org.apache.ivyde.eclipse.ivynature 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 22dd0302..027b1b69 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 @@ -27,67 +27,68 @@ import java.util.List; public class DeployAction extends SimpleAction { - 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); - } - } - } - }); - } + 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/control/DeployAlertControl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java index d1255ad9..daa35ae1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/control/DeployAlertControl.java @@ -8,17 +8,17 @@ import com.liferay.portlet.BaseControlPanelEntry; public class DeployAlertControl extends BaseControlPanelEntry { - public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) - throws Exception { + public boolean hasAccessPermission(PermissionChecker permissionChecker, Group group, Portlet portlet) + throws Exception { - long companyId = PortalUtil.getDefaultCompanyId(); + long companyId = PortalUtil.getDefaultCompanyId(); - if (companyId == permissionChecker.getCompanyId()) { - return true; - } + if (companyId == permissionChecker.getCompanyId()) { + return true; + } - return false; + return false; - } + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java index de467f37..92f0414f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationLogLocalServiceImpl.java @@ -28,12 +28,14 @@ import java.util.Date; /** * The implementation of the notification log 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.deployalert.service.NotificationLogLocalService} 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.deployalert.service.NotificationLogLocalService} + * 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 Matteo @@ -42,33 +44,34 @@ import java.util.Date; */ public class NotificationLogLocalServiceImpl extends NotificationLogLocalServiceBaseImpl { - public NotificationLog addNotification(String nomePlugin, String tipo) throws SystemException, PortalException { + public NotificationLog addNotification(String nomePlugin, String tipo) throws SystemException, + PortalException { - Date now = new Date(); + Date now = new Date(); - validate(nomePlugin, tipo); + validate(nomePlugin, tipo); - long notificationId = counterLocalService.increment(NotificationLog.class.getName()); + long notificationId = counterLocalService.increment(NotificationLog.class.getName()); - NotificationLog notification = notificationLogPersistence.create(notificationId); + NotificationLog notification = notificationLogPersistence.create(notificationId); - notification.setTipo(tipo); - notification.setNomePlugin(nomePlugin); - notification.setData(now); - notificationLogPersistence.update(notification); + notification.setTipo(tipo); + notification.setNomePlugin(nomePlugin); + notification.setData(now); + notificationLogPersistence.update(notification); - return notification; - } + return notification; + } - private void validate(String nomePlugin, String tipo) throws NotificationTipoException, - NotificationNomePluginException { + private void validate(String nomePlugin, String tipo) throws NotificationTipoException, + NotificationNomePluginException { - if (Validator.isNull(nomePlugin)) { - throw new NotificationNomePluginException(); - } - if (Validator.isNull(tipo)) { - throw new NotificationTipoException(); - } + if (Validator.isNull(nomePlugin)) { + throw new NotificationNomePluginException(); + } + if (Validator.isNull(tipo)) { + throw new NotificationTipoException(); + } - } + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java index 4103b228..3a82f2ad 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailLocalServiceImpl.java @@ -37,12 +37,14 @@ import java.util.List; /** * The implementation of the notification mail 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.deployalert.service.NotificationMailLocalService} 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.deployalert.service.NotificationMailLocalService} + * 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 Matteo @@ -51,101 +53,104 @@ import java.util.List; */ public class NotificationMailLocalServiceImpl extends NotificationMailLocalServiceBaseImpl { - public NotificationMail addNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext) - throws PortalException, SystemException { + public NotificationMail addNotification(String nomePlugin, String nomeTemplate, + ServiceContext serviceContext) throws PortalException, SystemException { - User user = userPersistence.findByPrimaryKey(serviceContext.getUserId()); + User user = userPersistence.findByPrimaryKey(serviceContext.getUserId()); - Date now = new Date(); + Date now = new Date(); - validate(nomePlugin, nomeTemplate); + validate(nomePlugin, nomeTemplate); - long notificationId = counterLocalService.increment(NotificationMail.class.getName()); + long notificationId = counterLocalService.increment(NotificationMail.class.getName()); - NotificationMail notification = notificationMailPersistence.create(notificationId); + NotificationMail notification = notificationMailPersistence.create(notificationId); - notification.setUserId(user.getUserId()); - notification.setCompanyId(user.getCompanyId()); - notification.setUserName(user.getFullName()); - notification.setCreateDate(serviceContext.getCreateDate(now)); - notification.setModifiedDate(serviceContext.getModifiedDate(now)); - notification.setExpandoBridgeAttributes(serviceContext); - notification.setNomePlugin(nomePlugin); - notification.setNomeTemplate(nomeTemplate); + notification.setUserId(user.getUserId()); + notification.setCompanyId(user.getCompanyId()); + notification.setUserName(user.getFullName()); + notification.setCreateDate(serviceContext.getCreateDate(now)); + notification.setModifiedDate(serviceContext.getModifiedDate(now)); + notification.setExpandoBridgeAttributes(serviceContext); + notification.setNomePlugin(nomePlugin); + notification.setNomeTemplate(nomeTemplate); - notificationMailPersistence.update(notification); + notificationMailPersistence.update(notification); - return notification; - } + return notification; + } - private void validate(String nomePlugin, String nomeTemplate) throws NotificationNomePluginException, - NotificationNomeTemplateException { + private void validate(String nomePlugin, String nomeTemplate) throws NotificationNomePluginException, + NotificationNomeTemplateException { - if (Validator.isNull(nomePlugin)) { - throw new NotificationNomePluginException(); - } - if (Validator.isNull(nomeTemplate)) { - throw new NotificationNomeTemplateException(); - } - } + if (Validator.isNull(nomePlugin)) { + throw new NotificationNomePluginException(); + } + if (Validator.isNull(nomeTemplate)) { + throw new NotificationNomeTemplateException(); + } + } - public NotificationMail updateNotification(String nomePlugin, String nomeTemplate, ServiceContext serviceContext, - long notificationId) throws SystemException, PortalException { + public NotificationMail updateNotification(String nomePlugin, String nomeTemplate, + ServiceContext serviceContext, long notificationId) throws SystemException, PortalException { - Date now = new Date(); + Date now = new Date(); - NotificationMail notification = getNotificationMail(notificationId); + NotificationMail notification = getNotificationMail(notificationId); - validate(nomePlugin, nomeTemplate); + validate(nomePlugin, nomeTemplate); - notification.setModifiedDate(serviceContext.getModifiedDate(now)); - notification.setNomePlugin(nomePlugin); - notification.setNomeTemplate(nomeTemplate); - notification.setExpandoBridgeAttributes(serviceContext); + notification.setModifiedDate(serviceContext.getModifiedDate(now)); + notification.setNomePlugin(nomePlugin); + notification.setNomeTemplate(nomeTemplate); + notification.setExpandoBridgeAttributes(serviceContext); - notificationMailPersistence.update(notification); + notificationMailPersistence.update(notification); - return notification; - } + return notification; + } - public List findNotifications(long companyId, int start, int end) throws SystemException { + public List findNotifications(long companyId, int start, int end) + throws SystemException { - // return notificationMailPersistence.findBycompanyId(companyId, start, end); - DynamicQuery query = notificationMailLocalService.dynamicQuery(); - query.addOrder(OrderFactoryUtil.asc("nomePlugin")); - List notifications = null; - try { - notifications = NotificationMailLocalServiceUtil.dynamicQuery(query); - } catch (SystemException e) { - e.printStackTrace(); - } - return notifications; - } + // return notificationMailPersistence.findBycompanyId(companyId, start, + // end); + DynamicQuery query = notificationMailLocalService.dynamicQuery(); + query.addOrder(OrderFactoryUtil.asc("nomePlugin")); + List notifications = null; + try { + notifications = NotificationMailLocalServiceUtil.dynamicQuery(query); + } catch (SystemException e) { + e.printStackTrace(); + } + return notifications; + } - public List findNotifications(long companyId) throws SystemException { + public List findNotifications(long companyId) throws SystemException { - return notificationMailPersistence.findBycompanyId(companyId); - } + return notificationMailPersistence.findBycompanyId(companyId); + } - public int getNotificationCount(long companyId) throws SystemException { + public int getNotificationCount(long companyId) throws SystemException { - return notificationMailPersistence.countBycompanyId(companyId); - } + return notificationMailPersistence.countBycompanyId(companyId); + } - public List findNotifications(long companyId, String servletContextName) throws SystemException { + public List findNotifications(long companyId, String servletContextName) + throws SystemException { - DynamicQuery dynamicQuery = notificationMailLocalService.dynamicQuery(); + DynamicQuery dynamicQuery = notificationMailLocalService.dynamicQuery(); - if (Validator.isNull(servletContextName)) { - Disjunction or = RestrictionsFactoryUtil.disjunction(); - or.add(RestrictionsFactoryUtil.isNull("nomePlugin")); - or.add(RestrictionsFactoryUtil.eq("nomePlugin", StringPool.BLANK)); + if (Validator.isNull(servletContextName)) { + Disjunction or = RestrictionsFactoryUtil.disjunction(); + or.add(RestrictionsFactoryUtil.isNull("nomePlugin")); + or.add(RestrictionsFactoryUtil.eq("nomePlugin", StringPool.BLANK)); - dynamicQuery.add(or); - } else { - dynamicQuery.add(RestrictionsFactoryUtil.eq("nomePlugin", servletContextName)); - } + dynamicQuery.add(or); + } else { + dynamicQuery.add(RestrictionsFactoryUtil.eq("nomePlugin", servletContextName)); + } - return notificationMailPersistence.findWithDynamicQuery(dynamicQuery); - } + return notificationMailPersistence.findWithDynamicQuery(dynamicQuery); + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailServiceImpl.java index 338d7aaa..69809bad 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/service/impl/NotificationMailServiceImpl.java @@ -20,10 +20,15 @@ import it.tref.liferay.portos.deployalert.service.base.NotificationMailServiceBa * The implementation of the notification mail 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.deployalert.service.NotificationMailService} 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.deployalert.service.NotificationMailService} + * 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 Matteo @@ -33,7 +38,9 @@ import it.tref.liferay.portos.deployalert.service.base.NotificationMailServiceBa public class NotificationMailServiceImpl extends NotificationMailServiceBaseImpl { /* * NOTE FOR DEVELOPERS: - * - * Never reference this interface directly. Always use {@link it.tref.liferay.portos.deployalert.service.NotificationMailServiceUtil} to access the notification mail remote service. + * + * Never reference this interface directly. Always use {@link + * it.tref.liferay.portos.deployalert.service.NotificationMailServiceUtil} + * to access the notification mail remote service. */ } \ 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/util/DeployAlertUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java index 9c630c8a..c78c5404 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/deployalert/util/DeployAlertUtil.java @@ -24,81 +24,80 @@ import java.util.Date; public class DeployAlertUtil { - private final static Log _log = LogFactoryUtil.getLog(DeployAlertUtil.class); + private final static Log _log = LogFactoryUtil.getLog(DeployAlertUtil.class); - public static final ServiceContext getServiceContext() { + public static final ServiceContext getServiceContext() { - long companyId = PortalUtil.getDefaultCompanyId(); + long companyId = PortalUtil.getDefaultCompanyId(); - ServiceContext serviceContext = new ServiceContext(); - Company company; - serviceContext.setCompanyId(companyId); + ServiceContext serviceContext = new ServiceContext(); + Company company; + serviceContext.setCompanyId(companyId); - try { - company = CompanyLocalServiceUtil.getCompany(companyId); - Role role = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ADMINISTRATOR); - long userAdminId = UserLocalServiceUtil.getRoleUserIds(role.getRoleId())[0]; + try { + company = CompanyLocalServiceUtil.getCompany(companyId); + Role role = RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ADMINISTRATOR); + long userAdminId = UserLocalServiceUtil.getRoleUserIds(role.getRoleId())[0]; - serviceContext.setUserId(userAdminId); - serviceContext.setScopeGroupId(company.getGroupId()); + serviceContext.setUserId(userAdminId); + serviceContext.setScopeGroupId(company.getGroupId()); - PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(UserLocalServiceUtil.getUser(userAdminId))); - } catch (Exception e) { - _log.error(e, e); - } + PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil + .create(UserLocalServiceUtil.getUser(userAdminId))); + } catch (Exception e) { + _log.error(e, e); + } - return serviceContext; - } + return serviceContext; + } - public static final boolean addDefaultDeployMailTemplate(ServiceContext serviceContext) { + public static final boolean addDefaultDeployMailTemplate(ServiceContext serviceContext) { - boolean add = false; - String subject = "Deploy Plugin"; - String body = "E' stato effettuato il $evento del plugin $nomePlugin in data $data."; - String[] to = {"matteoguggia97@gmail.com"}; + boolean add = false; + String subject = "Deploy Plugin"; + String body = "E' stato effettuato il $evento del plugin $nomePlugin in data $data."; + String[] to = { "matteoguggia97@gmail.com" }; - try { - add = - MailManagerUtil.addMailTemplate(MailConstants.DEFAULT_DEPLOY_TEMPLATE, "test@3fconsulting.it", to, null, - null, subject, body, false, serviceContext); - } catch (SystemException e) { - _log.error(e, e); - } - PermissionThreadLocal.setPermissionChecker(null); + try { + add = MailManagerUtil.addMailTemplate(MailConstants.DEFAULT_DEPLOY_TEMPLATE, + "test@3fconsulting.it", to, null, null, subject, body, false, serviceContext); + } catch (SystemException e) { + _log.error(e, e); + } + PermissionThreadLocal.setPermissionChecker(null); - return add; - } + return add; + } - public static final boolean addDefaultUndeployMailTemplate(ServiceContext serviceContext) { + public static final boolean addDefaultUndeployMailTemplate(ServiceContext serviceContext) { - boolean add = false; - String subject = "Undeploy Plugin"; - String body = "E' stato effettuato l'$evento del plugin $nomePlugin in data $data."; - String[] to = {"matteoguggia97@gmail.com"}; + boolean add = false; + String subject = "Undeploy Plugin"; + String body = "E' stato effettuato l'$evento del plugin $nomePlugin in data $data."; + String[] to = { "matteoguggia97@gmail.com" }; - try { - add = - MailManagerUtil.addMailTemplate(MailConstants.DEFAULT_UNDEPLOY_TEMPLATE, "test@3fconsulting.it", to, null, - null, subject, body, false, serviceContext); - } catch (SystemException e) { - _log.error(e, e); - } - PermissionThreadLocal.setPermissionChecker(null); + try { + add = MailManagerUtil.addMailTemplate(MailConstants.DEFAULT_UNDEPLOY_TEMPLATE, + "test@3fconsulting.it", to, null, null, subject, body, false, serviceContext); + } catch (SystemException e) { + _log.error(e, e); + } + PermissionThreadLocal.setPermissionChecker(null); - return add; - } + return add; + } - public static final JSONObject getParametri(String nomePlugin, String evento) { + public static final JSONObject getParametri(String nomePlugin, String evento) { - JSONObject parametri = JSONFactoryUtil.createJSONObject(); + JSONObject parametri = JSONFactoryUtil.createJSONObject(); - String data = new SimpleDateFormat("dd/MM/yyyy HH:mm").format(new Date()); + String data = new SimpleDateFormat("dd/MM/yyyy HH:mm").format(new Date()); - parametri.put("data", data); - parametri.put("evento", evento); - parametri.put("nomePlugin", nomePlugin); + parametri.put("data", data); + parametri.put("evento", evento); + parametri.put("nomePlugin", nomePlugin); - return parametri; - } + return parametri; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties index ebbc75f8..559de9e9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=DA - build.number=8 - build.date=1569596730980 + build.number=9 + build.date=1606299034524 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml index ddbee66c..51a51cbe 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml @@ -7,12 +7,12 @@ xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" > - + - + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java index df7a7bf1..c55c68ec 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java @@ -51,9 +51,6 @@ import javax.portlet.ResourceResponse; import org.apache.commons.codec.digest.DigestUtils; -/** - * Portlet implementation class FascicoloFePortlet - */ public class AllegatiPraticaPortlet extends MVCPortlet { private static Log _log = LogFactoryUtil.getLog(AllegatiPraticaPortlet.class); @@ -151,8 +148,7 @@ public class AllegatiPraticaPortlet extends MVCPortlet { long dettPraticaIdRimozione = 0; Date dtDataRimozione = null; // TODO attenzione perche' questo controllo potrebbe non - // andare bene per integrazioni e - // varianti + // andare bene per integrazioni e varianti boolean isUnivoco = DocumentiPraticaUtil.getDocUnivoci().contains(tipologia); if (isUnivoco && DocPraticaLocalServiceUtil.countByClassPk_Tipologia(classPk, tipologia) > 0) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java index 2a04cbef..06a5d28f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java @@ -114,9 +114,6 @@ import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil; import com.liferay.portlet.documentlibrary.util.DLUtil; import com.liferay.util.bridges.mvc.MVCPortlet; -/** - * Portlet implementation class FascicoloFePortlet - */ public class FascicoloFePortlet extends MVCPortlet { private static Log _log = LogFactoryUtil.getLog(FascicoloFePortlet.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/ParereGeologoPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/ParereGeologoPortlet.java index 7e6c8cb9..3803a33b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/ParereGeologoPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/ParereGeologoPortlet.java @@ -24,9 +24,6 @@ import java.io.File; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; -/** - * Portlet implementation class FascicoloFePortlet - */ public class ParereGeologoPortlet extends MVCPortlet { private static Log _log = LogFactoryUtil.getLog(ParereGeologoPortlet.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/RicercaPratichePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/RicercaPratichePortlet.java index 9c65b905..55569191 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/RicercaPratichePortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/RicercaPratichePortlet.java @@ -29,9 +29,6 @@ import javax.portlet.ResourceResponse; import org.apache.log4j.Logger; -/** - * Portlet implementation class RicercaAvvisiGenioCivilePortlet - */ public class RicercaPratichePortlet extends MVCPortlet { private final static Logger _log = Logger.getLogger(RicercaPratichePortlet.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/Constants.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/Constants.java deleted file mode 100644 index 01c3b19c..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/Constants.java +++ /dev/null @@ -1,5 +0,0 @@ -package it.tref.liferay.portos.fe.util; - -public interface Constants extends com.liferay.portal.kernel.util.Constants { - -} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloBean.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloBean.java index 852ac8ce..c05e4182 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloBean.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloBean.java @@ -4,9 +4,6 @@ import java.io.Serializable; public class ReportFascicoloBean implements Serializable{ - /** - * - */ private static final long serialVersionUID = 4921215218965971793L; public ReportFascicoloBean(){ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.classpath index c435092a..fcf44f2b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/lib/commons-logging.jar b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/lib/commons-logging.jar deleted file mode 100644 index 93a3b9f6..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/lib/commons-logging.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/ExtractorResponse.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/ExtractorResponse.java index 9eb9bc21..ab6795d8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/ExtractorResponse.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/util/ExtractorResponse.java @@ -4,18 +4,14 @@ import java.util.List; public class ExtractorResponse { - private boolean success; - private List cf; - - public boolean isSuccess() { - - return success; - } - - public List getCf() { - - return cf; - } + private boolean success; + private List cf; + public boolean isSuccess() { + return success; + } + public List getCf() { + return cf; + } } 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 b49f216a..a59463f9 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 @@ -13,181 +13,197 @@ import java.util.Map; public class FirmaGetUtil { - public Risposta> getConfiguration() { - - Risposta> risposta = new Risposta<>(); - - Map configurazione = new HashMap<>(); - configurazione.put("MESSAGGIO_FIRMA_ERRORE_RECUPERO_FILE", "Errore durante il recupero del file"); - configurazione.put("MESSAGGIO_FIRMA_FILE_OK", "File caricato e salvato correttamente"); - configurazione.put("MESSAGGIO_EFFETTUARE_LOGIN", "Effettuare il login per continuare"); - configurazione.put("ERRORE_TOKEN_SCADUTO", "Effettuare il login, sessione scaduta"); - configurazione.put("MESSAGGIO_RIFIUTO_ERRORE", "Si è verificato un errore durante il tentativo di rifiuto del file"); - configurazione.put("RIFIUTA", "true"); - configurazione.put("APRI_PRATICA_DISABILITATO_PER_DOCUMENTO", "v"); - configurazione.put("MESSAGGIO_FIRMA_ATTESA", "Attesa"); - configurazione.put("MESSAGGIO_NO_UTENTE", "Controllare di aver inserito la corretta smart card nel lettore"); - configurazione.put("MESSAGGIO_ERRORE_APPLICAZIONE", "Errore imprevisto, riprovare ad eseguire l'operazione; se l'errore persiste contattare l'assistenza"); - configurazione.put("TITOLO_APPLICAZIONE_FIRMA", "Applicazione di firma"); - configurazione.put("MESSAGGIO_FIRMA", "Inizio firma del file in corso"); - configurazione.put("MESSAGGIO_FILE_FIRMA_NON_PRESENTI", "Nessuno dei file selezionati è più disponibile"); - configurazione.put("SMART_CARD_LETTURA_CF", "SERIALNUMBER"); - configurazione.put("RIFIUTA_ASSEGNA_PER_PRATICA", " - "); - configurazione.put("RIFIUTA_CAMBIA_FASE", "false"); - configurazione.put("MESSAGGIO_SCELTA_CERTIFICATO_VALIDO", "Scelta del certificato non valido"); - configurazione.put("MESSAGGIO_NO_FILE", "Impossibile recuperare il file"); - configurazione.put("MESSAGGIO_NO_PRATICA", "Impossibile accedere alla pratica"); - configurazione.put("MESSAGGIO_RIFIUTO_OK", "Rifiuto del file avvenuto con successo"); - configurazione.put("MESSAGGIO_FIRMA_RECUPERO_FILE_OK", "Recupero file avvenuto con successo"); - configurazione.put("MESSAGGIO_NO_CARTA_IMPOSTATA", "Carta non impostata, procedere con la configurazione prima di proseguire"); - configurazione.put("MESSAGGIO_SELEZIONARE_FILE_FIRMA", "Selezionare almeno un file prima di premere firma"); - configurazione.put("MODALITA_VISIONE_FILE_ALLA_FIRMA", "documento"); - configurazione.put("MESSAGGIO_NO_CERTIFICATI_VALIDI", "Non è stato trovato alcun certificato o i certificati non sono validi"); - configurazione.put("MESSAGGIO_FIRMA_ERRORE_FIRMA", "Errore durante il tentativo di firma"); - configurazione.put("CARTELLA_FILE_VISUALIZZATI", "/file-firma-tmp/"); - configurazione.put("RIFIUTA_CAMBIA_FASE_PER_PRATICA", " - "); - configurazione.put("MODALITA_VISIONE_FILE_ALLA_FIRMA_PER_DOCUMENTO", "v"); - configurazione.put("RIFIUTA_ASSEGNA_PER_DOCUMENTO", " - "); - configurazione.put("VISUALIZZA_FILE_DISABILITATO_PER_PRATICA", " - "); - configurazione.put("INFORMAZIONI", "Applicazione firma è stata realizzata da 3FConsulting e distribuito sotto licenze GPL v.2. Il codice è basato sul prodotto j4sign (http://j4sign.sourceforge.net/) per il quale si ringraziano gli autori per il loro contributo."); - configurazione.put("RIFIUTA_DISABILITATO_PER_PRATICA", " - "); - configurazione.put("NO_FILE", "Nessun file da firmare presente"); - configurazione.put("MESSAGGIO_SELEZIONARE_FILE_RIFIUTA", "Selezionare almeno un file prima di premere rifiuta"); - configurazione.put("MODALITA_LOGIN", "codice_fiscale"); - configurazione.put("VISUALIZZA_FILE", "true"); - configurazione.put("APRI_PRATICA_DISABILITATO_PER_PRATICA", " - "); - configurazione.put("SMART_CARD_LETTURA_NOME", "GIVENNAME"); - configurazione.put("VISUALIZZA_FILE_DISABILITATO_PER_DOCUMENTO", " - "); - configurazione.put("MESSAGGIO_FIRMA_TOKEN_ERRORE_FIRMA", "Errore durante il tentativo di firma del file necessario al login, controllare di aver inserito correttamente la smart card"); - configurazione.put("RIFIUTA_ASSEGNA", "false"); - configurazione.put("MESSAGGIO_FILE_RIFIUTA_NON_PRESENTI", "Nessuno dei file selezionati è più disponibile"); - configurazione.put("RIFIUTA_CAMBIA_FASE_PER_DOCUMENTO", "a, ap, v"); - configurazione.put("APRI_PRATICA", "true"); - configurazione.put("MESSAGGIO_FIRMA_RECUPERO_FILE", "Recupero file in corso"); - configurazione.put("SMART_CARD_LETTURA_COGNOME", "SURNAME"); - configurazione.put("RIFIUTA_DISABILITATO_PER_DOCUMENTO", "v"); - configurazione.put("MESSAGGIO_FIRMA_COPLETATA", "Procedura di firma completata con successo"); - configurazione.put("MESSAGGIO_RIFIUTO_COPLETATA", "Procedura di rifiuto completata con successo"); - configurazione.put("MESSAGGIO_FIRMA_ERRORE_BLOCCANTE", "Attenzione errore imprevisto durante la procedura di firma"); - configurazione.put("MESSAGGIO_RIFIUTO_ERRORE_BLOCCANTE", "Attenzione errore imprevisto durante la procedura di rifiuto"); - configurazione.put("MESSAGGIO_FIRMA_IN_CORSO", "Firma dei file in corso..."); - configurazione.put("SELEZIONA_DOCUMENTO_SENZA_VISUALIZZAZIONE", "Documento senza visualizzazione"); - risposta.setRisposta(RispostaCostanti.OK); - risposta.setObj(configurazione); - - return risposta; - } - - public Risposta> getType() { - - Risposta> risposta = new Risposta<>(); - - Map mappa = new HashMap<>(); - - mappa.put("CO", "CONFORMITÀ"); - mappa.put("AU", "AUTORIZZAZIONE"); - mappa.put("NC", "NON CONFORMITÀ"); - mappa.put("AN", "AUTORIZZAZIONE NEGATA"); - mappa.put("IN", "RICHIESTE INTEGRAZIONI"); - mappa.put("AL", "ANNULLAMENTO"); - mappa.put("SP", "AVVIO PROCEDIMENTO"); - mappa.put("MA", "AVVISO MANUALE"); - mappa.put("CI", "CAMBIO ISTRUTTORE"); - - risposta.setRisposta(RispostaCostanti.OK); - risposta.setObj(mappa); - - return risposta; - } - - public Risposta> getTypeVerbale() { - - Risposta> risposta = new Risposta<>(); - - Map mappa = new HashMap<>(); - - risposta.setRisposta(RispostaCostanti.OK); - risposta.setObj(mappa); - - return risposta; - } - - 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); - } - return risposta; - } - - 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); - - Risposta risposta = new Risposta<>(); - - if (nome.equals(nomeTest) && cognome.equals(cognomeTest)) { - 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); + public Risposta> getConfiguration() { + + Risposta> risposta = new Risposta<>(); + + Map configurazione = new HashMap<>(); + configurazione.put("MESSAGGIO_FIRMA_ERRORE_RECUPERO_FILE", "Errore durante il recupero del file"); + configurazione.put("MESSAGGIO_FIRMA_FILE_OK", "File caricato e salvato correttamente"); + configurazione.put("MESSAGGIO_EFFETTUARE_LOGIN", "Effettuare il login per continuare"); + configurazione.put("ERRORE_TOKEN_SCADUTO", "Effettuare il login, sessione scaduta"); + configurazione.put("MESSAGGIO_RIFIUTO_ERRORE", + "Si è verificato un errore durante il tentativo di rifiuto del file"); + configurazione.put("RIFIUTA", "true"); + configurazione.put("APRI_PRATICA_DISABILITATO_PER_DOCUMENTO", "v"); + configurazione.put("MESSAGGIO_FIRMA_ATTESA", "Attesa"); + configurazione.put("MESSAGGIO_NO_UTENTE", + "Controllare di aver inserito la corretta smart card nel lettore"); + configurazione + .put("MESSAGGIO_ERRORE_APPLICAZIONE", + "Errore imprevisto, riprovare ad eseguire l'operazione; se l'errore persiste contattare l'assistenza"); + configurazione.put("TITOLO_APPLICAZIONE_FIRMA", "Applicazione di firma"); + configurazione.put("MESSAGGIO_FIRMA", "Inizio firma del file in corso"); + configurazione.put("MESSAGGIO_FILE_FIRMA_NON_PRESENTI", + "Nessuno dei file selezionati è più disponibile"); + configurazione.put("SMART_CARD_LETTURA_CF", "SERIALNUMBER"); + configurazione.put("RIFIUTA_ASSEGNA_PER_PRATICA", " - "); + configurazione.put("RIFIUTA_CAMBIA_FASE", "false"); + configurazione.put("MESSAGGIO_SCELTA_CERTIFICATO_VALIDO", "Scelta del certificato non valido"); + configurazione.put("MESSAGGIO_NO_FILE", "Impossibile recuperare il file"); + configurazione.put("MESSAGGIO_NO_PRATICA", "Impossibile accedere alla pratica"); + configurazione.put("MESSAGGIO_RIFIUTO_OK", "Rifiuto del file avvenuto con successo"); + configurazione.put("MESSAGGIO_FIRMA_RECUPERO_FILE_OK", "Recupero file avvenuto con successo"); + configurazione.put("MESSAGGIO_NO_CARTA_IMPOSTATA", + "Carta non impostata, procedere con la configurazione prima di proseguire"); + configurazione.put("MESSAGGIO_SELEZIONARE_FILE_FIRMA", + "Selezionare almeno un file prima di premere firma"); + configurazione.put("MODALITA_VISIONE_FILE_ALLA_FIRMA", "documento"); + configurazione.put("MESSAGGIO_NO_CERTIFICATI_VALIDI", + "Non è stato trovato alcun certificato o i certificati non sono validi"); + configurazione.put("MESSAGGIO_FIRMA_ERRORE_FIRMA", "Errore durante il tentativo di firma"); + configurazione.put("CARTELLA_FILE_VISUALIZZATI", "/file-firma-tmp/"); + configurazione.put("RIFIUTA_CAMBIA_FASE_PER_PRATICA", " - "); + configurazione.put("MODALITA_VISIONE_FILE_ALLA_FIRMA_PER_DOCUMENTO", "v"); + configurazione.put("RIFIUTA_ASSEGNA_PER_DOCUMENTO", " - "); + configurazione.put("VISUALIZZA_FILE_DISABILITATO_PER_PRATICA", " - "); + configurazione + .put("INFORMAZIONI", + "Applicazione firma è stata realizzata da 3FConsulting e distribuito sotto licenze GPL v.2. Il codice è basato sul prodotto j4sign (http://j4sign.sourceforge.net/) per il quale si ringraziano gli autori per il loro contributo."); + configurazione.put("RIFIUTA_DISABILITATO_PER_PRATICA", " - "); + configurazione.put("NO_FILE", "Nessun file da firmare presente"); + configurazione.put("MESSAGGIO_SELEZIONARE_FILE_RIFIUTA", + "Selezionare almeno un file prima di premere rifiuta"); + configurazione.put("MODALITA_LOGIN", "codice_fiscale"); + configurazione.put("VISUALIZZA_FILE", "true"); + configurazione.put("APRI_PRATICA_DISABILITATO_PER_PRATICA", " - "); + configurazione.put("SMART_CARD_LETTURA_NOME", "GIVENNAME"); + configurazione.put("VISUALIZZA_FILE_DISABILITATO_PER_DOCUMENTO", " - "); + configurazione + .put("MESSAGGIO_FIRMA_TOKEN_ERRORE_FIRMA", + "Errore durante il tentativo di firma del file necessario al login, controllare di aver inserito correttamente la smart card"); + configurazione.put("RIFIUTA_ASSEGNA", "false"); + configurazione.put("MESSAGGIO_FILE_RIFIUTA_NON_PRESENTI", + "Nessuno dei file selezionati è più disponibile"); + configurazione.put("RIFIUTA_CAMBIA_FASE_PER_DOCUMENTO", "a, ap, v"); + configurazione.put("APRI_PRATICA", "true"); + configurazione.put("MESSAGGIO_FIRMA_RECUPERO_FILE", "Recupero file in corso"); + configurazione.put("SMART_CARD_LETTURA_COGNOME", "SURNAME"); + configurazione.put("RIFIUTA_DISABILITATO_PER_DOCUMENTO", "v"); + configurazione.put("MESSAGGIO_FIRMA_COPLETATA", "Procedura di firma completata con successo"); + configurazione.put("MESSAGGIO_RIFIUTO_COPLETATA", "Procedura di rifiuto completata con successo"); + configurazione.put("MESSAGGIO_FIRMA_ERRORE_BLOCCANTE", + "Attenzione errore imprevisto durante la procedura di firma"); + configurazione.put("MESSAGGIO_RIFIUTO_ERRORE_BLOCCANTE", + "Attenzione errore imprevisto durante la procedura di rifiuto"); + configurazione.put("MESSAGGIO_FIRMA_IN_CORSO", "Firma dei file in corso..."); + configurazione.put("SELEZIONA_DOCUMENTO_SENZA_VISUALIZZAZIONE", "Documento senza visualizzazione"); + risposta.setRisposta(RispostaCostanti.OK); + risposta.setObj(configurazione); + + return risposta; + } + + public Risposta> getType() { + + Risposta> risposta = new Risposta<>(); + + Map mappa = new HashMap<>(); + + mappa.put("CO", "CONFORMITÀ"); + mappa.put("AU", "AUTORIZZAZIONE"); + mappa.put("NC", "NON CONFORMITÀ"); + mappa.put("AN", "AUTORIZZAZIONE NEGATA"); + mappa.put("IN", "RICHIESTE INTEGRAZIONI"); + mappa.put("AL", "ANNULLAMENTO"); + mappa.put("SP", "AVVIO PROCEDIMENTO"); + mappa.put("MA", "AVVISO MANUALE"); + mappa.put("CI", "CAMBIO ISTRUTTORE"); + + risposta.setRisposta(RispostaCostanti.OK); + risposta.setObj(mappa); + + return risposta; + } + + public Risposta> getTypeVerbale() { + + Risposta> risposta = new Risposta<>(); + + Map mappa = new HashMap<>(); + + risposta.setRisposta(RispostaCostanti.OK); + risposta.setObj(mappa); + + return risposta; + } + + 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); + } + return risposta; + } + + 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); + + Risposta risposta = new Risposta<>(); + + if (nome.equals(nomeTest) && cognome.equals(cognomeTest)) { + 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<>(); + Risposta risposta = new Risposta<>(); - if (!Validator.isBlank(versione)) { - risposta.setObj(versione); - risposta.setRisposta(RispostaCostanti.OK); - } + if (!Validator.isBlank(versione)) { + risposta.setObj(versione); + risposta.setRisposta(RispostaCostanti.OK); + } - return risposta; - } + return risposta; + } - public Risposta getStile() { + public Risposta getStile() { - Risposta risposta = new Risposta<>(); - Stile stile = new Stile(); + Risposta risposta = new Risposta<>(); + Stile stile = new Stile(); - stile.setLogo("iVBORw0KGgoAAAANSUhEUgAAAIAAAAAyCAYAAACUPNO1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkUwMEMwODBFQjkyMTFFMUIzMjlDRkZBQTk4MUY4NjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkUwMEMwODFFQjkyMTFFMUIzMjlDRkZBQTk4MUY4NjEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRTAwQzA3RUVCOTIxMUUxQjMyOUNGRkFBOTgxRjg2MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRTAwQzA3RkVCOTIxMUUxQjMyOUNGRkFBOTgxRjg2MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlqPyScAABO9SURBVHhe7V0JXFRV+35mYRj2HQEBZVPBFQRNcwHcRch9+aBMrdTU0sz6zDIt99zSvqzMzK1MM8V9TUQMlUUUlUVAQEj2bRgYhhnm/54z8M8v/QxDSWsef9e5c9cz933O8z7vufeqINM7QKNXXAGNUIBnEZrKKhhNGQeLFQvrl+jwKBDcsWqrqSsuoVmhdskzBg0qYTJtGiw3ra5fosOjQAgRC7wIgmd0Ym2H4Nkk79MA3ZX7h6MZCaCpn3R4mtBMBNCQXNfSJ5t0JHia0AwE0EAMNa5PHI6CUUOhBwVfdu+khxqaqokkdfRdh+ZEsyiAGCpkGxpgq58nItxbwYScuwGU0KfAm9J80pAAXJg4msJfS5ZOXb+XDs2BZiKAALK7eSjIyobM3Azn57yOdSF9cWGQP96bFooZFfkoDh6EdevfR5lQSI3SKUFz4YkTQETBrNQzRAqdqSA1Ddss9PFF9m14/GssSqeMh1BqAL2qasRs2gyf2KswrdPQHs/moNSziCdKAAHP/0ps/GgapK4uqCwpQ1VhMZLj4vD9lm+REHUBkRGRUIspSdjb4ZKFKe2l6/3NiSdKAAnl/lPdu+BSdAwEtUrYUZCdWzlDKBKhpLQUckUNvFxaY7KJOVzzCvDO/nP1fV+nAM2FRhNAQ8HUkGljAq11738E1vvrkOnmBFsTU5SXluH53s/D0dER/Qf0h1wuR1TKTSyIuoFXfo7B66djIczJoz3E9fvr0BxoFAFY8AUerhAH9Ka+qaTv5bRUTlNDbU/rUcXXsZKuod6vNTTDDY0KPbv5ITf3V7Rr2w5ubm5wd3fH0s83YEVGMRwKC+loEtpbTHuwoV0dmhONIoCANtPcSkPFD5sgyYqDaONaCELHQ93SAUJ7ewitLaGeOgnlbT0Q0a8H6pwdiQilqJRKkFteBgWZvPLycqSkpOD1GdPRrbsfRvgHoMO3n6EEMjoDUxSd7P8VEL1lZLNII1fQ5X94AETUu8uS0qlcGwgZ5XJlUH8oJo5ERehwXH+uC6462cFyzmtwHj8aRWOGoNjRGe0iLuN4GycolEoU5OUjPS0dJqbGCBo6lB/TivL/FYEA9hEnqfo3oCWPTgING0/w84VB0ID6JTo8ChpBABVNTNZFMEuNRbXUDJVeHnA2NoGMXH1uZjakBgYQUpCvXY5FCwtzxF24hERhHYyH+KMmJwe3a2pgIJHAxc0Fe37Yg1IygL179+JHd/Tvg3Pbf4RzWRnl/0dPAToCNA1/QAAVVGTiakcHQ1GrQbWjCyTUk2VWZsiuUUIuk6G8rBwnjp+Aubk5HCglhB8IR3JyEn45cxa2Xb3hScZPViGDBRFDXilHQEAA9u7Zx9PBoEEDechzXRxgsHs3pQ19+vZoKqAjQNPwBwQg+1elQOGmpRDMmYqc7t6o6OmLu2o1aqurUFtbC2sbK4hEYqSlpXGDZ9eiBfT0qABUq7B96zZabwupVB9VtH1efj5KSoqxYuVynDlzhqazCAoaghw6dfmJ87AuKaUzPpoK6AjQNPyBCRRBn+TboWtfpCxZCzHlb41QCFdnZ9Sp61BGsn316jVYWlogMDAAKckp0JCf69ChA1xdXSm4Qdi1cxe6dOkMP18/GBsZQyzSw4L3FuCDhe/jzdmzkJSUDFVFBZLNjUgBdINAzY1GeAAhrZHALToOdVnZEA7qizoTE1iRB3Bq2RJmJP3GxsaoIJk3NDJEGbn+X6nkCxoWBAEZPF/qnVFRF+Dt0wXubTzw6quTUatUw97BDp6e7WBrY4MqmRxni++iZ3QsmUE9oh0bDSin3l1FE+Moe/rnwe3TKUDT0MgqQEiBEcD4VgosN2+BIiMXqc72MHNxhkRfCkszMzhQZeDl6QUrKyuUU4++ePEi8u7mwdTUFIH9AvHTvv10HA0U1TX4btcu8goHKTUY8PLQhxRCZG2F6Lgr8Ll7B7cMjXEzcj+s570F05hE1OYm0b761IL7BauxBMjMzCJylnMDqlDUwMTEuH5N4xAbGweJRB+Ghob1S/48ZOSdcnJy+Sf7/UXFRbwTiUTNPw7SqHEALdg9OgOyheawP34KfV//EIYffgLRf7Yg+04W1u3aib3HjiGnoACOpAys1LOzs0PM5Rj8fOZn+HT1QWxMHKKjo2FPZtGYVMTUzJQTZsmSpTCh8J5ztIGqpQtOvhGGhIhofH/oGGK2rIb1li20lqlBw7MEjw4XKjk923ihcydvODjYIyR4eP2ah6O4pARnI85hWFAItm/bXr+0adi8+Wu4u7uhdetWfPJwd8epk6fq1zYvBHdsPTV1BaUP7F0Cfm+eDQGzdWyI9l6VUNFSJd9GQL2zyrcLslrb44xUBGn7dnC2c0B+YT7fknmFUjJ4YrEYcnk1ZJUyZJBpFJKfaE9+Yd68uWjf3gsrV6+Bl3dnXEu4BusyGfpeT0F5QA/cbt0aA5/zg7pnMKrTb9L5zOio2rbUsaeCp0+F5eer+Pf/BbFQgk83fooZM6bjWwrkpJcnclNqa2uD2W/OhVqlwierV8KAStqk5GSsXLEKNtY2lL6iMGrMKDqbAD179kCPHs9h+/btOBh+GFNemYIhQwZhx/adMDI2QmJiIpQ1tVi67GN+zi+++ApnTp/Bu+/O46mwAcw86+np4bnuPWFJHeDo0UN8+fLlK3Hj+g0s/uhDbqhzc3Ox6MOPIBAKsG7dGhgZGSEjI4NvZ0Opc9myJXy/s2cj8M03W4nYDrTvIqTduoXDh4/yEdejR49izZrVvAo7EB6O3d//AHc3dyxavJDH438ogAZS6m0KkuiKwN5QtXWn8Ffy5b+B7SyhPyJUS40gTLkN918S8JqROVzataPA1KG4qBjJZPJYqWhMniE/P48kr5RSw10EvxCCt+sDv3jxR9j67TZkk0xfioiCh5MzpHTOlNlTYTZqJIZRQ7/ctBm7NyyE8ayZRL0KOv+jKYGeWI9kPBbnIiOx94e90BPqo4WtLZzsKY1JxLwnOjm2IhOroVTmicGDB6Fjpw64eCkab899C6tWrkJqSiq140u8Mvk1vDgxDEOHDsbF6Es4TmXwhHH/QllpOZYtX0IX/RiR+l2sIULPfXsO/Lp1x/XE6/UtobZQ8Bnq6uroGmp/R9DQYOwkIvWmspkFrqqqit836dS5I1xdXKgN8/j2jBhKKsGPHz2OLp18cDszE4MHDsG4cWNx9meqqoYMw53sO5g//12cPHkSBynVzpwxE5cuXcbEsJcxnTrLTjLm48ZO4Od9wJ0X9ohWLSJ6+OD62CB4d/ODVUt7iD5eC9ctO2mNNgcaogbJZOSSwkagrr0HiiifWdjZ8xs/XZ2d4EkkYFAoFPhmy1YIxSKoVLW4eTOJep0tdn/3PU8RFhYWeI561ZgxozFwQH9q9Gl09fOBnH7kqxMnoYObK6y7+WJFdjHWxG+HLHwvVCnpEJ88S0eX8nM0Buyix1yORfSFaKTcSsJ16mkpqanIzcvBjRtJVM0kktwXIj7+CrzadUD0L9GoIa/QoDTMr0gNpPjqq80IeykML4SEoHevPtiwcSMsLSzRp28frFu/Bvv27eP5/cjhI1xN1qxeD4lYgq/pGqyn9feCVUzklPn80WOHKTA7ERoaipkz38CB/eGwNLfGimUriYgdsZSItenzLyERSbFt+1bUKJV8LMWF1HH7jm1cadgNNmNSCVaWGxuaUlu/4NUaK9G7d++Gzz7fyMdg2CmVFBeG+xSA3cOvpHItYeRAGFIDE87/gg3zFqB6zlQUODjSDmoKvhLRvh2x6aVgqDw94OXRBu8Ry6aPGoVRAwfwntUAqVTKx/9HjBjB562sLFFDpWW//v0wY+brvKft378fa9eu5wNJo0lu5dUKLHp/IXbEZ2PD98fheeI8Vgb4YnrL1ojYvRuiscF0ZKX2BI0E61FvvDkLyak3+ffDFCBWljIsIsk9EP4TdhEpHR1bQlmrRP8BAxAyPISCpH1Era5Ozfsqk80SSmcMcnkVDIgYrGcK6t9NqKvT0DZEdqUKg+i37f1xN/YfPICXJ73E19+He4SslBSEQaVWUoBrkJGVTmlrPezJYPfp5Y9a6kBqaoeSjbpS+c1I8h21efyEcZi/YD76+velVKZtr1CoNZSqWhXvZJu4cr2KTzesg4+3Nx1HW3LfRwARtSjX1BA5ZH5aUn3fOfEmatRqOtkB5BsacBsY7+KEtR4OqM3MRrfOndGrRw+UlJbwwKZTjmL3+wuLiqg0ZFLNmK4hUtgQuyeQGXMhyZUgjlz111RRuLi6YPTo0Tzvs7y1dOlyvPfpesyOvAoLysslpEdjTsfgxvGTOEGKFLT+G9TNXUpHNeLHbizUpF15eXl8nsntv//9DloS4foFDsCYkWMwoN9ALP5wMeVbIZfQSaQ+s6gn+vl2x7VriaiurkZpcQnlzkUIJ7JMfGkS4q/EYhX5hpycHO7oGUpoGzb/3gfzsXr1aoROCKPzDYaYeuXvwSqA4pJiPv8+EX7B/AXcnNpYtcCECRNgbmaBPZSuCguK4OXlidmz3+BViJurB7p164ZqIrWaYsOw5pM1OHLoCPdXrK0VlVqSlleUU2rSzitVCixY8AGlioj/b+99JpB5fSWxfGpIN4QOHozQ12ZiVKA/QqZORs/Qt2FPDHtt2gsoTE2HPm23c9cOMieGZKDWYuEHC5BMslReXgE/v64Q1veKYydOoKiwiAeeGcIsyvWsCmBpwNvHG1dIdlvYtUBAYCCKxUJ0PHgawVFx5PsltLeA8pQCeeRFXtKrwbt9+mLwgo9QTdUIW9dYE8jydNu2bXk1cJeIEE8lp79/H26sDpEa1CprMXLkcOzduw8fL/oYh48dogtZhTGjxqEV+YPlK5ZRSWsCZ2dnpKen88ogJHgYT2eJRBAFkd+PjF5ERCTl7Nb8wRdGnLi4OATTdtbW1vUt+Q2XLl/mcu1LFRL/Tnn61q00jB8/lisNC2R4+EF+3UaOHMG3YSn1wIFwbvj69OnNl7HfxnTdx7sLyX0G/c42SLhyhatsInkPVvayeLD9mHlk3qKwqJDO2/X3BGB6xO7LyRFHKz/z88J3P0bglc6tMGBSGPqHTUMqydrJ570RQeaihmr60BfDqDfNw0+kEIWFhdxdl1KQPyFGdvXxwdCgITAzNSXHnUcX7jZOnzqNK9Q4JksF+QVo26k9Onq2R+yVeBjYt4Bv7HUM/PEotYDl94aqQ0NlYg3eDx2KKSRhJa5+8CyvppbyJw4bRYDGIi4ungzSeBgSMdhAlpRq/wOH9sOe/MrfEf+VAvQor54b1geFidFwWrIATk6OKKGyrX2pDL2GDEGrO8lQvzcbdeTqNZTrWE46dPAQ5dUUjBwxHL16PU8l0k4e8BXLl/IS6sWwiZhLDvbsz+dgZWlJpdNkKqV6wNHJCY7tPaG+mYrwI0fQgdzu6LXbEHhf8LVQkhpILc2RSwarVl/yu7WPD12pN6alpyIhIY6MYTwuxUT/bYPP8F8jgexpXLe8MlwjebwqqEWvcjkcz0ejQ74cH+el4WaNAsWRUbDr1Im2ieM9JJfyX3p6Jmxb2FK+9IUPSfpxkvz4+ASMohJOVlnJy6/IyPN0URO4y9aQvFVIROhcVonpOw8i6OavcAs/Dkt5DWVqrez/Hqys7JOagy8lSow4eZmWMO4yy/pkhoLZb/sn4AEDQWw0ng3yqGhOQH8b0DwbF6ghsRXBEjL89MoUnBCqkUgllVKhJHOh5GUQK1dCQoLRxsMDc+bM5blTSbk19koCLMkEFlBqEEol6EBHDDx+AZ5Z2XRUA554tHjYRWevlzHRZ3UI+6Zt7+NOAf80POBeALOB7GUuCX2yAQvWy9ibfez1DhEFTB9tUu8gM8Qfl8m5W5Lcs1qzknp6fl4+su5kwcTEFFHno5BxOxNZhflEGg1al8ngnZyJsMtJ8I+MhSWpC5N1bdAbpoeBrW94ZeS3zKW7GdQ0PHQo+MFgfU9N5sgAs573wK8GUlgbGMKASkRm6qytrfit4O49uuP81asYv3wzXGXlRCBGJCF9sr218v04oFOApqGxUb8HzCuQEiirsSo6DZaUK3+tkvPn/tw93Kl80eM3UFwoDShuJMGO6k0ZqUY19XYFVxY2QPF4gq9D0/EnCMDAsrEYIkU1/nMsDqGFFVDpiZHPRq9uZ+AKlVLf7tkDv7hknjhYCtEGXRf4pw1/kgBaqKg3q6kcHBebjB07w7HxVAyCXgylgIM/LDKAanXmLnR4etEkAjCw3l1NZrEUxhBnXsOgth5wcHbmTwQpub1nL5KwcfR7Br11eGrQZAI0gFm7PAsXnMjPg7mlBaLOnsPd5e9AYmIJkaGUwi+jiZFBR4SnCY+NAMwY2pQWYcCOcLSg72cOhuOEqgbmFekQyzNhsnkjRE5OdMJqHQmeIjTymcDGgY0fmKXeQo+4m/C/lomChAT8VJoHaysbWPcPQM2cyZAVlkEaG01bs3cAmg7dOEDT8FgJ0FAislKPHa19hRxdIy/iUHYG0iRiGKoAo85tobf5O1r7eMpBHQGahseWAn4DC6p20IfV/WwQecrRSPjMWojzSddh59cddwcF0lr2BrEOfzWeAAHuRQMRpHApLMHAt5Yiw6kT7E9dIqXQPhenw1+LJ0yABmj/5QDb/FLY5OSTWWC3c5rp1Do8FM0YBa0/YP9uiC74Tw90kfiHQwg1u8HKRuqezYm1HfVPuOrw6Pgb/IcRcujPehk2C9+pX6JD4wH8H30gjYp5yZ8LAAAAAElFTkSuQmCC"); - stile.setListNumrodlfProperty(new ArrayList()); - stile.getListNumrodlfProperty().add("nimrodlf.p1=#CE0006"); - stile.getListNumrodlfProperty().add("nimrodlf.p2=#D80010"); - stile.getListNumrodlfProperty().add("nimrodlf.p3=#E2001A"); - stile.getListNumrodlfProperty().add("nimrodlf.s1=#D6D6D6"); - stile.getListNumrodlfProperty().add("nimrodlf.s2=#E0E0E0"); - stile.getListNumrodlfProperty().add("nimrodlf.s3=#EAEAEA"); - stile.getListNumrodlfProperty().add("nimrodlf.w=#FFFFFF"); - stile.getListNumrodlfProperty().add("nimrodlf.b=#000000"); - stile.getListNumrodlfProperty().add("nimrodlf.menuOpacity=195"); - stile.getListNumrodlfProperty().add("nimrodlf.frameOpacity=180"); + stile.setLogo("iVBORw0KGgoAAAANSUhEUgAAAIAAAAAyCAYAAACUPNO1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkUwMEMwODBFQjkyMTFFMUIzMjlDRkZBQTk4MUY4NjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkUwMEMwODFFQjkyMTFFMUIzMjlDRkZBQTk4MUY4NjEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRTAwQzA3RUVCOTIxMUUxQjMyOUNGRkFBOTgxRjg2MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRTAwQzA3RkVCOTIxMUUxQjMyOUNGRkFBOTgxRjg2MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlqPyScAABO9SURBVHhe7V0JXFRV+35mYRj2HQEBZVPBFQRNcwHcRch9+aBMrdTU0sz6zDIt99zSvqzMzK1MM8V9TUQMlUUUlUVAQEj2bRgYhhnm/54z8M8v/QxDSWsef9e5c9cz933O8z7vufeqINM7QKNXXAGNUIBnEZrKKhhNGQeLFQvrl+jwKBDcsWqrqSsuoVmhdskzBg0qYTJtGiw3ra5fosOjQAgRC7wIgmd0Ym2H4Nkk79MA3ZX7h6MZCaCpn3R4mtBMBNCQXNfSJ5t0JHia0AwE0EAMNa5PHI6CUUOhBwVfdu+khxqaqokkdfRdh+ZEsyiAGCpkGxpgq58nItxbwYScuwGU0KfAm9J80pAAXJg4msJfS5ZOXb+XDs2BZiKAALK7eSjIyobM3Azn57yOdSF9cWGQP96bFooZFfkoDh6EdevfR5lQSI3SKUFz4YkTQETBrNQzRAqdqSA1Ddss9PFF9m14/GssSqeMh1BqAL2qasRs2gyf2KswrdPQHs/moNSziCdKAAHP/0ps/GgapK4uqCwpQ1VhMZLj4vD9lm+REHUBkRGRUIspSdjb4ZKFKe2l6/3NiSdKAAnl/lPdu+BSdAwEtUrYUZCdWzlDKBKhpLQUckUNvFxaY7KJOVzzCvDO/nP1fV+nAM2FRhNAQ8HUkGljAq11738E1vvrkOnmBFsTU5SXluH53s/D0dER/Qf0h1wuR1TKTSyIuoFXfo7B66djIczJoz3E9fvr0BxoFAFY8AUerhAH9Ka+qaTv5bRUTlNDbU/rUcXXsZKuod6vNTTDDY0KPbv5ITf3V7Rr2w5ubm5wd3fH0s83YEVGMRwKC+loEtpbTHuwoV0dmhONIoCANtPcSkPFD5sgyYqDaONaCELHQ93SAUJ7ewitLaGeOgnlbT0Q0a8H6pwdiQilqJRKkFteBgWZvPLycqSkpOD1GdPRrbsfRvgHoMO3n6EEMjoDUxSd7P8VEL1lZLNII1fQ5X94AETUu8uS0qlcGwgZ5XJlUH8oJo5ERehwXH+uC6462cFyzmtwHj8aRWOGoNjRGe0iLuN4GycolEoU5OUjPS0dJqbGCBo6lB/TivL/FYEA9hEnqfo3oCWPTgING0/w84VB0ID6JTo8ChpBABVNTNZFMEuNRbXUDJVeHnA2NoGMXH1uZjakBgYQUpCvXY5FCwtzxF24hERhHYyH+KMmJwe3a2pgIJHAxc0Fe37Yg1IygL179+JHd/Tvg3Pbf4RzWRnl/0dPAToCNA1/QAAVVGTiakcHQ1GrQbWjCyTUk2VWZsiuUUIuk6G8rBwnjp+Aubk5HCglhB8IR3JyEn45cxa2Xb3hScZPViGDBRFDXilHQEAA9u7Zx9PBoEEDechzXRxgsHs3pQ19+vZoKqAjQNPwBwQg+1elQOGmpRDMmYqc7t6o6OmLu2o1aqurUFtbC2sbK4hEYqSlpXGDZ9eiBfT0qABUq7B96zZabwupVB9VtH1efj5KSoqxYuVynDlzhqazCAoaghw6dfmJ87AuKaUzPpoK6AjQNPyBCRRBn+TboWtfpCxZCzHlb41QCFdnZ9Sp61BGsn316jVYWlogMDAAKckp0JCf69ChA1xdXSm4Qdi1cxe6dOkMP18/GBsZQyzSw4L3FuCDhe/jzdmzkJSUDFVFBZLNjUgBdINAzY1GeAAhrZHALToOdVnZEA7qizoTE1iRB3Bq2RJmJP3GxsaoIJk3NDJEGbn+X6nkCxoWBAEZPF/qnVFRF+Dt0wXubTzw6quTUatUw97BDp6e7WBrY4MqmRxni++iZ3QsmUE9oh0bDSin3l1FE+Moe/rnwe3TKUDT0MgqQEiBEcD4VgosN2+BIiMXqc72MHNxhkRfCkszMzhQZeDl6QUrKyuUU4++ePEi8u7mwdTUFIH9AvHTvv10HA0U1TX4btcu8goHKTUY8PLQhxRCZG2F6Lgr8Ll7B7cMjXEzcj+s570F05hE1OYm0b761IL7BauxBMjMzCJylnMDqlDUwMTEuH5N4xAbGweJRB+Ghob1S/48ZOSdcnJy+Sf7/UXFRbwTiUTNPw7SqHEALdg9OgOyheawP34KfV//EIYffgLRf7Yg+04W1u3aib3HjiGnoACOpAys1LOzs0PM5Rj8fOZn+HT1QWxMHKKjo2FPZtGYVMTUzJQTZsmSpTCh8J5ztIGqpQtOvhGGhIhofH/oGGK2rIb1li20lqlBw7MEjw4XKjk923ihcydvODjYIyR4eP2ah6O4pARnI85hWFAItm/bXr+0adi8+Wu4u7uhdetWfPJwd8epk6fq1zYvBHdsPTV1BaUP7F0Cfm+eDQGzdWyI9l6VUNFSJd9GQL2zyrcLslrb44xUBGn7dnC2c0B+YT7fknmFUjJ4YrEYcnk1ZJUyZJBpFJKfaE9+Yd68uWjf3gsrV6+Bl3dnXEu4BusyGfpeT0F5QA/cbt0aA5/zg7pnMKrTb9L5zOio2rbUsaeCp0+F5eer+Pf/BbFQgk83fooZM6bjWwrkpJcnclNqa2uD2W/OhVqlwierV8KAStqk5GSsXLEKNtY2lL6iMGrMKDqbAD179kCPHs9h+/btOBh+GFNemYIhQwZhx/adMDI2QmJiIpQ1tVi67GN+zi+++ApnTp/Bu+/O46mwAcw86+np4bnuPWFJHeDo0UN8+fLlK3Hj+g0s/uhDbqhzc3Ox6MOPIBAKsG7dGhgZGSEjI4NvZ0Opc9myJXy/s2cj8M03W4nYDrTvIqTduoXDh4/yEdejR49izZrVvAo7EB6O3d//AHc3dyxavJDH438ogAZS6m0KkuiKwN5QtXWn8Ffy5b+B7SyhPyJUS40gTLkN918S8JqROVzataPA1KG4qBjJZPJYqWhMniE/P48kr5RSw10EvxCCt+sDv3jxR9j67TZkk0xfioiCh5MzpHTOlNlTYTZqJIZRQ7/ctBm7NyyE8ayZRL0KOv+jKYGeWI9kPBbnIiOx94e90BPqo4WtLZzsKY1JxLwnOjm2IhOroVTmicGDB6Fjpw64eCkab899C6tWrkJqSiq140u8Mvk1vDgxDEOHDsbF6Es4TmXwhHH/QllpOZYtX0IX/RiR+l2sIULPfXsO/Lp1x/XE6/UtobZQ8Bnq6uroGmp/R9DQYOwkIvWmspkFrqqqit836dS5I1xdXKgN8/j2jBhKKsGPHz2OLp18cDszE4MHDsG4cWNx9meqqoYMw53sO5g//12cPHkSBynVzpwxE5cuXcbEsJcxnTrLTjLm48ZO4Od9wJ0X9ohWLSJ6+OD62CB4d/ODVUt7iD5eC9ctO2mNNgcaogbJZOSSwkagrr0HiiifWdjZ8xs/XZ2d4EkkYFAoFPhmy1YIxSKoVLW4eTOJep0tdn/3PU8RFhYWeI561ZgxozFwQH9q9Gl09fOBnH7kqxMnoYObK6y7+WJFdjHWxG+HLHwvVCnpEJ88S0eX8nM0Buyix1yORfSFaKTcSsJ16mkpqanIzcvBjRtJVM0kktwXIj7+CrzadUD0L9GoIa/QoDTMr0gNpPjqq80IeykML4SEoHevPtiwcSMsLSzRp28frFu/Bvv27eP5/cjhI1xN1qxeD4lYgq/pGqyn9feCVUzklPn80WOHKTA7ERoaipkz38CB/eGwNLfGimUriYgdsZSItenzLyERSbFt+1bUKJV8LMWF1HH7jm1cadgNNmNSCVaWGxuaUlu/4NUaK9G7d++Gzz7fyMdg2CmVFBeG+xSA3cOvpHItYeRAGFIDE87/gg3zFqB6zlQUODjSDmoKvhLRvh2x6aVgqDw94OXRBu8Ry6aPGoVRAwfwntUAqVTKx/9HjBjB562sLFFDpWW//v0wY+brvKft378fa9eu5wNJo0lu5dUKLHp/IXbEZ2PD98fheeI8Vgb4YnrL1ojYvRuiscF0ZKX2BI0E61FvvDkLyak3+ffDFCBWljIsIsk9EP4TdhEpHR1bQlmrRP8BAxAyPISCpH1Era5Ozfsqk80SSmcMcnkVDIgYrGcK6t9NqKvT0DZEdqUKg+i37f1xN/YfPICXJ73E19+He4SslBSEQaVWUoBrkJGVTmlrPezJYPfp5Y9a6kBqaoeSjbpS+c1I8h21efyEcZi/YD76+velVKZtr1CoNZSqWhXvZJu4cr2KTzesg4+3Nx1HW3LfRwARtSjX1BA5ZH5aUn3fOfEmatRqOtkB5BsacBsY7+KEtR4OqM3MRrfOndGrRw+UlJbwwKZTjmL3+wuLiqg0ZFLNmK4hUtgQuyeQGXMhyZUgjlz111RRuLi6YPTo0Tzvs7y1dOlyvPfpesyOvAoLysslpEdjTsfgxvGTOEGKFLT+G9TNXUpHNeLHbizUpF15eXl8nsntv//9DloS4foFDsCYkWMwoN9ALP5wMeVbIZfQSaQ+s6gn+vl2x7VriaiurkZpcQnlzkUIJ7JMfGkS4q/EYhX5hpycHO7oGUpoGzb/3gfzsXr1aoROCKPzDYaYeuXvwSqA4pJiPv8+EX7B/AXcnNpYtcCECRNgbmaBPZSuCguK4OXlidmz3+BViJurB7p164ZqIrWaYsOw5pM1OHLoCPdXrK0VlVqSlleUU2rSzitVCixY8AGlioj/b+99JpB5fSWxfGpIN4QOHozQ12ZiVKA/QqZORs/Qt2FPDHtt2gsoTE2HPm23c9cOMieGZKDWYuEHC5BMslReXgE/v64Q1veKYydOoKiwiAeeGcIsyvWsCmBpwNvHG1dIdlvYtUBAYCCKxUJ0PHgawVFx5PsltLeA8pQCeeRFXtKrwbt9+mLwgo9QTdUIW9dYE8jydNu2bXk1cJeIEE8lp79/H26sDpEa1CprMXLkcOzduw8fL/oYh48dogtZhTGjxqEV+YPlK5ZRSWsCZ2dnpKen88ogJHgYT2eJRBAFkd+PjF5ERCTl7Nb8wRdGnLi4OATTdtbW1vUt+Q2XLl/mcu1LFRL/Tnn61q00jB8/lisNC2R4+EF+3UaOHMG3YSn1wIFwbvj69OnNl7HfxnTdx7sLyX0G/c42SLhyhatsInkPVvayeLD9mHlk3qKwqJDO2/X3BGB6xO7LyRFHKz/z88J3P0bglc6tMGBSGPqHTUMqydrJ570RQeaihmr60BfDqDfNw0+kEIWFhdxdl1KQPyFGdvXxwdCgITAzNSXHnUcX7jZOnzqNK9Q4JksF+QVo26k9Onq2R+yVeBjYt4Bv7HUM/PEotYDl94aqQ0NlYg3eDx2KKSRhJa5+8CyvppbyJw4bRYDGIi4ungzSeBgSMdhAlpRq/wOH9sOe/MrfEf+VAvQor54b1geFidFwWrIATk6OKKGyrX2pDL2GDEGrO8lQvzcbdeTqNZTrWE46dPAQ5dUUjBwxHL16PU8l0k4e8BXLl/IS6sWwiZhLDvbsz+dgZWlJpdNkKqV6wNHJCY7tPaG+mYrwI0fQgdzu6LXbEHhf8LVQkhpILc2RSwarVl/yu7WPD12pN6alpyIhIY6MYTwuxUT/bYPP8F8jgexpXLe8MlwjebwqqEWvcjkcz0ejQ74cH+el4WaNAsWRUbDr1Im2ieM9JJfyX3p6Jmxb2FK+9IUPSfpxkvz4+ASMohJOVlnJy6/IyPN0URO4y9aQvFVIROhcVonpOw8i6OavcAs/Dkt5DWVqrez/Hqys7JOagy8lSow4eZmWMO4yy/pkhoLZb/sn4AEDQWw0ng3yqGhOQH8b0DwbF6ghsRXBEjL89MoUnBCqkUgllVKhJHOh5GUQK1dCQoLRxsMDc+bM5blTSbk19koCLMkEFlBqEEol6EBHDDx+AZ5Z2XRUA554tHjYRWevlzHRZ3UI+6Zt7+NOAf80POBeALOB7GUuCX2yAQvWy9ibfez1DhEFTB9tUu8gM8Qfl8m5W5Lcs1qzknp6fl4+su5kwcTEFFHno5BxOxNZhflEGg1al8ngnZyJsMtJ8I+MhSWpC5N1bdAbpoeBrW94ZeS3zKW7GdQ0PHQo+MFgfU9N5sgAs573wK8GUlgbGMKASkRm6qytrfit4O49uuP81asYv3wzXGXlRCBGJCF9sr218v04oFOApqGxUb8HzCuQEiirsSo6DZaUK3+tkvPn/tw93Kl80eM3UFwoDShuJMGO6k0ZqUY19XYFVxY2QPF4gq9D0/EnCMDAsrEYIkU1/nMsDqGFFVDpiZHPRq9uZ+AKlVLf7tkDv7hknjhYCtEGXRf4pw1/kgBaqKg3q6kcHBebjB07w7HxVAyCXgylgIM/LDKAanXmLnR4etEkAjCw3l1NZrEUxhBnXsOgth5wcHbmTwQpub1nL5KwcfR7Br11eGrQZAI0gFm7PAsXnMjPg7mlBaLOnsPd5e9AYmIJkaGUwi+jiZFBR4SnCY+NAMwY2pQWYcCOcLSg72cOhuOEqgbmFekQyzNhsnkjRE5OdMJqHQmeIjTymcDGgY0fmKXeQo+4m/C/lomChAT8VJoHaysbWPcPQM2cyZAVlkEaG01bs3cAmg7dOEDT8FgJ0FAislKPHa19hRxdIy/iUHYG0iRiGKoAo85tobf5O1r7eMpBHQGahseWAn4DC6p20IfV/WwQecrRSPjMWojzSddh59cddwcF0lr2BrEOfzWeAAHuRQMRpHApLMHAt5Yiw6kT7E9dIqXQPhenw1+LJ0yABmj/5QDb/FLY5OSTWWC3c5rp1Do8FM0YBa0/YP9uiC74Tw90kfiHQwg1u8HKRuqezYm1HfVPuOrw6Pgb/IcRcujPehk2C9+pX6JD4wH8H30gjYp5yZ8LAAAAAElFTkSuQmCC"); + stile.setListNumrodlfProperty(new ArrayList()); + stile.getListNumrodlfProperty().add("nimrodlf.p1=#CE0006"); + stile.getListNumrodlfProperty().add("nimrodlf.p2=#D80010"); + stile.getListNumrodlfProperty().add("nimrodlf.p3=#E2001A"); + stile.getListNumrodlfProperty().add("nimrodlf.s1=#D6D6D6"); + stile.getListNumrodlfProperty().add("nimrodlf.s2=#E0E0E0"); + stile.getListNumrodlfProperty().add("nimrodlf.s3=#EAEAEA"); + stile.getListNumrodlfProperty().add("nimrodlf.w=#FFFFFF"); + stile.getListNumrodlfProperty().add("nimrodlf.b=#000000"); + stile.getListNumrodlfProperty().add("nimrodlf.menuOpacity=195"); + stile.getListNumrodlfProperty().add("nimrodlf.frameOpacity=180"); - risposta.setRisposta(RispostaCostanti.OK); - risposta.setObj(stile); + risposta.setRisposta(RispostaCostanti.OK); + risposta.setObj(stile); - return risposta; - } + return risposta; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.classpath index 3143cb15..e3868bf1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/impl/KaleoInstanceLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/impl/KaleoInstanceLocalServiceImpl.java index ab4c2750..d4183543 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/impl/KaleoInstanceLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/kaleo/controller/service/impl/KaleoInstanceLocalServiceImpl.java @@ -20,21 +20,28 @@ import it.tref.liferay.portos.kaleo.controller.service.base.KaleoInstanceLocalSe * The implementation of the kaleo instance 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.kaleo.controller.service.KaleoInstanceLocalService} 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.kaleo.controller.service.KaleoInstanceLocalService} + * 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 3FC * @see it.tref.liferay.portos.kaleo.controller.service.base.KaleoInstanceLocalServiceBaseImpl * @see it.tref.liferay.portos.kaleo.controller.service.KaleoInstanceLocalServiceUtil */ -public class KaleoInstanceLocalServiceImpl - extends KaleoInstanceLocalServiceBaseImpl { +public class KaleoInstanceLocalServiceImpl extends KaleoInstanceLocalServiceBaseImpl { /* * NOTE FOR DEVELOPERS: - * - * Never reference this interface directly. Always use {@link it.tref.liferay.portos.kaleo.controller.service.KaleoInstanceLocalServiceUtil} to access the kaleo instance local service. + * + * Never reference this interface directly. Always use {@link + * it.tref.liferay + * .portos.kaleo.controller.service.KaleoInstanceLocalServiceUtil} to access + * the kaleo instance local service. */ } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.classpath index 1a538b03..317e9542 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.classpath @@ -1,7 +1,7 @@ - + @@ -18,5 +18,6 @@ + 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..e106cdd8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.project +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.project @@ -32,5 +32,6 @@ org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature + org.apache.ivyde.eclipse.ivynature diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/build.xml b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/build.xml index 615200b7..a2cf165c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/build.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/build.xml @@ -3,5 +3,4 @@ - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/UserAgentUtils-1.19.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/UserAgentUtils.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/UserAgentUtils-1.19.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/UserAgentUtils.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-broker-5.9.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-broker.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-broker-5.9.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-broker.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-camel-5.9.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-camel.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-camel-5.9.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-camel.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-client-5.9.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-client.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-client-5.9.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-client.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-jms-pool-5.9.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-jms-pool.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-jms-pool-5.9.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-jms-pool.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-openwire-legacy-5.9.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-openwire-legacy.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-openwire-legacy-5.9.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-openwire-legacy.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-pool-5.9.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-pool.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-pool-5.9.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-pool.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-spring.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-spring.jar new file mode 100644 index 00000000..5e8c0dac Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/activemq-spring.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/aopalliance-1.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/aopalliance.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/aopalliance-1.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/aopalliance.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-core-2.17.6.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-core.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-core-2.17.6.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-core.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-jms-2.17.6.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-jms.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-jms-2.17.6.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-jms.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-spring-2.17.6.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-spring.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-spring-2.17.6.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/camel-spring.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-codec.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-codec.jar deleted file mode 100644 index 1d7417c4..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-codec.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-logging.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-logging.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-logging.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-pool.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-pool.jar deleted file mode 100644 index 43edf996..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-pool.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-j2ee-management_1.1_spec.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-j2ee-management_1.1_spec.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jms_1.1_spec.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jms_1.1_spec.jar new file mode 100644 index 00000000..4f5e6464 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jms_1.1_spec.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jta_1.0.1B_spec.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/geronimo-jta_1.0.1B_spec.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/guava-16.0.1.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/guava.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/guava-16.0.1.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/guava.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/hawtbuf-1.9.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/hawtbuf.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/hawtbuf-1.9.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/hawtbuf.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpclient-4.0.1.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpclient.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpclient-4.0.1.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpclient.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpcore-4.0.1.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpcore.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpcore-4.0.1.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/httpcore.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-annotations-2.6.0.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-annotations.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-annotations-2.6.0.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-annotations.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core-asl-1.9.11.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core-asl.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core-asl-1.9.11.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core-asl.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core-2.6.3.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core-2.6.3.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-core.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-databind-2.6.3.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-databind.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-databind-2.6.3.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jackson-databind.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/javax.inject-1.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/javax.inject.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/javax.inject-1.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/javax.inject.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jaxb-core.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jaxb-core.jar new file mode 100644 index 00000000..f3c84126 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jaxb-core.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jaxb-impl.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jaxb-impl.jar new file mode 100644 index 00000000..a5c5b23a Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jaxb-impl.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jsr305-1.3.9.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jsr305.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jsr305-1.3.9.jar rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jsr305.jar diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jstl-api.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jstl-api.jar deleted file mode 100644 index 80a5737f..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jstl-api.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jstl-impl.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jstl-impl.jar deleted file mode 100644 index e5a9342f..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/jstl-impl.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/log4j.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/log4j.jar deleted file mode 100644 index 068867eb..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/log4j.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/slf4j-api.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/slf4j-api.jar deleted file mode 100644 index 73f38db9..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/slf4j-api.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-aop.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-aop.jar new file mode 100644 index 00000000..1160057a Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-aop.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-beans.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-beans.jar deleted file mode 100644 index 5639dd47..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-beans.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-context-support.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-context-support.jar deleted file mode 100644 index aaf8755a..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-context-support.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-context.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-context.jar deleted file mode 100644 index 6b23efa8..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-context.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-core.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-core.jar deleted file mode 100644 index b8e928c2..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-core.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-expression.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-expression.jar new file mode 100644 index 00000000..59254228 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-expression.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-jms.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-jms.jar deleted file mode 100644 index 795eaf1c..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-jms.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-messaging.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-messaging.jar new file mode 100644 index 00000000..c0e483a0 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-messaging.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-transaction.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-transaction.jar deleted file mode 100644 index 9b257fc5..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-transaction.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-tx.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-tx.jar new file mode 100644 index 00000000..47542e4e Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-tx.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-web.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-web.jar deleted file mode 100644 index 519bef0d..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/spring-web.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-bridges.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-bridges.jar deleted file mode 100644 index 7d7435fe..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-bridges.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-taglib.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-taglib.jar deleted file mode 100644 index fbba5f0a..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-taglib.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/xbean-spring.jar b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/xbean-spring.jar new file mode 100644 index 00000000..abe5da1b Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/xbean-spring.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java index cecb30d8..d9142b9e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogRequestPostAction.java @@ -28,9 +28,9 @@ import com.liferay.portal.util.PortalUtil; import eu.bitwalker.useragentutils.UserAgent; import it.tref.portos.liferay.log.camel.core.CamelCoreInitializer; import it.tref.portos.liferay.log.model.LogActionDetails; -import it.tref.portos.liferay.log.shared.util.Constants; import it.tref.portos.liferay.log.spring.SpringContextBeanScanner; import it.tref.portos.liferay.log.utility.ClassUtils; +import it.tref.portos.liferay.log.utility.Constants; import java.lang.reflect.Field; import java.text.ParseException; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java index 6a5d6e77..22b7df63 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/action/LogStartupAction.java @@ -1,5 +1,7 @@ package it.tref.portos.liferay.log.action; +import it.tref.portos.liferay.log.utility.Constants; + import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.exception.PortalException; @@ -24,9 +26,6 @@ import com.liferay.portlet.expando.model.ExpandoTableConstants; import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; -import it.tref.portos.liferay.log.shared.util.Constants; - - public class LogStartupAction extends SimpleAction { private static Log _log = LogFactoryUtil.getLog(LogStartupAction.class); diff --git a/liferay-plugins-sdk-6.2/shared/portos-log-shared/src/it/tref/portos/liferay/log/shared/util/Constants.java b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/utility/Constants.java similarity index 97% rename from liferay-plugins-sdk-6.2/shared/portos-log-shared/src/it/tref/portos/liferay/log/shared/util/Constants.java rename to liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/utility/Constants.java index 92842da7..d68b7e47 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-log-shared/src/it/tref/portos/liferay/log/shared/util/Constants.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/src/it/tref/portos/liferay/log/utility/Constants.java @@ -1,4 +1,4 @@ -package it.tref.portos.liferay.log.shared.util; +package it.tref.portos.liferay.log.utility; public class Constants { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/tld/c.tld b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/tld/c.tld deleted file mode 100644 index 98efa6a6..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/tld/c.tld +++ /dev/null @@ -1,572 +0,0 @@ - - - - - JSTL 1.2 core library - JSTL core - 1.2 - c - http://java.sun.com/jsp/jstl/core - - - - Provides core validation features for JSTL tags. - - - org.apache.taglibs.standard.tlv.JstlCoreTLV - - - - - - Catches any Throwable that occurs in its body and optionally - exposes it. - - catch - org.apache.taglibs.standard.tag.common.core.CatchTag - JSP - - -Name of the exported scoped variable for the -exception thrown from a nested action. The type of the -scoped variable is the type of the exception thrown. - - var - false - false - - - - - - Simple conditional tag that establishes a context for - mutually exclusive conditional operations, marked by - <when> and <otherwise> - - choose - com.liferay.taglib.core.ChooseTag - JSP - - - - - Simple conditional tag, which evalutes its body if the - supplied condition is true and optionally exposes a Boolean - scripting variable representing the evaluation of this condition - - if - com.liferay.taglib.core.IfTag - JSP - - -The test condition that determines whether or -not the body content should be processed. - - test - true - true - boolean - - - -Name of the exported scoped variable for the -resulting value of the test condition. The type -of the scoped variable is Boolean. - - var - false - false - - - -Scope for var. - - scope - false - false - - - - - - Retrieves an absolute or relative URL and exposes its contents - to either the page, a String in 'var', or a Reader in 'varReader'. - - import - org.apache.taglibs.standard.tag.rt.core.ImportTag - org.apache.taglibs.standard.tei.ImportTEI - JSP - - -The URL of the resource to import. - - url - true - true - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is Reader. - - varReader - false - false - - - -Name of the context when accessing a relative -URL resource that belongs to a foreign -context. - - context - false - true - - - -Character encoding of the content at the input -resource. - - charEncoding - false - true - - - - - - The basic iteration tag, accepting many different - collection types and supporting subsetting and other - functionality - - forEach - org.apache.taglibs.standard.tag.rt.core.ForEachTag - org.apache.taglibs.standard.tei.ForEachTEI - JSP - - -Collection of items to iterate over. - - items - false - true - java.lang.Object - - java.lang.Object - - - - -If items specified: -Iteration begins at the item located at the -specified index. First item of the collection has -index 0. -If items not specified: -Iteration begins with index set at the value -specified. - - begin - false - true - int - - - -If items specified: -Iteration ends at the item located at the -specified index (inclusive). -If items not specified: -Iteration ends when index reaches the value -specified. - - end - false - true - int - - - -Iteration will only process every step items of -the collection, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. Its type depends -on the object of the underlying collection. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of type -javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Iterates over tokens, separated by the supplied delimeters - - forTokens - org.apache.taglibs.standard.tag.rt.core.ForTokensTag - JSP - - -String of tokens to iterate over. - - items - true - true - java.lang.String - - java.lang.String - - - - -The set of delimiters (the characters that -separate the tokens in the string). - - delims - true - true - java.lang.String - - - -Iteration begins at the token located at the -specified index. First token has index 0. - - begin - false - true - int - - - -Iteration ends at the token located at the -specified index (inclusive). - - end - false - true - int - - - -Iteration will only process every step tokens -of the string, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of -type -javax.servlet.jsp.jstl.core.LoopTag -Status. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Like <%= ... >, but for expressions. - - out - org.apache.taglibs.standard.tag.rt.core.OutTag - JSP - - -Expression to be evaluated. - - value - true - true - - - -Default value if the resulting value is null. - - default - false - true - - - -Determines whether characters <,>,&,'," in the -resulting string should be converted to their -corresponding character entity codes. Default value is -true. - - escapeXml - false - true - - - - - - - Subtag of <choose> that follows <when> tags - and runs only if all of the prior conditions evaluated to - 'false' - - otherwise - com.liferay.taglib.core.OtherwiseTag - JSP - - - - - Adds a parameter to a containing 'import' tag's URL. - - param - org.apache.taglibs.standard.tag.rt.core.ParamTag - JSP - - -Name of the query string parameter. - - name - true - true - - - -Value of the parameter. - - value - false - true - - - - - - Redirects to a new URL. - - redirect - org.apache.taglibs.standard.tag.rt.core.RedirectTag - JSP - - -The URL of the resource to redirect to. - - url - false - true - - - -Name of the context when redirecting to a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Removes a scoped variable (from a particular scope, if specified). - - remove - org.apache.taglibs.standard.tag.common.core.RemoveTag - empty - - -Name of the scoped variable to be removed. - - var - true - false - - - -Scope for var. - - scope - false - false - - - - - - Sets the result of an expression evaluation in a 'scope' - - set - org.apache.taglibs.standard.tag.rt.core.SetTag - JSP - - -Name of the exported scoped variable to hold the value -specified in the action. The type of the scoped variable is -whatever type the value expression evaluates to. - - var - false - false - - - -Expression to be evaluated. - - value - false - true - - java.lang.Object - - - - -Target object whose property will be set. Must evaluate to -a JavaBeans object with setter property property, or to a -java.util.Map object. - - target - false - true - - - -Name of the property to be set in the target object. - - property - false - true - - - -Scope for var. - - scope - false - false - - - - - - Creates a URL with optional query parameters. - - url - org.apache.taglibs.standard.tag.rt.core.UrlTag - JSP - - -Name of the exported scoped variable for the -processed url. The type of the scoped variable is -String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -URL to be processed. - - value - false - true - - - -Name of the context when specifying a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Subtag of <choose> that includes its body if its - condition evalutes to 'true' - - when - com.liferay.taglib.core.WhenTag - JSP - - -The test condition that determines whether or not the -body content should be processed. - - test - true - true - boolean - - - - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/ivy.xml b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/ivy.xml new file mode 100644 index 00000000..95f925cb --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/ivy.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/ivy.xml.MD5 b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/ivy.xml.MD5 new file mode 100644 index 00000000..ce0b87f8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/ivy.xml.MD5 @@ -0,0 +1 @@ +34c76a0a5e5c00d50cd4f61ccdf0db5d diff --git a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.classpath index 1a538b03..9975372f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/.classpath @@ -1,7 +1,7 @@ - + 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 15482be3..bfebc7c7 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 @@ -25,13 +25,15 @@ import java.util.Date; * 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 @@ -39,45 +41,46 @@ import java.util.Date; * @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 { + 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.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 { + 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 { - if (!PortalUtil.isCompanyAdmin(getUser())) { - throw new PortalException("Access denied!"); - } + if (!PortalUtil.isCompanyAdmin(getUser())) { + throw new PortalException("Access denied!"); + } - return maintenanceScheduleLocalService.updateMaintenanceSchedule(maintenanceScheduleId, type, reason, - portalMessage, after, end, onreboot, status, statusMessage, serviceContext); - } + return maintenanceScheduleLocalService.updateMaintenanceSchedule(maintenanceScheduleId, type, reason, + portalMessage, after, end, onreboot, status, statusMessage, serviceContext); + } - public MaintenanceSchedule deleteMaintenanceSchedule(long maintenanceScheduleId, ServiceContext serviceContext) - throws Exception { + public MaintenanceSchedule deleteMaintenanceSchedule(long maintenanceScheduleId, + ServiceContext serviceContext) throws Exception { - if (!PortalUtil.isCompanyAdmin(getUser())) { - throw new PortalException("Access denied!"); - } + if (!PortalUtil.isCompanyAdmin(getUser())) { + throw new PortalException("Access denied!"); + } - return maintenanceScheduleLocalService.deleteMaintenanceSchedule(maintenanceScheduleId); - } + 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/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 9424eda6..3fd21345 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,37 +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 014d9ace..993e0601 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,130 +1,129 @@ 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"); + FULL("full", "Full mode"), USER("user", "Only user mode"); - MaintenanceType(String code, String description) { - this.setCode(code); - this.setDescription(description); - } + MaintenanceType(String code, String description) { + this.setCode(code); + this.setDescription(description); + } - public String getDescription() { - return description; - } + public String getDescription() { + return description; + } - public void setDescription(String description) { - this.description = description; - } + public void setDescription(String description) { + this.description = description; + } - public String getCode() { - return code; - } + public String getCode() { + return code; + } - public void setCode(String code) { - this.code = code; - } + public void setCode(String code) { + this.code = code; + } - private String code; - private String description; + private String code; + private String description; - public static MaintenanceType parse(String code) { + public static MaintenanceType parse(String code) { - for (MaintenanceType maintenanceType : values()) { - if (maintenanceType.code.equals(code)) { - return maintenanceType; - } - } + for (MaintenanceType maintenanceType : values()) { + if (maintenanceType.code.equals(code)) { + return maintenanceType; + } + } - throw new IllegalArgumentException("Invalid MaintenanceType code: " + code); - } + throw new IllegalArgumentException("Invalid MaintenanceType code: " + code); + } - } + } - public enum MaintenanceOnReboot { + public enum MaintenanceOnReboot { - CONTINUE("continue", "Continue"), TERMINATE("terminate", "Terminate"); + CONTINUE("continue", "Continue"), TERMINATE("terminate", "Terminate"); - MaintenanceOnReboot(String code, String description) { - this.setCode(code); - this.setDescription(description); - } + MaintenanceOnReboot(String code, String description) { + this.setCode(code); + this.setDescription(description); + } - public String getDescription() { - return description; - } + public String getDescription() { + return description; + } - public void setDescription(String description) { - this.description = description; - } + public void setDescription(String description) { + this.description = description; + } - public String getCode() { - return code; - } + public String getCode() { + return code; + } - public void setCode(String code) { - this.code = code; - } + public void setCode(String code) { + this.code = code; + } - private String code; - private String description; + private String code; + private String description; - public static MaintenanceOnReboot parse(String code) { + public static MaintenanceOnReboot parse(String code) { - for (MaintenanceOnReboot maintenanceOnReboot : values()) { - if (maintenanceOnReboot.code.equals(code)) { - return maintenanceOnReboot; - } - } + for (MaintenanceOnReboot maintenanceOnReboot : values()) { + if (maintenanceOnReboot.code.equals(code)) { + return maintenanceOnReboot; + } + } - throw new IllegalArgumentException("Invalid MaintenanceOnReboot code: " + code); - } + throw new IllegalArgumentException("Invalid MaintenanceOnReboot code: " + code); + } - } + } - public enum MaintenanceStatus { + public enum MaintenanceStatus { - NEW("N", "New"), IN_PROGRESS("P", "In Progress"), ENDED("E", "Ended"), FORCE_ENDED("FE", "Force Ended"), ERROR( - "ER", "Error"); + 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); - } + MaintenanceStatus(String code, String description) { + this.setCode(code); + this.setDescription(description); + } - public String getDescription() { - return description; - } + public String getDescription() { + return description; + } - public void setDescription(String description) { - this.description = description; - } + public void setDescription(String description) { + this.description = description; + } - public String getCode() { - return code; - } + public String getCode() { + return code; + } - public void setCode(String code) { - this.code = code; - } + public void setCode(String code) { + this.code = code; + } - private String code; - private String description; + private String code; + private String description; - public static MaintenanceStatus parse(String code) { + public static MaintenanceStatus parse(String code) { - for (MaintenanceStatus maintenanceStatus : values()) { - if (maintenanceStatus.code.equals(code)) { - return maintenanceStatus; - } - } + for (MaintenanceStatus maintenanceStatus : values()) { + if (maintenanceStatus.code.equals(code)) { + return maintenanceStatus; + } + } - throw new IllegalArgumentException("Invalid MaintenanceStatus code: " + code); - } + 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 d36bc30b..7b4fa06a 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,20 +7,20 @@ import java.util.Date; public class MaintenanceDateUtil { - public static Date getStartDate(Date createDate, int after) { + public static Date getStartDate(Date createDate, int after) { - Calendar calendar = Calendar.getInstance(); - calendar.setTime(createDate); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(createDate); - if (after > 0) { - calendar.add(Calendar.MINUTE, after); - } + if (after > 0) { + calendar.add(Calendar.MINUTE, after); + } - return calendar.getTime(); - } + return calendar.getTime(); + } - public static Date getStartDate(MaintenanceSchedule maintenanceSchedule) { - return getStartDate(maintenanceSchedule.getCreateDate(), (int) maintenanceSchedule.getAfter()); - } + 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 5d543ea0..a0eed203 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 @@ -11,31 +11,30 @@ import java.lang.reflect.InvocationTargetException; public class PortalMaintenanceUtil { - public static void startMaintenaceMode(String sessionId, String classNameParam) throws IllegalAccessException, - IllegalArgumentException, InvocationTargetException, Exception { + 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"); + 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; - } + 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); - } + 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 { + 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]); + 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-mapit-plugin-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/.classpath index 1a538b03..9975372f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/plugin/FascicoloPlugin.java b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/plugin/FascicoloPlugin.java index 6a74fc7a..2e0abb99 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/plugin/FascicoloPlugin.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/plugin/FascicoloPlugin.java @@ -6,48 +6,40 @@ import it.tref.liferay.mapit.plugin.MapItPlugin; import it.tref.liferay.mapit.plugin.action.MapItPluginAction; import it.tref.liferay.mapit.plugin.event.MapItPluginEvent; -public class FascicoloPlugin implements MapItPlugin{ - - @Override - public String getBottomJspPage() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Set> getMapItPluginActions() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Set> getMapItPluginEvents() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getPortalConfigurationPortletId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getPortletConfigurationJsp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getSiteConfigurationPortletId() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getTopJspPage() { - return "/html/plugin/top.jsp"; - } - - +public class FascicoloPlugin implements MapItPlugin { + + @Override + public String getBottomJspPage() { + return null; + } + + @Override + public Set> getMapItPluginActions() { + return null; + } + + @Override + public Set> getMapItPluginEvents() { + return null; + } + + @Override + public String getPortalConfigurationPortletId() { + return null; + } + + @Override + public String getPortletConfigurationJsp() { + return null; + } + + @Override + public String getSiteConfigurationPortletId() { + return null; + } + + @Override + public String getTopJspPage() { + return "/html/plugin/top.jsp"; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.classpath index 8ddc78ee..e2e2522a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java index e2433d12..2acb09ac 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/notification/action/StartUpAction.java @@ -1,6 +1,5 @@ package it.tref.liferay.portos.notification.action; - import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.exception.PortalException; @@ -26,97 +25,100 @@ import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; public class StartUpAction extends SimpleAction { - private final static Log _log = LogFactoryUtil.getLog(StartUpAction.class); + private final static Log _log = LogFactoryUtil.getLog(StartUpAction.class); - @Override - public void run(String[] companyIds) throws ActionException { + @Override + public void run(String[] companyIds) throws ActionException { - for (String id : companyIds) { - try { - long companyId = GetterUtil.getLong(id); + for (String id : companyIds) { + try { + long companyId = GetterUtil.getLong(id); - String[] defaultActions = {ActionKeys.VIEW, ActionKeys.UPDATE}; - String[] guestActions = {ActionKeys.VIEW}; + String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE }; + String[] guestActions = { ActionKeys.VIEW }; - // Organization custom fields - addExpandoColumnIfNotExists(companyId, Group.class.getName(), "portos_notification_enable", - ExpandoColumnConstants.BOOLEAN, false, false, defaultActions, guestActions); - } catch (Exception e) { - _log.error("Errore nella procedura automatizzata di configurazione", e); - } - } - } + // Organization custom fields + addExpandoColumnIfNotExists(companyId, Group.class.getName(), "portos_notification_enable", + ExpandoColumnConstants.BOOLEAN, false, 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); + long classNameId = PortalUtil.getClassNameId(className); - ExpandoTable expandoTable = null; - try { - expandoTable = - ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); - } catch (PortalException e) { - try { - expandoTable = - ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, ExpandoTableConstants.DEFAULT_TABLE_NAME); - } catch (PortalException e1) { - } - } + ExpandoTable expandoTable = null; + try { + expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, + ExpandoTableConstants.DEFAULT_TABLE_NAME); + } catch (PortalException e) { + try { + expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, + ExpandoTableConstants.DEFAULT_TABLE_NAME); + } catch (PortalException e1) { + } + } - ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil + .getColumn(expandoTable.getTableId(), name); - if (expandoColumn == null) { + if (expandoColumn == null) { - try { - expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type); + try { + expandoColumn = ExpandoColumnLocalServiceUtil + .addColumn(expandoTable.getTableId(), name, type); - } catch (PortalException e) { - } - } + } catch (PortalException e) { + } + } - try { + try { - if (indexed) { + if (indexed) { - UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); - typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, - String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); + typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, + String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); - expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); - expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); - } + expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); + } - if (hidden) { + if (hidden) { - UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); - typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); + typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); - expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); - expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); - } + 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); + 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); - } catch (PortalException e) { - } + 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; - } + return expandoColumn; + } } 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..81b4071f 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 @@ -42,131 +42,134 @@ import com.liferay.util.bridges.mvc.MVCPortlet; */ public class NotificationPortlet extends MVCPortlet { - private static final Log _log = LogFactoryUtil.getLog(NotificationPortlet.class); - - @Override - public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, - PortletException { - - String id = resourceRequest.getResourceID(); - - try { - - ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest); - - long companyId = serviceContext.getCompanyId(); -// long groupId = serviceContext.getScopeGroupId(); - long userId = serviceContext.getUserId(); - - int count = 0; - - if ("countTasksUser".equals(id)) { - try { - count = WorkflowTaskManagerUtil.getWorkflowTaskCountByUser(companyId, userId, false); - } catch (WorkflowException e) { - } - } else if ("countTasksUserRoles".equals(id)) { - try { - count = WorkflowTaskManagerUtil.getWorkflowTaskCountByUserRoles(companyId, userId, false); - } catch (WorkflowException e) { - } - } else if ("countTaksGestioneFirmeMie".equals(id)) { - count = - AvvisoLocalServiceUtil.countAvvisiDaFirmarePrimaFirmaByCF(companyId, - UserLocalServiceUtil.getUser(userId).getScreenName()); - } else if ("countTaksGestioneFirme".equals(id)) { - long[] groupIds = new long[0]; - - - List organizations = - OrganizationLocalServiceUtil.getUserOrganizations(serviceContext.getUserId()); - for (Organization organization : organizations) { - if (UserGroupRoleLocalServiceUtil.hasUserGroupRole(serviceContext.getUserId(), organization.getGroupId(), - Constants.ROLE_NAME_FIRMA, true)) { - groupIds = ArrayUtil.append(groupIds, organization.getGroupId()); - } else if (UserGroupRoleLocalServiceUtil.hasUserGroupRole(serviceContext.getUserId(), - organization.getGroupId(), Constants.ROLE_NAME_FIRMA_DIRIGENTE, true)) { - groupIds = ArrayUtil.append(groupIds, organization.getGroupId()); - } - } - count = AvvisoLocalServiceUtil.countAvvisiDaFirmarePrimaFirma(companyId, groupIds); - } else if ("countPraticheInScadenza".equals(id)) { - count = TempisticaLocalServiceUtil.countScadenzePraticheInScadenza(companyId, 0l); - } else if ("countPraticheScadute".equals(id)) { - count = TempisticaLocalServiceUtil.countScadenzePraticheScadute(companyId, 0l); - } else if ("countIntegrazioniScadute".equals(id)) { - count = TempisticaLocalServiceUtil.countScadenzeIntegrazioniScadute(companyId, 0l); - } else if ("countPraticheAttive".equals(id)) { - count = TempisticaLocalServiceUtil.countPraticheAttive(companyId, 0l); - } else if ("countPraticheAttiveAssegnazione".equals(id)) { - - count = getCountPraticheAssegnazione(companyId, 0l, false); - - } else if ("countPraticheAttiveOrdinarie".equals(id)) { - count = getCountPraticheAssegnazione(companyId, 0l, true); - } - - JSONObject obj = JSONFactoryUtil.createJSONObject(); - obj.put("count", count); - - writeJSON(resourceRequest, resourceResponse, obj); - - } catch (PortalException e) { - _log.error("Error", e); - throw new PortletException(e); - } catch (SystemException e) { - _log.error("Error", e); - throw new PortletException(e); - } - - } - - private int getCountPraticheAssegnazione(long companyId, long groupId, boolean ordinarie) throws SystemException{ - - ClassLoader classLoaderBO = - (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), "portletClassLoader"); - - ClassLoader classLoader = - (ClassLoader) PortletBeanLocatorUtil.locate(com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader"); - - List pratiche = TempisticaLocalServiceUtil.countPraticheAttivePerDiscriminazione(companyId, 0l); - - int countControlloDaAssegnare = 0; - int countControlloOrdinarie = 0; - - for(Long intPraticaId : pratiche){ - - DynamicQuery query = DynamicQueryFactoryUtil.forClass(ControlloPratica.class,classLoaderBO); - query.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); - - List lista = ControlloPraticaLocalServiceUtil.dynamicQuery(query); - if(lista != null && !lista.isEmpty()){ - - ControlloPratica controlloPratica = lista.get(0); - if(controlloPratica != null){ - - DynamicQuery queryKaleo = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class,classLoader); - queryKaleo.add(RestrictionsFactoryUtil.eq("classPK", controlloPratica.getControlloPraticaId())); - queryKaleo.add(RestrictionsFactoryUtil.eq("className", ControlloPratica.class.getName())); - queryKaleo.add(RestrictionsFactoryUtil.eq("kaleoTaskName", "Assegnazione")); - queryKaleo.add(RestrictionsFactoryUtil.eq("completed", false)); - - List listaKaleo = KaleoTaskInstanceTokenLocalServiceUtil.dynamicQuery(queryKaleo); - if(listaKaleo != null && !listaKaleo.isEmpty()){ - countControlloDaAssegnare ++; - } else { - countControlloOrdinarie++; - - } - } - } - } - - if(ordinarie){ - return countControlloOrdinarie; - } else { - return countControlloDaAssegnare; - } - } + private static final Log _log = LogFactoryUtil.getLog(NotificationPortlet.class); + + @Override + public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) + throws IOException, PortletException { + + String id = resourceRequest.getResourceID(); + + try { + + ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest); + + long companyId = serviceContext.getCompanyId(); + // long groupId = serviceContext.getScopeGroupId(); + long userId = serviceContext.getUserId(); + + int count = 0; + + if ("countTasksUser".equals(id)) { + try { + count = WorkflowTaskManagerUtil.getWorkflowTaskCountByUser(companyId, userId, false); + } catch (WorkflowException e) { + } + } else if ("countTasksUserRoles".equals(id)) { + try { + count = WorkflowTaskManagerUtil.getWorkflowTaskCountByUserRoles(companyId, userId, false); + } catch (WorkflowException e) { + } + } else if ("countTaksGestioneFirmeMie".equals(id)) { + count = AvvisoLocalServiceUtil.countAvvisiDaFirmarePrimaFirmaByCF(companyId, + UserLocalServiceUtil.getUser(userId).getScreenName()); + } else if ("countTaksGestioneFirme".equals(id)) { + long[] groupIds = new long[0]; + + List organizations = OrganizationLocalServiceUtil + .getUserOrganizations(serviceContext.getUserId()); + for (Organization organization : organizations) { + if (UserGroupRoleLocalServiceUtil.hasUserGroupRole(serviceContext.getUserId(), + organization.getGroupId(), Constants.ROLE_NAME_FIRMA, true)) { + groupIds = ArrayUtil.append(groupIds, organization.getGroupId()); + } else if (UserGroupRoleLocalServiceUtil.hasUserGroupRole(serviceContext.getUserId(), + organization.getGroupId(), Constants.ROLE_NAME_FIRMA_DIRIGENTE, true)) { + groupIds = ArrayUtil.append(groupIds, organization.getGroupId()); + } + } + count = AvvisoLocalServiceUtil.countAvvisiDaFirmarePrimaFirma(companyId, groupIds); + } else if ("countPraticheInScadenza".equals(id)) { + count = TempisticaLocalServiceUtil.countScadenzePraticheInScadenza(companyId, 0l); + } else if ("countPraticheScadute".equals(id)) { + count = TempisticaLocalServiceUtil.countScadenzePraticheScadute(companyId, 0l); + } else if ("countIntegrazioniScadute".equals(id)) { + count = TempisticaLocalServiceUtil.countScadenzeIntegrazioniScadute(companyId, 0l); + } else if ("countPraticheAttive".equals(id)) { + count = TempisticaLocalServiceUtil.countPraticheAttive(companyId, 0l); + } else if ("countPraticheAttiveAssegnazione".equals(id)) { + + count = getCountPraticheAssegnazione(companyId, 0l, false); + + } else if ("countPraticheAttiveOrdinarie".equals(id)) { + count = getCountPraticheAssegnazione(companyId, 0l, true); + } + + JSONObject obj = JSONFactoryUtil.createJSONObject(); + obj.put("count", count); + + writeJSON(resourceRequest, resourceResponse, obj); + + } catch (PortalException e) { + _log.error("Error", e); + throw new PortletException(e); + } catch (SystemException e) { + _log.error("Error", e); + throw new PortletException(e); + } + + } + + private int getCountPraticheAssegnazione(long companyId, long groupId, boolean ordinarie) + throws SystemException { + + ClassLoader classLoaderBO = (ClassLoader) PortletBeanLocatorUtil.locate( + ClpSerializer.getServletContextName(), "portletClassLoader"); + + ClassLoader classLoader = (ClassLoader) PortletBeanLocatorUtil.locate( + com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), + "portletClassLoader"); + + List pratiche = TempisticaLocalServiceUtil.countPraticheAttivePerDiscriminazione(companyId, 0l); + + int countControlloDaAssegnare = 0; + int countControlloOrdinarie = 0; + + for (Long intPraticaId : pratiche) { + + DynamicQuery query = DynamicQueryFactoryUtil.forClass(ControlloPratica.class, classLoaderBO); + query.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); + + List lista = ControlloPraticaLocalServiceUtil.dynamicQuery(query); + if (lista != null && !lista.isEmpty()) { + + ControlloPratica controlloPratica = lista.get(0); + if (controlloPratica != null) { + + DynamicQuery queryKaleo = DynamicQueryFactoryUtil.forClass(KaleoTaskInstanceToken.class, + classLoader); + queryKaleo.add(RestrictionsFactoryUtil.eq("classPK", + controlloPratica.getControlloPraticaId())); + queryKaleo.add(RestrictionsFactoryUtil.eq("className", ControlloPratica.class.getName())); + queryKaleo.add(RestrictionsFactoryUtil.eq("kaleoTaskName", "Assegnazione")); + queryKaleo.add(RestrictionsFactoryUtil.eq("completed", false)); + + List listaKaleo = KaleoTaskInstanceTokenLocalServiceUtil + .dynamicQuery(queryKaleo); + if (listaKaleo != null && !listaKaleo.isEmpty()) { + countControlloDaAssegnare++; + } else { + countControlloOrdinarie++; + + } + } + } + } + + if (ordinarie) { + return countControlloOrdinarie; + } else { + return countControlloDaAssegnare; + } + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.classpath b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.classpath index 5c4dbb8c..0e46395b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.classpath +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportConstant.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportConstant.java index 33214b4a..10f5f261 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportConstant.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportConstant.java @@ -2,32 +2,19 @@ package it.tref.portos.report.engine.util; public class PortosReportConstant { - public static final String SCAN_CLASSPATH = "it.tref.portos.report.engine"; - - public static final String REPORT_CLASSES_LIST = "reportClassesList"; - - public static final String METHOD_GET_TITLE = "getTitle"; - - public static final String METHOD_GENERATE_HTML = "generateHTML"; - - public static final String METHOD_GENERATE_REPORT = "generateReport"; - - public static final String METHOD_GET_SEARCH_FIELDS = "getSearchFields"; - - public static final String METHOD_IS_CVS_ENABLED = "isCVSEnabled"; - - public static final String METHOD_IS_PDF_ENABLED = "isPDFEnabled"; - - public static final String METHOD_IS_EXCEL_ENABLED = "isExcelEnabled"; - - public static final String METHOD_IS_WORD_ENABLED = "isWordEnabled"; - - public static final String CMD_CVS = "cvs"; - - public static final String CMD_PDF = "pdf"; - - public static final String CMD_EXCEL = "excel"; - - public static final String CMD_WORD = "word"; + public static final String SCAN_CLASSPATH = "it.tref.portos.report.engine"; + public static final String REPORT_CLASSES_LIST = "reportClassesList"; + public static final String METHOD_GET_TITLE = "getTitle"; + public static final String METHOD_GENERATE_HTML = "generateHTML"; + public static final String METHOD_GENERATE_REPORT = "generateReport"; + public static final String METHOD_GET_SEARCH_FIELDS = "getSearchFields"; + public static final String METHOD_IS_CVS_ENABLED = "isCVSEnabled"; + public static final String METHOD_IS_PDF_ENABLED = "isPDFEnabled"; + public static final String METHOD_IS_EXCEL_ENABLED = "isExcelEnabled"; + public static final String METHOD_IS_WORD_ENABLED = "isWordEnabled"; + public static final String CMD_CVS = "cvs"; + public static final String CMD_PDF = "pdf"; + public static final String CMD_EXCEL = "excel"; + public static final String CMD_WORD = "word"; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportUtil.java index dcdfdc24..43570242 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosReportUtil.java @@ -15,77 +15,78 @@ import com.liferay.portal.kernel.util.StringPool; public class PortosReportUtil { - private static Log _log = LogFactoryUtil.getLog(PortosReportUtil.class); + private static Log _log = LogFactoryUtil.getLog(PortosReportUtil.class); - public static Object invokeMethod(String className, String methodName, Class[] paramTypes, Object objs) { + public static Object invokeMethod(String className, String methodName, Class[] paramTypes, Object objs) { - Object returnedFromMethod = ""; + Object returnedFromMethod = ""; - try { + try { - Class classToInvoke = Class.forName(className); - Object obj = classToInvoke.newInstance(); + Class classToInvoke = Class.forName(className); + Object obj = classToInvoke.newInstance(); - Method method = classToInvoke.getDeclaredMethod(methodName, paramTypes); + Method method = classToInvoke.getDeclaredMethod(methodName, paramTypes); - returnedFromMethod = method.invoke(obj, objs); + returnedFromMethod = method.invoke(obj, objs); - } catch (Exception e) { - _log.error(e, e); - } + } catch (Exception e) { + _log.error(e, e); + } - return returnedFromMethod; - } + return returnedFromMethod; + } - public static Object invokeMethod(String className, String methodName) { + public static Object invokeMethod(String className, String methodName) { - Object returnedFromMethod = ""; + Object returnedFromMethod = ""; - try { + try { - Class classToInvoke = Class.forName(className); - Object obj = classToInvoke.newInstance(); + Class classToInvoke = Class.forName(className); + Object obj = classToInvoke.newInstance(); - Method method = classToInvoke.getDeclaredMethod(methodName); + Method method = classToInvoke.getDeclaredMethod(methodName); - returnedFromMethod = method.invoke(obj); + returnedFromMethod = method.invoke(obj); - } catch (Exception e) { - _log.error(e, e); - } + } catch (Exception e) { + _log.error(e, e); + } + return returnedFromMethod; + } - return returnedFromMethod; - } + public static String getReportsTabNames(List portosReportClassList) { - public static String getReportsTabNames(List portosReportClassList) { + StringBuilder sb = new StringBuilder(); - StringBuilder sb = new StringBuilder(); + for (String reportClassName : portosReportClassList) { + String reportTitle = (String) invokeMethod(reportClassName, PortosReportConstant.METHOD_GET_TITLE); + sb.append(reportTitle).append(StringPool.COMMA); + } - for (String reportClassName : portosReportClassList) { - String reportTitle = (String) invokeMethod(reportClassName, PortosReportConstant.METHOD_GET_TITLE); - sb.append(reportTitle).append(StringPool.COMMA); - } + return sb.toString(); + } - return sb.toString(); - } + public static String getClassNameByTitle(String title) { - public static String getClassNameByTitle(String title) { + String className = ""; - String className = ""; + ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider( + true); + scanner.addIncludeFilter(new AnnotationTypeFilter(PortosReport.class)); - ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(true); - scanner.addIncludeFilter(new AnnotationTypeFilter(PortosReport.class)); + for (BeanDefinition bd : scanner.findCandidateComponents(PortosReportConstant.SCAN_CLASSPATH)) { + String reportTitle = (String) invokeMethod(bd.getBeanClassName(), + PortosReportConstant.METHOD_GET_TITLE); - for (BeanDefinition bd : scanner.findCandidateComponents(PortosReportConstant.SCAN_CLASSPATH)) { - String reportTitle = (String) invokeMethod(bd.getBeanClassName(), PortosReportConstant.METHOD_GET_TITLE); + if (reportTitle.equals(title)) { + className = bd.getBeanClassName(); + } - if (reportTitle.equals(title)) { - className = bd.getBeanClassName(); - } + } - } - - return className; - } + return className; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosTemplate_OLD.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosTemplate_OLD.java deleted file mode 100644 index 6ac5ba6a..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/PortosTemplate_OLD.java +++ /dev/null @@ -1,134 +0,0 @@ -package it.tref.portos.report.engine.util; - -import java.awt.Color; -import java.util.Locale; - -import net.sf.dynamicreports.report.base.expression.AbstractValueFormatter; -import net.sf.dynamicreports.report.builder.DynamicReports; -import net.sf.dynamicreports.report.builder.ReportTemplateBuilder; -import net.sf.dynamicreports.report.builder.component.ComponentBuilder; -import net.sf.dynamicreports.report.builder.datatype.BigDecimalType; -import net.sf.dynamicreports.report.builder.style.StyleBuilder; -import net.sf.dynamicreports.report.builder.tableofcontents.TableOfContentsCustomizerBuilder; -import net.sf.dynamicreports.report.constant.HorizontalAlignment; -import net.sf.dynamicreports.report.constant.VerticalAlignment; -import net.sf.dynamicreports.report.definition.ReportParameters; - -public class PortosTemplate_OLD { - - public static final StyleBuilder rootStyle; - public static final StyleBuilder boldStyle; - public static final StyleBuilder italicStyle; - public static final StyleBuilder boldCenteredStyle; - public static final StyleBuilder bold12CenteredStyle; - public static final StyleBuilder bold18CenteredStyle; - public static final StyleBuilder bold22CenteredStyle; - public static final StyleBuilder columnStyle; - public static final StyleBuilder columnTitleStyle; - public static final StyleBuilder groupStyle; - public static final StyleBuilder subtotalStyle; - - public static final ReportTemplateBuilder reportTemplate; - public static final CurrencyType currencyType; - - static { - - rootStyle = DynamicReports.stl.style().setPadding(2); - - boldStyle = DynamicReports.stl.style(rootStyle).bold(); - - italicStyle = DynamicReports.stl.style(rootStyle).italic(); - - boldCenteredStyle = - DynamicReports.stl.style(boldStyle).setAlignment(HorizontalAlignment.CENTER, VerticalAlignment.MIDDLE); - - bold12CenteredStyle = DynamicReports.stl.style(boldCenteredStyle).setFontSize(12); - - bold18CenteredStyle = DynamicReports.stl.style(boldCenteredStyle).setFontSize(18); - - bold22CenteredStyle = DynamicReports.stl.style(boldCenteredStyle).setFontSize(22); - - columnStyle = DynamicReports.stl.style(rootStyle).setVerticalAlignment(VerticalAlignment.MIDDLE); - - columnTitleStyle = - DynamicReports.stl.style(columnStyle).setBorder(DynamicReports.stl.pen1Point()).setHorizontalAlignment( - HorizontalAlignment.CENTER).setBackgroundColor(Color.LIGHT_GRAY).bold(); - - groupStyle = DynamicReports.stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.LEFT); - - subtotalStyle = DynamicReports.stl.style(boldStyle).setTopBorder(DynamicReports.stl.pen1Point()); - - StyleBuilder crosstabGroupStyle = DynamicReports.stl.style(columnTitleStyle); - - StyleBuilder crosstabGroupTotalStyle = DynamicReports.stl.style(columnTitleStyle) - - .setBackgroundColor(new Color(170, 170, 170)); - - StyleBuilder crosstabGrandTotalStyle = DynamicReports.stl.style(columnTitleStyle) - - .setBackgroundColor(new Color(140, 140, 140)); - - StyleBuilder crosstabCellStyle = DynamicReports.stl.style(columnStyle) - - .setBorder(DynamicReports.stl.pen1Point()); - - TableOfContentsCustomizerBuilder tableOfContentsCustomizer = - DynamicReports.tableOfContentsCustomizer().setHeadingStyle(0, DynamicReports.stl.style(rootStyle).bold()); - - reportTemplate = - DynamicReports.template().setLocale(Locale.ITALIAN).setColumnStyle(columnStyle).setColumnTitleStyle( - columnTitleStyle).setGroupStyle(groupStyle).setGroupTitleStyle(groupStyle).setSubtotalStyle(subtotalStyle).highlightDetailEvenRows().crosstabHighlightEvenRows().setCrosstabGroupStyle( - crosstabGroupStyle).setCrosstabGroupTotalStyle(crosstabGroupTotalStyle).setCrosstabGrandTotalStyle( - crosstabGrandTotalStyle).setCrosstabCellStyle(crosstabCellStyle).setTableOfContentsCustomizer( - tableOfContentsCustomizer); - - currencyType = new CurrencyType(); - } - - public static ComponentBuilder createTitleComponent(String label) { - - return DynamicReports.cmp.horizontalList().add( - DynamicReports.cmp.text(label).setStyle(bold18CenteredStyle).setHorizontalAlignment(HorizontalAlignment.RIGHT)).newRow().add( - DynamicReports.cmp.line()).newRow().add(DynamicReports.cmp.verticalGap(10)); - } - - public static CurrencyValueFormatter createCurrencyValueFormatter(String label) { - - return new CurrencyValueFormatter(label); - - } - - - public static class CurrencyType extends BigDecimalType { - - private static final long serialVersionUID = 1L; - - @Override - public String getPattern() { - - return "$ #,###.00"; - - } - - } - - private static class CurrencyValueFormatter extends AbstractValueFormatter { - - private static final long serialVersionUID = 1L; - - private String label; - - public CurrencyValueFormatter(String label) { - - this.label = label; - } - - @Override - public String format(Number value, ReportParameters reportParameters) { - - return label + currencyType.valueToString(value, reportParameters.getLocale()); - } - } - - -} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportTempisticheBean.java b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportTempisticheBean.java index e791e921..3e14630a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportTempisticheBean.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/src/it/tref/portos/report/engine/util/ReportTempisticheBean.java @@ -9,17 +9,15 @@ public class ReportTempisticheBean { private Date dtinviosignal; private Date dtinvio; private String tipoDocumento; - private Date dtavviso; + private Date dtavviso; private String statoPratica; - - + public ReportTempisticheBean() { super(); - // TODO Auto-generated constructor stub } - public ReportTempisticheBean(long intpraticaid, long avvisoId, - long classpk, Date dtinviosignal, Date dtinvio, - String tipoDocumento, Date dtavviso,String statoPratica) { + + public ReportTempisticheBean(long intpraticaid, long avvisoId, long classpk, Date dtinviosignal, + Date dtinvio, String tipoDocumento, Date dtavviso, String statoPratica) { super(); this.intpraticaid = intpraticaid; this.avvisoId = avvisoId; @@ -28,50 +26,65 @@ public class ReportTempisticheBean { this.dtinvio = dtinvio; this.tipoDocumento = tipoDocumento; this.dtavviso = dtavviso; - this.statoPratica=statoPratica; + this.statoPratica = statoPratica; } + public long getAvvisoId() { return avvisoId; } + public void setAvvisoId(long avvisoId) { this.avvisoId = avvisoId; } + public long getIntpraticaid() { return intpraticaid; } + public void setIntpraticaid(long intpraticaid) { this.intpraticaid = intpraticaid; } + public long getClasspk() { return classpk; } + public void setClasspk(long classpk) { this.classpk = classpk; } + public Date getDtinviosignal() { return dtinviosignal; } + public void setDtinviosignal(Date dtinviosignal) { this.dtinviosignal = dtinviosignal; } + public Date getDtinvio() { return dtinvio; } + public void setDtinvio(Date dtinvio) { this.dtinvio = dtinvio; } + public String getTipoDocumento() { return tipoDocumento; } + public void setTipoDocumento(String tipoDocumento) { this.tipoDocumento = tipoDocumento; } + public Date getDtavviso() { return dtavviso; } + public void setDtavviso(Date dtavviso) { this.dtavviso = dtavviso; } + @Override public int hashCode() { final int prime = 31; @@ -79,6 +92,7 @@ public class ReportTempisticheBean { result = prime * result + (int) (avvisoId ^ (avvisoId >>> 32)); return result; } + @Override public boolean equals(Object obj) { if (this == obj) @@ -92,13 +106,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-portlet/docroot/WEB-INF/lib/velocity.jar b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/lib/velocity.jar new file mode 100644 index 00000000..e7151c5c Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/lib/velocity.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/ReportEngine.java b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/ReportEngine.java index 54e4bd2e..3bff8fb3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/ReportEngine.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/report/jasper/core/ReportEngine.java @@ -33,410 +33,450 @@ import com.liferay.portal.kernel.util.HttpUtil; public class ReportEngine { - public static final int EXPORT_TO_PDF = 8; - public static final int EXPORT_TO_PDFA_1A = 9; - public static final int EXPORT_TO_PDFA_1B = 10; - public static final int EXPORT_TO_TXT = 1; - public static final int EXPORT_TO_HTML = 2; - public static final int EXPORT_TO_XLS = 3; - public static final int EXPORT_TO_RTF = 4; - public static final int EXPORT_TO_DOC = 5; - public static final int EXPORT_TO_HTM = 6; - public static final int EXPORT_TO_CSV = 7; - public static final int EXPORT_TO_DOCX = 1; + public static final int EXPORT_TO_PDF = 8; + public static final int EXPORT_TO_PDFA_1A = 9; + public static final int EXPORT_TO_PDFA_1B = 10; + public static final int EXPORT_TO_TXT = 1; + public static final int EXPORT_TO_HTML = 2; + public static final int EXPORT_TO_XLS = 3; + public static final int EXPORT_TO_RTF = 4; + public static final int EXPORT_TO_DOC = 5; + public static final int EXPORT_TO_HTM = 6; + public static final int EXPORT_TO_CSV = 7; + public static final int EXPORT_TO_DOCX = 1; - public static final String SRGB_IEC61966_2_1_BLACK_SCALED = "profile/sRGB_IEC61966-2-1_black_scaled.icc"; - public static final String SRGB_IEC61966_2_1_NO_BLACK_SCALING = "profile/sRGB_IEC61966-2-1_no_black_scaling.icc"; - public static final String SRGB_V4_ICC_PREFERENCE_DISPLAYCLASS = "profile/sRGB_v4_ICC_preference_displayclass.icc"; - public static final String SRGB_V4_ICC_PREFERENCE = "profile/sRGB_v4_ICC_preference.icc"; + public static final String SRGB_IEC61966_2_1_BLACK_SCALED = "profile/sRGB_IEC61966-2-1_black_scaled.icc"; + public static final String SRGB_IEC61966_2_1_NO_BLACK_SCALING = "profile/sRGB_IEC61966-2-1_no_black_scaling.icc"; + public static final String SRGB_V4_ICC_PREFERENCE_DISPLAYCLASS = "profile/sRGB_v4_ICC_preference_displayclass.icc"; + public static final String SRGB_V4_ICC_PREFERENCE = "profile/sRGB_v4_ICC_preference.icc"; - private String profile = SRGB_IEC61966_2_1_BLACK_SCALED; + private String profile = SRGB_IEC61966_2_1_BLACK_SCALED; - public static final String[] ESTENSIONI = {"txt", "html", "xls", "rtf", "doc", "htm", "cvs", "docx", "pdf", "pdf", - "pdf"}; + public static final String[] ESTENSIONI = { "txt", "html", "xls", "rtf", "doc", "htm", "cvs", "docx", + "pdf", "pdf", "pdf" }; - private String reportPath = "report/"; - private String templatePath = "template"; - private String templateExt = "jrxml"; + private String reportPath = "report/"; + private String templatePath = "template"; + private String templateExt = "jrxml"; - private ReportInterface CSVDati = null; - private String nomiReport = null; - private String nomeTemplate = null; - private HashMap parameters = null; - private Integer exportType; + private ReportInterface CSVDati = null; + private String nomiReport = null; + private String nomeTemplate = null; + private HashMap parameters = null; + private Integer exportType; - private Connection con = null; - private String classPath = ""; - private String compileTempPath = ""; + private Connection con = null; + private String classPath = ""; + private String compileTempPath = ""; - private JRExporter exporter = null; - private JRDataSource datasource = null; - private InputStream fileTemplate; + private JRExporter exporter = null; + private JRDataSource datasource = null; + private InputStream fileTemplate; - public ReportEngine(InputStream fileTemlate) { + public ReportEngine(InputStream fileTemlate) { - this.fileTemplate = fileTemlate; - } + this.fileTemplate = fileTemlate; + } - public ReportEngine(String templatePath, String reportPath, String classPath, String compileTempPath) { + public ReportEngine(String templatePath, String reportPath, String classPath, String compileTempPath) { - super(); - this.templatePath = sistemaSlash(templatePath); - this.classPath = sistemaSlash(classPath); - this.compileTempPath = sistemaSlash(compileTempPath); - this.reportPath = sistemaSlash(reportPath); - } + super(); + this.templatePath = sistemaSlash(templatePath); + this.classPath = sistemaSlash(classPath); + this.compileTempPath = sistemaSlash(compileTempPath); + this.reportPath = sistemaSlash(reportPath); + } - public ReportEngine(String templatePath, String classPath, String compileTempPath) { + public ReportEngine(String templatePath, String classPath, String compileTempPath) { - super(); - this.templatePath = sistemaSlash(templatePath); - this.classPath = sistemaSlash(classPath); - this.compileTempPath = sistemaSlash(compileTempPath); - } + super(); + this.templatePath = sistemaSlash(templatePath); + this.classPath = sistemaSlash(classPath); + this.compileTempPath = sistemaSlash(compileTempPath); + } - public ReportEngine(String templatePath, String reportPath) { + public ReportEngine(String templatePath, String reportPath) { - super(); - this.reportPath = sistemaSlash(reportPath); - this.templatePath = sistemaSlash(templatePath); - } + super(); + this.reportPath = sistemaSlash(reportPath); + this.templatePath = sistemaSlash(templatePath); + } - public ReportEngine(String templatePath) { + public ReportEngine(String templatePath) { - super(); - this.templatePath = sistemaSlash(templatePath); - } - - public String getTemplatePath() { - - return templatePath; - } - - public void setTemplatePath(String templatePath) { - - this.templatePath = sistemaSlash(templatePath); - } - - public String getReportPath() { - - return reportPath; - } - - public void setReportPath(String reportPath) { - - this.reportPath = sistemaSlash(reportPath); - } - - public String getClassPath() { - - return classPath; - } - - public void setClassPath(String classPath) { - - this.classPath = sistemaSlash(classPath); - } - - public String getCompileTempPath() { - - return compileTempPath; - } - - public void setCompileTempPath(String compileTempPath) { - - this.compileTempPath = sistemaSlash(compileTempPath); - } - - public InputStream getFileTemplate() { - - return fileTemplate; - } - - public void setFileTemplate(FileInputStream fileTemplate) { - - this.fileTemplate = fileTemplate; - } - - /** - * Funzione per inserire e verificare i dati CSV, al fine di costruire un singolo file di report - * - * @param nomeTemplate nome del/i file/s template del/i report/s - * @param nomiReport nome del/i report/s - * @param con Connessione al database - * @param numColonne numero delle colonne dei dati CSV - * @param parametri HashMap dei parametri da passare al report - * @throws Exception 1.inesistenza template 2.numero colonne nei dati maggiore del numero indicato - * da numColonne 3. I vettori dei dati non sono della stessa lunghezza - */ - public void insertDataConnection(Connection con, HashMap parametri, Integer exportType) - throws Exception { - - insertData(parametri, exportType); - this.con = con; - this.CSVDati = null; - } - - public void insertDataConnection(String templateName, String reportName, Connection con, - HashMap parametri, Integer exportType) throws Exception { - - insertData(templateName, reportName, parametri, exportType); - this.con = con; - this.CSVDati = null; - } - - /** - * Funzione per inserire e verificare i dati CSV, al fine di costruire pi� file report, diversi - * tra loro - * - * @param nomeTemplate nome del/i file/s template del/i report/s - * @param nomiReport nome del/i report/s - * @param csvDati i dati in formato CSV (ogni riga deve terminare con \r\n, anche l'ultima) - * @param numColonne numero delle colonne dei dati CSV - * @param parametri HashMap dei parametri da passare al report - * @throws Exception 1.inesistenza template 2.numero colonne nei dati maggiore del numero indicato - * da numColonne 3. I vettori dei dati non sono della stessa lunghezza - */ - public void insertDataSource(String nomeTemplate, String nomiReport, ReportInterface csvDati, - HashMap parametri, Integer exportType) throws Exception { - - insertData(nomeTemplate, nomiReport, parametri, exportType); - this.CSVDati = csvDati; - this.con = null; - } - - public void insertDataSource(ReportInterface csvDati, HashMap parametri, Integer exportType) - throws Exception { - - insertData(parametri, exportType); - this.CSVDati = csvDati; - this.con = null; - } - - /** - * Funzione per inserire e verificare i dati CSV, al fine di costruire pi� file report, diversi - * tra loro - * - * @param nomeTemplate nome del/i file/s template del/i report/s - * @param nomiReport nome del/i report/s - * @param csvDati i dati in formato CSV (ogni riga deve terminare con \r\n, anche l'ultima) - * @param numColonne numero delle colonne dei dati CSV - * @param parametri HashMap dei parametri da passare al report - * @throws Exception 1.inesistenza template 2.numero colonne nei dati maggiore del numero indicato - * da numColonne 3. I vettori dei dati non sono della stessa lunghezza - */ - public void insertSimpleData(String nomeTemplate, String nomiReport, HashMap parametri, - Integer exportType) throws Exception { - - insertData(nomeTemplate, nomiReport, parametri, exportType); - this.CSVDati = null; - this.con = null; - } - - public void insertSimpleData(HashMap parametri, Integer exportType) throws Exception { - - insertData(parametri, exportType); - this.CSVDati = null; - this.con = null; - } - - /** - * Funzione per inserire e verificare i dati (solo parametri), al fine di costruire pi� file - * report diversi tra loro - * - * @param nomeTemplate nome del/i file/s template del/i report/s - * @param nomiReport nome del/i report/s - * @param parametri HashMap dei parametri da passare al report - * @param numColonne - * @throws Exception 1.inesistenza template 2.numero colonne nei dati maggiore del numero indicato - * da numColonne 3. I vettori dei dati non sono della stessa lunghezza - */ - private void insertData(String nomeTemplate, String nomiReport, HashMap parametri, Integer exportType) - throws Exception { - - if (!(new File(this.templatePath + nomeTemplate + "." + this.templateExt).exists())) - throw new Exception("Il template " + nomeTemplate + " non esiste !"); - this.exportType = exportType; - this.nomeTemplate = nomeTemplate; - this.CSVDati = null; - this.nomiReport = nomiReport; - this.parameters = parametri; - } - - private void insertData(HashMap parametri, Integer exportType) throws Exception { - - this.exportType = exportType; - this.CSVDati = null; - this.parameters = parametri; - } - - /** - * Funzione per creare un report direttamente su un OutputStream con il formato desiderato - * - * @param out OutputStream in cui scrivere - * @param patternTipologie pattern tipo report da generare (doc,html,pdf,xls,etc...) - * @throws Exception - */ - public void scriviOutputStream(OutputStream out) throws Exception { - - JasperPrint jp = null; - if (exportType == EXPORT_TO_XLS) { - if (exporter == null || !(exporter instanceof JRXlsExporter)) - exporter = new JRXlsExporter(); - parameters.put("IS_IGNORE_PAGINATION", Boolean.TRUE); - - if (exporter.getParameter(JRXlsExporterParameter.JASPER_PRINT) == null) - exporter.setParameter(JRXlsExporterParameter.JASPER_PRINT, jp); - if (exporter.getParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET) == null) - exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); - if (exporter.getParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND) == null) - exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); - } else if (exportType == EXPORT_TO_PDF) { - if (exporter == null || !(exporter instanceof JRPdfExporter)) - exporter = new JRPdfExporter(); - parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); - } else if (exportType == EXPORT_TO_PDFA_1A) { - if (exporter == null || !(exporter instanceof JRPdfExporter)) - exporter = new JRPdfExporter(); - parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); - exporter.setParameter(JRPdfExporterParameter.PDFA_CONFORMANCE, JRPdfExporterParameter.PDFA_CONFORMANCE_1A); - exporter.setParameter(JRPdfExporterParameter.PDFA_ICC_PROFILE_PATH, - HttpUtil.decodeURL(this.getClass().getResource(getProfile()).getPath())); - } else if (exportType == EXPORT_TO_PDFA_1B) { - if (exporter == null || !(exporter instanceof JRPdfExporter)) - exporter = new JRPdfExporter(); - parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); - exporter.setParameter(JRPdfExporterParameter.PDFA_CONFORMANCE, JRPdfExporterParameter.PDFA_CONFORMANCE_1B); - exporter.setParameter(JRPdfExporterParameter.PDFA_ICC_PROFILE_PATH, - HttpUtil.decodeURL(this.getClass().getResource(getProfile()).getPath())); - } else if (exportType == EXPORT_TO_DOC || exportType == EXPORT_TO_RTF) { - if (exporter == null || !(exporter instanceof JRRtfExporter)) - exporter = new JRRtfExporter(); - parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); - } else if (exportType == EXPORT_TO_DOCX) { - if (exporter == null || !(exporter instanceof JRDocxExporter)) - exporter = new JRDocxExporter(); - parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); - } - // creazione file HTML - else if (exportType == EXPORT_TO_HTML || exportType == EXPORT_TO_HTM) { - if (exporter == null || !(exporter instanceof JRHtmlExporter)) - exporter = new JRHtmlExporter(); - String htmlHeader = - "" + nomiReport + "" - + "" - + "" - + "" + ""; - String htmlFooter = ""; - parameters.put("IS_IGNORE_PAGINATION", Boolean.TRUE); - - if (exporter.getParameter(JRHtmlExporterParameter.HTML_HEADER) == null) - exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, htmlHeader); - if (exporter.getParameter(JRHtmlExporterParameter.HTML_FOOTER) == null) - exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, htmlFooter); - - } else if (exportType == EXPORT_TO_CSV) { - out.write(CSVDati.getCSVBytes(), 0, CSVDati.getCSVBytes().length); - } - - if (exportType != EXPORT_TO_CSV) { - if (CSVDati != null) { - datasource = getDataSource(CSVDati); - jp = CompileAndFillReport(nomeTemplate, parameters); - } else { - datasource = null; - jp = CompileAndFillReport(nomeTemplate, parameters); - } - if (exporter.getParameter(JRExporterParameter.JASPER_PRINT) == null) - exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp); - if (exporter.getParameter(JRExporterParameter.OUTPUT_STREAM) == null) - exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out); - - exporter.exportReport(); - } - out.flush(); - - } - - /** - * Funzione per il riempimento e la compilazione del template Jasper - * - * @param ds DataSource sorgente dati pu� essere nullo in tal caso si tiene conto solo di - * parameters - * @param nomeTeplate Template Jasper da usare - * @param parameters Parametri da passare al template - * @return JasperPrint - * @throws JRException - */ - private JasperPrint CompileAndFillReport(String nomeTeplate, HashMap parameters) throws JRException { - - JasperDesign jd = null; - JasperReport jr = null; - JasperPrint jp = null; - if (classPath != null && !classPath.equals("")) - System.setProperty("jasper.reports.compile.class.path", classPath); - if (compileTempPath != null && !compileTempPath.equals("")) - System.setProperty("jasper.reports.compile.temp", compileTempPath); - try { - if (fileTemplate != null) { - jd = JRXmlLoader.load(fileTemplate); - } else { - jd = JRXmlLoader.load(templatePath + nomeTeplate + "." + templateExt); - } - jr = JasperCompileManager.compileReport(jd); - - if (datasource != null) - jp = JasperFillManager.fillReport(jr, parameters, datasource); - else if (con != null) - jp = JasperFillManager.fillReport(jr, parameters, con); - else - jp = JasperFillManager.fillReport(jr, parameters, new JREmptyDataSource()); - - } catch (JRException e) { - throw e; - } - return jp; - - } - - /** - * Funzione per settare il datasource del report. - * - * @param is inputstream dati csv - * @param cvsReport numero colonne del csv - * @return JRCsvDataSource - */ - private JRDataSource getDataSource(ReportInterface absReport) { - - return absReport.generaDataSource(); - } - - private String sistemaSlash(String path) { - - if (path.charAt(path.length() - 1) != '/' && path.charAt(path.length() - 1) != '\\') { - path += "/"; - } - return path; - } - - public JRExporter getExporter() { - - return exporter; - } - - public void setExporter(JRExporter exporter) { - - this.exporter = exporter; - } - - public void setProfile(String profile) { - - this.profile = profile; - } - - public String getProfile() { - - return profile; - } + super(); + this.templatePath = sistemaSlash(templatePath); + } + + public String getTemplatePath() { + + return templatePath; + } + + public void setTemplatePath(String templatePath) { + + this.templatePath = sistemaSlash(templatePath); + } + + public String getReportPath() { + + return reportPath; + } + + public void setReportPath(String reportPath) { + + this.reportPath = sistemaSlash(reportPath); + } + + public String getClassPath() { + + return classPath; + } + + public void setClassPath(String classPath) { + + this.classPath = sistemaSlash(classPath); + } + + public String getCompileTempPath() { + + return compileTempPath; + } + + public void setCompileTempPath(String compileTempPath) { + + this.compileTempPath = sistemaSlash(compileTempPath); + } + + public InputStream getFileTemplate() { + + return fileTemplate; + } + + public void setFileTemplate(FileInputStream fileTemplate) { + + this.fileTemplate = fileTemplate; + } + + /** + * Funzione per inserire e verificare i dati CSV, al fine di costruire un + * singolo file di report + * + * @param nomeTemplate + * nome del/i file/s template del/i report/s + * @param nomiReport + * nome del/i report/s + * @param con + * Connessione al database + * @param numColonne + * numero delle colonne dei dati CSV + * @param parametri + * HashMap dei parametri da passare al report + * @throws Exception + * 1.inesistenza template 2.numero colonne nei dati maggiore del + * numero indicato da numColonne 3. I vettori dei dati non sono + * della stessa lunghezza + */ + public void insertDataConnection(Connection con, HashMap parametri, Integer exportType) + throws Exception { + + insertData(parametri, exportType); + this.con = con; + this.CSVDati = null; + } + + public void insertDataConnection(String templateName, String reportName, Connection con, + HashMap parametri, Integer exportType) throws Exception { + + insertData(templateName, reportName, parametri, exportType); + this.con = con; + this.CSVDati = null; + } + + /** + * Funzione per inserire e verificare i dati CSV, al fine di costruire pi� + * file report, diversi tra loro + * + * @param nomeTemplate + * nome del/i file/s template del/i report/s + * @param nomiReport + * nome del/i report/s + * @param csvDati + * i dati in formato CSV (ogni riga deve terminare con \r\n, + * anche l'ultima) + * @param numColonne + * numero delle colonne dei dati CSV + * @param parametri + * HashMap dei parametri da passare al report + * @throws Exception + * 1.inesistenza template 2.numero colonne nei dati maggiore del + * numero indicato da numColonne 3. I vettori dei dati non sono + * della stessa lunghezza + */ + public void insertDataSource(String nomeTemplate, String nomiReport, ReportInterface csvDati, + HashMap parametri, Integer exportType) throws Exception { + + insertData(nomeTemplate, nomiReport, parametri, exportType); + this.CSVDati = csvDati; + this.con = null; + } + + public void insertDataSource(ReportInterface csvDati, HashMap parametri, + Integer exportType) throws Exception { + + insertData(parametri, exportType); + this.CSVDati = csvDati; + this.con = null; + } + + /** + * Funzione per inserire e verificare i dati CSV, al fine di costruire pi� + * file report, diversi tra loro + * + * @param nomeTemplate + * nome del/i file/s template del/i report/s + * @param nomiReport + * nome del/i report/s + * @param csvDati + * i dati in formato CSV (ogni riga deve terminare con \r\n, + * anche l'ultima) + * @param numColonne + * numero delle colonne dei dati CSV + * @param parametri + * HashMap dei parametri da passare al report + * @throws Exception + * 1.inesistenza template 2.numero colonne nei dati maggiore del + * numero indicato da numColonne 3. I vettori dei dati non sono + * della stessa lunghezza + */ + public void insertSimpleData(String nomeTemplate, String nomiReport, HashMap parametri, + Integer exportType) throws Exception { + + insertData(nomeTemplate, nomiReport, parametri, exportType); + this.CSVDati = null; + this.con = null; + } + + public void insertSimpleData(HashMap parametri, Integer exportType) throws Exception { + + insertData(parametri, exportType); + this.CSVDati = null; + this.con = null; + } + + /** + * Funzione per inserire e verificare i dati (solo parametri), al fine di + * costruire pi� file report diversi tra loro + * + * @param nomeTemplate + * nome del/i file/s template del/i report/s + * @param nomiReport + * nome del/i report/s + * @param parametri + * HashMap dei parametri da passare al report + * @param numColonne + * @throws Exception + * 1.inesistenza template 2.numero colonne nei dati maggiore del + * numero indicato da numColonne 3. I vettori dei dati non sono + * della stessa lunghezza + */ + private void insertData(String nomeTemplate, String nomiReport, HashMap parametri, + Integer exportType) throws Exception { + + if (!(new File(this.templatePath + nomeTemplate + "." + this.templateExt).exists())) + throw new Exception("Il template " + nomeTemplate + " non esiste !"); + this.exportType = exportType; + this.nomeTemplate = nomeTemplate; + this.CSVDati = null; + this.nomiReport = nomiReport; + this.parameters = parametri; + } + + private void insertData(HashMap parametri, Integer exportType) throws Exception { + + this.exportType = exportType; + this.CSVDati = null; + this.parameters = parametri; + } + + /** + * Funzione per creare un report direttamente su un OutputStream con il + * formato desiderato + * + * @param out + * OutputStream in cui scrivere + * @param patternTipologie + * pattern tipo report da generare (doc,html,pdf,xls,etc...) + * @throws Exception + */ + public void scriviOutputStream(OutputStream out) throws Exception { + + JasperPrint jp = null; + if (exportType == EXPORT_TO_XLS) { + if (exporter == null || !(exporter instanceof JRXlsExporter)) + exporter = new JRXlsExporter(); + parameters.put("IS_IGNORE_PAGINATION", Boolean.TRUE); + + if (exporter.getParameter(JRXlsExporterParameter.JASPER_PRINT) == null) + exporter.setParameter(JRXlsExporterParameter.JASPER_PRINT, jp); + if (exporter.getParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET) == null) + exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); + if (exporter.getParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND) == null) + exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); + } else if (exportType == EXPORT_TO_PDF) { + if (exporter == null || !(exporter instanceof JRPdfExporter)) + exporter = new JRPdfExporter(); + parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); + } else if (exportType == EXPORT_TO_PDFA_1A) { + if (exporter == null || !(exporter instanceof JRPdfExporter)) + exporter = new JRPdfExporter(); + parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); + exporter.setParameter(JRPdfExporterParameter.PDFA_CONFORMANCE, + JRPdfExporterParameter.PDFA_CONFORMANCE_1A); + exporter.setParameter(JRPdfExporterParameter.PDFA_ICC_PROFILE_PATH, + HttpUtil.decodeURL(this.getClass().getResource(getProfile()).getPath())); + } else if (exportType == EXPORT_TO_PDFA_1B) { + if (exporter == null || !(exporter instanceof JRPdfExporter)) + exporter = new JRPdfExporter(); + parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); + exporter.setParameter(JRPdfExporterParameter.PDFA_CONFORMANCE, + JRPdfExporterParameter.PDFA_CONFORMANCE_1B); + exporter.setParameter(JRPdfExporterParameter.PDFA_ICC_PROFILE_PATH, + HttpUtil.decodeURL(this.getClass().getResource(getProfile()).getPath())); + } else if (exportType == EXPORT_TO_DOC || exportType == EXPORT_TO_RTF) { + if (exporter == null || !(exporter instanceof JRRtfExporter)) + exporter = new JRRtfExporter(); + parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); + } else if (exportType == EXPORT_TO_DOCX) { + if (exporter == null || !(exporter instanceof JRDocxExporter)) + exporter = new JRDocxExporter(); + parameters.put("IS_IGNORE_PAGINATION", Boolean.FALSE); + } + // creazione file HTML + else if (exportType == EXPORT_TO_HTML || exportType == EXPORT_TO_HTM) { + if (exporter == null || !(exporter instanceof JRHtmlExporter)) + exporter = new JRHtmlExporter(); + String htmlHeader = "" + nomiReport + "" + + "" + + "" + "" + + ""; + String htmlFooter = ""; + parameters.put("IS_IGNORE_PAGINATION", Boolean.TRUE); + + if (exporter.getParameter(JRHtmlExporterParameter.HTML_HEADER) == null) + exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, htmlHeader); + if (exporter.getParameter(JRHtmlExporterParameter.HTML_FOOTER) == null) + exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, htmlFooter); + + } else if (exportType == EXPORT_TO_CSV) { + out.write(CSVDati.getCSVBytes(), 0, CSVDati.getCSVBytes().length); + } + + if (exportType != EXPORT_TO_CSV) { + if (CSVDati != null) { + datasource = getDataSource(CSVDati); + jp = CompileAndFillReport(nomeTemplate, parameters); + } else { + datasource = null; + jp = CompileAndFillReport(nomeTemplate, parameters); + } + if (exporter.getParameter(JRExporterParameter.JASPER_PRINT) == null) + exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp); + if (exporter.getParameter(JRExporterParameter.OUTPUT_STREAM) == null) + exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out); + + exporter.exportReport(); + } + out.flush(); + + } + + /** + * Funzione per il riempimento e la compilazione del template Jasper + * + * @param ds + * DataSource sorgente dati pu� essere nullo in tal caso si tiene + * conto solo di parameters + * @param nomeTeplate + * Template Jasper da usare + * @param parameters + * Parametri da passare al template + * @return JasperPrint + * @throws JRException + */ + private JasperPrint CompileAndFillReport(String nomeTeplate, HashMap parameters) + throws JRException { + + JasperDesign jd = null; + JasperReport jr = null; + JasperPrint jp = null; + if (classPath != null && !classPath.equals("")) + System.setProperty("jasper.reports.compile.class.path", classPath); + if (compileTempPath != null && !compileTempPath.equals("")) + System.setProperty("jasper.reports.compile.temp", compileTempPath); + try { + if (fileTemplate != null) { + jd = JRXmlLoader.load(fileTemplate); + } else { + jd = JRXmlLoader.load(templatePath + nomeTeplate + "." + templateExt); + } + jr = JasperCompileManager.compileReport(jd); + + if (datasource != null) + jp = JasperFillManager.fillReport(jr, parameters, datasource); + else if (con != null) + jp = JasperFillManager.fillReport(jr, parameters, con); + else + jp = JasperFillManager.fillReport(jr, parameters, new JREmptyDataSource()); + + } catch (JRException e) { + throw e; + } + return jp; + + } + + /** + * Funzione per settare il datasource del report. + * + * @param is + * inputstream dati csv + * @param cvsReport + * numero colonne del csv + * @return JRCsvDataSource + */ + private JRDataSource getDataSource(ReportInterface absReport) { + + return absReport.generaDataSource(); + } + + private String sistemaSlash(String path) { + + if (path.charAt(path.length() - 1) != '/' && path.charAt(path.length() - 1) != '\\') { + path += "/"; + } + return path; + } + + public JRExporter getExporter() { + + return exporter; + } + + public void setExporter(JRExporter exporter) { + + this.exporter = exporter; + } + + public void setProfile(String profile) { + + this.profile = profile; + } + + public String getProfile() { + + return profile; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.classpath b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.classpath index 20614503..9db89fb5 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.classpath +++ b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/.classpath @@ -1,6 +1,7 @@ - + + diff --git a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AttributesBuilder.java b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AttributesBuilder.java index 5436320b..60a5ea6f 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AttributesBuilder.java +++ b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AttributesBuilder.java @@ -19,139 +19,140 @@ import com.liferay.portal.kernel.util.Validator; public class AttributesBuilder { - private List _attributes = new ArrayList(); - private T _newBean; - private T _oldBean; - - public AttributesBuilder(T newBean, T oldBean) { - - _newBean = newBean; - _oldBean = oldBean; - } - - public void add(String name) { - - DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z", TimeZone.getTimeZone("UTC")); - Object newValueObj = BeanPropertiesUtil.getObject(_newBean, name); - Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name); - - String newValue = null; - String oldValue = null; - if (Validator.isNotNull(newValueObj)) { - newValue = newValueObj instanceof Date ? format.format(newValueObj) : newValueObj.toString(); - } - if (Validator.isNotNull(oldValueObj)) { - oldValue = oldValueObj instanceof Date ? format.format(oldValueObj) : oldValueObj.toString(); - } - if (!Validator.equals(newValue, oldValue)) { - Attribute attribute = new Attribute(name, newValue, oldValue); - - _attributes.add(attribute); - } - } - - public void addLocalized(String name) { - - DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z", TimeZone.getTimeZone("UTC")); - Object newValueObj = BeanPropertiesUtil.getObject(_newBean, name); - Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name); - - String newValue = null; - String oldValue = null; - if (Validator.isNotNull(newValueObj)) { - newValue = newValueObj instanceof Date ? format.format(newValueObj) : newValueObj.toString(); - } - if (Validator.isNotNull(oldValueObj)) { - oldValue = oldValueObj instanceof Date ? format.format(oldValueObj) : oldValueObj.toString(); - } - - if (!Validator.equals(newValue, oldValue)) { - boolean createAttribute = false; - - Map newValueMap = LocalizationUtil.getLocalizationMap(newValue); - Map oldValueMap = LocalizationUtil.getLocalizationMap(oldValue); - - if (Validator.isNull(newValueMap) && Validator.isNotNull(oldValueMap)) { - createAttribute = true; - } else if (Validator.isNotNull(newValueMap) && Validator.isNull(oldValueMap)) { - createAttribute = true; - } else if (newValueMap.keySet().size() != oldValueMap.keySet().size()) { - createAttribute = true; - } else { - for (Locale locale : newValueMap.keySet()) { - if (!oldValueMap.keySet().contains(locale)) { - createAttribute = true; - break; - } - - String newLocalizedValue = newValueMap.get(locale); - String oldLocalizedValue = oldValueMap.get(locale); - if (!Validator.equals(newLocalizedValue, oldLocalizedValue)) { - createAttribute = true; - break; - } - } - } - - if (createAttribute) { - Attribute attribute = new Attribute(name, newValue, oldValue); - _attributes.add(attribute); - } - } - } - - public JSONObject getAttributesJSON() { - - JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); - - for (Attribute attribute : _attributes) { - JSONObject attributeJSONObject = JSONFactoryUtil.createJSONObject(); - - attributeJSONObject.put("name", attribute.getName()); - attributeJSONObject.put("newValue", attribute.getNewValue()); - attributeJSONObject.put("oldValue", attribute.getOldValue()); - - jsonArray.put(attributeJSONObject); - } - - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); - jsonObject.put("attributes", jsonArray); - - return jsonObject; - } + private List _attributes = new ArrayList(); + private T _newBean; + private T _oldBean; + + public AttributesBuilder(T newBean, T oldBean) { + + _newBean = newBean; + _oldBean = oldBean; + } + + public void add(String name) { + + DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z", + TimeZone.getTimeZone("UTC")); + Object newValueObj = BeanPropertiesUtil.getObject(_newBean, name); + Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name); + + String newValue = null; + String oldValue = null; + if (Validator.isNotNull(newValueObj)) { + newValue = newValueObj instanceof Date ? format.format(newValueObj) : newValueObj.toString(); + } + if (Validator.isNotNull(oldValueObj)) { + oldValue = oldValueObj instanceof Date ? format.format(oldValueObj) : oldValueObj.toString(); + } + if (!Validator.equals(newValue, oldValue)) { + Attribute attribute = new Attribute(name, newValue, oldValue); + + _attributes.add(attribute); + } + } + + public void addLocalized(String name) { + + DateFormat format = DateFormatFactoryUtil.getSimpleDateFormat("yyyy/MM/dd HH:mm z", + TimeZone.getTimeZone("UTC")); + Object newValueObj = BeanPropertiesUtil.getObject(_newBean, name); + Object oldValueObj = BeanPropertiesUtil.getObject(_oldBean, name); + + String newValue = null; + String oldValue = null; + if (Validator.isNotNull(newValueObj)) { + newValue = newValueObj instanceof Date ? format.format(newValueObj) : newValueObj.toString(); + } + if (Validator.isNotNull(oldValueObj)) { + oldValue = oldValueObj instanceof Date ? format.format(oldValueObj) : oldValueObj.toString(); + } + + if (!Validator.equals(newValue, oldValue)) { + boolean createAttribute = false; + + Map newValueMap = LocalizationUtil.getLocalizationMap(newValue); + Map oldValueMap = LocalizationUtil.getLocalizationMap(oldValue); + + if (Validator.isNull(newValueMap) && Validator.isNotNull(oldValueMap)) { + createAttribute = true; + } else if (Validator.isNotNull(newValueMap) && Validator.isNull(oldValueMap)) { + createAttribute = true; + } else if (newValueMap.keySet().size() != oldValueMap.keySet().size()) { + createAttribute = true; + } else { + for (Locale locale : newValueMap.keySet()) { + if (!oldValueMap.keySet().contains(locale)) { + createAttribute = true; + break; + } + + String newLocalizedValue = newValueMap.get(locale); + String oldLocalizedValue = oldValueMap.get(locale); + if (!Validator.equals(newLocalizedValue, oldLocalizedValue)) { + createAttribute = true; + break; + } + } + } + + if (createAttribute) { + Attribute attribute = new Attribute(name, newValue, oldValue); + _attributes.add(attribute); + } + } + } + + public JSONObject getAttributesJSON() { + + JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); + + for (Attribute attribute : _attributes) { + JSONObject attributeJSONObject = JSONFactoryUtil.createJSONObject(); + + attributeJSONObject.put("name", attribute.getName()); + attributeJSONObject.put("newValue", attribute.getNewValue()); + attributeJSONObject.put("oldValue", attribute.getOldValue()); + + jsonArray.put(attributeJSONObject); + } + + JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); + jsonObject.put("attributes", jsonArray); + + return jsonObject; + } } - class Attribute { - private String _name; - private String _newValue; - private String _oldValue; + private String _name; + private String _newValue; + private String _oldValue; - public Attribute(String name) { + public Attribute(String name) { - this(name, StringPool.BLANK, StringPool.BLANK); - } + this(name, StringPool.BLANK, StringPool.BLANK); + } - public Attribute(String name, String newValue, String oldValue) { + public Attribute(String name, String newValue, String oldValue) { - _name = name; - _newValue = newValue; - _oldValue = oldValue; - } + _name = name; + _newValue = newValue; + _oldValue = oldValue; + } - public String getName() { + public String getName() { - return _name; - } + return _name; + } - public String getNewValue() { + public String getNewValue() { - return _newValue; - } + return _newValue; + } - public String getOldValue() { + public String getOldValue() { - return _oldValue; - } + return _oldValue; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditModelListener.java b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditModelListener.java index 2c3f7f16..b93940db 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditModelListener.java +++ b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditModelListener.java @@ -16,158 +16,165 @@ import com.liferay.portal.model.BaseModelListener; public abstract class AuditModelListener> extends BaseModelListener { - - @Override - public void onBeforeCreate(T model) throws ModelListenerException { - - routeAuditMessage(Constants.ADD.toUpperCase(), model, getMessage(model), null, false); - } - - @Override - public void onBeforeRemove(T model) throws ModelListenerException { - - routeAuditMessage(Constants.DELETE.toUpperCase(), model, getMessage(model), null, false); - } - - @Override - public void onBeforeUpdate(T newModel) throws ModelListenerException { - - try { - - T oldModel = getOldModel(newModel); - - JSONObject attributes = getModifiedAttributes(newModel, oldModel); - JSONArray array = attributes.getJSONArray("attributes"); - boolean isUpdate = true; - if (array != null) { - for (int i = 0; i < array.length(); i++) { - String name = array.getJSONObject(i).getString("name"); - String newValue = array.getJSONObject(i).getString("newValue"); - if (name.equalsIgnoreCase(getStatoAttributesName())) { - - routeAuditMessage(convertStatoToEventString(newValue), newModel, getMessage(newModel), attributes, true); - - if (array.length() == 1) { - isUpdate = false; - } - - } - attributes.remove(getStatoAttributesName()); - - } - } - if (isUpdate) { - boolean sended = - routeAuditMessage(Constants.UPDATE.toUpperCase(), newModel, getMessage(newModel), attributes, false); - if (sended) { - onBeforeRealUpdate(newModel, oldModel); - } - } - } catch (Exception e) { - throw new ModelListenerException(e); - } - } - - protected String convertStatoToEventString(String newValue) { - if ("1".equalsIgnoreCase(newValue) || "true".equalsIgnoreCase(newValue)) { - return Constants.ATTIVA.toUpperCase(); - } else { - return Constants.DISATTIVA.toUpperCase(); - } - } - - protected String getStatoAttributesName() { - return "valido"; - } - - protected String getStatoAttivaString() { - return "1"; - } - - protected abstract T getOldModel(T newModel) throws ModelListenerException; - - protected List getExcludedFields() { - List esclusioni = new ArrayList() { - { - add("modifiedDate"); - add("createDate"); - } - }; - return esclusioni; - } - - protected JSONObject getModifiedAttributes(T newRelazioniAnagrafiche, T oldRelazioniAnagrafiche) { - - AttributesBuilder attributesBuilder = new AttributesBuilder(newRelazioniAnagrafiche, oldRelazioniAnagrafiche); - - Map model = newRelazioniAnagrafiche.getModelAttributes(); - Iterator modelList = model.keySet().iterator(); - while (modelList.hasNext()) { - String name = (String) modelList.next(); - if (!getExcludedFields().contains(name)) { - attributesBuilder.add(name); - } - } - - return attributesBuilder.getAttributesJSON(); - } - - protected boolean routeAuditMessage(String eventAction, T model, String message, JSONObject additionalInfo, - boolean cambiostato) throws ModelListenerException { - String className = getClassName(model); - if (cambiostato) { - AuditUtil.doCambioStato(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, - getEventCategory(model), eventAction); - onBeforeCambioStato(model); - return true; - } else if (additionalInfo == null) { - AuditUtil.doLog(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, - getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model), - getRelatedClassName(model), getRelatedClassPk(model), getAdditionalInfoForLogEvent(eventAction, model)); - onBeforeLog(model); - return true; - } else { - return AuditUtil.doStorico(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, - getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model), - getRelatedClassName(model), getRelatedClassPk(model), additionalInfo, null); - } - - } - - protected JSONObject getAdditionalInfoForLogEvent(String eventAction, T model) { - - return null; - } - - protected void onBeforeRealUpdate(T newModel, T oldModel) throws ModelListenerException {} - - protected void onBeforeLog(T model) throws ModelListenerException {} - - protected void onBeforeCambioStato(T model) throws ModelListenerException {} - - protected Long getParentClassPk(T model) { - return 0l; - } - - protected String getParentClassName(T model) { - return StringPool.BLANK; - } - - protected Long getRelatedClassPk(T model) { - return 0l; - } - - protected String getRelatedClassName(T model) { - return StringPool.BLANK; - } - - protected String getMessage(T model) { - return StringPool.BLANK; - } - - protected abstract String getClassName(T model); - - protected abstract String getEventType(T model); - - protected abstract String getEventCategory(T model); + @Override + public void onBeforeCreate(T model) throws ModelListenerException { + + routeAuditMessage(Constants.ADD.toUpperCase(), model, getMessage(model), null, false); + } + + @Override + public void onBeforeRemove(T model) throws ModelListenerException { + + routeAuditMessage(Constants.DELETE.toUpperCase(), model, getMessage(model), null, false); + } + + @Override + public void onBeforeUpdate(T newModel) throws ModelListenerException { + + try { + + T oldModel = getOldModel(newModel); + + JSONObject attributes = getModifiedAttributes(newModel, oldModel); + JSONArray array = attributes.getJSONArray("attributes"); + boolean isUpdate = true; + if (array != null) { + for (int i = 0; i < array.length(); i++) { + String name = array.getJSONObject(i).getString("name"); + String newValue = array.getJSONObject(i).getString("newValue"); + if (name.equalsIgnoreCase(getStatoAttributesName())) { + + routeAuditMessage(convertStatoToEventString(newValue), newModel, + getMessage(newModel), attributes, true); + + if (array.length() == 1) { + isUpdate = false; + } + + } + attributes.remove(getStatoAttributesName()); + + } + } + if (isUpdate) { + boolean sended = routeAuditMessage(Constants.UPDATE.toUpperCase(), newModel, + getMessage(newModel), attributes, false); + if (sended) { + onBeforeRealUpdate(newModel, oldModel); + } + } + } catch (Exception e) { + throw new ModelListenerException(e); + } + } + + protected String convertStatoToEventString(String newValue) { + if ("1".equalsIgnoreCase(newValue) || "true".equalsIgnoreCase(newValue)) { + return Constants.ATTIVA.toUpperCase(); + } else { + return Constants.DISATTIVA.toUpperCase(); + } + } + + protected String getStatoAttributesName() { + return "valido"; + } + + protected String getStatoAttivaString() { + return "1"; + } + + protected abstract T getOldModel(T newModel) throws ModelListenerException; + + protected List getExcludedFields() { + @SuppressWarnings("serial") + List esclusioni = new ArrayList() { + { + add("modifiedDate"); + add("createDate"); + } + }; + return esclusioni; + } + + protected JSONObject getModifiedAttributes(T newRelazioniAnagrafiche, T oldRelazioniAnagrafiche) { + + AttributesBuilder attributesBuilder = new AttributesBuilder(newRelazioniAnagrafiche, + oldRelazioniAnagrafiche); + + Map model = newRelazioniAnagrafiche.getModelAttributes(); + Iterator modelList = model.keySet().iterator(); + while (modelList.hasNext()) { + String name = (String) modelList.next(); + if (!getExcludedFields().contains(name)) { + attributesBuilder.add(name); + } + } + + return attributesBuilder.getAttributesJSON(); + } + + protected boolean routeAuditMessage(String eventAction, T model, String message, + JSONObject additionalInfo, boolean cambiostato) throws ModelListenerException { + String className = getClassName(model); + if (cambiostato) { + AuditUtil.doCambioStato(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, + getEventCategory(model), eventAction); + onBeforeCambioStato(model); + return true; + } else if (additionalInfo == null) { + AuditUtil.doLog(getEventType(model), className, (Long) model.getPrimaryKeyObj(), message, + getEventCategory(model), eventAction, getParentClassName(model), getParentClassPk(model), + getRelatedClassName(model), getRelatedClassPk(model), + getAdditionalInfoForLogEvent(eventAction, model)); + onBeforeLog(model); + return true; + } else { + return AuditUtil.doStorico(getEventType(model), className, (Long) model.getPrimaryKeyObj(), + message, getEventCategory(model), eventAction, getParentClassName(model), + getParentClassPk(model), getRelatedClassName(model), getRelatedClassPk(model), + additionalInfo, null); + } + + } + + protected JSONObject getAdditionalInfoForLogEvent(String eventAction, T model) { + + return null; + } + + protected void onBeforeRealUpdate(T newModel, T oldModel) throws ModelListenerException { + } + + protected void onBeforeLog(T model) throws ModelListenerException { + } + + protected void onBeforeCambioStato(T model) throws ModelListenerException { + } + + protected Long getParentClassPk(T model) { + return 0l; + } + + protected String getParentClassName(T model) { + return StringPool.BLANK; + } + + protected Long getRelatedClassPk(T model) { + return 0l; + } + + protected String getRelatedClassName(T model) { + return StringPool.BLANK; + } + + protected String getMessage(T model) { + return StringPool.BLANK; + } + + protected abstract String getClassName(T model); + + protected abstract String getEventType(T model); + + protected abstract String getEventCategory(T model); } diff --git a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditUtil.java b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditUtil.java index 241c6de2..fde213f7 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditUtil.java +++ b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/AuditUtil.java @@ -16,99 +16,102 @@ import com.liferay.portal.util.PortalUtil; public class AuditUtil { - public static void doLog(String eventType, String className, long classPK) throws ModelListenerException { - - doLog(eventType, className, classPK, StringPool.BLANK); - } - - public static void doLog(String eventType, String className, long classPK, String message) - throws ModelListenerException { - - doLog(eventType, className, classPK, message, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK, 0l, - StringPool.BLANK, 0l, null); - } - - public static void doLog(String eventType, String className, long classPK, String message, String eventCategory, - String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, Long relatedClassPK, - JSONObject additionalInfo) throws ModelListenerException { - - doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_LOG, eventCategory, eventAction, - parentClassName, parentClassPK, relatedClassName, relatedClassPK, null, additionalInfo); - } - - public static boolean doStorico(String eventType, String className, long classPK, String message, - String eventCategory, String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, - Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) throws ModelListenerException { - if (diff != null && !diff.isNull("attributes") && diff.getJSONArray("attributes").length() > 0) { - doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_STORICO, eventCategory, eventAction, - parentClassName, parentClassPK, relatedClassName, relatedClassPK, diff, additionalInfo); - return true; - } else { - return false; - } - } - - public static void doCambioStato(String eventType, String className, long classPK, String message, - String eventCategory, String eventAction) throws ModelListenerException { - doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_CAMBIO_STATO, eventCategory, eventAction, - StringPool.BLANK, 0l, StringPool.BLANK, 0l, null, null); - - } - - private static void doAudit(String eventType, String className, long classPK, String message, String auditEventTable, - String eventCategory, String eventAction, String parentClassName, Long parentClassPK, String relatedClassName, - Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) throws ModelListenerException { - - try { - if (additionalInfo == null) - additionalInfo = JSONFactoryUtil.createJSONObject(); - - addIfNotNull(additionalInfo, AuditKey.FIELD_AUDIT_EVENT_TABLE, auditEventTable); - addIfNotNull(additionalInfo, AuditKey.FIELD_EVENT_CATEGORY, eventCategory); - addIfNotNull(additionalInfo, AuditKey.FIELD_EVENT_ACTION, eventAction); - addIfNotNull(additionalInfo, AuditKey.FIELD_PARENT_CLASS_NAME, parentClassName); - addIfNotNull(additionalInfo, AuditKey.FIELD_PARENT_CLASS_PK, parentClassPK); - addIfNotNull(additionalInfo, AuditKey.FIELD_RELATED_CLASS_NAME, relatedClassName); - addIfNotNull(additionalInfo, AuditKey.FIELD_RELATED_CLASS_PK, relatedClassPK); - if (diff != null) { - additionalInfo.put(AuditKey.FIELD_DIFF, diff); - } - - long companyId = CompanyThreadLocal.getCompanyId(); - - long userId = 0; - if (PrincipalThreadLocal.getName() != null) { - userId = GetterUtil.getLong(PrincipalThreadLocal.getName()); - } - - AuditRequestThreadLocal auditRequestThreadLocal = AuditRequestThreadLocal.getAuditThreadLocal(); - long realUserId = auditRequestThreadLocal.getRealUserId(); - String realUserName = PortalUtil.getUserName(realUserId, StringPool.BLANK); - - if ((realUserId > 0) && (userId != realUserId)) { - additionalInfo.put("doAsUserId", String.valueOf(userId)); - additionalInfo.put("doAsUserName", PortalUtil.getUserName(userId, StringPool.BLANK)); - } - - AuditMessage auditMessage = - new AuditMessage(eventType, companyId, realUserId, realUserName, className, String.valueOf(classPK), message, - additionalInfo); - - AuditRouterUtil.route(auditMessage); - } catch (PortalException e) { - throw new ModelListenerException(e); - } - } - - private static void addIfNotNull(JSONObject additionalInfo, String key, String value) { - if (Validator.isNotNull(value)) { - additionalInfo.put(key, value); - } - } - - private static void addIfNotNull(JSONObject additionalInfo, String key, Long value) { - if (Validator.isNotNull(value)) { - additionalInfo.put(key, value); - } - } + public static void doLog(String eventType, String className, long classPK) throws ModelListenerException { + + doLog(eventType, className, classPK, StringPool.BLANK); + } + + public static void doLog(String eventType, String className, long classPK, String message) + throws ModelListenerException { + + doLog(eventType, className, classPK, message, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK, + 0l, StringPool.BLANK, 0l, null); + } + + public static void doLog(String eventType, String className, long classPK, String message, + String eventCategory, String eventAction, String parentClassName, Long parentClassPK, + String relatedClassName, Long relatedClassPK, JSONObject additionalInfo) + throws ModelListenerException { + + doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_LOG, eventCategory, eventAction, + parentClassName, parentClassPK, relatedClassName, relatedClassPK, null, additionalInfo); + } + + public static boolean doStorico(String eventType, String className, long classPK, String message, + String eventCategory, String eventAction, String parentClassName, Long parentClassPK, + String relatedClassName, Long relatedClassPK, JSONObject diff, JSONObject additionalInfo) + throws ModelListenerException { + if (diff != null && !diff.isNull("attributes") && diff.getJSONArray("attributes").length() > 0) { + doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_STORICO, eventCategory, + eventAction, parentClassName, parentClassPK, relatedClassName, relatedClassPK, diff, + additionalInfo); + return true; + } else { + return false; + } + } + + public static void doCambioStato(String eventType, String className, long classPK, String message, + String eventCategory, String eventAction) throws ModelListenerException { + doAudit(eventType, className, classPK, message, AuditKey.EVENT_TABLE_CAMBIO_STATO, eventCategory, + eventAction, StringPool.BLANK, 0l, StringPool.BLANK, 0l, null, null); + + } + + private static void doAudit(String eventType, String className, long classPK, String message, + String auditEventTable, String eventCategory, String eventAction, String parentClassName, + Long parentClassPK, String relatedClassName, Long relatedClassPK, JSONObject diff, + JSONObject additionalInfo) throws ModelListenerException { + + try { + if (additionalInfo == null) + additionalInfo = JSONFactoryUtil.createJSONObject(); + + addIfNotNull(additionalInfo, AuditKey.FIELD_AUDIT_EVENT_TABLE, auditEventTable); + addIfNotNull(additionalInfo, AuditKey.FIELD_EVENT_CATEGORY, eventCategory); + addIfNotNull(additionalInfo, AuditKey.FIELD_EVENT_ACTION, eventAction); + addIfNotNull(additionalInfo, AuditKey.FIELD_PARENT_CLASS_NAME, parentClassName); + addIfNotNull(additionalInfo, AuditKey.FIELD_PARENT_CLASS_PK, parentClassPK); + addIfNotNull(additionalInfo, AuditKey.FIELD_RELATED_CLASS_NAME, relatedClassName); + addIfNotNull(additionalInfo, AuditKey.FIELD_RELATED_CLASS_PK, relatedClassPK); + if (diff != null) { + additionalInfo.put(AuditKey.FIELD_DIFF, diff); + } + + long companyId = CompanyThreadLocal.getCompanyId(); + + long userId = 0; + if (PrincipalThreadLocal.getName() != null) { + userId = GetterUtil.getLong(PrincipalThreadLocal.getName()); + } + + AuditRequestThreadLocal auditRequestThreadLocal = AuditRequestThreadLocal.getAuditThreadLocal(); + long realUserId = auditRequestThreadLocal.getRealUserId(); + String realUserName = PortalUtil.getUserName(realUserId, StringPool.BLANK); + + if ((realUserId > 0) && (userId != realUserId)) { + additionalInfo.put("doAsUserId", String.valueOf(userId)); + additionalInfo.put("doAsUserName", PortalUtil.getUserName(userId, StringPool.BLANK)); + } + + AuditMessage auditMessage = new AuditMessage(eventType, companyId, realUserId, realUserName, + className, String.valueOf(classPK), message, additionalInfo); + + AuditRouterUtil.route(auditMessage); + } catch (PortalException e) { + throw new ModelListenerException(e); + } + } + + private static void addIfNotNull(JSONObject additionalInfo, String key, String value) { + if (Validator.isNotNull(value)) { + additionalInfo.put(key, value); + } + } + + private static void addIfNotNull(JSONObject additionalInfo, String key, Long value) { + if (Validator.isNotNull(value)) { + additionalInfo.put(key, value); + } + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/permission/HistoryPermission.java b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/permission/HistoryPermission.java index 63671cac..cca32903 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/permission/HistoryPermission.java +++ b/liferay-plugins-sdk-6.2/shared/portos-audit-shared/src/it/tref/liferay/portos/audit/shared/permission/HistoryPermission.java @@ -9,25 +9,25 @@ import com.liferay.portal.security.permission.PermissionChecker; public class HistoryPermission { - public static final String RESOURCE_NAME = "it.tref.liferay.portos.audit.history"; + public static final String RESOURCE_NAME = "it.tref.liferay.portos.audit.history"; - public static void check(PermissionChecker permissionChecker, long groupId, String actionId) throws PortalException { + public static void check(PermissionChecker permissionChecker, long groupId, String actionId) + throws PortalException { - if (!contains(permissionChecker, groupId, actionId)) { - throw new PrincipalException(); - } - } + if (!contains(permissionChecker, groupId, actionId)) { + throw new PrincipalException(); + } + } - public static boolean contains(PermissionChecker permissionChecker, long groupId, String actionId) { + public static boolean contains(PermissionChecker permissionChecker, long groupId, String actionId) { - Boolean hasPermission = - StagingPermissionUtil.hasPermission(permissionChecker, groupId, RESOURCE_NAME, groupId, - PortletKeys.AUDIT_DETAIL, actionId); + Boolean hasPermission = StagingPermissionUtil.hasPermission(permissionChecker, groupId, + RESOURCE_NAME, groupId, PortletKeys.AUDIT_DETAIL, actionId); - if (hasPermission != null) { - return hasPermission.booleanValue(); - } + if (hasPermission != null) { + return hasPermission.booleanValue(); + } - return permissionChecker.hasPermission(groupId, RESOURCE_NAME, groupId, actionId); - } + return permissionChecker.hasPermission(groupId, RESOURCE_NAME, groupId, actionId); + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.classpath b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.classpath index 504c4212..b079ea96 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.classpath +++ b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.classpath @@ -2,5 +2,5 @@ - + diff --git a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.gitignore b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.gitignore index 163dddc4..840e7d31 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.gitignore +++ b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/.gitignore @@ -1,2 +1 @@ /classes/ -/bin/ diff --git a/liferay-plugins-sdk-6.2/shared/portos-log-shared/build.xml b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/build.xml similarity index 63% rename from liferay-plugins-sdk-6.2/shared/portos-log-shared/build.xml rename to liferay-plugins-sdk-6.2/shared/portos-firma-shared/build.xml index 184b9b96..9c2b94ef 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-log-shared/build.xml +++ b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/build.xml @@ -1,8 +1,8 @@ - + - \ No newline at end of file + diff --git a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RestFile.java b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RestFile.java index d09f4f45..3eaf6db9 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RestFile.java +++ b/liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RestFile.java @@ -14,29 +14,29 @@ public class RestFile implements Serializable { private String file; public RestFile() { - this.idFile = Integer.valueOf(-1); - this.dataInvio = new Date(); - this.nomeFile = ""; - this.documentiType = ""; - this.tipoPratica = ""; - setFile(""); + idFile = -1; + nomeFile = ""; + dataInvio = new Date(); + documentiType = ""; + tipoPratica = ""; + file = ""; } public String toString() { StringBuilder sb = new StringBuilder(); - if (this.idFile != null) { + if (idFile != null) { sb.append("Id = "); - sb.append(this.idFile); + sb.append(idFile); sb.append(" "); } - if (this.documentiType != null) { + if (documentiType != null) { sb.append("Documenti type = "); - sb.append(this.documentiType); + sb.append(documentiType); sb.append(" "); } - if (this.tipoPratica != null) { + if (tipoPratica != null) { sb.append("Tipo pratica= "); - sb.append(this.tipoPratica); + sb.append(tipoPratica); sb.append(" "); } return sb.toString(); diff --git a/liferay-plugins-sdk-6.2/shared/portos-report-shared/.classpath b/liferay-plugins-sdk-6.2/shared/portos-report-shared/.classpath index 4efd3e26..e2b82b00 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-report-shared/.classpath +++ b/liferay-plugins-sdk-6.2/shared/portos-report-shared/.classpath @@ -5,7 +5,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportDto.java b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportDto.java index 51904e97..f266ca22 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportDto.java +++ b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportDto.java @@ -8,179 +8,179 @@ import java.util.Map; public class ReportDto { - private String type; - private long folderId; - private long[] fileEntryIds; - private String fileName; - private String[] css; - private String portalURL; - private boolean showNumberOfPage; - private Object dataSource; - private Map parameters; - private String header; - private int headerHeight; - private String footer; - private int footerHeight; + private String type; + private long folderId; + private long[] fileEntryIds; + private String fileName; + private String[] css; + private String portalURL; + private boolean showNumberOfPage; + private Object dataSource; + private Map parameters; + private String header; + private int headerHeight; + private String footer; + private int footerHeight; - public ReportDto() { + public ReportDto() { - } + } - public ReportDto(String type, long folderId, long[] fileEntryIds, String fileName, String[] css, String portalURL, - boolean showNumberOfPage, Object dataSource, Map parameters, String header, int headerHeight, - String footer, int footerHeight) { + public ReportDto(String type, long folderId, long[] fileEntryIds, String fileName, String[] css, + String portalURL, boolean showNumberOfPage, Object dataSource, Map parameters, + String header, int headerHeight, String footer, int footerHeight) { - this(); - this.type = type; - this.folderId = folderId; - this.fileEntryIds = fileEntryIds; - this.fileName = fileName; - this.css = css; - this.portalURL = portalURL; - this.showNumberOfPage = showNumberOfPage; - this.dataSource = dataSource; - this.parameters = parameters; - this.header = header; - this.headerHeight = headerHeight; - this.footer = footer; - this.footerHeight = footerHeight; - } + this(); + this.type = type; + this.folderId = folderId; + this.fileEntryIds = fileEntryIds; + this.fileName = fileName; + this.css = css; + this.portalURL = portalURL; + this.showNumberOfPage = showNumberOfPage; + this.dataSource = dataSource; + this.parameters = parameters; + this.header = header; + this.headerHeight = headerHeight; + this.footer = footer; + this.footerHeight = footerHeight; + } - public String getType() { + public String getType() { - return type; - } + return type; + } - public void setType(String type) { + public void setType(String type) { - this.type = type; - } + this.type = type; + } - public long getFolderId() { + public long getFolderId() { - return folderId; - } + return folderId; + } - public void setFolderId(long folderId) { + public void setFolderId(long folderId) { - this.folderId = folderId; - } + this.folderId = folderId; + } - public long[] getFileEntryIds() { + public long[] getFileEntryIds() { - return fileEntryIds; - } + return fileEntryIds; + } - public void setFileEntryIds(long[] fileEntryIds) { + public void setFileEntryIds(long[] fileEntryIds) { - this.fileEntryIds = fileEntryIds; - } + this.fileEntryIds = fileEntryIds; + } - public String getFileName() { + public String getFileName() { - return fileName; - } + return fileName; + } - public void setFileName(String fileName) { + public void setFileName(String fileName) { - this.fileName = fileName; - } + this.fileName = fileName; + } - public String[] getCss() { + public String[] getCss() { - return css; - } + return css; + } - public void setCss(String[] css) { + public void setCss(String[] css) { - this.css = css; - } + this.css = css; + } - public String getPortalURL() { + public String getPortalURL() { - return portalURL; - } + return portalURL; + } - public void setPortalURL(String portalURL) { + public void setPortalURL(String portalURL) { - this.portalURL = portalURL; - } + this.portalURL = portalURL; + } - public boolean isShowNumberOfPage() { + public boolean isShowNumberOfPage() { - return showNumberOfPage; - } + return showNumberOfPage; + } - public void setShowNumberOfPage(boolean showNumberOfPage) { + public void setShowNumberOfPage(boolean showNumberOfPage) { - this.showNumberOfPage = showNumberOfPage; - } + this.showNumberOfPage = showNumberOfPage; + } - /* - * public Object getDataSource() { - * - * return dataSource; } - * - * public void setDataSource(Object dataSource) { - * - * this.dataSource = dataSource; } - */ - public Map getParameters() { + /* + * public Object getDataSource() { + * + * return dataSource; } + * + * public void setDataSource(Object dataSource) { + * + * this.dataSource = dataSource; } + */ + public Map getParameters() { - return parameters; - } + return parameters; + } - public void setParameters(Map parameters) { + public void setParameters(Map parameters) { - this.parameters = parameters; - } + this.parameters = parameters; + } - public String getHeader() { + public String getHeader() { - return header; - } + return header; + } - public void setHeader(String header) { + public void setHeader(String header) { - this.header = header; - } + this.header = header; + } - public String getFooter() { + public String getFooter() { - return footer; - } + return footer; + } - public void setFooter(String footer) { + public void setFooter(String footer) { - this.footer = footer; - } + this.footer = footer; + } - public int getHeaderHeight() { + public int getHeaderHeight() { - return headerHeight; - } + return headerHeight; + } - public void setHeaderHeight(int headerHeight) { + public void setHeaderHeight(int headerHeight) { - this.headerHeight = headerHeight; - } + this.headerHeight = headerHeight; + } - public int getFooterHeight() { + public int getFooterHeight() { - return footerHeight; - } + return footerHeight; + } - public void setFooterHeight(int footerHeight) { + public void setFooterHeight(int footerHeight) { - this.footerHeight = footerHeight; - } + this.footerHeight = footerHeight; + } - public ReportType getReportType() { + public ReportType getReportType() { - if (Validator.isNotNull(getType())) { - return ReportType.valueOf(getType()); - } + if (Validator.isNotNull(getType())) { + return ReportType.valueOf(getType()); + } - return null; - } + return null; + } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportResultDto.java b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportResultDto.java index aeaccb03..b02404ee 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportResultDto.java +++ b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/dto/ReportResultDto.java @@ -1,4 +1,3 @@ - package it.tref.liferay.portos.report.shared.dto; import com.liferay.portal.kernel.util.Validator; @@ -20,9 +19,7 @@ public class ReportResultDto implements Serializable { } - public ReportResultDto( - long reportTaskId, long[] fileEntryIds, String result, - String resultMessage) { + public ReportResultDto(long reportTaskId, long[] fileEntryIds, String result, String resultMessage) { this(); this.reportTaskId = reportTaskId; diff --git a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/PdfUtil.java b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/PdfUtil.java index 0ae9dc68..7680eea0 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/PdfUtil.java +++ b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/PdfUtil.java @@ -1,4 +1,3 @@ - package it.tref.liferay.portos.report.shared.util; import com.itextpdf.text.Document; @@ -71,9 +70,7 @@ public class PdfUtil { while (pageOfCurrentReaderPDF < pdfReader.getNumberOfPages()) { document.newPage(); pageOfCurrentReaderPDF++; - page = - writer.getImportedPage( - pdfReader, pageOfCurrentReaderPDF); + page = writer.getImportedPage(pdfReader, pageOfCurrentReaderPDF); cb.addTemplate(page, 0, 0); } pageOfCurrentReaderPDF = 0; @@ -88,20 +85,17 @@ public class PdfUtil { outputStream.close(); return outputStream.toByteArray(); - } - catch (Exception e) { + } catch (Exception e) { _log.error("Errore", e); return null; - } - finally { + } finally { if (document.isOpen()) { document.close(); } } } - public static byte[] mergePdf(List reports, boolean showNumberOfPage) - throws Exception { + public static byte[] mergePdf(List reports, boolean showNumberOfPage) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -111,8 +105,7 @@ public class PdfUtil { document.open(); - List> outlines = - new ArrayList>(); + List> outlines = new ArrayList>(); int totalPage = 0; for (byte[] report : reports) { @@ -133,18 +126,14 @@ public class PdfUtil { curentPageNumber++; - PdfImportedPage pdfImportedPage = - pdfCopy.getImportedPage(pdfReader, ++page); + PdfImportedPage pdfImportedPage = pdfCopy.getImportedPage(pdfReader, ++page); PageStamp stamp = pdfCopy.createPageStamp(pdfImportedPage); if (showNumberOfPage) { // add page numbers - ColumnText.showTextAligned( - stamp.getUnderContent(), - Element.ALIGN_CENTER, - new Phrase(String.format( - "%d / %d", curentPageNumber, totalPage)), - pdfImportedPage.getHeight() / 2, 20, 0); + ColumnText.showTextAligned(stamp.getUnderContent(), Element.ALIGN_CENTER, new Phrase( + String.format("%d / %d", curentPageNumber, totalPage)), pdfImportedPage + .getHeight() / 2, 20, 0); } stamp.alterContents(); @@ -166,8 +155,7 @@ public class PdfUtil { protected ElementList header; protected ElementList footer; - public HeaderFooter(String headerHtml, String footerHtml) - throws IOException { + public HeaderFooter(String headerHtml, String footerHtml) throws IOException { if (Validator.isNotNull(headerHtml)) { header = XMLWorkerHelper.parseToElementList(headerHtml, null); @@ -199,8 +187,7 @@ public class PdfUtil { } ct.go(); } - } - catch (DocumentException de) { + } catch (DocumentException de) { throw new ExceptionConverter(de); } } diff --git a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/VelocityUtil.java b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/VelocityUtil.java index 3639ab23..1d284439 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/VelocityUtil.java +++ b/liferay-plugins-sdk-6.2/shared/portos-report-shared/src/it/tref/liferay/portos/report/shared/util/VelocityUtil.java @@ -28,41 +28,41 @@ import org.apache.velocity.runtime.RuntimeConstants; */ public class VelocityUtil { - public static String evaluate(String input) throws Exception { + public static String evaluate(String input) throws Exception { - return evaluate(input, null); - } + return evaluate(input, null); + } - public static String evaluate(String input, Map variables) throws Exception { + public static String evaluate(String input, Map variables) throws Exception { - VelocityEngine velocityEngine = new VelocityEngine(); + VelocityEngine velocityEngine = new VelocityEngine(); - velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, - com.liferay.portal.kernel.util.PropsUtil.get(PropsKeys.VELOCITY_ENGINE_LOGGER)); + velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, + com.liferay.portal.kernel.util.PropsUtil.get(PropsKeys.VELOCITY_ENGINE_LOGGER)); - velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM + ".log4j.category", - com.liferay.portal.kernel.util.PropsUtil.get(PropsKeys.VELOCITY_ENGINE_LOGGER_CATEGORY)); + velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM + ".log4j.category", + com.liferay.portal.kernel.util.PropsUtil.get(PropsKeys.VELOCITY_ENGINE_LOGGER_CATEGORY)); - velocityEngine.init(); + velocityEngine.init(); - VelocityContext velocityContext = new VelocityContext(); + VelocityContext velocityContext = new VelocityContext(); - if (variables != null) { - for (Map.Entry entry : variables.entrySet()) { - String key = entry.getKey(); - Object value = entry.getValue(); + if (variables != null) { + for (Map.Entry entry : variables.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); - if (Validator.isNotNull(key)) { - velocityContext.put(key, value); - } - } - } + if (Validator.isNotNull(key)) { + velocityContext.put(key, value); + } + } + } - UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter(); + UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter(); - velocityEngine.evaluate(velocityContext, unsyncStringWriter, VelocityUtil.class.getName(), input); + velocityEngine.evaluate(velocityContext, unsyncStringWriter, VelocityUtil.class.getName(), input); - return unsyncStringWriter.toString(); - } + return unsyncStringWriter.toString(); + } } diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/.classpath b/liferay-plugins-sdk-6.2/webs/elasticray-web/.classpath index 089238a7..31fed00b 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/.classpath +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/.classpath @@ -1,7 +1,7 @@ - + diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactory.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactory.java index 8ff93d5b..0f1e7a7e 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactory.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactory.java @@ -18,9 +18,6 @@ package com.rknowsys.portal.search.elastic.client; import org.elasticsearch.client.Client; -/** - * //TODO Comment goes here - */ public interface ClientFactory { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactoryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactoryImpl.java index f602e0e5..0f9a5629 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactoryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/client/ClientFactoryImpl.java @@ -40,9 +40,6 @@ import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.GetterUtil; import com.liferay.portal.kernel.util.PropsUtil; -/** - * //TODO Comment goes here - */ public class ClientFactoryImpl implements ClientFactory { private static final Log _log = LogFactoryUtil.getLog(ClientFactoryImpl.class); @@ -76,9 +73,6 @@ public class ClientFactoryImpl implements ClientFactory { } TransportAddress[] tas = transportAddresses.toArray(new TransportAddress[transportAddresses.size()]); - // TODO Validate this code change - //Settings settings = ImmutableSettings.settingsBuilder().classLoader(ClientFactoryImpl.class.getClassLoader()). - // put(properties).build(); Settings settings = Settings.settingsBuilder().put(properties).build(); diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/ElasticTermCollector.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/ElasticTermCollector.java index 09694186..4c7d1288 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/ElasticTermCollector.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/ElasticTermCollector.java @@ -17,9 +17,6 @@ package com.rknowsys.portal.search.elastic.facet; import com.liferay.portal.kernel.search.facet.collector.TermCollector; -/** - * //TODO Comment goes here - */ public class ElasticTermCollector implements TermCollector { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/LiferayFacetParser.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/LiferayFacetParser.java index e8242842..a40b3c6e 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/LiferayFacetParser.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/facet/LiferayFacetParser.java @@ -34,9 +34,6 @@ import com.liferay.portal.kernel.search.facet.RangeFacet; import com.liferay.portal.kernel.search.facet.config.FacetConfiguration; import com.liferay.portal.kernel.search.facet.util.RangeParserUtil; -/** - * //TODO Comment goes here - */ public class LiferayFacetParser { private static final Log _log = LogFactoryUtil.getLog(LiferayFacetParser.class); diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseFactoryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseFactoryImpl.java index 25855611..fcbe6205 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseFactoryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseFactoryImpl.java @@ -15,26 +15,23 @@ import com.liferay.portal.kernel.search.SearchEngine; import com.liferay.portal.kernel.search.SearchEngineUtil; import com.liferay.portal.kernel.search.TermQueryFactory; -/** - * //TODO Comment goes here - */ public class BooleanClauseFactoryImpl implements BooleanClauseFactory { - public static final String svnRevision = "$Id$"; + public static final String svnRevision = "$Id$"; - @Override - public BooleanClause create(SearchContext searchContext, Query query, String occur) { - BooleanClauseOccur booleanClauseOccur = new BooleanClauseOccurImpl(occur); - return new BooleanClauseImpl(query, booleanClauseOccur); - } + @Override + public BooleanClause create(SearchContext searchContext, Query query, String occur) { + BooleanClauseOccur booleanClauseOccur = new BooleanClauseOccurImpl(occur); + return new BooleanClauseImpl(query, booleanClauseOccur); + } - @Override - public BooleanClause create(SearchContext searchContext, String field, String value, String occur) { - String searchEngineId = searchContext.getSearchEngineId(); - SearchEngine searchEngine = SearchEngineUtil.getSearchEngine(searchEngineId); - TermQueryFactory termQueryFactory = searchEngine.getTermQueryFactory(); - Query query = termQueryFactory.create(field, value); - BooleanClauseOccur booleanClauseOccur = new BooleanClauseOccurImpl(occur); - return new BooleanClauseImpl(query, booleanClauseOccur); - } + @Override + public BooleanClause create(SearchContext searchContext, String field, String value, String occur) { + String searchEngineId = searchContext.getSearchEngineId(); + SearchEngine searchEngine = SearchEngineUtil.getSearchEngine(searchEngineId); + TermQueryFactory termQueryFactory = searchEngine.getTermQueryFactory(); + Query query = termQueryFactory.create(field, value); + BooleanClauseOccur booleanClauseOccur = new BooleanClauseOccurImpl(occur); + return new BooleanClauseImpl(query, booleanClauseOccur); + } } diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseImpl.java index 4d95af77..d687a63b 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseImpl.java @@ -10,9 +10,6 @@ import com.liferay.portal.kernel.search.BooleanClause; import com.liferay.portal.kernel.search.BooleanClauseOccur; import com.liferay.portal.kernel.search.Query; -/** - * //TODO Comment goes here - */ public class BooleanClauseImpl implements BooleanClause { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseOccurImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseOccurImpl.java index bb518c85..56ba1acb 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseOccurImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanClauseOccurImpl.java @@ -8,9 +8,6 @@ package com.rknowsys.portal.search.elastic.liferay; import com.liferay.portal.kernel.search.BooleanClauseOccur; -/** - * //TODO Comment goes here - */ public class BooleanClauseOccurImpl implements BooleanClauseOccur { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryFactoryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryFactoryImpl.java index 1370d519..2f0b4464 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryFactoryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryFactoryImpl.java @@ -9,9 +9,6 @@ package com.rknowsys.portal.search.elastic.liferay; import com.liferay.portal.kernel.search.BooleanQuery; import com.liferay.portal.kernel.search.BooleanQueryFactory; -/** - * //TODO Comment goes here - */ public class BooleanQueryFactoryImpl implements BooleanQueryFactory { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryImpl.java index 61ffa4e1..e2d11328 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/BooleanQueryImpl.java @@ -27,9 +27,6 @@ import com.liferay.portal.kernel.search.Query; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringUtil; -/** - * //TODO Comment goes here - */ public class BooleanQueryImpl extends QueryImpl implements BooleanQuery { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryImpl.java index 7729b82f..13bcc301 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryImpl.java @@ -9,9 +9,6 @@ package com.rknowsys.portal.search.elastic.liferay; import com.liferay.portal.kernel.search.Query; import com.liferay.portal.kernel.search.QueryConfig; -/** - * //TODO Comment goes here - */ public abstract class QueryImpl implements Query { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTermImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTermImpl.java index 962666eb..62a0845b 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTermImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTermImpl.java @@ -8,9 +8,6 @@ package com.rknowsys.portal.search.elastic.liferay; import com.liferay.portal.kernel.search.QueryTerm; -/** - * //TODO Comment goes here - */ public class QueryTermImpl implements QueryTerm { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTranslatorUtil.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTranslatorUtil.java index b68b8a9d..790463c5 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTranslatorUtil.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/QueryTranslatorUtil.java @@ -10,9 +10,6 @@ import org.elasticsearch.index.query.QueryBuilder; import com.liferay.portal.kernel.search.Query; -/** - * //TODO Comment goes here - */ public class QueryTranslatorUtil { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryFactoryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryFactoryImpl.java index 0a7bbeb3..98a24d08 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryFactoryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryFactoryImpl.java @@ -9,9 +9,6 @@ package com.rknowsys.portal.search.elastic.liferay; import com.liferay.portal.kernel.search.TermQuery; import com.liferay.portal.kernel.search.TermQueryFactory; -/** - * //TODO Comment goes here - */ public class TermQueryFactoryImpl implements TermQueryFactory { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryImpl.java index 2b045add..25067257 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermQueryImpl.java @@ -12,9 +12,6 @@ import org.elasticsearch.index.query.TermQueryBuilder; import com.liferay.portal.kernel.search.QueryTerm; import com.liferay.portal.kernel.search.TermQuery; -/** - * //TODO Comment goes here - */ public class TermQueryImpl extends QueryImpl implements TermQuery { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryFactoryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryFactoryImpl.java index 8409f75b..ee0a60af 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryFactoryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryFactoryImpl.java @@ -9,9 +9,6 @@ package com.rknowsys.portal.search.elastic.liferay; import com.liferay.portal.kernel.search.TermRangeQuery; import com.liferay.portal.kernel.search.TermRangeQueryFactory; -/** - * //TODO Comment goes here - */ public class TermRangeQueryFactoryImpl implements TermRangeQueryFactory { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryImpl.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryImpl.java index 88319d84..0c233c6c 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryImpl.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/TermRangeQueryImpl.java @@ -11,9 +11,6 @@ import org.elasticsearch.index.query.RangeQueryBuilder; import com.liferay.portal.kernel.search.TermRangeQuery; -/** - * //TODO Comment goes here - */ public class TermRangeQueryImpl extends QueryImpl implements TermRangeQuery { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/WildcardSearchFields.java b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/WildcardSearchFields.java index 3e99faaf..9dae6f25 100644 --- a/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/WildcardSearchFields.java +++ b/liferay-plugins-sdk-6.2/webs/elasticray-web/docroot/WEB-INF/src/com/rknowsys/portal/search/elastic/liferay/WildcardSearchFields.java @@ -8,9 +8,6 @@ package com.rknowsys.portal.search.elastic.liferay; import java.util.regex.Pattern; -/** - * //TODO Comment goes here - */ public class WildcardSearchFields { public static final String svnRevision = "$Id$"; diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath index bbfce019..6ee26b4f 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/.classpath @@ -1,7 +1,7 @@ - + @@ -17,5 +17,10 @@ + + + + + diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/build.xml b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/build.xml index 6f46faf6..62e4e759 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/build.xml +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/build.xml @@ -2,10 +2,7 @@ - - + - - - + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-java.jar b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/util-java.jar similarity index 100% rename from liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-java.jar rename to liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/lib/util-java.jar