Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package software.aws.toolkits.jetbrains.core.notifications

class ProcessNotificationsBase {

Check warning on line 6 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Class "ProcessNotificationsBase" is never used

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Class "ProcessNotificationsBase" is never used
init {

Check notice on line 7 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Redundant empty initializer block

Redundant empty initializer block

Check warning on line 7 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L6-L7

Added lines #L6 - L7 were not covered by tests

Check notice

Code scanning / QDJVMC

Redundant empty initializer block Note

Redundant empty initializer block
// TODO: install a listener for the polling class
}

Check warning on line 9 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L9

Added line #L9 was not covered by tests

fun getNotificationsFromFile() {

Check warning on line 11 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "getNotificationsFromFile" is never used

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Function "getNotificationsFromFile" is never used
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this what the poller should be doing?

Copy link
Contributor Author

@manodnyab manodnyab Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the poller will deserialize to check if well formed, but we will need to pull the notifications in anyway to call the separation of lists function. This function is optional and can be moved to the poller class too. Would prefer keeping it here to keep track of all the processing bit in the same class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this in for now, @samgst-amazon will modify the location later, if required!

// TODO: returns a notification list
}

Check warning on line 13 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L13

Added line #L13 was not covered by tests

fun retrieveStartupAndEmergencyNotifications() {

Check warning on line 15 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "retrieveStartupAndEmergencyNotifications" is never used

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Function "retrieveStartupAndEmergencyNotifications" is never used
// TODO: separates notifications into startup and emergency
// iterates through the 2 lists and processes each notification(if it isn't dismissed)
}

Check warning on line 18 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L18

Added line #L18 was not covered by tests

fun processNotification() {

Check warning on line 20 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "processNotification" is never used

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Function "processNotification" is never used
// TODO: calls the Rule engine and notifies listeners
}

Check warning on line 22 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L22

Added line #L22 was not covered by tests

fun notifyListenerForNotification() {

Check warning on line 24 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "notifyListenerForNotification" is never used

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Function "notifyListenerForNotification" is never used
}

Check warning on line 25 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L25

Added line #L25 was not covered by tests

fun addListenerForNotification() {

Check warning on line 27 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "addListenerForNotification" is never used

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Function "addListenerForNotification" is never used
}

Check warning on line 28 in plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt

View check run for this annotation

Codecov / codecov/patch

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/ProcessNotificationsBase.kt#L28

Added line #L28 was not covered by tests
}
Loading