Package net.commuty.parking.model
Enum Class AccessRightReason
- All Implemented Interfaces:
Serializable,Comparable<AccessRightReason>,Constable
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 ConstantsEnum ConstantDescriptionIf 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 reasonSPOT_RECEIVED, the others will have the reasonPASSENGER.
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 TypeMethodDescriptionstatic AccessRightReasonfindByName(String name) static AccessRightReasonReturns the enum constant of this class with the specified name.static AccessRightReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SPOT_RECEIVED
When someone requests (and receives) a parking spot, this reason will be used.
The access is granted. -
SPOT_RELEASED
When a parking spot owner releases their spot, this reason will be used.
The access is not granted. -
PERMANENT_ACCESS
When a parking spot owner is not releasing their spot, this reason will be used.
The access is granted. -
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
When someone requests (and receives) a parking spot for a carpooling, one user in the carpooling will have a reasonSPOT_RECEIVED, the others will have the reasonPASSENGER.
The access is granted. -
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
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
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
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 nameNullPointerException- if the argument is null
-
getReasonName
-
findByName
-