-
Notifications
You must be signed in to change notification settings - Fork 3
Remove Event class usage from event processors
#108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…rocessor to generate PRODID based on mutators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates calendar mapping from the deprecated at.bitfire.ical4android.Event to ical4j’s VEvent and related types, removing legacy pathways and aligning processors/tests with ical4j’s property/component model. It also introduces a new AndroidEventProcessor that returns AssociatedEvents, adds PRODID generation via a new ProdIdGenerator, and removes the MutatorsProcessor and LegacyAndroidCalendar.
- Replace Event with VEvent across processors and tests
- Introduce AndroidEventProcessor returning AssociatedEvents with pluggable PRODID generation; remove MutatorsProcessor and LegacyAndroidCalendar
- Update property handling to use ical4j properties/components (Url, Uid, Summary, Status, DtStart/DtEnd, Transp, Categories, Attendee, etc.)
Reviewed Changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/UrlProcessorTest.kt | Update tests to VEvent and ical4j Url property usage |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/UnknownPropertiesProcessorTest.kt | Update tests to VEvent; assert against properties; note: assertTrue import removed but still used |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/UidProcessorTest.kt | Update tests to VEvent and Uid property value |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/TitleProcessorTest.kt | Update tests to VEvent Summary property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/StatusProcessorTest.kt | Update tests to VEvent Status property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/StartTimeProcessorTest.kt | Update tests to VEvent DtStart (startDate) |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/SequenceProcessorTest.kt | Update tests to VEvent Sequence property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/RemindersProcessorTest.kt | Update tests to VEvent alarms via ical4j |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/RecurrenceFieldProcessorTest.kt | Update tests to use getProperty/getProperties for RRULE/RDATE/EXRULE/EXDATE |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/OriginalInstanceTimeProcessorTest.kt | Update tests to VEvent RecurrenceId handling |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/OrganizerProcessorTest.kt | Update tests to VEvent Organizer; remove isOrganizer coverage |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/MutatorsProcessorTest.kt | Remove tests tied to MutatorsProcessor (deleted) |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/LocationProcessorTest.kt | Update tests to VEvent Location property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/EndTimeProcessorTest.kt | Update tests to VEvent DtEnd (endDate) |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/DurationProcessorTest.kt | Update tests to VEvent DtEnd and clear Duration |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/DescriptionProcessorTest.kt | Update tests to VEvent Description property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/ColorProcessorTest.kt | Update tests to VEvent Color property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/CategoriesProcessorTest.kt | Update tests to VEvent Categories property via TextList |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/AvailabilityProcessorTest.kt | Update tests to VEvent Transp property (OPAQUE/TRANSPARENT) |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/AttendeesProcessorTest.kt | Update attendee tests to ical4j Attendee property API |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/processor/AccessLevelProcessorTest.kt | Update classification tests to Clazz property |
| lib/src/test/kotlin/at/bitfire/synctools/mapping/calendar/AndroidEventProcessorTest.kt | Add tests for new AndroidEventProcessor, exceptions handling, EXDATE, and PRODID generation |
| lib/src/main/kotlin/at/bitfire/synctools/storage/calendar/AndroidEvent2.kt | Remove MUTATORS_SEPARATOR constant (moved to AndroidEventProcessor) |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/UrlProcessor.kt | Port to VEvent and ical4j Url property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/UnknownPropertiesProcessor.kt | Port to VEvent; add unknown properties directly to ical4j property list |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/UidProcessor.kt | Port to VEvent; use ical4j Uid property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/TitleProcessor.kt | Port to VEvent; use Summary property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/StatusProcessor.kt | Port to VEvent; add Status property conditionally |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/StartTimeProcessor.kt | Port to VEvent; set DtStart |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/SequenceProcessor.kt | Port to VEvent; set Sequence |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/RemindersProcessor.kt | Port to VEvent; add VAlarm components |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/RecurrenceFieldsProcessor.kt | Port to VEvent; add RRULE/RDATE/EXRULE/EXDATE properties |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/ProdIdGenerator.kt | Add functional interface to generate PRODID |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/OriginalInstanceTimeProcessor.kt | Port to VEvent; set RecurrenceId for exceptions |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/OrganizerProcessor.kt | Port to VEvent; set Organizer only for group-scheduled events |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/MutatorsProcessor.kt | Remove processor (replaced by PRODID generator logic) |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/LocationProcessor.kt | Port to VEvent; set Location property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/EndTimeProcessor.kt | Port to VEvent; set DtEnd |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/DurationProcessor.kt | Port to VEvent; compute and set DtEnd, clear duration |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/DescriptionProcessor.kt | Port to VEvent; set Description property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/ColorProcessor.kt | Port to VEvent; map Android color to ical4j Color property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/CategoriesProcessor.kt | Port to VEvent; set Categories from extended properties |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/AvailabilityProcessor.kt | Port to VEvent; set TRANSP based on availability |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/AttendeesProcessor.kt | Port to VEvent; add Attendee properties |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/AndroidEventFieldProcessor.kt | Change processor interface to accept VEvent |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/AccessLevelProcessor.kt | Port to VEvent; set Clazz property |
| lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/AndroidEventProcessor.kt | New VEvent-based processor; returns AssociatedEvents and generates PRODID |
| lib/src/main/kotlin/at/bitfire/synctools/icalendar/AssociatedComponents.kt | Extend structure to include optional prodId |
| lib/src/main/kotlin/at/bitfire/ical4android/LegacyAndroidCalendar.kt | Remove legacy calendar wrapper |
| lib/src/main/kotlin/at/bitfire/ical4android/Event.kt | Update deprecation to point to AssociatedEvents |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...est/kotlin/at/bitfire/synctools/mapping/calendar/processor/UnknownPropertiesProcessorTest.kt
Show resolved
Hide resolved
...rc/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/AndroidEventFieldProcessor.kt
Show resolved
Hide resolved
...rc/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/UnknownPropertiesProcessor.kt
Show resolved
Hide resolved
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/ColorProcessor.kt
Show resolved
Hide resolved
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/processor/UrlProcessor.kt
Outdated
Show resolved
Hide resolved
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/AndroidEventProcessor.kt
Show resolved
Hide resolved
Update AndroidEventProcessor constructor parameter
- Add test case for sequence value 1
Event class usage from event processors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 52 out of 52 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
lib/src/main/kotlin/at/bitfire/synctools/mapping/calendar/AndroidEventProcessor.kt:1
- Extra space before the
.appendmethod call. Should bebuilder.appendwithout the space.
/*
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small detail, it's not important, but may be useful for migrations.
Key change:
LegacyAndroidEventProcessorbecomesAndroidEventProcessorby not using the deprecatedEventclass anymore.EventbyAssociatedEventsPRODIDtoAssociatedEventsso thatMUTATORScan be processed/stored.LegacyAndroidCalendar