Created
February 14, 2014 02:58
-
-
Save MinCha/8995058 to your computer and use it in GitHub Desktop.
Tell, Don`t Ask #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReadOnlyNotifier { | |
private List<String> getRelatedServices() { | |
// | |
} | |
public void notifyToRelatedServicesIfItNeeds(StopMessage stopMessage) { | |
if (getRelatedServices().size() > 0) { | |
if (notifyToRelatedServices(stopMessage) == false) { | |
throw new FailedReadOnlyNotificationException(); | |
} | |
} | |
} | |
} | |
readOnlyNotifier.notifyToRelatedServicesIfItNeeds(stopMessage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment