Class UserNotificationMapping
- java.lang.Object
-
- org.cyclos.impl.utils.notifications.UserNotificationMapping
-
public class UserNotificationMapping extends Object
Provides a mapping for all implementations ofUserNotificationType, which are enum classes that implement this interface, one perNotificationRootType. But we do have the constraint that the enum names cannot be repeated among types (mostly because the translation keys are in the same namespace, but are also persisted unprefixed in the database).
-
-
Constructor Summary
Constructors Constructor Description UserNotificationMapping()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<? extends UserNotificationType>classByRoot(NotificationRootType root)Returns the enum class for the given root typestatic UserNotificationTypegetAnnotatedType(Method method)Returns theUserNotificationTypewhich is annotated on the given handler methodstatic UserNotificationTypegetByName(String name)Returns the enum instance for the given root type.static List<UserNotificationType>list()Returns the enum instance for the given root type.static List<UserNotificationType>listByRoot(NotificationRootType root)Lists the possible user notification types for the given root type
-
-
-
Method Detail
-
classByRoot
public static Class<? extends UserNotificationType> classByRoot(NotificationRootType root)
Returns the enum class for the given root type
-
getAnnotatedType
public static UserNotificationType getAnnotatedType(Method method)
Returns theUserNotificationTypewhich is annotated on the given handler method
-
getByName
public static UserNotificationType getByName(String name)
Returns the enum instance for the given root type. Returns null when nothing is found
-
list
public static List<UserNotificationType> list()
Returns the enum instance for the given root type. Returns null when nothing is found
-
listByRoot
public static List<UserNotificationType> listByRoot(NotificationRootType root)
Lists the possible user notification types for the given root type
-
-