Skip to content

Commit c44dd1d

Browse files
committed
Add SECURITY and TOPOLOGY notification categories
1 parent 92e7341 commit c44dd1d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

driver/src/main/java/org/neo4j/driver/NotificationCategory.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,22 @@ public sealed interface NotificationCategory extends Serializable permits Intern
6464
*/
6565
NotificationCategory DEPRECATION = new InternalNotificationCategory(Type.DEPRECATION);
6666

67+
/**
68+
* A security category.
69+
* <p>
70+
* For instance, the security warnings.
71+
* @since 5.13
72+
*/
73+
NotificationCategory SECURITY = new InternalNotificationCategory(Type.SECURITY);
74+
75+
/**
76+
* A topology category.
77+
* <p>
78+
* For instance, the topology notifications.
79+
* @since 5.13
80+
*/
81+
NotificationCategory TOPOLOGY = new InternalNotificationCategory(Type.TOPOLOGY);
82+
6783
/**
6884
* A generic category.
6985
* <p>

driver/src/main/java/org/neo4j/driver/internal/InternalNotificationCategory.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public enum Type {
3535
UNSUPPORTED,
3636
PERFORMANCE,
3737
DEPRECATION,
38+
SECURITY,
39+
TOPOLOGY,
3840
GENERIC
3941
}
4042

@@ -48,6 +50,8 @@ public static Optional<NotificationCategory> valueOf(String value) {
4850
case UNSUPPORTED -> NotificationCategory.UNSUPPORTED;
4951
case PERFORMANCE -> NotificationCategory.PERFORMANCE;
5052
case DEPRECATION -> NotificationCategory.DEPRECATION;
53+
case SECURITY -> NotificationCategory.SECURITY;
54+
case TOPOLOGY -> NotificationCategory.TOPOLOGY;
5155
case GENERIC -> NotificationCategory.GENERIC;
5256
});
5357
}

0 commit comments

Comments
 (0)