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()final ReviewConfig.StategetCommentaryState()final BooleangetSingleReview()final DoublegetMinRating()final IntegergetCommentaryMaxLength()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()
-
getCommentaryState
final ReviewConfig.State getCommentaryState()
-
getSingleReview
final Boolean getSingleReview()
-
getMinRating
final Double getMinRating()
-
getCommentaryMaxLength
final Integer getCommentaryMaxLength()
-
isValid
final Boolean isValid()
Check if the review configuration is valid
- Returns:
true if at least one state is State.REQUIRED
-
-
-
-