/** * 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); } } }
config.setRecentDateFormatStr(recentDateFormat);
config.setRecentDateFormatStr(recentDateFormat);
config.setRecentDateFormatStr(recentDateFormat);
if (recentDateFormat != null) config.setRecentDateFormatStr(recentDateFormat);
/** * 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); } } }
config.setRecentDateFormatStr(recentDateFormatConfig); task.log("custom config: recent date format = " + recentDateFormatConfig, Project.MSG_VERBOSE);
config.setRecentDateFormatStr(recentDateFormatConfig); task.log("custom config: recent date format = " + recentDateFormatConfig, Project.MSG_VERBOSE);
config.setRecentDateFormatStr(recentDateFormatConfig); task.log("custom config: recent date format = " + recentDateFormatConfig, Project.MSG_VERBOSE);
if (recentDateFormat != null) config.setRecentDateFormatStr(recentDateFormat);