Enum SubscriptionMethod
- java.lang.Object
-
- java.lang.Enum<SubscriptionMethod>
-
- org.silverpeas.core.subscription.constant.SubscriptionMethod
-
- All Implemented Interfaces:
Serializable
,Comparable<SubscriptionMethod>
public enum SubscriptionMethod extends Enum<SubscriptionMethod>
The method used to subscribe a user or a group of users to a given resource in Silverpeas.- Author:
- Yohann Chastagnier Date: 19/02/13
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FORCED
The subscription was done by another user with management rights.SELF_CREATION
The subscription was done by the subscriber himself.UNKNOWN
The subscription is unknown. assimilable to nothing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubscriptionMethod
from(String name)
String
getName()
static Collection<SubscriptionMethod>
getValidValues()
All Subscription methods are returned into a collection excepted the UNKNOWN one.boolean
isValid()
Is this method is valid?static SubscriptionMethod
valueOf(String name)
Returns the enum constant of this type with the specified name.static SubscriptionMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final SubscriptionMethod UNKNOWN
The subscription is unknown. assimilable to nothing.
-
SELF_CREATION
public static final SubscriptionMethod SELF_CREATION
The subscription was done by the subscriber himself.
-
FORCED
public static final SubscriptionMethod FORCED
The subscription was done by another user with management rights.
-
-
Method Detail
-
values
public static SubscriptionMethod[] 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 (SubscriptionMethod c : SubscriptionMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SubscriptionMethod 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
-
isValid
public boolean isValid()
Is this method is valid? It is valid if the method isn't unknown.- Returns:
- true if the method used in the subscription is known, false otherwise.
-
getName
public String getName()
-
from
public static SubscriptionMethod from(String name)
-
getValidValues
public static Collection<SubscriptionMethod> getValidValues()
All Subscription methods are returned into a collection excepted the UNKNOWN one.- Returns:
- a collection of all of the valid subscription methods.
-
-