Class RedditServicesConfiguration
java.lang.Object
io.github.yvasyliev.forwarder.telegram.reddit.configuration.RedditServicesConfiguration
@Configuration
@EnableConfigurationProperties({RedditProperties.class,RedditVideoDownloaderProperties.class})
public class RedditServicesConfiguration
extends Object
Configuration class for Reddit services.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates aRedditInstantPropertyServicebean if one is not already present in the context.redditPostForwarder(RedditInstantPropertyService redditInstantPropertyService, RedditClient redditClient, RedditProperties redditProperties, List<RedditPostSenderStrategy> redditPostSenderStrategies) Creates aPostForwarderbean for Reddit if one is not already present in the context.redditVideoDownloader(RedditVideoDownloaderProperties videoDownloaderProperties, RedditProperties redditProperties) Creates aRedditVideoDownloaderbean if one is not already present in the context.
-
Constructor Details
-
RedditServicesConfiguration
public RedditServicesConfiguration()
-
-
Method Details
-
redditPostForwarder
@Bean @ConditionalOnMissingBean(name="redditPostForwarder") public PostForwarder redditPostForwarder(RedditInstantPropertyService redditInstantPropertyService, RedditClient redditClient, RedditProperties redditProperties, List<RedditPostSenderStrategy> redditPostSenderStrategies) Creates aPostForwarderbean for Reddit if one is not already present in the context.- Parameters:
redditInstantPropertyService- the Reddit instant property serviceredditClient- the Reddit clientredditProperties- the Reddit propertiesredditPostSenderStrategies- the list of Reddit post sender strategies- Returns:
- a new instance of
RedditPostForwarder
-
redditInstantPropertyService
@Bean @ConditionalOnMissingBean public RedditInstantPropertyService redditInstantPropertyService(RedditInstantPropertyRepository repository) Creates aRedditInstantPropertyServicebean if one is not already present in the context.- Parameters:
repository- the Reddit instant property repository- Returns:
- a new instance of
RedditInstantPropertyService
-
redditVideoDownloader
@Bean @ConditionalOnMissingBean public RedditVideoDownloader redditVideoDownloader(RedditVideoDownloaderProperties videoDownloaderProperties, RedditProperties redditProperties) Creates aRedditVideoDownloaderbean if one is not already present in the context.- Parameters:
videoDownloaderProperties- the Reddit video downloader propertiesredditProperties- the Reddit properties- Returns:
- a new instance of
RedditVideoDownloader
-