@Override public IndexTemplate build() { if (name == null) { throw new ConfigurationException("No name provided for IndexTemplate"); } if ((path == null && source == null) || (path != null && source != null)) { throw new ConfigurationException("Either path or source have to be provided for IndexTemplate"); } return new IndexTemplate(name, loadSource()); }
@Override public IndexTemplate build() { if (name == null) { throw new ConfigurationException("No name provided for IndexTemplate"); } if ((path == null && source == null) || (path != null && source != null)) { throw new ConfigurationException("Either path or source have to be provided for IndexTemplate"); } return new IndexTemplate(name, loadSource()); }