mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
guicing up
This commit is contained in:
@@ -3,7 +3,10 @@ package com.commafeed.backend.opml;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import com.commafeed.backend.dao.FeedCategoryDAO;
|
||||
import com.commafeed.backend.dao.FeedSubscriptionDAO;
|
||||
@@ -14,7 +17,8 @@ import com.rometools.opml.feed.opml.Attribute;
|
||||
import com.rometools.opml.feed.opml.Opml;
|
||||
import com.rometools.opml.feed.opml.Outline;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor(onConstructor = @__({ @Inject }))
|
||||
@Singleton
|
||||
public class OPMLExporter {
|
||||
|
||||
private final FeedCategoryDAO feedCategoryDAO;
|
||||
|
||||
@@ -3,6 +3,10 @@ package com.commafeed.backend.opml;
|
||||
import java.io.StringReader;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -20,18 +24,13 @@ import com.rometools.opml.feed.opml.Outline;
|
||||
import com.rometools.rome.io.WireFeedInput;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor(onConstructor = @__({ @Inject }))
|
||||
@Singleton
|
||||
public class OPMLImporter {
|
||||
|
||||
private FeedCategoryDAO feedCategoryDAO;
|
||||
private FeedSubscriptionService feedSubscriptionService;
|
||||
private CacheService cache;
|
||||
|
||||
public OPMLImporter(FeedCategoryDAO feedCategoryDAO, FeedSubscriptionService feedSubscriptionService, CacheService cache) {
|
||||
super();
|
||||
this.feedCategoryDAO = feedCategoryDAO;
|
||||
this.feedSubscriptionService = feedSubscriptionService;
|
||||
this.cache = cache;
|
||||
}
|
||||
private final FeedCategoryDAO feedCategoryDAO;
|
||||
private final FeedSubscriptionService feedSubscriptionService;
|
||||
private final CacheService cache;
|
||||
|
||||
public void importOpml(User user, String xml) {
|
||||
xml = xml.substring(xml.indexOf('<'));
|
||||
|
||||
Reference in New Issue
Block a user