org.kohsuke.jnt
Enum SubscriptionMode

java.lang.Object
  extended by java.lang.Enum<SubscriptionMode>
      extended by org.kohsuke.jnt.SubscriptionMode
All Implemented Interfaces:
Serializable, Comparable<SubscriptionMode>

public enum SubscriptionMode
extends Enum<SubscriptionMode>

Mode of subscription to a mailing list.

Author:
Kohsuke Kawaguchi

Enum Constant Summary
ALLOWED_POSTERS
          Allowed posters.
DIGEST
          Digest subscription mode.
MODERATOR
          List moderators.
NORMAL
          Normal subscription mode.
 
Method Summary
 String getNameAsWord()
          Gets either "Normal" or "Digest".
 String toString()
          Returns human-readable mode name.
static SubscriptionMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SubscriptionMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NORMAL

public static final SubscriptionMode NORMAL
Normal subscription mode. One e-mail per a post.


DIGEST

public static final SubscriptionMode DIGEST
Digest subscription mode. One e-mail per a day.


MODERATOR

public static final SubscriptionMode MODERATOR
List moderators.


ALLOWED_POSTERS

public static final SubscriptionMode ALLOWED_POSTERS
Allowed posters. Those who can post messages but don't receive e-mails.

Method Detail

values

public static SubscriptionMode[] 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 (SubscriptionMode c : SubscriptionMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SubscriptionMode 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 name
NullPointerException - if the argument is null

toString

public String toString()
Returns human-readable mode name. Either "normal" or "digest".

Overrides:
toString in class Enum<SubscriptionMode>

getNameAsWord

public String getNameAsWord()
Gets either "Normal" or "Digest". Used in the form.



Copyright © 2003-2008 Kohsuke Kawaguchi. All Rights Reserved.