[openmeetings] branch master updated: [OPENMEETINGS-2675] libraries, code clean-up
This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git The following commit(s) were added to refs/heads/master by this push: new 7a94848 [OPENMEETINGS-2675] libraries, code clean-up 7a94848 is described below commit 7a94848eb4d7e81378dd42ab16fa3004d01c5827 Author: Maxim Solodovnik AuthorDate: Thu Dec 23 22:34:22 2021 +0700 [OPENMEETINGS-2675] libraries, code clean-up --- openmeetings-core/pom.xml | 4 - .../apache/openmeetings/core/mail/MailHandler.java | 30 +-- .../openmeetings/core/mail/TestMailSending.java| 10 +- openmeetings-install/pom.xml | 6 + openmeetings-server/pom.xml| 2 +- .../calendar/caldav/AppointmentManager.java| 7 - .../service/calendar/caldav/IcalUtils.java | 258 + .../service/room/InvitationManager.java| 8 +- openmeetings-util/pom.xml | 6 +- .../util/mail/ByteArrayDataSource.java | 2 +- .../apache/openmeetings/util/mail/IcalHandler.java | 99 .../src/main/resources/ical4j.properties | 21 ++ openmeetings-web/pom.xml | 14 +- .../web/util/logging/TomcatGenericExports.java | 12 +- .../org/apache/openmeetings/backup/TestExport.java | 2 +- .../openmeetings/calendar/TestSendIcalMessage.java | 30 ++- .../openmeetings/invitiation/TestInvitation.java | 2 +- .../openmeetings/service/scheduler/TestJob.java| 2 +- .../org/apache/openmeetings/util/TestDateTime.java | 2 +- .../web/app/TestApplicationMocked.java | 4 +- .../openmeetings/web/pages/TestHashPage.java | 2 +- .../openmeetings/webservice/TestFileService.java | 2 +- pom.xml| 56 ++--- 23 files changed, 286 insertions(+), 295 deletions(-) diff --git a/openmeetings-core/pom.xml b/openmeetings-core/pom.xml index 145b416..3cabb9d 100644 --- a/openmeetings-core/pom.xml +++ b/openmeetings-core/pom.xml @@ -82,10 +82,6 @@ api-all - com.sun.mail - javax.mail - - org.jodconverter jodconverter-local diff --git a/openmeetings-core/src/main/java/org/apache/openmeetings/core/mail/MailHandler.java b/openmeetings-core/src/main/java/org/apache/openmeetings/core/mail/MailHandler.java index 5e42772..445d1a6 100644 --- a/openmeetings-core/src/main/java/org/apache/openmeetings/core/mail/MailHandler.java +++ b/openmeetings-core/src/main/java/org/apache/openmeetings/core/mail/MailHandler.java @@ -40,24 +40,10 @@ import java.util.Date; import java.util.List; import java.util.Properties; -import javax.activation.DataHandler; -import javax.mail.Authenticator; -import javax.mail.BodyPart; -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Multipart; -import javax.mail.PasswordAuthentication; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeBodyPart; -import javax.mail.internet.MimeMessage; -import javax.mail.internet.MimeMultipart; -import javax.mail.util.ByteArrayDataSource; - import org.apache.openmeetings.db.dao.basic.MailMessageDao; import org.apache.openmeetings.db.entity.basic.MailMessage; import org.apache.openmeetings.db.entity.basic.MailMessage.Status; +import org.apache.openmeetings.util.mail.ByteArrayDataSource; import org.apache.openmeetings.util.mail.MailUtil; import org.apache.wicket.util.string.Strings; import org.slf4j.Logger; @@ -66,6 +52,20 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.task.TaskExecutor; import org.springframework.stereotype.Component; +import jakarta.activation.DataHandler; +import jakarta.mail.Authenticator; +import jakarta.mail.BodyPart; +import jakarta.mail.Message; +import jakarta.mail.MessagingException; +import jakarta.mail.Multipart; +import jakarta.mail.PasswordAuthentication; +import jakarta.mail.Session; +import jakarta.mail.Transport; +import jakarta.mail.internet.InternetAddress; +import jakarta.mail.internet.MimeBodyPart; +import jakarta.mail.internet.MimeMessage; +import jakarta.mail.internet.MimeMultipart; + /** * * @author swagner diff --git a/openmeetings-core/src/test/java/org/apache/openmeetings/core/mail/TestMailSending.java b/openmeetings-core/src/test/java/org/apache/openmeetings/core/mail/TestMailSending.java index e2572e9..3533970 100644 --- a/openmeetings-core/src/test/java/org/apache/openmeetings/core/mail/TestMailSending.java +++ b/openmeetings-core/src/test/java/org/apache/openmeetings/core/mail/TestMailSending.java @@ -26,15 +26,15 @@ import static
[jira] [Commented] (OPENMEETINGS-2675) (7.0.0) Libraries should be updated
[ https://issues.apache.org/jira/browse/OPENMEETINGS-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17464650#comment-17464650 ] ASF subversion and git services commented on OPENMEETINGS-2675: --- Commit 7a94848eb4d7e81378dd42ab16fa3004d01c5827 in openmeetings's branch refs/heads/master from Maxim Solodovnik [ https://gitbox.apache.org/repos/asf?p=openmeetings.git;h=7a94848 ] [OPENMEETINGS-2675] libraries, code clean-up > (7.0.0) Libraries should be updated > --- > > Key: OPENMEETINGS-2675 > URL: https://issues.apache.org/jira/browse/OPENMEETINGS-2675 > Project: Openmeetings > Issue Type: Task > Components: Builds >Affects Versions: 6.2.0 >Reporter: Maxim Solodovnik >Assignee: Maxim Solodovnik >Priority: Major > Fix For: 7.0.0 > > > Libraries should be updated -- This message was sent by Atlassian Jira (v8.20.1#820001)
[openmeetings] 01/01: Merge branch 'master' into java11-modules
This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch java11-modules in repository https://gitbox.apache.org/repos/asf/openmeetings.git commit 7f6f9fdb5677bb2139123a15539964555ee879b5 Merge: c824bb4 7a94848 Author: Maxim Solodovnik AuthorDate: Thu Dec 23 22:50:18 2021 +0700 Merge branch 'master' into java11-modules openmeetings-install/pom.xml | 6 ++ openmeetings-server/pom.xml| 2 +- .../calendar/caldav/AppointmentManager.java| 7 -- .../service/calendar/caldav/IcalUtils.java | 8 +-- openmeetings-util/pom.xml | 6 -- .../apache/openmeetings/util/mail/IcalHandler.java | 82 +- .../src/main/resources/ical4j.properties | 21 ++ openmeetings-web/pom.xml | 6 ++ .../openmeetings/calendar/TestSendIcalMessage.java | 3 +- .../openmeetings/webservice/TestFileService.java | 2 +- pom.xml| 16 ++--- 11 files changed, 92 insertions(+), 67 deletions(-) diff --cc openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java index d16c730,02d5f19..13ae412 --- a/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java +++ b/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java @@@ -27,8 -27,7 +27,6 @@@ import java.util.Calendar import java.util.Date; import java.util.TimeZone; - import javax.activation.DataHandler; - -import org.apache.openmeetings.AbstractOmServerTest; import org.apache.openmeetings.core.mail.MailHandler; import org.apache.openmeetings.util.mail.ByteArrayDataSource; import org.apache.openmeetings.util.mail.IcalHandler; diff --cc openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java index d297299,dd94f41..818c837 --- a/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java +++ b/openmeetings-web/src/test/java/org/apache/openmeetings/webservice/TestFileService.java @@@ -20,11 -20,11 +20,11 @@@ package org.apache.openmeetings.webserv import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.UUID.randomUUID; -import static org.apache.openmeetings.AbstractOmServerTest.UNIT_TEST_ARAB_EXT_TYPE; -import static org.apache.openmeetings.AbstractOmServerTest.createUser; -import static org.apache.openmeetings.AbstractOmServerTest.getUser; +import static org.apache.openmeetings.web.test.AbstractOmServerTest.UNIT_TEST_ARAB_EXT_TYPE; +import static org.apache.openmeetings.web.test.AbstractOmServerTest.createUser; +import static org.apache.openmeetings.web.test.AbstractOmServerTest.getUser; - import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertEquals; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import java.awt.Graphics;
[openmeetings] branch java11-modules updated (c824bb4 -> 7f6f9fd)
This is an automated email from the ASF dual-hosted git repository. solomax pushed a change to branch java11-modules in repository https://gitbox.apache.org/repos/asf/openmeetings.git. from c824bb4 Merge branch 'master' into java11-modules Some errors are fixed add 7a94848 [OPENMEETINGS-2675] libraries, code clean-up new 7f6f9fd Merge branch 'master' into java11-modules The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: openmeetings-install/pom.xml | 6 ++ openmeetings-server/pom.xml| 2 +- .../calendar/caldav/AppointmentManager.java| 7 -- .../service/calendar/caldav/IcalUtils.java | 8 +-- openmeetings-util/pom.xml | 6 -- .../apache/openmeetings/util/mail/IcalHandler.java | 82 +- .../src/main/resources/ical4j.properties | 6 +- openmeetings-web/pom.xml | 6 ++ .../openmeetings/calendar/TestSendIcalMessage.java | 3 +- .../openmeetings/webservice/TestFileService.java | 2 +- pom.xml| 16 ++--- 11 files changed, 74 insertions(+), 70 deletions(-) copy openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.properties => openmeetings-util/src/main/resources/ical4j.properties (82%)
[jira] [Commented] (OPENMEETINGS-2675) (7.0.0) Libraries should be updated
[ https://issues.apache.org/jira/browse/OPENMEETINGS-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17464656#comment-17464656 ] ASF subversion and git services commented on OPENMEETINGS-2675: --- Commit 7a94848eb4d7e81378dd42ab16fa3004d01c5827 in openmeetings's branch refs/heads/java11-modules from Maxim Solodovnik [ https://gitbox.apache.org/repos/asf?p=openmeetings.git;h=7a94848 ] [OPENMEETINGS-2675] libraries, code clean-up > (7.0.0) Libraries should be updated > --- > > Key: OPENMEETINGS-2675 > URL: https://issues.apache.org/jira/browse/OPENMEETINGS-2675 > Project: Openmeetings > Issue Type: Task > Components: Builds >Affects Versions: 6.2.0 >Reporter: Maxim Solodovnik >Assignee: Maxim Solodovnik >Priority: Major > Fix For: 7.0.0 > > > Libraries should be updated -- This message was sent by Atlassian Jira (v8.20.1#820001)
[openmeetings] branch master updated: [OPENMEETINGS-2675] h2
This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git The following commit(s) were added to refs/heads/master by this push: new 619bb6c [OPENMEETINGS-2675] h2 619bb6c is described below commit 619bb6c12e08723fb7f09d6991286eceff1e4056 Author: Maxim Solodovnik AuthorDate: Thu Dec 23 22:54:57 2021 +0700 [OPENMEETINGS-2675] h2 --- .../src/main/webapp/WEB-INF/classes/META-INF/h2_persistence.xml | 5 +++-- pom.xml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/h2_persistence.xml b/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/h2_persistence.xml index abac226..88010b6 100644 --- a/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/h2_persistence.xml +++ b/openmeetings-web/src/main/webapp/WEB-INF/classes/META-INF/h2_persistence.xml @@ -63,8 +63,7 @@ + + diff --git a/pom.xml b/pom.xml index 9df3206..9c3dc23 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ 1.4.1 ${project.basedir} false - 1.4.200 + 2.0.202 3.12.0 2.0.1 3.2.1-SNAPSHOT
[jira] [Commented] (OPENMEETINGS-2675) (7.0.0) Libraries should be updated
[ https://issues.apache.org/jira/browse/OPENMEETINGS-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17464660#comment-17464660 ] ASF subversion and git services commented on OPENMEETINGS-2675: --- Commit 619bb6c12e08723fb7f09d6991286eceff1e4056 in openmeetings's branch refs/heads/master from Maxim Solodovnik [ https://gitbox.apache.org/repos/asf?p=openmeetings.git;h=619bb6c ] [OPENMEETINGS-2675] h2 > (7.0.0) Libraries should be updated > --- > > Key: OPENMEETINGS-2675 > URL: https://issues.apache.org/jira/browse/OPENMEETINGS-2675 > Project: Openmeetings > Issue Type: Task > Components: Builds >Affects Versions: 6.2.0 >Reporter: Maxim Solodovnik >Assignee: Maxim Solodovnik >Priority: Major > Fix For: 7.0.0 > > > Libraries should be updated -- This message was sent by Atlassian Jira (v8.20.1#820001)
[openmeetings] branch master updated: [OPENMEETINGS-2675] code clean-up
This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings.git The following commit(s) were added to refs/heads/master by this push: new 4ac3436 [OPENMEETINGS-2675] code clean-up 4ac3436 is described below commit 4ac3436982b2a8f38d03ae0ca6be67090b34cac1 Author: Maxim Solodovnik AuthorDate: Thu Dec 23 23:29:55 2021 +0700 [OPENMEETINGS-2675] code clean-up --- .../service/calendar/caldav/IcalUtils.java | 105 + 1 file changed, 43 insertions(+), 62 deletions(-) diff --git a/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/IcalUtils.java b/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/IcalUtils.java index f83dff8..5c57007 100644 --- a/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/IcalUtils.java +++ b/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/IcalUtils.java @@ -41,6 +41,7 @@ import java.util.Set; import java.util.TimeZone; import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; import org.apache.commons.lang3.time.FastDateFormat; import org.apache.openmeetings.db.dao.user.UserDao; @@ -57,8 +58,11 @@ import org.springframework.beans.factory.annotation.Autowired; import net.fortuna.ical4j.model.Calendar; import net.fortuna.ical4j.model.Component; +import net.fortuna.ical4j.model.ComponentList; import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyList; import net.fortuna.ical4j.model.component.CalendarComponent; import net.fortuna.ical4j.model.component.VEvent; import net.fortuna.ical4j.model.parameter.Cn; @@ -131,8 +135,7 @@ public class IcalUtils { a.setDeleted(false); a.setRoom(createDefaultRoom()); a.setReminder(Appointment.Reminder.NONE); - a = addVEventPropertiestoAppointment(a, event); - appointments.add(a); + appointments.add(addVEventPropertiestoAppointment(a, event)); } return appointments; } @@ -353,21 +356,35 @@ public class IcalUtils { return c.getTime(); } - /** -* Adds the Appointment Properties to the given VEvent -* -* @param appointment Appointment whose properties are taken -* @param meeting VEvent of the Appointment -* @return Updated VEvent -*/ - private static void addVEventpropsfromAppointment(Appointment appointment, VEvent meeting) { + private net.fortuna.ical4j.model.TimeZone getTimazone(String tzid) { + net.fortuna.ical4j.model.TimeZone timeZone = TZ_REGISTRY.getTimeZone(tzid); + if (timeZone == null) { + throw new NoSuchElementException("Unable to get time zone by id provided: " + tzid); + } + return timeZone; + } + + private Calendar getCalendar(net.fortuna.ical4j.model.TimeZone timeZone, List events) { + List comps = new ArrayList<>(events); + comps.add(0, timeZone.getVTimeZone()); + return new Calendar( + new PropertyList(List.of(new ProdId(PROD_ID), Version.VERSION_2_0, CalScale.GREGORIAN)) + , new ComponentList<>(comps)); + } + + private VEvent parseAppointment(Appointment appointment, net.fortuna.ical4j.model.TimeZone timeZone) { + ZonedDateTime start = getZoneDateTime(appointment.getStart(), timeZone.getID()); + ZonedDateTime end = getZoneDateTime(appointment.getEnd(), timeZone.getID()); + + VEvent meeting = new VEvent(start, end, appointment.getTitle()); + List mProperties = new ArrayList<>(meeting.getProperties().getAll()); if (appointment.getLocation() != null) { - meeting.getProperties().add(new Location(appointment.getLocation())); + mProperties.add(new Location(appointment.getLocation())); } - meeting.getProperties().add(new Description(appointment.getDescription())); - meeting.getProperties().add(new Sequence(0)); - meeting.getProperties().add(Transp.OPAQUE); + mProperties.add(new Description(appointment.getDescription())); + mProperties.add(new Sequence(0)); + mProperties.add(Transp.OPAQUE); String uid = appointment.getIcalId(); Uid ui; @@ -379,53 +396,23 @@ public class IcalUtils { ui = new Uid(uid); } -
[jira] [Commented] (OPENMEETINGS-2675) (7.0.0) Libraries should be updated
[ https://issues.apache.org/jira/browse/OPENMEETINGS-2675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17464687#comment-17464687 ] ASF subversion and git services commented on OPENMEETINGS-2675: --- Commit 4ac3436982b2a8f38d03ae0ca6be67090b34cac1 in openmeetings's branch refs/heads/master from Maxim Solodovnik [ https://gitbox.apache.org/repos/asf?p=openmeetings.git;h=4ac3436 ] [OPENMEETINGS-2675] code clean-up > (7.0.0) Libraries should be updated > --- > > Key: OPENMEETINGS-2675 > URL: https://issues.apache.org/jira/browse/OPENMEETINGS-2675 > Project: Openmeetings > Issue Type: Task > Components: Builds >Affects Versions: 6.2.0 >Reporter: Maxim Solodovnik >Assignee: Maxim Solodovnik >Priority: Major > Fix For: 7.0.0 > > > Libraries should be updated -- This message was sent by Atlassian Jira (v8.20.1#820001)