/** * Implementation of the {@link Configurable Configurable} * interface. Configures this parser by delegating to the * underlying Configurable FTPTimestampParser implementation, ' * passing it the supplied {@link FTPClientConfig FTPClientConfig} * if that is non-null or a default configuration defined by * each concrete subclass. * * @param config the configuration to be used to configure this parser. * If it is null, a default configuration defined by * each concrete subclass is used instead. */ @Override public void configure(FTPClientConfig config) { if (this.timestampParser instanceof Configurable) { FTPClientConfig defaultCfg = getDefaultConfiguration(); if (config != null) { if (null == config.getDefaultDateFormatStr()) { config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr()); } if (null == config.getRecentDateFormatStr()) { config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr()); } ((Configurable)this.timestampParser).configure(config); } else { ((Configurable)this.timestampParser).configure(defaultCfg); } } }
setRecentDateFormat(recentFormatString, dfs); String defaultFormatString = config.getDefaultDateFormatStr(); if (defaultFormatString == null) { throw new IllegalArgumentException("defaultFormatString cannot be null");
/** * Implementation of the {@link Configurable Configurable} * interface. Configures this parser by delegating to the * underlying Configurable FTPTimestampParser implementation, ' * passing it the supplied {@link FTPClientConfig FTPClientConfig} * if that is non-null or a default configuration defined by * each concrete subclass. * </p> * @param config the configuration to be used to configure this parser. * If it is null, a default configuration defined by * each concrete subclass is used instead. */ public void configure(FTPClientConfig config) { if (this.timestampParser instanceof Configurable) { FTPClientConfig defaultCfg = getDefaultConfiguration(); if (config != null) { if (null == config.getDefaultDateFormatStr()) { config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr()); } if (null == config.getRecentDateFormatStr()) { config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr()); } ((Configurable)this.timestampParser).configure(config); } else { ((Configurable)this.timestampParser).configure(defaultCfg); } } }
/** * Implementation of the {@link Configurable Configurable} * interface. Configures this parser by delegating to the * underlying Configurable FTPTimestampParser implementation, ' * passing it the supplied {@link FTPClientConfig FTPClientConfig} * if that is non-null or a default configuration defined by * each concrete subclass. * </p> * @param config the configuration to be used to configure this parser. * If it is null, a default configuration defined by * each concrete subclass is used instead. */ public void configure(FTPClientConfig config) { if (this.timestampParser instanceof Configurable) { FTPClientConfig defaultCfg = getDefaultConfiguration(); if (config != null) { if (null == config.getDefaultDateFormatStr()) { config.setDefaultDateFormatStr(defaultCfg.getDefaultDateFormatStr()); } if (null == config.getRecentDateFormatStr()) { config.setRecentDateFormatStr(defaultCfg.getRecentDateFormatStr()); } ((Configurable)this.timestampParser).configure(config); } else { ((Configurable)this.timestampParser).configure(defaultCfg); } } }
String defaultFormatString = config.getDefaultDateFormatStr(); if (defaultFormatString == null) { throw new IllegalArgumentException("defaultFormatString cannot be null");
String defaultFormatString = config.getDefaultDateFormatStr(); if (defaultFormatString == null) { throw new IllegalArgumentException("defaultFormatString cannot be null");