public void configure(Context context) throws ConfigurationException { failIfConfigured(); String confType = context.getString( BasicConfigurationConstants.CONFIG_TYPE); if (confType != null && !confType.isEmpty()) { this.type = confType; } // Type can be set by child class constructors, so check if it was. if (this.type == null || this.type.isEmpty()) { errors.add(new FlumeConfigurationError(componentName, BasicConfigurationConstants.CONFIG_TYPE, FlumeConfigurationErrorType.ATTRS_MISSING, ErrorOrWarning.ERROR)); throw new ConfigurationException( "Component has no type. Cannot configure. " + componentName); } }
public void configure(Context context) throws ConfigurationException { failIfConfigured(); String confType = context.getString( BasicConfigurationConstants.CONFIG_TYPE); if (confType != null && !confType.isEmpty()) { this.type = confType; } // Type can be set by child class constructors, so check if it was. if (this.type == null || this.type.isEmpty()) { errors.add(new FlumeConfigurationError(componentName, BasicConfigurationConstants.CONFIG_TYPE, FlumeConfigurationErrorType.ATTRS_MISSING, ErrorOrWarning.ERROR)); throw new ConfigurationException( "Component has no type. Cannot configure. " + componentName); } }