docs: update feature toggle

This commit is contained in:
Ilkka Seppälä
2024-04-20 15:43:09 +03:00
parent 2b58233080
commit 6a97047aaa
5 changed files with 58 additions and 43 deletions
@@ -77,12 +77,12 @@ public class PropertiesFeatureToggleVersion implements Service {
/**
* Generate a welcome message based on the user being passed and the status of the feature toggle.
* If the enhanced version is enabled, then the message will be personalised with the name of the
* passed {@link User}. However if disabled then a generic version fo the message is returned.
* passed {@link User}. However, if disabled then a generic version fo the message is returned.
*
* @param user the {@link User} to be displayed in the message if the enhanced version is enabled
* see {@link PropertiesFeatureToggleVersion#isEnhanced()}. If the enhanced version is
* enabled, then the message will be personalised with the name of the passed {@link
* User}. However if disabled then a generic version fo the message is returned.
* User}. However, if disabled then a generic version fo the message is returned.
* @return Resulting welcome message.
* @see User
*/
@@ -30,10 +30,10 @@ import com.iluwatar.featuretoggle.user.UserGroup;
/**
* This example of the Feature Toggle pattern shows how it could be implemented based on a {@link
* User}. Therefore showing its use within a tiered application where the paying users get access to
* User}. Therefore, showing its use within a tiered application where the paying users get access to
* different content or better versions of features. So in this instance a {@link User} is passed in
* and if they are found to be on the {@link UserGroup#isPaid(User)} they are welcomed with a
* personalised message. While the other is more generic. However this pattern is limited to simple
* personalised message. While the other is more generic. However, this pattern is limited to simple
* examples such as the one below.
*
* @see Service
@@ -66,7 +66,7 @@ public class TieredFeatureToggleVersion implements Service {
/**
* Method that checks if the welcome message to be returned is the enhanced version. For this
* instance as the logic is driven by the user group. This method is a little redundant. However
* instance as the logic is driven by the user group. This method is a little redundant. However,
* can be used to show that there is an enhanced version available.
*
* @return Boolean value {@code true} if enhanced.