@Test public void testCalendarDomainValid() { Assertions.assertFalse(Configuration.isDomainValid(null)); Assertions.assertFalse(Configuration.isDomainValid("")); Assertions.assertFalse(Configuration.isDomainValid(" ")); Assertions.assertFalse(Configuration.isDomainValid(" a")); Assertions.assertTrue(Configuration.isDomainValid("www.projectforge.org")); Assertions.assertTrue(Configuration.isDomainValid("pf-acme.priv")); Assertions.assertFalse(Configuration.isDomainValid("pf-acme.priv-")); Assertions.assertFalse(Configuration.isDomainValid("-pf-acme.priv")); }
public static boolean isDomainValid(final String domain) { return StringUtils.isNotBlank(domain) && domain.matches("^[a-zA-Z]+[a-zA-Z0-9\\.\\-]*[a-zA-Z0-9]+$"); }
Configuration extends AbstractConfiguration { public static boolean isDomainValid(final String domain) { return StringUtils.isNotBlank(domain) && domain.matches("^[a-zA-Z]+[a-zA-Z0-9\\.\\-]*[a-zA-Z0-9]+$"); } }
Configuration extends AbstractConfiguration { public static boolean isDomainValid(final String domain) { return StringUtils.isNotBlank(domain) && domain.matches("^[a-zA-Z]+[a-zA-Z0-9\\.\\-]*[a-zA-Z0-9]+$"); } Configuration(ConfigurationService configurationService, final TenantDO tenant); }
Configuration extends AbstractConfiguration { public static boolean isDomainValid(final String domain) { return StringUtils.isNotBlank(domain) && domain.matches("^[a-zA-Z]+[a-zA-Z0-9\\.\\-]*[a-zA-Z0-9]+$"); } Configuration(ConfigurationService configurationService, final TenantDO tenant); static Configuration getInstance(); boolean isMebConfigured(); String getCalendarDomain(); boolean isCalendarDomainValid(); static boolean isDomainValid(final String domain); TimeZone getDefaultTimeZone(); String[] getDateFormats(); String getDefaultDateFormat(); String[] getExcelDateFormats(); String getDefaultExcelDateFormat(); }
Configuration extends AbstractConfiguration { public static boolean isDomainValid(final String domain) { return StringUtils.isNotBlank(domain) && domain.matches("^[a-zA-Z]+[a-zA-Z0-9\\.\\-]*[a-zA-Z0-9]+$"); } Configuration(ConfigurationService configurationService, final TenantDO tenant); static Configuration getInstance(); boolean isMebConfigured(); String getCalendarDomain(); boolean isCalendarDomainValid(); static boolean isDomainValid(final String domain); TimeZone getDefaultTimeZone(); String[] getDateFormats(); String getDefaultDateFormat(); String[] getExcelDateFormats(); String getDefaultExcelDateFormat();  }