Package knf.hydra.core.models.data
Class ReviewConfig
-
- All Implemented Interfaces:
public final class ReviewConfigData representing the review system configuration
At lest one state needs to be State.REQUIRED
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumReviewConfig.State
-
Field Summary
Fields Modifier and Type Field Description private final ReviewConfig.StatestarsStateprivate final ReviewConfig.StatecommentaryStateprivate final BooleansingleReviewprivate final DoubleminRatingprivate final IntegercommentaryMaxLength
-
Constructor Summary
Constructors Constructor Description ReviewConfig(ReviewConfig.State starsState, ReviewConfig.State commentaryState, Boolean singleReview, Double minRating, Integer commentaryMaxLength)
-
Method Summary
Modifier and Type Method Description final ReviewConfig.StategetStarsState()The state of the rating bar in the review dialog final ReviewConfig.StategetCommentaryState()The state of the EditText in the review dialog final BooleangetSingleReview()If enabled the main app will remember the submitted review and prevent the user for reviewing again final DoublegetMinRating()Optional: Sets the minimum rating final IntegergetCommentaryMaxLength()Optional: Sets the max length for the commentary, default to 150 final BooleanisValid()Check if the review configuration is valid -
-
Constructor Detail
-
ReviewConfig
ReviewConfig(ReviewConfig.State starsState, ReviewConfig.State commentaryState, Boolean singleReview, Double minRating, Integer commentaryMaxLength)
-
-
Method Detail
-
getStarsState
final ReviewConfig.State getStarsState()
The state of the rating bar in the review dialog
-
getCommentaryState
final ReviewConfig.State getCommentaryState()
The state of the EditText in the review dialog
-
getSingleReview
final Boolean getSingleReview()
If enabled the main app will remember the submitted review and prevent the user for reviewing again
-
getMinRating
final Double getMinRating()
Optional: Sets the minimum rating
-
getCommentaryMaxLength
final Integer getCommentaryMaxLength()
Optional: Sets the max length for the commentary, default to 150
-
isValid
final Boolean isValid()
Check if the review configuration is valid
- Returns:
true if at least one state is State.REQUIRED
-
-
-
-