@Test public void testParseExpirationAtIsEmpty() { assertEquals(Expiration.TIME_PERIOD, presenter.parseExpiration(null, Expiration.DATETIME)); assertEquals(Expiration.TIME_PERIOD, presenter.parseExpiration("", Expiration.DATETIME)); }
@Override public Expiration parseExpiration(String expirationAt, Expiration expiration) { if (isEmpty(expirationAt)) { return Expiration.TIME_PERIOD; } if (expiration != null) { return expiration; } return new ExpirationTypeOracle().guess(expirationAt); }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public Expiration parseExpiration(String expirationAt, Expiration expiration) { if (isEmpty(expirationAt)) { return Expiration.TIME_PERIOD; } if (expiration != null) { return expiration; } return new ExpirationTypeOracle().guess(expirationAt); } }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public Expiration parseExpiration(String expirationAt, Expiration expiration) { if (isEmpty(expirationAt)) { return Expiration.TIME_PERIOD; } if (expiration != null) { return expiration; } return new ExpirationTypeOracle().guess(expirationAt); } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public Expiration parseExpiration(String expirationAt, Expiration expiration) { if (isEmpty(expirationAt)) { return Expiration.TIME_PERIOD; } if (expiration != null) { return expiration; } return new ExpirationTypeOracle().guess(expirationAt); } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); @Override Widget asWidget(); @Override String getNameHeader(); @Override String getFromLabel(); @Override String getExpirationLabel(Expiration type); @Override void createOrEdit(NotificationWidgetView parent, NotificationRow row); @Override void ok(String emails); @Override String clearEmails(String emails); void setReadOnly(boolean readOnly); @Override void setRepeatNotificationVisibility(boolean isVisible); @Override void setRepeatNotificationInvisibility(boolean isInvisible); @Override void setNotificationPanelDivVisibility(boolean isVisible); @Override void addUsers(List<String> users); @Override void addGroups(List<String> groups); @Override void addFrom(String from); @Override void addReplyTo(String replyTo); @Override Expiration parseExpiration(String expirationAt, Expiration expiration); @Override void setExpiration(Expiration expiration, NotificationRow row); @Override String getRepeatCount(String repeatable); @Override void setExpirationDateTime(String expiresAt); @Override Date parseDate(String date); @Override String clearTimeZone(String value); @Override NotificationType getNotificationType(boolean isNotStarted); @Override boolean isRepeatable(String repeatable); @Override String minuteOrMonth(MatchResult match); }
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public Expiration parseExpiration(String expirationAt, Expiration expiration) { if (isEmpty(expirationAt)) { return Expiration.TIME_PERIOD; } if (expiration != null) { return expiration; } return new ExpirationTypeOracle().guess(expirationAt); } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); @Override Widget asWidget(); @Override String getNameHeader(); @Override String getFromLabel(); @Override String getExpirationLabel(Expiration type); @Override void createOrEdit(NotificationWidgetView parent, NotificationRow row); @Override void ok(String emails); @Override String clearEmails(String emails); void setReadOnly(boolean readOnly); @Override void setRepeatNotificationVisibility(boolean isVisible); @Override void setRepeatNotificationInvisibility(boolean isInvisible); @Override void setNotificationPanelDivVisibility(boolean isVisible); @Override void addUsers(List<String> users); @Override void addGroups(List<String> groups); @Override void addFrom(String from); @Override void addReplyTo(String replyTo); @Override Expiration parseExpiration(String expirationAt, Expiration expiration); @Override void setExpiration(Expiration expiration, NotificationRow row); @Override String getRepeatCount(String repeatable); @Override void setExpirationDateTime(String expiresAt); @Override Date parseDate(String date); @Override String clearTimeZone(String value); @Override NotificationType getNotificationType(boolean isNotStarted); @Override boolean isRepeatable(String repeatable); @Override String minuteOrMonth(MatchResult match);  }