Files
java-design-patterns/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java

33 lines
1.1 KiB
Java
Raw Normal View History

package com.iluwatar.featuretoggle.pattern;
import com.iluwatar.featuretoggle.user.User;
2016-01-31 13:46:34 +00:00
/**
* Simple interfaces to allow the calling of the method to generate the welcome message for a given user. While there is
* a helper method to gather the the status of the feature toggle. In some cases there is no need for the
* {@link Service#isEnhanced()} in {@link com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion}
* where the toggle is determined by the actual {@link User}.
*
* @see com.iluwatar.featuretoggle.pattern.propertiesversion.PropertiesFeatureToggleVersion
* @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion
* @see User
*/
public interface Service {
2016-01-31 13:46:34 +00:00
/**
* Generates a welcome message for the passed user.
*
* @param user the {@link User} to be used if the message is to be personalised.
* @return Generated {@link String} welcome message
*/
2016-01-26 19:20:28 +00:00
String getWelcomeMessage(User user);
2016-01-31 13:46:34 +00:00
/**
* Returns if the welcome message to be displayed will be the enhanced version.
*
* @return Boolean {@value true} if enhanced.
*/
boolean isEnhanced();
}