/** * Constructs a {@link SystemDescriptor} instance. * * @param systemName name of this system * @param factoryClassName name of the SystemFactory class for this system * @param transformer the {@link InputTransformer} for the system if any, else null * @param expander the {@link StreamExpander} for the system if any, else null */ public SystemDescriptor(String systemName, String factoryClassName, InputTransformer transformer, StreamExpander expander) { Preconditions.checkArgument(isValidSystemName(systemName), String.format("systemName: %s must be non-empty and must not contain spaces or special characters.", systemName)); if (StringUtils.isBlank(factoryClassName)) { LOGGER.warn("Blank SystemFactory class name for system: {}. A value must be provided in configuration using {}.", systemName, String.format(FACTORY_CONFIG_KEY, systemName)); } this.systemName = systemName; this.factoryClassNameOptional = Optional.ofNullable(StringUtils.stripToNull(factoryClassName)); this.transformerOptional = Optional.ofNullable(transformer); this.expanderOptional = Optional.ofNullable(expander); }
/** * Constructs a {@link SystemDescriptor} instance. * * @param systemName name of this system * @param factoryClassName name of the SystemFactory class for this system * @param transformer the {@link InputTransformer} for the system if any, else null * @param expander the {@link StreamExpander} for the system if any, else null */ public SystemDescriptor(String systemName, String factoryClassName, InputTransformer transformer, StreamExpander expander) { Preconditions.checkArgument(isValidSystemName(systemName), String.format("systemName: %s must be non-empty and must not contain spaces or special characters.", systemName)); if (StringUtils.isBlank(factoryClassName)) { LOGGER.warn("Blank SystemFactory class name for system: {}. A value must be provided in configuration using {}.", systemName, String.format(FACTORY_CONFIG_KEY, systemName)); } this.systemName = systemName; this.factoryClassNameOptional = Optional.ofNullable(StringUtils.stripToNull(factoryClassName)); this.transformerOptional = Optional.ofNullable(transformer); this.expanderOptional = Optional.ofNullable(expander); }