Class UserResponseDTO<T>

java.lang.Object
callofproject.dev.authentication.dto.UserResponseDTO<T>
Type Parameters:
T - the type of the object to be transferred

public class UserResponseDTO<T> extends Object
Data Transfer Object for a user response. It is used to transfer data between the client and the server.
  • Constructor Details

    • UserResponseDTO

      public UserResponseDTO(boolean success, String token, String refreshToken)
      Constructor for the UserResponseDTO class. It is used to create an instance of the class with all fields set to their default values.
    • UserResponseDTO

      public UserResponseDTO(boolean success, String token, String refreshToken, T object)
      Constructor for the UserResponseDTO class. It is used to create an instance of the class with all fields set to their default values.
    • UserResponseDTO

      public UserResponseDTO(boolean success)
      Constructor for the UserResponseDTO class. It is used to create an instance of the class with all fields set to their default values.
    • UserResponseDTO

      public UserResponseDTO(boolean success, T object)
      Constructor for the UserResponseDTO class. It is used to create an instance of the class with all fields set to their default values.
  • Method Details

    • isSuccess

      public boolean isSuccess()
      Checks if the operation was successful.
      Returns:
      True if the operation was successful, false otherwise.
    • getToken

      public String getToken()
      Gets the authentication token.
      Returns:
      The authentication token.
    • getRefreshToken

      public String getRefreshToken()
      Gets the refresh token.
      Returns:
      The refresh token.
    • getObject

      public T getObject()
      Gets the object contained in the response message.
      Returns:
      The object contained in the response message.