Enum BuiltInNotifAddress
- java.lang.Object
-
- java.lang.Enum<BuiltInNotifAddress>
-
- org.silverpeas.core.notification.user.client.constant.BuiltInNotifAddress
-
- All Implemented Interfaces:
Serializable
,Comparable<BuiltInNotifAddress>
public enum BuiltInNotifAddress extends Enum<BuiltInNotifAddress>
Definition of the builtin addresses that are used in the notification to the users. Each of them are related to a given notification channel (seeNotifChannel
). That means that for eachNotifChannel
there is one and a unique one notification address definition. Hence a notification address is also always related to the channel through which the notifications are sent.Among the builtin addresses there is also some predefined addresses that are not true notification addresses but aliases to a true address that requires to be computed according to the concerned user:
DEFAULT
is an alias to the first address set as default by the user,COMPONENT_DEFINED
is an alias to the address that is defined by the user for all notifications sent through a given component instance .
- Author:
- Yohann Chastagnier
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASIC_POPUP
Builtin address related to the notification channelNotifChannel.POPUP
.BASIC_REMOVE
Builtin address related to the notification channelNotifChannel.REMOVE
.BASIC_SERVER
Builtin address related to the notification channelNotifChannel.SERVER
.BASIC_SILVERMAIL
Builtin address related to the notification channelNotifChannel.SILVERMAIL
.BASIC_SMTP
Builtin address related to the notification channelNotifChannel.SMTP
.COMPONENT_DEFINED
Refers the notification address that was specifically set by the reciepient user for notifications sent within a given component instance.DEFAULT
Refers the first notification address set as default in the notification preferences of the recipient user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<BuiltInNotifAddress>
decode(Integer id)
Decodes the specified media type identifier to aBuiltInNotifAddress
instance.int
getId()
static BuiltInNotifAddress
valueOf(String name)
Returns the enum constant of this type with the specified name.static BuiltInNotifAddress[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final BuiltInNotifAddress DEFAULT
Refers the first notification address set as default in the notification preferences of the recipient user.
-
COMPONENT_DEFINED
public static final BuiltInNotifAddress COMPONENT_DEFINED
Refers the notification address that was specifically set by the reciepient user for notifications sent within a given component instance.
-
BASIC_POPUP
public static final BuiltInNotifAddress BASIC_POPUP
Builtin address related to the notification channelNotifChannel.POPUP
.
-
BASIC_REMOVE
public static final BuiltInNotifAddress BASIC_REMOVE
Builtin address related to the notification channelNotifChannel.REMOVE
.
-
BASIC_SILVERMAIL
public static final BuiltInNotifAddress BASIC_SILVERMAIL
Builtin address related to the notification channelNotifChannel.SILVERMAIL
.
-
BASIC_SMTP
public static final BuiltInNotifAddress BASIC_SMTP
Builtin address related to the notification channelNotifChannel.SMTP
. For such a channel, the builtin address is the email address of the recipient user as set in his profile (beware, his profile isn't his notification preferences).
-
BASIC_SERVER
public static final BuiltInNotifAddress BASIC_SERVER
Builtin address related to the notification channelNotifChannel.SERVER
. This channel refers any remote server to which a notification is sent, whatever it is.
-
-
Method Detail
-
values
public static BuiltInNotifAddress[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BuiltInNotifAddress c : BuiltInNotifAddress.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BuiltInNotifAddress valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getId
public int getId()
-
decode
public static Optional<BuiltInNotifAddress> decode(Integer id)
Decodes the specified media type identifier to aBuiltInNotifAddress
instance.- Parameters:
id
- an identifier of a media type.- Returns:
- an optional
BuiltInNotifAddress
instance corresponding to the specified identifier.
-
-