Enum Class AccessRightReason

java.lang.Object
java.lang.Enum<AccessRightReason>
net.commuty.parking.model.AccessRightReason
All Implemented Interfaces:
Serializable, Comparable<AccessRightReason>, Constable

public enum AccessRightReason extends Enum<AccessRightReason>
Indicates the reason why an access (that can be granted or not) exists.
  • 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
    If a parking site is configured to always give access, users will be authorized to enter a site anytime, even if they didn't requested a parking spot.
    The access is granted.
    When a user is not owner of a parking spot and is not requesting one, this reason will be used.
    The access is not granted.
    When someone requests (and receives) a parking spot for a carpooling, one user in the carpooling will have a reason SPOT_RECEIVED, the others will have the reason PASSENGER.
    The access is granted.
    When a parking spot owner is not releasing their spot, this reason will be used.
    The access is granted.
    When someone requests (and receives) a parking spot, this reason will be used.
    The access is granted.
    When a parking spot owner releases their spot, this reason will be used.
    The access is not granted.
    If a parking site is configured to always give access on the weekend, users will be authorized to enter a site on the saturday or sunday, even if they didn't requested a parking spot.
    The access is granted.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    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

    • SPOT_RECEIVED

      public static final AccessRightReason SPOT_RECEIVED
      When someone requests (and receives) a parking spot, this reason will be used.
      The access is granted.
    • SPOT_RELEASED

      public static final AccessRightReason SPOT_RELEASED
      When a parking spot owner releases their spot, this reason will be used.
      The access is not granted.
    • PERMANENT_ACCESS

      public static final AccessRightReason PERMANENT_ACCESS
      When a parking spot owner is not releasing their spot, this reason will be used.
      The access is granted.
    • NONE

      public static final AccessRightReason NONE
      When a user is not owner of a parking spot and is not requesting one, this reason will be used.
      The access is not granted.
    • PASSENGER

      public static final AccessRightReason PASSENGER
      When someone requests (and receives) a parking spot for a carpooling, one user in the carpooling will have a reason SPOT_RECEIVED, the others will have the reason PASSENGER.
      The access is granted.
    • WEEKEND_ACCESS

      public static final AccessRightReason WEEKEND_ACCESS
      If a parking site is configured to always give access on the weekend, users will be authorized to enter a site on the saturday or sunday, even if they didn't requested a parking spot.
      The access is granted.
    • FREE_ACCESS

      public static final AccessRightReason FREE_ACCESS
      If a parking site is configured to always give access, users will be authorized to enter a site anytime, even if they didn't requested a parking spot.
      The access is granted.
  • Method Details

    • values

      public static AccessRightReason[] 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 AccessRightReason 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
    • getReasonName

      public String getReasonName()
    • findByName

      public static AccessRightReason findByName(String name)