Package fr.utc.miage.sporttrack.dto
Enum Class RelationshipStatusDTO
- All Implemented Interfaces:
Serializable,Comparable<RelationshipStatusDTO>,Constable
Enumeration serving as a view-layer Data Transfer Object (DTO) that represents
the relationship status between two athletes within the SportTrack application.
Used by the frontend (Thymeleaf templates) to determine which action buttons
to display (e.g., "Add Friend", "Cancel Request", "Block"). The value is
computed from the underlying Friendship entity and
FriendshipStatus.
- Author:
- SportTrack Team
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe current user has blocked the target user.The target user has blocked the current user.Both athletes are already friends (FriendshipStatus.ACCEPTED).Both users have blocked each other.No relationship exists between the two athletes; a friend request can be sent.A friend request was previously rejected.The current user has received a pending friend request (is the recipient).The current user has sent a pending friend request (is the initiator).The current user is viewing their own profile. -
Method Summary
Modifier and TypeMethodDescriptionstatic RelationshipStatusDTOReturns the enum constant of this class with the specified name.static RelationshipStatusDTO[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SELF
The current user is viewing their own profile. -
FRIENDS
Both athletes are already friends (FriendshipStatus.ACCEPTED). -
REQUEST_SENT
The current user has sent a pending friend request (is the initiator). -
REQUEST_RECEIVED
The current user has received a pending friend request (is the recipient). -
REJECTED
A friend request was previously rejected. -
BLOCKED_BY_ME
The current user has blocked the target user. -
BLOCKED_ME
The target user has blocked the current user. -
MUTUALLY_BLOCKED
Both users have blocked each other. -
NONE
No relationship exists between the two athletes; a friend request can be sent.
-
-
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
-