Enum Class MembershipStatus

java.lang.Object
java.lang.Enum<MembershipStatus>
org.silverpeas.components.community.model.MembershipStatus
All Implemented Interfaces:
Serializable, Comparable<MembershipStatus>, Constable

public enum MembershipStatus extends Enum<MembershipStatus>

It defines the status of the membership of a user to a community of users. By its values, it defines the different steps a membership can pass:

  • first, a user asks to join a community of users. If the membership requires validation, the membership of the user is pending.
  • If no validation is required for a membership application or if a pending membership is validated, the membership of the user to the community of users is then committed.
  • In the case of a validation, the application for membership can be refused.
  • After a time, the user can remove himself from the community of users (or he can be retired by an administrator), in this case his membership is removed.
Author:
mmoquillon
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The user is currently member of the community of users.
    The user asked to join the community of users and his membership is pending, waiting for validation by a validator.
    The asking of a user to join the community of users has been refused by a validator.
    The user isn't anymore a member of the community of users.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is the membership to the community of users is committed?
    boolean
    Is the membership to the community of users has been removed?
    boolean
    Is the membership to the community of user pending for validation by a validator?
    boolean
    Is the membership to the community of users has been refused?
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PENDING

      public static final MembershipStatus PENDING
      The user asked to join the community of users and his membership is pending, waiting for validation by a validator.
    • COMMITTED

      public static final MembershipStatus COMMITTED
      The user is currently member of the community of users.
    • REFUSED

      public static final MembershipStatus REFUSED
      The asking of a user to join the community of users has been refused by a validator. The membership of the user to the community is stated as refused.
    • REMOVED

      public static final MembershipStatus REMOVED
      The user isn't anymore a member of the community of users. He either retired himself or he has been removed from the community. His membership isn't deleted, just the status is updated.
  • Method Details

    • values

      public static MembershipStatus[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MembershipStatus valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isPending

      public boolean isPending()
      Is the membership to the community of user pending for validation by a validator?
      Returns:
      true if the membership of the user to the community is waiting for validation. False otherwise.
    • isMember

      public boolean isMember()
      Is the membership to the community of users is committed?
      Returns:
      true if the user is an actual member of the community. False otherwise.
    • isRefused

      public boolean isRefused()
      Is the membership to the community of users has been refused?
      Returns:
      true if the membership asking of the user has been refused by a validator. False otherwise.
    • isNoMoreMember

      public boolean isNoMoreMember()
      Is the membership to the community of users has been removed?
      Returns:
      true if the user isn't anymore a member of the community. False otherwise.